Commit 78285fac authored by 李灿灿's avatar 李灿灿

feat:保单号对应起止保时间接口调试

parent f9980150
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.checkerframework.common.value.qual.IntVal;
import org.checkerframework.common.value.qual.StringVal;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
......@@ -37,15 +36,15 @@ public class InsurancePolicyListEditParam implements Serializable {
* 保单开始时间
*/
@Schema(description = "保单开始时间")
@NotBlank(message = "保单开始时间不能为空")
private String policyStart;
@NotNull(message = "保单开始时间不能为空")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
@NotBlank(message = "保单结束时间不能为空")
private String policyEnd;
@NotNull(message = "保单结束时间不能为空")
private LocalDate policyEnd;
/**
* 保险公司名称
......
......@@ -16,6 +16,7 @@ import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
/**
......@@ -81,7 +82,7 @@ public class TInsurancePolicyController {
*/
@Operation(summary = "修改保单号对应起止保时间", description = "修改保单号对应起止保时间)")
@PostMapping("/update")
public R update(@RequestBody InsurancePolicyListEditParam param) {
public R update(@RequestBody @Valid InsurancePolicyListEditParam param) {
return tInsurancePolicyService.updateInsurancePolicy(param);
}
......
......@@ -128,10 +128,10 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
if (!Optional.ofNullable(tInsurancePolicy).isPresent()){
return R.failed("数据不存在");
}
BeanCopyUtils.copyProperties(param,tInsurancePolicy);
updateById(tInsurancePolicy);
//操作日志
tBusinessOperateService.saveModificationRecord(param.getId(),tInsurancePolicy,param,null);
BeanCopyUtils.copyProperties(param,tInsurancePolicy);
updateById(tInsurancePolicy);
return R.ok();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment