Commit 5d2fc4f0 by xmh

<feat> 分析数据添加任务名称字段

<feat> 修改返回信息为中文
<feat> ChannelController.add 修改返回信息
1 parent 713483d7
...@@ -30,19 +30,19 @@ public abstract class BaseController<O extends BaseModel, T extends VoInterface< ...@@ -30,19 +30,19 @@ public abstract class BaseController<O extends BaseModel, T extends VoInterface<
/** /**
* 通用message * 通用message
*/ */
public static final String MESSAGE_ADD_SUCCESS = "addSuccess"; public static final String MESSAGE_ADD_SUCCESS = "添加成功";
public static final String MESSAGE_ADD_ERROR = "addError"; public static final String MESSAGE_ADD_ERROR = "addError";
public static final String MESSAGE_UPDATE_SUCCESS = "updateSuccess"; public static final String MESSAGE_UPDATE_SUCCESS = "更新成功";
public static final String MESSAGE_UPDATE_ERROR = "updateError"; public static final String MESSAGE_UPDATE_ERROR = "updateError";
public static final String MESSAGE_DELETE_SUCCESS = "delSuccess"; public static final String MESSAGE_DELETE_SUCCESS = "删除成功";
public static final String MESSAGE_DELETE_ERROR = "delError"; public static final String MESSAGE_DELETE_ERROR = "delError";
public static final String MESSAGE_COUNT_SUCCESS = "countSuccess"; public static final String MESSAGE_COUNT_SUCCESS = "成功";
public static final String MESSAGE_COUNT_ERROR = "countError"; public static final String MESSAGE_COUNT_ERROR = "countError";
public static final String MESSAGE_SELECT_SUCCESS = "selSuccess"; public static final String MESSAGE_SELECT_SUCCESS = "成功";
public static final String MESSAGE_SELECT_ERROR = "selError"; public static final String MESSAGE_SELECT_ERROR = "selError";
public static final String MESSAGE_LIST_SUCCESS = "listSuccess"; public static final String MESSAGE_LIST_SUCCESS = "成功";
public static final String MESSAGE_LIST_ERROR = "listError"; public static final String MESSAGE_LIST_ERROR = "listError";
public static final String MESSAGE_PAGE_SUCCESS = "pageSuccess"; public static final String MESSAGE_PAGE_SUCCESS = "成功";
public static final String MESSAGE_PAGE_ERROR = "pageError"; public static final String MESSAGE_PAGE_ERROR = "pageError";
public static final String MESSAGE_WEBROOT_NOTFOUND_ERROR = "webRootNotFoundError"; public static final String MESSAGE_WEBROOT_NOTFOUND_ERROR = "webRootNotFoundError";
public static final String MESSAGE_FILE_UPLOAD_SUCCESS = "fileUploadSuccess"; public static final String MESSAGE_FILE_UPLOAD_SUCCESS = "fileUploadSuccess";
......
...@@ -35,6 +35,7 @@ public class TaskInfoProcessor implements ItemProcessor<JSONObject, JSONObject>, ...@@ -35,6 +35,7 @@ public class TaskInfoProcessor implements ItemProcessor<JSONObject, JSONObject>,
String channelUnid = task.getChannelUnid(); String channelUnid = task.getChannelUnid();
item.put("taskId", taskId); item.put("taskId", taskId);
item.put("vchan_refid", channelUnid); item.put("vchan_refid", channelUnid);
item.put("task_name", task.getName());
} }
return item; return item;
} }
......
...@@ -55,7 +55,7 @@ public class ChannelController extends ChannelBaseController { ...@@ -55,7 +55,7 @@ public class ChannelController extends ChannelBaseController {
Assert.notNull(channelVo.getType(), "类型不能为空"); Assert.notNull(channelVo.getType(), "类型不能为空");
try { try {
return channelService.add(channelVo); return JsonMessageUtil.getSuccessJsonMsg(channelService.add(channelVo));
} catch (DuplicateKeyException e) { } catch (DuplicateKeyException e) {
log.error("", e); log.error("", e);
return JsonMessageUtil.getErrorJsonMsg("设备编号或名称重复"); return JsonMessageUtil.getErrorJsonMsg("设备编号或名称重复");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!