From 124db1632945cd4e1091bc56a72bc9453669f778 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Sat, 8 Feb 2025 16:04:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=8F=90=E7=A4=BA=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=95=B0=E9=87=8F=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E3=80=81=E6=8F=92=E5=85=A5=E6=B6=88=E6=81=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9B=E5=A6=82=E6=9E=9C=E6=98=AF=E6=8A=95?= =?UTF-8?q?=E8=AF=89=E5=B9=B3=E5=8F=B0=E5=88=99=E8=B7=B3=E8=BF=87=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/message/controller/MessageController.java | 11 ++++++++++- .../message/controller/app/AppMessageController.java | 2 +- .../com/sqx/modules/message/entity/MessageInfo.java | 7 ++++++- .../message/service/impl/MessageServiceImpl.java | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/sqx/modules/message/controller/MessageController.java b/src/main/java/com/sqx/modules/message/controller/MessageController.java index 64386eb..f17e4f2 100644 --- a/src/main/java/com/sqx/modules/message/controller/MessageController.java +++ b/src/main/java/com/sqx/modules/message/controller/MessageController.java @@ -6,6 +6,7 @@ import com.sqx.common.utils.PageUtils; import com.sqx.common.utils.Result; import com.sqx.modules.message.entity.MessageInfo; import com.sqx.modules.message.service.MessageService; +import com.sqx.modules.shipinquan.entity.BlShipinquan; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -195,4 +196,12 @@ public class MessageController { return messageService.selectArtificerList(page, limit, artificerName, phone); } -} \ No newline at end of file + @GetMapping("/dataSelectXxzx") + @ApiOperation("获取消息中心未读数据") + public Result dataSelectXxzx(){ + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("state",2); + qw.and(q->q.isNull("is_see").or().eq("is_see",1)); + return Result.success().put("data",messageService.count(qw)); + } +} diff --git a/src/main/java/com/sqx/modules/message/controller/app/AppMessageController.java b/src/main/java/com/sqx/modules/message/controller/app/AppMessageController.java index d213b5e..2a92106 100644 --- a/src/main/java/com/sqx/modules/message/controller/app/AppMessageController.java +++ b/src/main/java/com/sqx/modules/message/controller/app/AppMessageController.java @@ -136,4 +136,4 @@ public class AppMessageController { } -} \ No newline at end of file +} diff --git a/src/main/java/com/sqx/modules/message/entity/MessageInfo.java b/src/main/java/com/sqx/modules/message/entity/MessageInfo.java index bae5d77..0bf7c5e 100644 --- a/src/main/java/com/sqx/modules/message/entity/MessageInfo.java +++ b/src/main/java/com/sqx/modules/message/entity/MessageInfo.java @@ -50,6 +50,7 @@ public class MessageInfo implements Serializable { /** * 分类 + * 2 消息 * 4 开通会员、取消会员 * 5 系统通知(系统通知、提现通知) * 6 举报 @@ -107,4 +108,8 @@ public class MessageInfo implements Serializable { public MessageInfo() {} -} \ No newline at end of file + //投诉类型时,记录被举报对象类型,技师:null,平台:PT + @TableField(exist = false) + private String obj; + +} diff --git a/src/main/java/com/sqx/modules/message/service/impl/MessageServiceImpl.java b/src/main/java/com/sqx/modules/message/service/impl/MessageServiceImpl.java index bf8ac57..fb5cf9b 100644 --- a/src/main/java/com/sqx/modules/message/service/impl/MessageServiceImpl.java +++ b/src/main/java/com/sqx/modules/message/service/impl/MessageServiceImpl.java @@ -61,7 +61,7 @@ public class MessageServiceImpl extends for(String id:ids.split(",")){ MessageInfo messageInfo = baseMapper.selectById(Long.parseLong(id)); if("0".equals(messageInfo.getType())){ - if(status==1){ + if(status==1 && !"-1".equals(messageInfo.getByUserId())){ Artificer artificer = artificerService.selectArtificerByUserId(Long.parseLong(messageInfo.getByUserId())); MessageInfo type = baseMapper.selectById(messageInfo.getTypeId()); BigDecimal subtract = artificer.getCreditScore().subtract(new BigDecimal(type.getContent())); @@ -132,7 +132,7 @@ public class MessageServiceImpl extends SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date now = new Date(); messageInfo.setCreateAt(sdf.format(now)); - if(StringUtils.isNotBlank(messageInfo.getState()) && "7".equals(messageInfo.getState())){ + if(StringUtils.isNotBlank(messageInfo.getState()) && "7".equals(messageInfo.getState()) && messageInfo.getObj() == null){ Risk risk=new Risk(); risk.setUserId(Long.parseLong(messageInfo.getByUserId())); risk.setContent("用户被举报:"+messageInfo.getContent());