master:档口认证更新调整;
parent
bb12bf2ce8
commit
8d8384d36d
|
|
@ -28,6 +28,9 @@ public class StoreCertUpdateVO {
|
|||
@ApiModelProperty(value = "档口ID", required = true)
|
||||
@NotNull(message = "档口ID不能为空!")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口认证ID")
|
||||
@NotNull(message = "档口认证ID不能为空!")
|
||||
private Long storeCertId;
|
||||
@Valid
|
||||
@ApiModelProperty(value = "档口认证信息", required = true)
|
||||
@NotNull(message = "档口认证信息不能为空!")
|
||||
|
|
@ -69,8 +72,6 @@ public class StoreCertUpdateVO {
|
|||
@Data
|
||||
@ApiModel
|
||||
public static class SCStoreCertVO {
|
||||
@ApiModelProperty(value = "档口认证ID(新增时不传,编辑必传)")
|
||||
private Long storeCertId;
|
||||
@ApiModelProperty(value = "真实姓名", required = true)
|
||||
@NotBlank(message = "真实姓名不能为空")
|
||||
@Size(min = 0, max = 30, message = "真实姓名长度必须在1到30个字之间")
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public class StoreCertDTO {
|
|||
|
||||
@ApiModelProperty(value = "档口ID", required = true)
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口认证ID(新增时不传,编辑必传)")
|
||||
private Long storeCertId;
|
||||
@ApiModelProperty(value = "档口认证信息", required = true)
|
||||
private SCStoreCertDTO storeCert;
|
||||
@ApiModelProperty(value = "档口基础信息", required = true)
|
||||
|
|
@ -52,8 +54,6 @@ public class StoreCertDTO {
|
|||
|
||||
@Data
|
||||
public static class SCStoreCertDTO {
|
||||
@ApiModelProperty(value = "档口认证ID(新增时不传,编辑必传)")
|
||||
private Long storeCertId;
|
||||
@ApiModelProperty(value = "真实姓名", required = true)
|
||||
private String realName;
|
||||
@ApiModelProperty(value = "联系电话", required = true)
|
||||
|
|
|
|||
|
|
@ -120,10 +120,8 @@ public class StoreCertificateServiceImpl implements IStoreCertificateService {
|
|||
@Override
|
||||
@Transactional
|
||||
public Integer update(StoreCertDTO certDTO) {
|
||||
// 档口认证ID不能为空
|
||||
Optional.ofNullable(certDTO.getStoreCert().getStoreCertId()).orElseThrow(() -> new ServiceException("档口认证ID不能为空!", HttpStatus.ERROR));
|
||||
StoreCertificate storeCert = Optional.ofNullable(this.storeCertMapper.selectOne(new LambdaQueryWrapper<StoreCertificate>()
|
||||
.eq(StoreCertificate::getId, certDTO.getStoreCert().getStoreCertId()).eq(StoreCertificate::getDelFlag, Constants.UNDELETED)
|
||||
.eq(StoreCertificate::getId, certDTO.getStoreCertId()).eq(StoreCertificate::getDelFlag, Constants.UNDELETED)
|
||||
.eq(StoreCertificate::getStoreId, certDTO.getStoreId())))
|
||||
.orElseThrow(() -> new ServiceException("档口认证不存在!", HttpStatus.ERROR));
|
||||
// 先将旧的档口认证相关文件置为无效
|
||||
|
|
|
|||
Loading…
Reference in New Issue