|
@@ -1,6 +1,7 @@
|
|
|
package com.usky.system.service.impl;
|
|
|
|
|
|
|
|
|
+import com.google.gson.JsonObject;
|
|
|
import com.usky.common.core.bean.ApiResult;
|
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
|
import com.usky.iot.RemoteMceService;
|
|
@@ -62,12 +63,12 @@ public class SysNoticeServiceImpl extends AbstractCrudService<SysNoticeMapper, S
|
|
|
public int insertNotice(SysNotice notice)
|
|
|
{
|
|
|
int insertId = noticeMapper.insertNotice(notice);
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("infoTitle", notice.getNoticeTitle());
|
|
|
- map.put("infoContent",notice.getNoticeContent());
|
|
|
- map.put("infoType",1);
|
|
|
- map.put("id",insertId);
|
|
|
- ApiResult<Void> resultMce = remoteMceService.addMce(map.toString());
|
|
|
+ JsonObject jsonObject = new JsonObject();
|
|
|
+ jsonObject.addProperty("infoTitle", notice.getNoticeTitle());
|
|
|
+ jsonObject.addProperty("infoContent",notice.getNoticeContent());
|
|
|
+ jsonObject.addProperty("infoType",1);
|
|
|
+ jsonObject.addProperty("id",insertId);
|
|
|
+ ApiResult<Void> resultMce = remoteMceService.addMce(jsonObject.toString());
|
|
|
return insertId;
|
|
|
}
|
|
|
|