@@ -557,9 +557,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
|
||||
queryWrapper.like(StringUtils.isNotBlank(memberSearchVO.getUsername()), "username", memberSearchVO.getUsername());
|
||||
//按照电话号码查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(memberSearchVO.getMobile()), "mobile", memberSearchVO.getMobile());
|
||||
//按照电话号码查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(memberSearchVO.getDisabled()), "disabled", memberSearchVO.getDisabled());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
//按照状态查询
|
||||
queryWrapper.eq(StringUtils.isNotBlank(memberSearchVO.getDisabled()), "disabled",
|
||||
memberSearchVO.getDisabled().equals(SwitchEnum.OPEN.name()) ? 1 : 0); queryWrapper.orderByDesc("create_time");
|
||||
return this.count(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.lili.modules.member.entity.dos;
|
||||
package cn.lili.modules.message.entity.dos;
|
||||
|
||||
import cn.lili.base.BaseEntity;
|
||||
import cn.lili.modules.message.entity.enums.MessageStatusEnum;
|
||||
@@ -11,7 +11,7 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 会员消息
|
||||
* 会员接受消息对象
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-02-25 14:10:16
|
||||
@@ -37,6 +37,9 @@ public class MemberMessage extends BaseEntity {
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "关联消息id")
|
||||
private String messageId;
|
||||
|
||||
/**
|
||||
* @see MessageStatusEnum
|
||||
*/
|
||||
@@ -2,6 +2,7 @@ package cn.lili.modules.message.entity.dos;
|
||||
|
||||
import cn.lili.base.BaseEntity;
|
||||
import cn.lili.modules.message.entity.enums.RangeEnum;
|
||||
import cn.lili.modules.message.entity.enums.MessageSendClient;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -13,6 +14,8 @@ import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
/**
|
||||
* 管理段发送消息对象
|
||||
*
|
||||
* @author lili
|
||||
*/
|
||||
|
||||
@@ -37,7 +40,10 @@ public class Message extends BaseEntity {
|
||||
@ApiModelProperty(value = "发送范围")
|
||||
private String messageRange;
|
||||
|
||||
@ApiModelProperty(value = "发送客户端 商家和会员")
|
||||
/**
|
||||
* @see MessageSendClient
|
||||
*/
|
||||
@ApiModelProperty(value = "发送客户端 商家或者会员")
|
||||
private String messageClient;
|
||||
|
||||
@Transient
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 站内消息模板设置
|
||||
* 通知类站内信模版对象
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @version v4.1
|
||||
@@ -20,7 +20,7 @@ import javax.persistence.Table;
|
||||
@Entity
|
||||
@Table(name = "li_notice_message")
|
||||
@TableName("li_notice_message")
|
||||
@ApiModel(value = "站内消息模板")
|
||||
@ApiModel(value = "通知类消息模板")
|
||||
public class NoticeMessage extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -17,7 +17,7 @@ import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店铺消息
|
||||
* 店铺接收消息对象
|
||||
* @author Chopper
|
||||
* @date 2021/1/30 4:13 下午
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.lili.modules.message.entity.enums;
|
||||
|
||||
/**
|
||||
* 消息发送客户端
|
||||
*
|
||||
* @author pikachu
|
||||
* @date 2020/12/8 9:46
|
||||
*/
|
||||
public enum MessageSendClient {
|
||||
|
||||
//全部用户
|
||||
MEMBER("会员"),
|
||||
//指定用户
|
||||
STORE("店铺");
|
||||
|
||||
private final String description;
|
||||
|
||||
MessageSendClient(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,17 +1,19 @@
|
||||
package cn.lili.modules.member.entity.vo;
|
||||
package cn.lili.modules.message.entity.vos;
|
||||
|
||||
import cn.lili.modules.message.entity.enums.MessageStatusEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 会员消息查询
|
||||
* 会员接收消息查询vo
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-02-25 14:10:16
|
||||
* @date 2020/12/2 17:50
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "会员接收消息查询vo")
|
||||
public class MemberMessageQueryVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -22,6 +24,9 @@ public class MemberMessageQueryVO {
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "消息id")
|
||||
private String messageId;
|
||||
|
||||
@ApiModelProperty(value = "消息标题")
|
||||
private String title;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package cn.lili.modules.member.mapper;
|
||||
package cn.lili.modules.message.mapper;
|
||||
|
||||
|
||||
import cn.lili.modules.member.entity.dos.MemberMessage;
|
||||
import cn.lili.modules.message.entity.dos.MemberMessage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 会员消息数据处理层
|
||||
* 会员接收到消息数据处理层
|
||||
*
|
||||
* @author lili
|
||||
* @date 2020-02-25 14:10:16
|
||||
@@ -4,7 +4,7 @@ import cn.lili.modules.message.entity.dos.Message;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 消息内容数据处理层
|
||||
* 管理端发送消息内容数据处理层
|
||||
* @author Chopper
|
||||
* @date 2020/12/2 17:50
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ import cn.lili.modules.message.entity.dos.NoticeMessage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 消息模板数据处理层
|
||||
* 通知类消息模板数据处理层
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date 2020/12/8 9:46
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 消息发送数据处理层
|
||||
* 店铺接收到消息发送数据处理层
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021/1/30 4:17 下午
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package cn.lili.modules.member.service;
|
||||
package cn.lili.modules.message.service;
|
||||
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.modules.member.entity.dos.MemberMessage;
|
||||
import cn.lili.modules.member.entity.vo.MemberMessageQueryVO;
|
||||
import cn.lili.modules.message.entity.dos.MemberMessage;
|
||||
import cn.lili.modules.message.entity.vos.MemberMessageQueryVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息发送业务层
|
||||
* 会员消息发送业务层
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 3:44 下午
|
||||
@@ -41,4 +43,13 @@ public interface MemberMessageService extends IService<MemberMessage> {
|
||||
Boolean deleteMessage(String messageId);
|
||||
|
||||
|
||||
/**
|
||||
* 保存消息信息
|
||||
*
|
||||
* @param messages 消息
|
||||
* @return
|
||||
*/
|
||||
boolean save(List<MemberMessage> messages);
|
||||
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 消息内容业务层
|
||||
* 管理端发送消息内容业务层
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 3:44 下午
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 消息模板业务层
|
||||
* 通知类消息模板业务层
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date 2020/12/8 9:47
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息发送业务层
|
||||
* 店铺接收消息业务层
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 3:44 下午
|
||||
@@ -34,7 +34,7 @@ public interface StoreMessageService extends IService<StoreMessage> {
|
||||
IPage<StoreMessage> getPage(StoreMessageQueryVO storeMessageQueryVO, PageVO pageVO);
|
||||
|
||||
/**
|
||||
* 保存消息信息
|
||||
* 保存店铺消息信息
|
||||
*
|
||||
* @param messages 消息
|
||||
* @return
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
package cn.lili.modules.member.serviceimpl;
|
||||
package cn.lili.modules.message.serviceimpl;
|
||||
|
||||
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.modules.member.entity.dos.MemberMessage;
|
||||
import cn.lili.modules.member.entity.vo.MemberMessageQueryVO;
|
||||
import cn.lili.modules.member.mapper.MemberMessageMapper;
|
||||
import cn.lili.modules.member.service.MemberMessageService;
|
||||
import cn.lili.modules.message.entity.dos.MemberMessage;
|
||||
import cn.lili.modules.message.mapper.MemberMessageMapper;
|
||||
import cn.lili.modules.message.service.MemberMessageService;
|
||||
import cn.lili.modules.message.entity.vos.MemberMessageQueryVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员消息业务层实现
|
||||
* 会员接收消息业务层实现
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 3:48 下午
|
||||
@@ -28,6 +30,8 @@ public class MemberMessageServiceImpl extends ServiceImpl<MemberMessageMapper, M
|
||||
@Override
|
||||
public IPage<MemberMessage> getPage(MemberMessageQueryVO memberMessageQueryVO, PageVO pageVO) {
|
||||
QueryWrapper<MemberMessage> queryWrapper = new QueryWrapper<>();
|
||||
//消息id
|
||||
queryWrapper.like(StringUtils.isNotEmpty(memberMessageQueryVO.getMessageId()), "message_id", memberMessageQueryVO.getMessageId());
|
||||
//消息标题
|
||||
queryWrapper.like(StringUtils.isNotEmpty(memberMessageQueryVO.getTitle()), "title", memberMessageQueryVO.getTitle());
|
||||
//会员id
|
||||
@@ -61,4 +65,9 @@ public class MemberMessageServiceImpl extends ServiceImpl<MemberMessageMapper, M
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean save(List<MemberMessage> messages) {
|
||||
return saveBatch(messages);
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 消息内容业务层实现
|
||||
* 管理端发送消息内容业务层实现
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 3:48 下午
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 消息模板业务层实现
|
||||
* 通知类消息模板业务层实现
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date 2020/12/8 9:48
|
||||
|
||||
Reference in New Issue
Block a user