修复消息发布失败问题

master
toesbieya 6 years ago
parent 4e0c9636a7
commit 3adbf2bd87
  1. 4
      java/cloud/web/web-modules/message/src/main/java/cn/toesbieya/jxc/message/service/MsgManageService.java
  2. 4
      java/local/src/main/java/com/toesbieya/my/service/MsgService.java
  3. 2
      java/local/src/main/resources/mapper/Msg.xml

@ -46,7 +46,7 @@ public class MsgManageService {
@UserAction("'添加消息:'+#msg.title") @UserAction("'添加消息:'+#msg.title")
public Result add(Msg msg) { public Result add(Msg msg) {
msg.setId(msgMapper.insert(msg)); msgMapper.insert(msg);
return Result.success("添加成功", msg); return Result.success("添加成功", msg);
} }
@ -103,7 +103,7 @@ public class MsgManageService {
} }
} }
} }
else result.setMsg("发布失败," + result.getMsg()); else result.setMsg("发布失败,请刷新重试");
return result; return result;
} }

@ -37,7 +37,7 @@ public class MsgService {
@UserAction("'添加消息:'+#msg.title") @UserAction("'添加消息:'+#msg.title")
public Result add(Msg msg) { public Result add(Msg msg) {
msg.setId(msgMapper.insert(msg)); msgMapper.insert(msg);
return Result.success("添加成功", msg); return Result.success("添加成功", msg);
} }
@ -77,7 +77,7 @@ public class MsgService {
} }
} }
} }
else result.setMsg("发布失败," + result.getMsg()); else result.setMsg("发布失败,请刷新重试");
return result; return result;
} }

@ -23,7 +23,7 @@
and id not in (select mid from msg_state where uid = #{uid}) and id not in (select mid from msg_state where uid = #{uid})
</sql> </sql>
<insert id="insert" parameterType="com.toesbieya.my.model.entity.Msg"> <insert id="insert" parameterType="com.toesbieya.my.model.entity.Msg" useGeneratedKeys="true" keyProperty="id">
insert into msg (title, content, type, cid, cname, ctime, insert into msg (title, content, type, cid, cname, ctime,
pid, pname, ptime, wid, wname, wtime, status, broadcast, recipient) pid, pname, ptime, wid, wname, wtime, status, broadcast, recipient)
values (#{title}, #{content}, #{type}, #{cid}, #{cname}, #{ctime}, #{pid}, values (#{title}, #{content}, #{type}, #{cid}, #{cname}, #{ctime}, #{pid},

Loading…
Cancel
Save