mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-14 06:09:03 +08:00
♻️ Refactoring code. 统一消息插入时间规则,完全依靠数据库的时钟设置
This commit is contained in:
1 parent
59e11b0492
commit
a646f3599a
2 files changed
+3
-5
No files matched your search
+3
-3
@@ -66,7 +66,7 @@ public class WxFansMsgController {
|
||||
* @return R
|
||||
*/
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('mp_wxmsg_add')")
|
||||
@PreAuthorize("@pms.hasPermission('mp_wxfansmsg_add')")
|
||||
public R save(@RequestBody WxMsg wxMsg) {
|
||||
return wxMsgService.saveAndPushMsg(wxMsg);
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class WxFansMsgController {
|
||||
* @return R
|
||||
*/
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('mp_wxmsg_edit')")
|
||||
@PreAuthorize("@pms.hasPermission('mp_wxfansmsg_edit')")
|
||||
public R updateById(@RequestBody WxMsg wxMsg) {
|
||||
return R.ok(wxMsgService.updateById(wxMsg));
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class WxFansMsgController {
|
||||
* @return R
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
@PreAuthorize("@pms.hasPermission('mp_wxmsg_del')")
|
||||
@PreAuthorize("@pms.hasPermission('mp_wxfansmsg_del')")
|
||||
public R removeById(@PathVariable String id) {
|
||||
return R.ok(wxMsgService.removeById(id));
|
||||
}
|
||||
|
||||
-2
@@ -25,7 +25,6 @@ import me.chanjar.weixin.mp.bean.message.WxMpXmlOutNewsMessage;
|
||||
import me.chanjar.weixin.mp.builder.outxml.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -117,7 +116,6 @@ public class MsgHandler extends AbstractHandler {
|
||||
wxMsg.setWxUserId(fans.getId());
|
||||
wxMsg.setNickName(fans.getNickname());
|
||||
wxMsg.setHeadimgUrl(fans.getHeadimgUrl());
|
||||
wxMsg.setCreateTime(LocalDateTime.now());
|
||||
wxMsg.setType(MsgTypeEnum.MP2USER.getType());
|
||||
wxMsg.setRepType(wxAutoReply.getRepType());
|
||||
wxMsg.setOpenId(fans.getOpenid());
|
||||
|
||||
Reference in new issue
Block a user