wanghui лет назад: 8
Родитель
Сommit
0a16ca40e3
1 измененных файлов с 16 добавлено и 16 удалено
  1. 16 16
      src/main/java/com/goafanti/admin/controller/AdminMessageController.java

+ 16 - 16
src/main/java/com/goafanti/admin/controller/AdminMessageController.java

@@ -68,19 +68,19 @@ public class AdminMessageController extends CertifyApiController{
 			String roles,String industryIds,String title,String body,Integer subject,Integer targetType,String createTime,Integer isDraft) throws ParseException{
 		Result res = new Result();
 		if(null == targetType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定人员类型"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定人员类型"));
 			return res;
 		}
 		if(null == subject){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定消息类型"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定消息类型"));
 			return res;
 		}
 		if(StringUtils.isBlank(title) || StringUtils.isBlank(body)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息是的标题和内容不能为空"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是的标题和内容不能为空"));
 			return res;
 		}
 		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"必须说明是否为草稿"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须说明是否为草稿"));
 			return res;
 		}
 		checkParam(userIds,adminIds,companyIds,societyTags,provinceIds,cityIds,areaIds,roles,industryIds);
@@ -98,7 +98,7 @@ public class AdminMessageController extends CertifyApiController{
 		if(targetType == ConsumerType.ROLE.getTypeCode()) targetMap.put(targetType, roles);
 		if(targetType == ConsumerType.INDUSTRY.getTypeCode()) targetMap.put(targetType, industryIds);
 		if(StringUtils.isBlank(targetMap.get(targetType))){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须选定目标群体"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须选定目标群体"));
 			return res;
 		}
 		messageServiceImpl.insertSystemMessage(targetMap,targetType, title, body, subject,
@@ -131,15 +131,15 @@ public class AdminMessageController extends CertifyApiController{
 			String userIds,String societyTags,String provinceIds,String cityIds,String areaIds,String industryIds,Integer targetType,Integer isDraft){
 		Result res = new Result();
 		if(null == sourceType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定推荐类型"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定推荐类型"));
 			return res;
 		}
 		if(null == targetType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"必须制定目标群体"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定目标群体"));
 			return res;
 		}
 		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"必须说明是否为草稿"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须说明是否为草稿"));
 			return res;
 		}
 		checkParam(projectIds,projectIds,personalAchievementIds,organizationAchievementIds,personalDemandIds,organizationDemandIds,
@@ -153,7 +153,7 @@ public class AdminMessageController extends CertifyApiController{
 		if(sourceType == RecommendType.EXPERT.getTypeCode()) sourceMap.put(sourceType, expertIds);
 		if(sourceType == RecommendType.NEWS.getTypeCode()) sourceMap.put(sourceType, newsIds);
 		if(StringUtils.isBlank(sourceMap.get(targetType))){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须选定推荐内容"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须选定推荐内容"));
 			return res;
 		}
 		Map<Integer,String> targetMap = new HashMap<Integer, String>();
@@ -167,7 +167,7 @@ public class AdminMessageController extends CertifyApiController{
 		}
 		if(targetType == ConsumerType.INDUSTRY.getTypeCode()) targetMap.put(targetType, industryIds);
 		if(StringUtils.isBlank(targetMap.get(targetType))){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定目标群体"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定目标群体"));
 			return res;
 		}
 		messageServiceImpl.insertRecommendMessage(sourceMap,sourceType,targetMap,targetType,SubjectType.TUI_JIAN.getTypeCode(),isDraft);
@@ -185,7 +185,7 @@ public class AdminMessageController extends CertifyApiController{
 	public Result listSystemMessage(Integer isDraft,Integer subject,Integer page,Integer pageNo,Integer pageSize){
 		Result res = new Result();
 		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息发送状态不能未空"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息发送状态不能为空"));
 			return res;
 		}
 		/*if(null == subject){
@@ -207,15 +207,15 @@ public class AdminMessageController extends CertifyApiController{
 	public Result updateSystemMessage(String messageId,String title,String body,Integer isDraft){
 		Result res = new Result();
 		if(StringUtils.isBlank(messageId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息编号不能为空"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号不能为空"));
 			return res;
 		}
 		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息发送状态不能未空"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息发送状态不能为空"));
 			return res;
 		}
 		if(StringUtils.isBlank(title) || StringUtils.isBlank(body)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息标题和消息内容不能为空"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息标题和消息内容不能为空"));
 			return res;
 		}
 		messageServiceImpl.updateSystemMessage(messageId, title, body, isDraft);
@@ -231,7 +231,7 @@ public class AdminMessageController extends CertifyApiController{
 	public Result deleteSystemMessage(String messageId){
 		Result res = new Result();
 		if(StringUtils.isBlank(messageId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息编号为空"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号为空"));
 			return res;
 		}
 		messageServiceImpl.deleteSystemMessage(messageId);
@@ -247,7 +247,7 @@ public class AdminMessageController extends CertifyApiController{
 	public Result getSystemMessageDetail(String messageId){
 		Result res = new Result();
 		if(StringUtils.isBlank(messageId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息编号为空"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号为空"));
 			return res;
 		}
 		// 读取消息详情