|
@@ -65,7 +65,15 @@ public class PostCollectionsController extends BaseController
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody PostCollectionsVo postCollectionsVo)
|
|
|
{
|
|
|
-
|
|
|
+ //截止时间早于起售时间,套系售卖截止时间早于创建时间
|
|
|
+ if (postCollectionsVo.getStartTime().after(postCollectionsVo.getEndTime())||
|
|
|
+ postCollectionsVo.getEndTime().before(DateUtils.getNowDate())){
|
|
|
+ return warn("请设置正确的套系时间");
|
|
|
+ }
|
|
|
+ //判断套系名称是否重复
|
|
|
+ if (postCollectionsService.selectPostCollectionsByName(postCollectionsVo) > 0){
|
|
|
+ return warn("该套系名称已存在");
|
|
|
+ }
|
|
|
return toAjax(postCollectionsService.insertPostCollections(postCollectionsVo));
|
|
|
}
|
|
|
|