|
|
@@ -6,9 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
import shop.alien.entity.result.R;
|
|
|
import shop.alien.entity.store.LawyerExpertiseArea;
|
|
|
import shop.alien.lawyer.service.LawyerExpertiseAreaService;
|
|
|
@@ -39,7 +39,7 @@ public class LawyerExpertiseAreaServiceImpl extends ServiceImpl<LawyerExpertiseA
|
|
|
Page<LawyerExpertiseArea> page = new Page<>(pageNum, pageSize);
|
|
|
LambdaQueryWrapper<LawyerExpertiseArea> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(LawyerExpertiseArea::getDeleteFlag, 0);
|
|
|
- if (StringUtils.hasText(expertiseAreaInfo)) {
|
|
|
+ if (StringUtils.isNotBlank(expertiseAreaInfo)) {
|
|
|
queryWrapper.like(LawyerExpertiseArea::getExpertiseAreaInfo, expertiseAreaInfo);
|
|
|
}
|
|
|
queryWrapper.orderByDesc(LawyerExpertiseArea::getCreatedTime);
|
|
|
@@ -56,6 +56,11 @@ public class LawyerExpertiseAreaServiceImpl extends ServiceImpl<LawyerExpertiseA
|
|
|
log.warn("新增领域信息失败:参数为空");
|
|
|
return R.fail("参数不能为空");
|
|
|
}
|
|
|
+ // 参数校验
|
|
|
+ if (StringUtils.isBlank(expertiseArea.getExpertiseAreaInfo())) {
|
|
|
+ log.warn("新增领域信息失败:领域名称为空");
|
|
|
+ return R.fail("领域名称不能为空");
|
|
|
+ }
|
|
|
|
|
|
// 设置默认值
|
|
|
if (expertiseArea.getDeleteFlag() == null) {
|