Commit 419def2d by 陶光胜

通知详情修改

parent 9188d7ee
......@@ -51,6 +51,6 @@ public class HelpCenterServiceImpl implements HelpCenterService {
@Override
public Integer countHelpCenterByIsShow() {
return null;
return listHelpCenter().size();
}
}
......@@ -6,6 +6,7 @@ import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.dto.HelpCenterDTO;
import com.gic.enterprise.entity.TabHelpCenter;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.HelpCenterApiService;
import com.gic.enterprise.service.HelpCenterService;
import com.github.pagehelper.PageHelper;
......@@ -38,6 +39,12 @@ public class HelpCenterApiServiceImpl implements HelpCenterApiService {
tabHelpCenter.setIsShow(0);
}
}
if(tabHelpCenter.getIsShow() == 1){
Integer integer = this.helpCenterService.countHelpCenterByIsShow();
if(integer >=5){
return ServiceResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), "显示数量超过5个了");
}
}
Integer i = this.helpCenterService.saveHelpCenter(tabHelpCenter);
return ServiceResponse.success(i);
}
......
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