增加字段必填校验

This commit is contained in:
shuo.wang
2025-04-13 14:08:28 +08:00
parent d2202fbc5c
commit e123987f3e
3 changed files with 17 additions and 1 deletions

View File

@@ -85,6 +85,7 @@ public class AddPointDetailRequest {
private String landlordUsername; private String landlordUsername;
@ApiModelProperty("房东电话") @ApiModelProperty("房东电话")
@NotBlank(message = "房东电话不能为空")
private String landlordMobile; private String landlordMobile;
@Min(1) @Min(1)

View File

@@ -302,6 +302,9 @@ public class PointServiceImpl implements PointService {
log.error("铺位详细信息不存在"); log.error("铺位详细信息不存在");
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
} }
if (!checkIsAudit(pointInfo,pointDetailInfo)) {
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
}
//处理子任务审核记录表 //处理子任务审核记录表
AuditSettingVO auditSetting = getAuditSetting(); AuditSettingVO auditSetting = getAuditSetting();
if (Objects.isNull(auditSetting)) { if (Objects.isNull(auditSetting)) {
@@ -328,7 +331,17 @@ public class PointServiceImpl implements PointService {
dealNextAuditRecord(pointInfo, pointAuditRecordMap, NodeNoEnum.NODE_NO_0.getCode()); dealNextAuditRecord(pointInfo, pointAuditRecordMap, NodeNoEnum.NODE_NO_0.getCode());
return pointInfoDAO.updatePointInfo(updatePoint); return pointInfoDAO.updatePointInfo(updatePoint);
} }
private Boolean checkIsAudit(PointInfoDO pointInfo,PointDetailInfoDO pointDetailInfoDO){
if (StringUtils.isAnyBlank(pointInfo.getPointArea(),pointInfo.getLatitude(),
pointInfo.getLongitude(),pointInfo.getAddress(),pointInfo.getProvince(),pointInfo.getCity(),
pointInfo.getDistrict(),pointInfo.getTownship(),pointInfo.getOpportunityPointCode(),pointInfo.getOpportunityPointName()
,pointInfo.getProvinceCode(),pointInfo.getCityCode(),pointInfo.getDistrictCode(),pointDetailInfoDO.getMonthRent()
,pointDetailInfoDO.getLandlordMobile())){
return false;
}
return true;
}
@Override @Override
public Integer auditSetting(AuditSettingRequest request) { public Integer auditSetting(AuditSettingRequest request) {
String cacheKey = MessageFormat.format(AUDIT_SETTING_KEY, enterpriseId); String cacheKey = MessageFormat.format(AUDIT_SETTING_KEY, enterpriseId);

View File

@@ -1,6 +1,7 @@
package com.cool.store.controller.webb; package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.XgjOrganizationDTO;
import com.cool.store.enums.OrderSysTypeEnum; import com.cool.store.enums.OrderSysTypeEnum;
import com.cool.store.request.OrderSysInfoRequest; import com.cool.store.request.OrderSysInfoRequest;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
@@ -12,6 +13,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* @Author: WangShuo * @Author: WangShuo
@@ -45,7 +47,7 @@ public class PCOrderSysInfoController {
@GetMapping("/getXgjOrganization") @GetMapping("/getXgjOrganization")
@ApiOperation("获取新管家组织架构") @ApiOperation("获取新管家组织架构")
public ResponseResult<Object> getXgjOrganization(@RequestParam(value = "partnerId", required = true,defaultValue = "0") String partnerId) { public ResponseResult<List<XgjOrganizationDTO>> getXgjOrganization(@RequestParam(value = "partnerId", required = true,defaultValue = "0") String partnerId) {
return ResponseResult.success(pushService.getXgjOrganization(partnerId)); return ResponseResult.success(pushService.getXgjOrganization(partnerId));
} }