From bd64c3a16fb1d3666b9ff00543e2a4af9b333994 Mon Sep 17 00:00:00 2001 From: hu177768073 <177768073@qq.com> Date: Mon, 23 Dec 2024 11:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hfkj/controller/MessageController.java | 4 ++-- .../com/hfkj/controller/TestController.java | 23 +++++++++++++++++-- .../impl/BsMessageReadServiceImpl.java | 2 +- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/cweb/src/main/java/com/hfkj/controller/MessageController.java b/cweb/src/main/java/com/hfkj/controller/MessageController.java index 4569034..d343661 100644 --- a/cweb/src/main/java/com/hfkj/controller/MessageController.java +++ b/cweb/src/main/java/com/hfkj/controller/MessageController.java @@ -63,7 +63,7 @@ public class MessageController { Map param = new HashMap<>(); param.put("userId", userSession.getUser().getId()); - param.put("status", MessageStatusEnum.status2.getStatus()); + param.put("msgStatus", MessageStatusEnum.status2.getStatus()); param.put("type", type); PageHelper.startPage(pageNum,pageSize); @@ -85,7 +85,7 @@ public class MessageController { for (MessageTypeEnum type : MessageTypeEnum.values()) { Map param = new HashMap<>(); param.put("userId", userSession.getUser().getId()); - param.put("status", MessageStatusEnum.status2.getStatus()); + param.put("msgStatus", MessageStatusEnum.status2.getStatus()); param.put("type", type.getType()); param.put("readStatus", 0); List> list = messageService.getUserMsgList(param); diff --git a/cweb/src/main/java/com/hfkj/controller/TestController.java b/cweb/src/main/java/com/hfkj/controller/TestController.java index 2dcc4ef..eeedce2 100644 --- a/cweb/src/main/java/com/hfkj/controller/TestController.java +++ b/cweb/src/main/java/com/hfkj/controller/TestController.java @@ -51,12 +51,13 @@ public class TestController { @Resource private BsUserService bsUserService; + @Resource + private BsUserContributeService userContributeService; @RequestMapping(value="/getPublisherInfo",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "淘宝客-公用-私域用户备案") - public ResponseData getPublisherInfo(@RequestParam(value = "code" , required = false) String code - ) { + public ResponseData getPublisherInfo(@RequestParam(value = "code" , required = false) String code) { try { // 用户session UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); @@ -78,7 +79,25 @@ public class TestController { } } + @RequestMapping(value="/purchase",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "会员贡献测试") + public ResponseData purchase(@RequestParam(value = "rebate" , required = true) BigDecimal rebate, + @RequestParam(value = "userId" , required = true) Long userId) { + try { + + Map otherParam = new HashMap<>(); + otherParam.put("sourceId", System.currentTimeMillis()); + otherParam.put("sourceOrderNo", System.currentTimeMillis()); + userContributeService.purchase(rebate, userId, otherParam); + + return ResponseMsgUtil.success("操作成功"); + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } } diff --git a/service/src/main/java/com/hfkj/service/message/impl/BsMessageReadServiceImpl.java b/service/src/main/java/com/hfkj/service/message/impl/BsMessageReadServiceImpl.java index 231e1dd..002f541 100644 --- a/service/src/main/java/com/hfkj/service/message/impl/BsMessageReadServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/message/impl/BsMessageReadServiceImpl.java @@ -54,7 +54,7 @@ public class BsMessageReadServiceImpl implements BsMessageReadService { Map param = new HashMap<>(); param.put("userId", userId); param.put("type", messageType.getType()); - param.put("status", MessageStatusEnum.status2.getStatus()); + param.put("msgStatus", MessageStatusEnum.status2.getStatus()); // 未读 param.put("readStatus", 0);