Browse Source

Merge branch 'dev_personal_center' into dev_temp

dev_shibei_match
liushaowen 5 years ago
parent
commit
c9ed536938
  1. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java

6
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java

@ -119,8 +119,10 @@ public class UserAdviceController {
@PostMapping("advicelist")
public Result<PageData<AdviceListResultDTO>> adviceList(AdviceListFormDTO dto){
ValidatorUtils.validateEntity(dto);
if (dto.getStartTime().after(dto.getEndTime())){
throw new RenException("开始时间不能大于结束时间");
if (dto.getStartTime()!=null && dto.getEndTime()!=null){
if (dto.getStartTime().after(dto.getEndTime())){
throw new RenException("开始时间不能大于结束时间");
}
}
PageData<AdviceListResultDTO> page = userAdviceService.adviceList(dto);
return new Result<PageData<AdviceListResultDTO>>().ok(page);

Loading…
Cancel
Save