消息管理
This commit is contained in:
24
docs/databases/tables_modify.sql
Normal file
24
docs/databases/tables_modify.sql
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
alter table sms_home_new_product add `original_price` decimal(10,2) DEFAULT NULL COMMENT '市场价';
|
||||||
|
alter table sms_home_recommend_product add `original_price` decimal(10,2) DEFAULT NULL COMMENT '市场价';
|
||||||
|
|
||||||
|
update sms_home_new_product shnp set
|
||||||
|
original_price=(select pp.original_price from pms_product pp where pp.id=shnp.product_id limit 1),
|
||||||
|
price=(select pp.price from pms_product pp where pp.id=shnp.product_id limit 1)
|
||||||
|
|
||||||
|
update sms_home_recommend_product shnp set
|
||||||
|
original_price=(select pp.original_price from pms_product pp where pp.id=shnp.product_id limit 1),
|
||||||
|
price=(select pp.price from pms_product pp where pp.id=shnp.product_id limit 1)
|
||||||
|
|
||||||
|
|
||||||
|
select * from sys_message
|
||||||
|
|
||||||
|
delete from sys_message where 1=1
|
||||||
|
|
||||||
|
insert into sys_message values
|
||||||
|
(1,340,'交易物流','您有新的物流信息','您的订单商品已经到取货点,请在7日内取出。',now(),now(),0,1),
|
||||||
|
(2,340,'云链助手','该施肥了','春天已经至,已到施肥时间。。',now(),now(),0,1),
|
||||||
|
(3,341,'交易物流','您有新的物流信息','您的订单商品已经到取货点,请在7日内取出。',now(),now(),0,1),
|
||||||
|
(4,341,'云链助手','该施肥了','春天已经至,已到施肥时间。。',now(),now(),0,1);
|
||||||
|
|
||||||
|
SELECT id,user_id,code,params,content,ctime,utime,status FROM sys_message WHERE user_id = 341 ORDER BY ctime desc
|
||||||
BIN
docs/images/微信图片_20230220120104.jpg
Normal file
BIN
docs/images/微信图片_20230220120104.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 136 KiB |
17
docs/xiugai/wx20230220.txt
Normal file
17
docs/xiugai/wx20230220.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
云链需要修改和完善的内容:
|
||||||
|
1。消息通知功能需要实现;
|
||||||
|
2。后台管理的菜单需要调整,顺序、菜单名称、需要隐藏的都需要调整;
|
||||||
|
3。收货地址(提货点)功能需要实现;
|
||||||
|
4。定时任务功能,可发送定时消息通知。
|
||||||
|
|
||||||
|
问题(2023-02-21)
|
||||||
|
1. APP升级功能
|
||||||
|
2. 后台管理,去掉商户入住,绑定社区
|
||||||
|
3. APP上新增收货地址,新增完后显示错误。
|
||||||
|
4. APP上收藏功能不可用
|
||||||
|
5. APP上注册成功后,需要有提示
|
||||||
|
6. APP注册成功后,直接登录,登录后跳转到登录之前的页面。
|
||||||
|
7. 优惠券领取后,应该不再显示该优惠券
|
||||||
|
8. 优惠券是否可针对某个商品或针对会员可领取
|
||||||
|
9. APP短信验证(注册、登录)
|
||||||
|
10.支付宝付款、微信付款功能
|
||||||
@@ -45,4 +45,10 @@ public class SmsHomeNewProduct extends BaseEntity implements Serializable {
|
|||||||
private String pic;
|
private String pic;
|
||||||
|
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市场价
|
||||||
|
*/
|
||||||
|
@TableField("original_price")
|
||||||
|
private BigDecimal originalPrice;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,5 +43,10 @@ public class SmsHomeRecommendProduct extends BaseEntity implements Serializable
|
|||||||
private String pic;
|
private String pic;
|
||||||
|
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 市场价
|
||||||
|
*/
|
||||||
|
@TableField("original_price")
|
||||||
|
private BigDecimal originalPrice;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package com.zscat.mallplus.ums.entity;
|
package com.zscat.mallplus.ums.entity;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -57,7 +59,28 @@ public class SysMessage implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 1未查看,2已查看
|
* 1未查看,2已查看
|
||||||
*/
|
*/
|
||||||
private Boolean status;
|
private Boolean status = false;
|
||||||
|
|
||||||
|
public String getCdate() {
|
||||||
|
cdate = "";
|
||||||
|
if (ctime != null && ctime > 0) {
|
||||||
|
cdate = DateUtil.format(new Date(ctime), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
return cdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUdate() {
|
||||||
|
udate = "";
|
||||||
|
if (utime != null && utime > 0) {
|
||||||
|
udate = DateUtil.format(new Date(utime), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
return udate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String cdate;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String udate;
|
||||||
|
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.zscat.mallplus.apirest;
|
||||||
|
|
||||||
|
import com.zscat.mallplus.oms.entity.OmsCartItem;
|
||||||
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
import com.zscat.mallplus.ums.entity.UmsMember;
|
||||||
|
import com.zscat.mallplus.ums.service.ISysMessageService;
|
||||||
|
import com.zscat.mallplus.ums.service.IUmsMemberService;
|
||||||
|
import com.zscat.mallplus.utils.CommonResult;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "SysMessageRest", description = "系统消息")
|
||||||
|
@RequestMapping("/api/sys/message")
|
||||||
|
public class SysMessageRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IUmsMemberService memberService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysMessageService messageService;
|
||||||
|
|
||||||
|
@ApiOperation("获取某个会员的消息列表")
|
||||||
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public Object list() {
|
||||||
|
UmsMember umsMember = memberService.getNewCurrentMember();
|
||||||
|
List<SysMessage> list = new ArrayList<>();
|
||||||
|
if (umsMember != null && umsMember.getId() != null) {
|
||||||
|
list = messageService.listByUserId(umsMember.getId());
|
||||||
|
return new CommonResult().success(list);
|
||||||
|
}
|
||||||
|
return new CommonResult().success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取消息内容")
|
||||||
|
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public Object info(@RequestParam(value = "id", required = false, defaultValue = "0") Long id) {
|
||||||
|
SysMessage mes = messageService.getById(id);
|
||||||
|
if (mes != null && !mes.getStatus()) {
|
||||||
|
mes.setStatus(true);
|
||||||
|
messageService.updateStatus(mes);
|
||||||
|
}
|
||||||
|
return new CommonResult().success(mes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("更新")
|
||||||
|
@RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public Object updateStatus(@RequestBody SysMessage sysMessage) {
|
||||||
|
int count = messageService.updateStatus(sysMessage);
|
||||||
|
if (count > 0) {
|
||||||
|
return new CommonResult().success(count);
|
||||||
|
}
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,8 @@ package com.zscat.mallplus.ums.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zscat.mallplus.ums.entity.SysMessage;
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 站内信 服务类
|
* 站内信 服务类
|
||||||
@@ -13,4 +15,7 @@ import com.zscat.mallplus.ums.entity.SysMessage;
|
|||||||
*/
|
*/
|
||||||
public interface ISysMessageService extends IService<SysMessage> {
|
public interface ISysMessageService extends IService<SysMessage> {
|
||||||
|
|
||||||
|
List<SysMessage> listByUserId(Long userId);
|
||||||
|
|
||||||
|
int updateStatus(SysMessage sysMessage);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package com.zscat.mallplus.ums.service.impl;
|
package com.zscat.mallplus.ums.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zscat.mallplus.ums.entity.SysMessage;
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
import com.zscat.mallplus.ums.mapper.SysMessageMapper;
|
import com.zscat.mallplus.ums.mapper.SysMessageMapper;
|
||||||
import com.zscat.mallplus.ums.service.ISysMessageService;
|
import com.zscat.mallplus.ums.service.ISysMessageService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 站内信 服务实现类
|
* 站内信 服务实现类
|
||||||
@@ -17,4 +20,18 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class SysMessageServiceImpl extends ServiceImpl<SysMessageMapper, SysMessage> implements ISysMessageService {
|
public class SysMessageServiceImpl extends ServiceImpl<SysMessageMapper, SysMessage> implements ISysMessageService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysMessage> listByUserId(Long userId) {
|
||||||
|
QueryWrapper<SysMessage> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("user_id", userId);
|
||||||
|
qw.orderByDesc("ctime");
|
||||||
|
return baseMapper.selectList(qw);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateStatus(SysMessage sysMessage) {
|
||||||
|
sysMessage.setUtime(System.currentTimeMillis());
|
||||||
|
baseMapper.updateById(sysMessage);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,7 +334,8 @@
|
|||||||
productId:this.dialogData.multipleSelection[i].id,
|
productId:this.dialogData.multipleSelection[i].id,
|
||||||
pic:this.dialogData.multipleSelection[i].pic,
|
pic:this.dialogData.multipleSelection[i].pic,
|
||||||
price:this.dialogData.multipleSelection[i].price,
|
price:this.dialogData.multipleSelection[i].price,
|
||||||
productName:this.dialogData.multipleSelection[i].name
|
productName:this.dialogData.multipleSelection[i].name,
|
||||||
|
originalPrice:this.dialogData.multipleSelection[i].originalPrice
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$confirm('使用要进行添加操作?', '提示', {
|
this.$confirm('使用要进行添加操作?', '提示', {
|
||||||
|
|||||||
@@ -334,7 +334,8 @@
|
|||||||
productId:this.dialogData.multipleSelection[i].id,
|
productId:this.dialogData.multipleSelection[i].id,
|
||||||
pic:this.dialogData.multipleSelection[i].pic,
|
pic:this.dialogData.multipleSelection[i].pic,
|
||||||
price:this.dialogData.multipleSelection[i].price,
|
price:this.dialogData.multipleSelection[i].price,
|
||||||
productName:this.dialogData.multipleSelection[i].name
|
productName:this.dialogData.multipleSelection[i].name,
|
||||||
|
originalPrice:this.dialogData.multipleSelection[i].originalPrice
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$confirm('使用要进行添加操作?', '提示', {
|
this.$confirm('使用要进行添加操作?', '提示', {
|
||||||
|
|||||||
Reference in New Issue
Block a user