| | |
| | | import com.google.gson.JsonSerializationContext;
|
| | | import com.google.gson.JsonSerializer;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail.MsgTypeInviteTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.util.factory.msg.UserMsgVOFactory;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
|
| | | import com.yeshi.fanli.vo.msg.UserMsgVO;
|
| | |
| | | contentList.add(new ClientTextStyleVO("206089388856584237", "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", "#888888"), contentList));
|
| | |
|
| | | contentList.clear();
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("共", "#000000"));
|
| | | contentList.add(new ClientTextStyleVO("1", "#E5005C"));
|
| | | contentList.add(new ClientTextStyleVO("件商品", "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("商品数量", "#888888"), contentList));
|
| | |
|
| | | contentList.clear();
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("邀请订单", "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单类型", "#888888"), contentList));
|
| | |
|
| | | contentList.clear();
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("已付款", "#E5005C"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单状态", "#888888"), contentList));
|
| | |
|
| | | contentList.clear();
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥58", "#E5005C"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("付款金额", "#888888"), contentList));
|
| | |
|
| | | contentList.clear();
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥0.36", "#E5005C"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请奖金", "#888888"), contentList));
|
| | |
|
| | | contentList.clear();
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("无", "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", "#888888"), contentList));
|
| | |
|
| | | list.add(new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "订单消息", new Date(),
|
| | | items));
|
| | | GsonBuilder builder = new GsonBuilder();
|
| | | builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<Date>() {
|
| | | builder.registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
|
| | | @Override
|
| | | public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) {
|
| | | if (value == null) {
|
| | | return new JsonPrimitive("");
|
| | | } else {
|
| | | return new JsonPrimitive("今天 10:25");
|
| | | }
|
| | | }
|
| | | });
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("data", builder.create().toJson(list));
|
| | | root.put("count", 1);
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请消息
|
| | | * |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param page
|
| | | * @param out
|
| | | */
|
| | |
|
| | | @RequestMapping(value = "getInviteMsgList", method = RequestMethod.POST)
|
| | | public void getInviteMsgList(AcceptData acceptData, Long uid, int page, PrintWriter out) {
|
| | |
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | |
|
| | | List<UserMsgVO> list = new ArrayList<>();
|
| | |
|
| | | for (int i = 0; i < 20; i++) {
|
| | | MsgInviteDetail detail = new MsgInviteDetail();
|
| | | detail.setCreateTime(new Date());
|
| | | ThreeSale ts = new ThreeSale();
|
| | | UserInfo worker = new UserInfo(438965L);
|
| | | worker.setPortrait("https://g2.ykimg.com/051400005A38ADC2ADBAC3A4BB0C648E");
|
| | | worker.setNickName("呵呵");
|
| | | ts.setWorker(worker);
|
| | | detail.setInviteUser(ts);
|
| | | detail.setDesc("恭喜你,有新队员加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
|
| | | detail.setBeiZhu("无");
|
| | | detail.setMsgType(MsgTypeInviteTypeEnum.invite);
|
| | | list.add(UserMsgVOFactory.create(detail));
|
| | | }
|
| | |
|
| | | GsonBuilder builder = new GsonBuilder();
|
| | | builder.registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
|
| | | @Override
|
| | | public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) {
|
| | | if (value == null) {
|
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.msg; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail; |
| | | |
| | | public interface MsgAccountDetailMapper extends BaseMapper<MsgAccountDetail> { |
| | | |
| | | /** |
| | | * 根据用户查询消息,根据更新时间倒叙 |
| | | * |
| | | * @param uid |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<MsgAccountDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count); |
| | | |
| | | /** |
| | | * 根据用户查询数量 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | Long countByUid(@Param("uid") Long uid); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.msg; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail; |
| | | |
| | | public interface MsgInviteDetailMapper extends BaseMapper<MsgInviteDetail> { |
| | | |
| | | /** |
| | | * 根据邀请ID获取数据 |
| | | * |
| | | * @param threeSaleId |
| | | * @return |
| | | */ |
| | | MsgInviteDetail selectByThreeSaleId(Long threeSaleId); |
| | | |
| | | /** |
| | | * 根据用户查询消息,根据更新时间倒叙 |
| | | * |
| | | * @param uid |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<MsgInviteDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count); |
| | | |
| | | /** |
| | | * 根据用户查询数量 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | Long countByUid(@Param("uid") Long uid); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.msg; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail; |
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum; |
| | | |
| | | public interface MsgMoneyDetailMapper extends BaseMapper<MsgMoneyDetail> { |
| | | |
| | | MsgMoneyDetail selectBySourceIdAndMsgType(@Param("sourceId") Long sourceId, |
| | | @Param("type") MsgTypeMoneyTypeEnum type); |
| | | |
| | | List<MsgMoneyDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count); |
| | | |
| | | Long countByUid(@Param("uid") Long uid); |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.msg; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail; |
| | | |
| | | public interface MsgOrderDetailMapper extends BaseMapper<MsgOrderDetail> { |
| | | |
| | | MsgOrderDetail selectByUidAndOrderId(@Param("uid") Long uid, @Param("orderId") String orderId); |
| | | |
| | | List<MsgOrderDetail> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count); |
| | | |
| | | Long countByUid(@Param("uid") Long uid); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.msg; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.msg.UserMsgUnReadNum; |
| | | |
| | | public interface UserMsgUnReadNumMapper extends BaseMapper<UserMsgUnReadNum> { |
| | | |
| | | UserMsgUnReadNum selectByUid(Long uid); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.msg; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.msg.UserSystemMsg; |
| | | |
| | | public interface UserSystemMsgMapper extends BaseMapper<UserSystemMsg> { |
| | | |
| | | List<UserSystemMsg> listByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count); |
| | | |
| | | Long countByUid(@Param("uid") Long uid); |
| | | } |
| | |
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | | /**
|
| | |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_msg_account")
|
| | | public class MsgAccountDetail {
|
| | | public enum MsgTypeAccountEnumType {
|
| | | public enum MsgTypeAccountTypeEnum {
|
| | | bingding("账号绑定"), cancelBinding("取消绑定"), bingdingChange("绑定更换"), update("账号修改"), level("账号等级"), connect("账号合并");
|
| | | private final String desc;
|
| | |
|
| | | private MsgTypeAccountEnumType(String desc) {
|
| | | private MsgTypeAccountTypeEnum(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Column(name = "ma_id")
|
| | | private Long id;
|
| | | @Column(name = "ma_uid")
|
| | | private UserInfo user;
|
| | | private MsgTypeAccountEnumType type;// 类型
|
| | | @Column(name = "ma_type")
|
| | | private MsgTypeAccountTypeEnum type;// 类型
|
| | | @Column(name = "ma_title")
|
| | | private String title;// 事项
|
| | | @Column(name = "ma_content")
|
| | | private String content;// 状态
|
| | | @Column(name = "ma_beizhu")
|
| | | private String beiZhu;// 备注
|
| | | @Column(name = "ma_read")
|
| | | private Boolean read;
|
| | | @Column(name = "ma_create_time")
|
| | | private Date createTime;
|
| | | @Column(name = "ma_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Boolean getRead() {
|
| | | return read;
|
| | |
| | | this.content = content;
|
| | | }
|
| | |
|
| | | public MsgTypeAccountEnumType getType() {
|
| | | public MsgTypeAccountTypeEnum getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(MsgTypeAccountEnumType type) {
|
| | | public void setType(MsgTypeAccountTypeEnum type) {
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_msg_invite")
|
| | | public class MsgInviteDetail {
|
| | | public enum MsgTypeInviteEnumType {
|
| | | public enum MsgTypeInviteTypeEnum {
|
| | | invite("邀请消息");
|
| | | private final String desc;
|
| | |
|
| | | private MsgTypeInviteEnumType(String desc) {
|
| | | private MsgTypeInviteTypeEnum(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Column(name="mi_id")
|
| | | private Long id;
|
| | | @Column(name="mi_uid")
|
| | | private UserInfo user;
|
| | | private MsgTypeInviteEnumType msgType;// 消息类型
|
| | | @Column(name="mi_type")
|
| | | private MsgTypeInviteTypeEnum msgType;// 消息类型
|
| | | @Column(name="mi_invite_id")
|
| | | private ThreeSale inviteUser;// 邀请信息
|
| | | @Column(name="mi_desc")
|
| | | private String desc;// 说明
|
| | | @Column(name="mi_beizhu")
|
| | | private String beiZhu;// 备注
|
| | | @Column(name="mi_read")
|
| | | private Boolean read;// 是否已读
|
| | | @Column(name="mi_create_time")
|
| | | private Date createTime;
|
| | | @Column(name="mi_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | |
| | | this.user = user;
|
| | | }
|
| | |
|
| | | public MsgTypeInviteEnumType getMsgType() {
|
| | | public MsgTypeInviteTypeEnum getMsgType() {
|
| | | return msgType;
|
| | | }
|
| | |
|
| | | public void setMsgType(MsgTypeInviteEnumType msgType) {
|
| | | public void setMsgType(MsgTypeInviteTypeEnum msgType) {
|
| | | this.msgType = msgType;
|
| | | }
|
| | |
|
| | |
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayAccountValidNormalHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_msg_money")
|
| | | public class MsgMoneyDetail {
|
| | | public enum MsgTypeMoneyEnumType {
|
| | | public enum MsgTypeMoneyTypeEnum {
|
| | | share("分享奖金"), invite("邀请奖金"), fanli("返利到账"), extract("提现"), extractValid("提现账号验证");
|
| | | private final String desc;
|
| | |
|
| | | private MsgTypeMoneyEnumType(String desc) {
|
| | | private MsgTypeMoneyTypeEnum(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Column(name = "mm_id")
|
| | | private Long id;
|
| | | @Column(name = "mm_uid")
|
| | | private UserInfo user;
|
| | | private MsgTypeMoneyEnumType msgType;// 消息类型
|
| | | @Column(name = "mm_type")
|
| | | private MsgTypeMoneyTypeEnum msgType;// 消息类型
|
| | | @Column(name = "mm_order_count")
|
| | | private Integer orderCount;// 订单数(奖金适用)
|
| | | @Column(name = "mm_goods_count")
|
| | | private Integer goodsCount;// 商品数
|
| | | @Column(name = "mm_order_id")
|
| | | private String orderId;// 订单号(返利适用)
|
| | | @Column(name = "mm_source_id")
|
| | | private Extract extract;// 提现详情
|
| | | private AlipayAccountValidNormalHistory alipayAccountValid;// 提现账号验证详情
|
| | | @Column(name = "mm_money")
|
| | | private BigDecimal money;// 到账资金
|
| | | @Column(name = "mm_balance")
|
| | | private BigDecimal balance;// 账户余额
|
| | | @Column(name = "mm_state_desc")
|
| | | private String stateDesc;// 状态说明
|
| | | @Column(name = "mm_beizhu")
|
| | | private String beiZhu;// 备注
|
| | | @Column(name = "mm_create_time")
|
| | | private Date createTime;
|
| | | @Column(name = "mm_update_time")
|
| | | private Date updateTime;
|
| | | @Column(name = "mm_read")
|
| | | private Boolean read;
|
| | |
|
| | | public Long getId() {
|
| | |
| | | this.stateDesc = stateDesc;
|
| | | }
|
| | |
|
| | | public MsgTypeMoneyEnumType getMsgType() {
|
| | | public MsgTypeMoneyTypeEnum getMsgType() {
|
| | | return msgType;
|
| | | }
|
| | |
|
| | | public void setMsgType(MsgTypeMoneyEnumType msgType) {
|
| | | public void setMsgType(MsgTypeMoneyTypeEnum msgType) {
|
| | | this.msgType = msgType;
|
| | | }
|
| | |
|
| | |
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | | /***
|
| | |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_msg_order")
|
| | | public class MsgOrderDetail {
|
| | | public final static int STATE_FK = 1;// 已付款
|
| | | public final static int STATE_JS = 2;// 已收货
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Column(name = "mo_id")
|
| | | private Long id;
|
| | | @Column(name = "mo_uid")
|
| | | private UserInfo user;
|
| | | @Column(name = "mo_type")
|
| | | private MsgTypeOrderTypeEnum type;// 消息类型
|
| | | @Column(name = "mo_order_id")
|
| | | private String orderId;// 订单号
|
| | | @Column(name = "mo_state")
|
| | | private Integer state;// 状态
|
| | | @Column(name = "mo_goods_count")
|
| | | private Integer goodsCount;// 商品数量
|
| | | @Column(name = "mo_pay_money")
|
| | | private BigDecimal payMoney;// 付款金额
|
| | | @Column(name = "mo_hongbao_money")
|
| | | private BigDecimal hongBaoMoney;// 佣金
|
| | | @Column(name = "mo_beizhu")
|
| | | private String beiZhu;
|
| | | @Column(name = "mo_read")
|
| | | private Boolean read;// 是否已读
|
| | | @Column(name = "mo_create_time")
|
| | | private Date createTime;
|
| | | @Column(name = "mo_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | |
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | | /*
|
| | | * 用户消息已读状态存储
|
| | | */
|
| | | @Table("yeshi_ec_msg_read_state")
|
| | | public class UserMsgUnReadNum {
|
| | | @Column(name = "mrs_id")
|
| | | private Long id;
|
| | | private Integer typeOrder;// 订单消息未读数
|
| | | private Integer typeMoney;// 资金消息未读数
|
| | | private Integer typeAccount;// 账户消息未读数
|
| | | private Integer typeInvite;// 邀请消息未读数
|
| | | private Integer typeScore;// 积分消息未读数
|
| | | @Column(name = "mrs_uid")
|
| | | private UserInfo user;
|
| | | @Column(name = "mrs_type_order")
|
| | | private Integer typeOrder;// 订单消息未读数
|
| | | @Column(name = "mrs_type_money")
|
| | | private Integer typeMoney;// 资金消息未读数
|
| | | @Column(name = "mrs_type_account")
|
| | | private Integer typeAccount;// 账户消息未读数
|
| | | @Column(name = "mrs_type_invite")
|
| | | private Integer typeInvite;// 邀请消息未读数
|
| | | @Column(name = "mrs_type_score")
|
| | | private Integer typeScore;// 积分消息未读数
|
| | | @Column(name = "mrs_type_system")
|
| | | private Integer typeSystem;// 系统消息未读数
|
| | | @Column(name = "mrs_create_time")
|
| | | private Date createTime;
|
| | | @Column(name = "mrs_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | |
| | | this.typeMoney = typeMoney;
|
| | | }
|
| | |
|
| | | public Integer getTypeSystem() {
|
| | | return typeSystem;
|
| | | }
|
| | |
|
| | | public void setTypeSystem(Integer typeSystem) {
|
| | | this.typeSystem = typeSystem;
|
| | | }
|
| | |
|
| | | public Integer getTypeAccount() {
|
| | | return typeAccount;
|
| | | }
|
| | |
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.system.SystemZnx;
|
| | |
|
| | |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_msg_system")
|
| | | public class UserSystemMsg {
|
| | | @Column(name="ms_id")
|
| | | private Long id;
|
| | | @Column(name="ms_uid")
|
| | | private UserInfo user;
|
| | | @Column(name="ms_type")
|
| | | private UserSystemMsgTypeEnum type;// 消息类型
|
| | | @Column(name="ms_system_znx_id")
|
| | | private SystemZnx systemZNX;// 系统统一广播的站内信,当有系统站内信时,标题内容等为空
|
| | | @Column(name="ms_read")
|
| | | private Boolean read;// 是否已读
|
| | | @Column(name="ms_solved")
|
| | | private Boolean solved;// 是否已经解决
|
| | | @Column(name="ms_title")
|
| | | private String title;// 标题
|
| | | @Column(name="ms_content")
|
| | | private String content;// 内容
|
| | | @Column(name="ms_time_tag")
|
| | | private Integer timeTag;// 时间标识:1-紧急 0-普通
|
| | | @Column(name="ms_create_time")
|
| | | private Date createTime;
|
| | | @Column(name="ms_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | |
| | | package com.yeshi.fanli.entity.bus.user;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | |
| | | @org.yeshi.utils.mybatis.Column(name = "adminId")
|
| | | private Long adminId; // 任务id 目前默认值
|
| | |
|
| | | //TODO 等待添加字段
|
| | | private Date receiveTime;//到账时间
|
| | |
|
| | | public Date getReceiveTime() {
|
| | | return receiveTime;
|
| | | }
|
| | |
|
| | | public void setReceiveTime(Date receiveTime) {
|
| | | this.receiveTime = receiveTime;
|
| | | }
|
| | |
|
| | | public Long getAdminId() {
|
| | | return adminId;
|
| | | }
|
| | |
| | | public static int EXPIRE_NORMAL = 0;// 正常状态
|
| | | public static int EXPIRE_OUTOFDATE = 1;// 过期状态
|
| | |
|
| | |
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
New file |
| | |
| | | package com.yeshi.fanli.exception.msg; |
| | | |
| | | public class MsgAccountDetailException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public MsgAccountDetailException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public MsgAccountDetailException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.exception.msg; |
| | | |
| | | public class MsgInviteDetailException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public MsgInviteDetailException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public MsgInviteDetailException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.exception.msg; |
| | | |
| | | public class MsgMoneyDetailException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public MsgMoneyDetailException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public MsgMoneyDetailException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.exception.msg; |
| | | |
| | | public class MsgOrderDetailException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public MsgOrderDetailException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public MsgOrderDetailException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.msg.MsgAccountDetailMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail"> |
| | | <id column="ma_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="ma_type" property="type" |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.msg.MsgTypeAccountTypeEnumHandler" /> |
| | | <result column="ma_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="ma_content" property="content" jdbcType="VARCHAR" /> |
| | | <result column="ma_beizhu" property="beiZhu" jdbcType="VARCHAR" /> |
| | | <result column="ma_read" property="read" jdbcType="BOOLEAN" /> |
| | | <result column="ma_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="ma_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <association property="user" column="ma_uid"> |
| | | <id column="ma_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">ma_id,ma_uid,ma_type,ma_title,ma_content,ma_beizhu,ma_read,ma_create_time,ma_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_account where ma_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_account where ma_uid = #{uid,jdbcType=BIGINT} order |
| | | by ma_update_time desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="countByUid" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(ma_id) |
| | | from yeshi_ec_msg_account where ma_uid |
| | | = #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_account where ma_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_account |
| | | (ma_id,ma_uid,ma_type,ma_title,ma_content,ma_beizhu,ma_read,ma_create_time,ma_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_msg_account |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">ma_id,</if> |
| | | <if test="user != null">ma_uid,</if> |
| | | <if test="type != null">ma_type,</if> |
| | | <if test="title != null">ma_title,</if> |
| | | <if test="content != null">ma_content,</if> |
| | | <if test="beiZhu != null">ma_beizhu,</if> |
| | | <if test="read != null">ma_read,</if> |
| | | <if test="createTime != null">ma_create_time,</if> |
| | | <if test="updateTime != null">ma_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="user != null">#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">#{type,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="content != null">#{content,jdbcType=VARCHAR},</if> |
| | | <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="read != null">#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail">update |
| | | yeshi_ec_msg_account set ma_uid = #{user.id,jdbcType=BIGINT},ma_type |
| | | = |
| | | #{type,jdbcType=VARCHAR},ma_title = |
| | | #{title,jdbcType=VARCHAR},ma_content = |
| | | #{content,jdbcType=VARCHAR},ma_beizhu = |
| | | #{beiZhu,jdbcType=VARCHAR},ma_read = |
| | | #{read,jdbcType=BOOLEAN},ma_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},ma_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where ma_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgAccountDetail"> |
| | | update yeshi_ec_msg_account |
| | | <set> |
| | | <if test="user != null">ma_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">ma_type=#{type,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">ma_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="content != null">ma_content=#{content,jdbcType=VARCHAR},</if> |
| | | <if test="beiZhu != null">ma_beizhu=#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="read != null">ma_read=#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">ma_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">ma_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where ma_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.msg.MsgInviteDetailMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.bus.msg.MsgInviteDetail"> |
| | | <id column="mi_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="mi_type" property="msgType" |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.msg.MsgTypeInviteTypeEnumHandler" /> |
| | | <result column="mi_desc" property="desc" jdbcType="VARCHAR" /> |
| | | <result column="mi_beizhu" property="beiZhu" jdbcType="VARCHAR" /> |
| | | <result column="mi_read" property="read" jdbcType="BOOLEAN" /> |
| | | <result column="mi_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mi_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | |
| | | <association property="inviteUser" column="mi_invite_id"> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <association property="boss" column="boss_id" |
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <id column="boss_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | <association property="worker" column="worker_id" |
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="nick_name" property="nickName" jdbcType="VARCHAR" /> |
| | | <result column="portrait" property="portrait" jdbcType="VARCHAR" /> |
| | | </association> |
| | | </association> |
| | | <association property="user" column="mi_uid"> |
| | | <id column="mi_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">mi_id,mi_uid,mi_type,mi_invite_id,mi_desc,mi_beizhu,mi_read,mi_create_time,mi_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_invite where mi_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByThreeSaleId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_invite where mi_invite_id = #{0} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | ,u.`id`,u.`nick_name`,u.`portrait` FROM yeshi_ec_msg_invite i LEFT |
| | | JOIN yeshi_ec_threesale t ON t.`id`=i.`mi_invite_id` LEFT JOIN |
| | | yeshi_ec_user u ON u.`id`=t.`worker_id` where mi_uid = #{uid} order by |
| | | mi_update_time desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | |
| | | <select id="countByUid" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(mi_id) |
| | | from yeshi_ec_msg_invite where mi_uid |
| | | = #{0} |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_invite where mi_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgInviteDetail" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_invite |
| | | (mi_id,mi_uid,mi_type,mi_invite_id,mi_desc,mi_beizhu,mi_read,mi_create_time,mi_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{msgType,jdbcType=VARCHAR},#{inviteUser.id,jdbcType=BIGINT},#{desc,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgInviteDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_msg_invite |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">mi_id,</if> |
| | | <if test="user != null">mi_uid,</if> |
| | | <if test="msgType != null">mi_type,</if> |
| | | <if test="inviteUser != null">mi_invite_id,</if> |
| | | <if test="desc != null">mi_desc,</if> |
| | | <if test="beiZhu != null">mi_beizhu,</if> |
| | | <if test="read != null">mi_read,</if> |
| | | <if test="createTime != null">mi_create_time,</if> |
| | | <if test="updateTime != null">mi_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="user != null">#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="msgType != null">#{msgType,jdbcType=VARCHAR},</if> |
| | | <if test="inviteUser != null">#{inviteUser.id,jdbcType=BIGINT},</if> |
| | | <if test="desc != null">#{desc,jdbcType=VARCHAR},</if> |
| | | <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="read != null">#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgInviteDetail">update |
| | | yeshi_ec_msg_invite set mi_uid = #{user.id,jdbcType=BIGINT},mi_type = |
| | | #{msgType,jdbcType=VARCHAR},mi_invite_id = |
| | | #{inviteUser.id,jdbcType=BIGINT},mi_desc = |
| | | #{desc,jdbcType=VARCHAR},mi_beizhu = |
| | | #{beiZhu,jdbcType=VARCHAR},mi_read = |
| | | #{read,jdbcType=BOOLEAN},mi_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},mi_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where mi_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgInviteDetail"> |
| | | update yeshi_ec_msg_invite |
| | | <set> |
| | | <if test="user != null">mi_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="msgType != null">mi_type=#{msgType,jdbcType=VARCHAR},</if> |
| | | <if test="inviteUser != null">mi_invite_id=#{inviteUser.id,jdbcType=BIGINT},</if> |
| | | <if test="desc != null">mi_desc=#{desc,jdbcType=VARCHAR},</if> |
| | | <if test="beiZhu != null">mi_beizhu=#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="read != null">mi_read=#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">mi_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">mi_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where mi_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.msg.MsgMoneyDetailMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail"> |
| | | <id column="mm_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="mm_type" property="msgType" |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.msg.MsgTypeMoneyTypeEnumHandler" /> |
| | | <result column="mm_order_count" property="orderCount" jdbcType="INTEGER" /> |
| | | <result column="mm_goods_count" property="goodsCount" jdbcType="INTEGER" /> |
| | | <result column="mm_order_id" property="orderId" jdbcType="VARCHAR" /> |
| | | <result column="mm_money" property="money" jdbcType="DECIMAL" /> |
| | | <result column="mm_balance" property="balance" jdbcType="DECIMAL" /> |
| | | <result column="mm_state_desc" property="stateDesc" jdbcType="VARCHAR" /> |
| | | <result column="mm_beizhu" property="beiZhu" jdbcType="VARCHAR" /> |
| | | <result column="mm_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mm_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mm_read" property="read" jdbcType="BOOLEAN" /> |
| | | <association property="user" column="mm_uid"> |
| | | <id column="mm_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | <association property="extract" column="mm_source_id" |
| | | select="com.yeshi.fanli.dao.mybatis.ExtractMapper.selectByPrimaryKey"> |
| | | </association> |
| | | <association property="alipayAccountValid" column="mm_source_id" |
| | | select="com.yeshi.fanli.dao.mybatis.AlipayAccountValidNormalHistoryMapper.selectByPrimaryKey"> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">mm_id,mm_uid,mm_type,mm_order_count,mm_goods_count,mm_order_id,mm_source_id,mm_money,mm_balance,mm_state_desc,mm_beizhu,mm_create_time,mm_update_time,mm_read |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_money where mm_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectBySourceIdAndMsgType" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_money where mm_source_id = |
| | | #{sourceId,jdbcType=BIGINT} and mm_type=#{type} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap" parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_money where mm_uid = #{uid,jdbcType=BIGINT} order by |
| | | mm_update_time desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | |
| | | <select id="countByUid" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(mm_id) |
| | | from yeshi_ec_msg_money where mm_uid = |
| | | #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_money where mm_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_money |
| | | (mm_id,mm_uid,mm_type,mm_order_count,mm_goods_count,mm_order_id,mm_source_id,mm_money,mm_balance,mm_state_desc,mm_beizhu,mm_create_time,mm_update_time,mm_read) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{msgType,jdbcType=VARCHAR},#{orderCount,jdbcType=INTEGER},#{goodsCount,jdbcType=INTEGER},#{orderId,jdbcType=VARCHAR},#{extract.id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{balance,jdbcType=DECIMAL},#{stateDesc,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{read,jdbcType=BOOLEAN}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_msg_money |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">mm_id,</if> |
| | | <if test="user != null">mm_uid,</if> |
| | | <if test="msgType != null">mm_type,</if> |
| | | <if test="orderCount != null">mm_order_count,</if> |
| | | <if test="goodsCount != null">mm_goods_count,</if> |
| | | <if test="orderId != null">mm_order_id,</if> |
| | | <if test="extract != null">mm_source_id,</if> |
| | | <if test="alipayAccountValid != null">mm_source_id,</if> |
| | | <if test="money != null">mm_money,</if> |
| | | <if test="balance != null">mm_balance,</if> |
| | | <if test="stateDesc != null">mm_state_desc,</if> |
| | | <if test="beiZhu != null">mm_beizhu,</if> |
| | | <if test="createTime != null">mm_create_time,</if> |
| | | <if test="updateTime != null">mm_update_time,</if> |
| | | <if test="read != null">mm_read,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="user != null">#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="msgType != null">#{msgType,jdbcType=VARCHAR},</if> |
| | | <if test="orderCount != null">#{orderCount,jdbcType=INTEGER},</if> |
| | | <if test="goodsCount != null">#{goodsCount,jdbcType=INTEGER},</if> |
| | | <if test="orderId != null">#{orderId,jdbcType=VARCHAR},</if> |
| | | <if test="extract != null">#{extract.id,jdbcType=BIGINT},</if> |
| | | <if test="alipayAccountValid != null">#{alipayAccountValid.id,jdbcType=BIGINT},</if> |
| | | <if test="money != null">#{money,jdbcType=DECIMAL},</if> |
| | | <if test="balance != null">#{balance,jdbcType=DECIMAL},</if> |
| | | <if test="stateDesc != null">#{stateDesc,jdbcType=VARCHAR},</if> |
| | | <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="read != null">#{read,jdbcType=BOOLEAN},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail">update |
| | | yeshi_ec_msg_money set mm_uid = #{user.id,jdbcType=BIGINT},mm_type = |
| | | #{msgType,jdbcType=VARCHAR},mm_order_count = |
| | | #{orderCount,jdbcType=INTEGER},mm_goods_count = |
| | | #{goodsCount,jdbcType=INTEGER},mm_order_id = |
| | | #{orderId,jdbcType=VARCHAR},mm_source_id = |
| | | #{extract.id,jdbcType=BIGINT},mm_money = |
| | | #{money,jdbcType=DECIMAL},mm_balance = |
| | | #{balance,jdbcType=DECIMAL},mm_state_desc = |
| | | #{stateDesc,jdbcType=VARCHAR},mm_beizhu = |
| | | #{beiZhu,jdbcType=VARCHAR},mm_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},mm_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP},mm_read = #{read,jdbcType=BOOLEAN} |
| | | where mm_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail"> |
| | | update yeshi_ec_msg_money |
| | | <set> |
| | | <if test="user != null">mm_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="msgType != null">mm_type=#{msgType,jdbcType=VARCHAR},</if> |
| | | <if test="orderCount != null">mm_order_count=#{orderCount,jdbcType=INTEGER},</if> |
| | | <if test="goodsCount != null">mm_goods_count=#{goodsCount,jdbcType=INTEGER},</if> |
| | | <if test="orderId != null">mm_order_id=#{orderId,jdbcType=VARCHAR},</if> |
| | | <if test="extract != null">mm_source_id=#{extract.id,jdbcType=BIGINT},</if> |
| | | <if test="alipayAccountValid != null">mm_source_id=#{alipayAccountValid.id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null">mm_money=#{money,jdbcType=DECIMAL},</if> |
| | | <if test="balance != null">mm_balance=#{balance,jdbcType=DECIMAL},</if> |
| | | <if test="stateDesc != null">mm_state_desc=#{stateDesc,jdbcType=VARCHAR},</if> |
| | | <if test="beiZhu != null">mm_beizhu=#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">mm_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">mm_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="read != null">mm_read=#{read,jdbcType=BOOLEAN},</if> |
| | | </set> |
| | | where mm_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.msg.MsgOrderDetailMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail"> |
| | | <id column="mo_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="mo_type" property="type" |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.msg.MsgTypeOrderTypeEnumHandler" /> |
| | | <result column="mo_order_id" property="orderId" jdbcType="VARCHAR" /> |
| | | <result column="mo_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="mo_goods_count" property="goodsCount" jdbcType="INTEGER" /> |
| | | <result column="mo_pay_money" property="payMoney" jdbcType="DECIMAL" /> |
| | | <result column="mo_hongbao_money" property="hongBaoMoney" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="mo_beizhu" property="beiZhu" jdbcType="VARCHAR" /> |
| | | <result column="mo_read" property="read" jdbcType="BOOLEAN" /> |
| | | <result column="mo_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mo_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <association property="user" column="mo_uid"> |
| | | <id column="mo_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">mo_id,mo_uid,mo_type,mo_order_id,mo_state,mo_goods_count,mo_pay_money,mo_hongbao_money,mo_beizhu,mo_read,mo_create_time,mo_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_order where mo_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByUidAndOrderId" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_order where mo_uid = #{uid,jdbcType=BIGINT} and |
| | | mo_order_id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_order where mo_uid = #{uid,jdbcType=BIGINT} order by |
| | | mo_update_time desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="countByUid" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(mo_id) |
| | | from yeshi_ec_msg_order where mo_uid = |
| | | #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_order where mo_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_order |
| | | (mo_id,mo_uid,mo_type,mo_order_id,mo_state,mo_goods_count,mo_pay_money,mo_hongbao_money,mo_beizhu,mo_read,mo_create_time,mo_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{orderId,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{goodsCount,jdbcType=INTEGER},#{payMoney,jdbcType=DECIMAL},#{hongBaoMoney,jdbcType=DECIMAL},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_msg_order |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">mo_id,</if> |
| | | <if test="user != null">mo_uid,</if> |
| | | <if test="type != null">mo_type,</if> |
| | | <if test="orderId != null">mo_order_id,</if> |
| | | <if test="state != null">mo_state,</if> |
| | | <if test="goodsCount != null">mo_goods_count,</if> |
| | | <if test="payMoney != null">mo_pay_money,</if> |
| | | <if test="hongBaoMoney != null">mo_hongbao_money,</if> |
| | | <if test="beiZhu != null">mo_beizhu,</if> |
| | | <if test="read != null">mo_read,</if> |
| | | <if test="createTime != null">mo_create_time,</if> |
| | | <if test="updateTime != null">mo_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="user != null">#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">#{type,jdbcType=VARCHAR},</if> |
| | | <if test="orderId != null">#{orderId,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="goodsCount != null">#{goodsCount,jdbcType=INTEGER},</if> |
| | | <if test="payMoney != null">#{payMoney,jdbcType=DECIMAL},</if> |
| | | <if test="hongBaoMoney != null">#{hongBaoMoney,jdbcType=DECIMAL},</if> |
| | | <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="read != null">#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail">update |
| | | yeshi_ec_msg_order set mo_uid = #{user.id,jdbcType=BIGINT},mo_type = |
| | | #{type,jdbcType=VARCHAR},mo_order_id = |
| | | #{orderId,jdbcType=VARCHAR},mo_state = |
| | | #{state,jdbcType=INTEGER},mo_goods_count = |
| | | #{goodsCount,jdbcType=INTEGER},mo_pay_money = |
| | | #{payMoney,jdbcType=DECIMAL},mo_hongbao_money = |
| | | #{hongBaoMoney,jdbcType=DECIMAL},mo_beizhu = |
| | | #{beiZhu,jdbcType=VARCHAR},mo_read = |
| | | #{read,jdbcType=BOOLEAN},mo_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},mo_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where mo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail"> |
| | | update yeshi_ec_msg_order |
| | | <set> |
| | | <if test="user != null">mo_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">mo_type=#{type,jdbcType=VARCHAR},</if> |
| | | <if test="orderId != null">mo_order_id=#{orderId,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">mo_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="goodsCount != null">mo_goods_count=#{goodsCount,jdbcType=INTEGER},</if> |
| | | <if test="payMoney != null">mo_pay_money=#{payMoney,jdbcType=DECIMAL},</if> |
| | | <if test="hongBaoMoney != null">mo_hongbao_money=#{hongBaoMoney,jdbcType=DECIMAL},</if> |
| | | <if test="beiZhu != null">mo_beizhu=#{beiZhu,jdbcType=VARCHAR},</if> |
| | | <if test="read != null">mo_read=#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">mo_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">mo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where mo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.msg.UserMsgUnReadNumMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.bus.msg.UserMsgUnReadNum"> |
| | | <id column="mrs_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="mrs_type_order" property="typeOrder" jdbcType="INTEGER" /> |
| | | <result column="mrs_type_money" property="typeMoney" jdbcType="INTEGER" /> |
| | | <result column="mrs_type_account" property="typeAccount" |
| | | jdbcType="INTEGER" /> |
| | | <result column="mrs_type_invite" property="typeInvite" |
| | | jdbcType="INTEGER" /> |
| | | <result column="mrs_type_score" property="typeScore" jdbcType="INTEGER" /> |
| | | <result column="mrs_type_system" property="typeSystem" |
| | | jdbcType="INTEGER" /> |
| | | <result column="mrs_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="mrs_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <association property="user" column="mrs_uid"> |
| | | <id column="mrs_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">mrs_id,mrs_uid,mrs_type_order,mrs_type_money,mrs_type_account,mrs_type_invite,mrs_type_score,mrs_type_system,mrs_create_time,mrs_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_read_state where mrs_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByUid" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_read_state where mrs_uid = #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_read_state where mrs_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.UserMsgUnReadNum" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_msg_read_state |
| | | (mrs_id,mrs_uid,mrs_type_order,mrs_type_money,mrs_type_account,mrs_type_invite,mrs_type_score,mrs_type_system,mrs_create_time,mrs_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{typeOrder,jdbcType=INTEGER},#{typeMoney,jdbcType=INTEGER},#{typeAccount,jdbcType=INTEGER},#{typeInvite,jdbcType=INTEGER},#{typeScore,jdbcType=INTEGER},#{typeSystem,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.UserMsgUnReadNum" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_msg_read_state |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">mrs_id,</if> |
| | | <if test="user != null">mrs_uid,</if> |
| | | <if test="typeOrder != null">mrs_type_order,</if> |
| | | <if test="typeMoney != null">mrs_type_money,</if> |
| | | <if test="typeAccount != null">mrs_type_account,</if> |
| | | <if test="typeInvite != null">mrs_type_invite,</if> |
| | | <if test="typeScore != null">mrs_type_score,</if> |
| | | <if test="typeSystem != null">mrs_type_system,</if> |
| | | <if test="createTime != null">mrs_create_time,</if> |
| | | <if test="updateTime != null">mrs_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="user != null">#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="typeOrder != null">#{typeOrder,jdbcType=INTEGER},</if> |
| | | <if test="typeMoney != null">#{typeMoney,jdbcType=INTEGER},</if> |
| | | <if test="typeAccount != null">#{typeAccount,jdbcType=INTEGER},</if> |
| | | <if test="typeInvite != null">#{typeInvite,jdbcType=INTEGER},</if> |
| | | <if test="typeScore != null">#{typeScore,jdbcType=INTEGER},</if> |
| | | <if test="typeSystem != null">#{typeSystem,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.UserMsgUnReadNum">update |
| | | yeshi_ec_msg_read_state set mrs_uid = |
| | | #{user.id,jdbcType=BIGINT},mrs_type_order = |
| | | #{typeOrder,jdbcType=INTEGER},mrs_type_money = |
| | | #{typeMoney,jdbcType=INTEGER},mrs_type_account = |
| | | #{typeAccount,jdbcType=INTEGER},mrs_type_invite = |
| | | #{typeInvite,jdbcType=INTEGER},mrs_type_score = |
| | | #{typeScore,jdbcType=INTEGER},mrs_type_system = |
| | | #{typeSystem,jdbcType=INTEGER},mrs_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},mrs_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where mrs_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.UserMsgUnReadNum"> |
| | | update yeshi_ec_msg_read_state |
| | | <set> |
| | | <if test="user != null">mrs_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="typeOrder != null">mrs_type_order=#{typeOrder,jdbcType=INTEGER},</if> |
| | | <if test="typeMoney != null">mrs_type_money=#{typeMoney,jdbcType=INTEGER},</if> |
| | | <if test="typeAccount != null">mrs_type_account=#{typeAccount,jdbcType=INTEGER},</if> |
| | | <if test="typeInvite != null">mrs_type_invite=#{typeInvite,jdbcType=INTEGER},</if> |
| | | <if test="typeScore != null">mrs_type_score=#{typeScore,jdbcType=INTEGER},</if> |
| | | <if test="typeSystem != null">mrs_type_system=#{typeSystem,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">mrs_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">mrs_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where mrs_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.msg.UserSystemMsgMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.msg.UserSystemMsg"> |
| | | <id column="ms_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="ms_type" property="type" |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.msg.UserSystemMsgTypeEnumHandler" /> |
| | | <result column="ms_read" property="read" jdbcType="BOOLEAN" /> |
| | | <result column="ms_solved" property="solved" jdbcType="BOOLEAN" /> |
| | | <result column="ms_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="ms_content" property="content" jdbcType="VARCHAR" /> |
| | | <result column="ms_time_tag" property="timeTag" jdbcType="INTEGER" /> |
| | | <result column="ms_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="ms_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <association property="user" column="ms_uid"> |
| | | <id column="ms_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | <association property="systemZNX" column="ms_system_znx_id"> |
| | | <id column="ms_system_znx_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">ms_id,ms_uid,ms_type,ms_system_znx_id,ms_read,ms_solved,ms_title,ms_content,ms_time_tag,ms_create_time,ms_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_system where ms_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_system where ms_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_system |
| | | (ms_id,ms_uid,ms_type,ms_system_znx_id,ms_read,ms_solved,ms_title,ms_content,ms_time_tag,ms_create_time,ms_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{systemZNX.id,jdbcType=BIGINT},#{read,jdbcType=BOOLEAN},#{solved,jdbcType=BOOLEAN},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{timeTag,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_msg_system |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">ms_id,</if> |
| | | <if test="user != null">ms_uid,</if> |
| | | <if test="type != null">ms_type,</if> |
| | | <if test="systemZNX != null">ms_system_znx_id,</if> |
| | | <if test="read != null">ms_read,</if> |
| | | <if test="solved != null">ms_solved,</if> |
| | | <if test="title != null">ms_title,</if> |
| | | <if test="content != null">ms_content,</if> |
| | | <if test="timeTag != null">ms_time_tag,</if> |
| | | <if test="createTime != null">ms_create_time,</if> |
| | | <if test="updateTime != null">ms_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="user != null">#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">#{type,jdbcType=VARCHAR},</if> |
| | | <if test="systemZNX != null">#{systemZNX.id,jdbcType=BIGINT},</if> |
| | | <if test="read != null">#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="solved != null">#{solved,jdbcType=BOOLEAN},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="content != null">#{content,jdbcType=VARCHAR},</if> |
| | | <if test="timeTag != null">#{timeTag,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg">update |
| | | yeshi_ec_msg_system set ms_uid = #{user.id,jdbcType=BIGINT},ms_type = |
| | | #{type,jdbcType=VARCHAR},ms_system_znx_id = |
| | | #{systemZNX.id,jdbcType=BIGINT},ms_read = |
| | | #{read,jdbcType=BOOLEAN},ms_solved = |
| | | #{solved,jdbcType=BOOLEAN},ms_title = |
| | | #{title,jdbcType=VARCHAR},ms_content = |
| | | #{content,jdbcType=VARCHAR},ms_time_tag = |
| | | #{timeTag,jdbcType=INTEGER},ms_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},ms_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where ms_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.UserSystemMsg"> |
| | | update yeshi_ec_msg_system |
| | | <set> |
| | | <if test="user != null">ms_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="type != null">ms_type=#{type,jdbcType=VARCHAR},</if> |
| | | <if test="systemZNX != null">ms_system_znx_id=#{systemZNX.id,jdbcType=BIGINT},</if> |
| | | <if test="read != null">ms_read=#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="solved != null">ms_solved=#{solved,jdbcType=BOOLEAN},</if> |
| | | <if test="title != null">ms_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="content != null">ms_content=#{content,jdbcType=VARCHAR},</if> |
| | | <if test="timeTag != null">ms_time_tag=#{timeTag,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">ms_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">ms_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where ms_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | package com.yeshi.fanli.service.impl.msg;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgAccountDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgAccountDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgAccountDetailService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class MsgAccountDetailServiceImpl implements MsgAccountDetailService {
|
| | |
|
| | | @Resource
|
| | | private MsgAccountDetailMapper msgAccountDetailMapper;
|
| | |
|
| | | @Override
|
| | | public void addMsgAccountDetail(MsgAccountDetail detail) throws MsgAccountDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgAccountDetailException(1, "消息为空");
|
| | | if (StringUtil.isNullOrEmpty(detail.getTitle()) || StringUtil.isNullOrEmpty(detail.getContent())
|
| | | || detail.getType() == null || detail.getUser() == null)
|
| | | throw new MsgAccountDetailException(2, "消息内容不完整");
|
| | | // 持久化到数据库
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgAccountDetailMapper.insertSelective(detail);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<MsgAccountDetail> listMsgAccountDetail(Long uid, int page) {
|
| | | return msgAccountDetailMapper.listByUid(uid, (page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countMsgAccountDetail(Long uid) {
|
| | | return msgAccountDetailMapper.countByUid(uid);
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.msg;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgInviteDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.exception.msg.MsgInviteDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgInviteDetailService;
|
| | |
|
| | | @Service
|
| | | public class MsgInviteDetailServiceImpl implements MsgInviteDetailService {
|
| | |
|
| | | @Resource
|
| | | private MsgInviteDetailMapper msgInviteDetailMapper;
|
| | |
|
| | | @Override
|
| | | public void addMsgInviteDetail(MsgInviteDetail detail) throws MsgInviteDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgInviteDetailException(1, "消息为空");
|
| | |
|
| | | if (detail.getInviteUser() == null || detail.getMsgType() == null || detail.getUser() == null
|
| | | || detail.getDesc() == null)
|
| | | throw new MsgInviteDetailException(2, "消息内容不完整");
|
| | |
|
| | | // 查询是否已存在该邀请ID
|
| | | MsgInviteDetail oldDetail = msgInviteDetailMapper.selectByThreeSaleId(detail.getInviteUser().getId());
|
| | | if (oldDetail == null) {
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgInviteDetailMapper.insertSelective(detail);
|
| | | } else {
|
| | | MsgInviteDetail update = new MsgInviteDetail();
|
| | | update.setId(oldDetail.getId());
|
| | | if (!detail.getInviteUser().getState()) {
|
| | | if (detail.getInviteUser().getExpire() == ThreeSale.EXPIRE_NORMAL) {
|
| | | update.setDesc("恭喜你,有新队员加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
|
| | | } else {
|
| | | update.setDesc("抱歉,该队员因60天内未激活,已脱离了你的队列,可以试着重新邀请");
|
| | | }
|
| | | } else {
|
| | | update.setDesc("恭喜你,成功邀请一个队员");
|
| | | }
|
| | | update.setUpdateTime(new Date());
|
| | | update.setRead(false);
|
| | | msgInviteDetailMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<MsgInviteDetail> listMsgInviteDetail(Long uid, int page) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countMsgInviteDetail(Long uid) {
|
| | | return 0;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.msg;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgMoneyDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.exception.msg.MsgMoneyDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgMoneyDetailService;
|
| | |
|
| | | @Service
|
| | | public class MsgMoneyDetailServiceImpl implements MsgMoneyDetailService {
|
| | |
|
| | | @Resource
|
| | | private MsgMoneyDetailMapper msgMoneyDetailMapper;
|
| | |
|
| | | @Override
|
| | | public void addMsgMoneyDetail(MsgMoneyDetail detail) throws MsgMoneyDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgMoneyDetailException(1, "消息为空");
|
| | | if (detail.getMsgType() == MsgTypeMoneyTypeEnum.extract) {
|
| | | if (detail.getExtract() == null || detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | MsgMoneyDetail msg = msgMoneyDetailMapper.selectBySourceIdAndMsgType(detail.getExtract().getId(),
|
| | | MsgTypeMoneyTypeEnum.extract);
|
| | | if (msg == null) {
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | } else {
|
| | | MsgMoneyDetail update = new MsgMoneyDetail();
|
| | | update.setId(msg.getId());
|
| | | update.setUpdateTime(new Date());
|
| | | update.setRead(false);
|
| | | update.setStateDesc(detail.getStateDesc());
|
| | | msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | |
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
|
| | | if (detail.getExtract() == null || detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | MsgMoneyDetail msg = msgMoneyDetailMapper.selectBySourceIdAndMsgType(detail.getExtract().getId(),
|
| | | MsgTypeMoneyTypeEnum.extractValid);
|
| | | if (msg == null) {
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | } else {
|
| | | MsgMoneyDetail update = new MsgMoneyDetail();
|
| | | update.setId(msg.getId());
|
| | | update.setUpdateTime(new Date());
|
| | | update.setRead(false);
|
| | | update.setStateDesc(detail.getStateDesc());
|
| | | msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | |
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.fanli) {
|
| | | if (detail.getMoney() == null || detail.getGoodsCount() == null || detail.getOrderCount() == null
|
| | | || detail.getOrderId() == null || detail.getBalance() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | |
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.invite
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.share) {
|
| | | if (detail.getMoney() == null || detail.getGoodsCount() == null || detail.getOrderCount() == null
|
| | | || detail.getBalance() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<MsgMoneyDetail> listMsgMoneyDetail(Long uid, int page) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countMsgMoneyDetail(Long uid) {
|
| | | return 0;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.msg;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgOrderDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgOrderDetailService;
|
| | |
|
| | | @Service
|
| | | public class MsgOrderDetailServiceImpl implements MsgOrderDetailService {
|
| | |
|
| | | @Resource
|
| | | private MsgOrderDetailMapper msgOrderDetailMapper;
|
| | |
|
| | | @Override
|
| | | public void addMsgOrderDetail(MsgOrderDetail detail) throws MsgOrderDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgOrderDetailException(1, "消息为空");
|
| | | if (detail.getOrderId() == null || detail.getGoodsCount() == null || detail.getType() == null
|
| | | || detail.getState() == null || detail.getPayMoney() == null || detail.getUser() == null)
|
| | | throw new MsgOrderDetailException(2, "消息不完整");
|
| | | MsgOrderDetail old = msgOrderDetailMapper.selectByUidAndOrderId(detail.getUser().getId(), detail.getOrderId());
|
| | | if (old == null) {
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgOrderDetailMapper.insertSelective(detail);
|
| | | } else {
|
| | | MsgOrderDetail update = new MsgOrderDetail();
|
| | | update.setId(old.getId());
|
| | | update.setUpdateTime(new Date());
|
| | | update.setState(detail.getState());
|
| | | update.setPayMoney(detail.getPayMoney());
|
| | | update.setHongBaoMoney(detail.getHongBaoMoney());
|
| | | update.setRead(false);
|
| | | update.setBeiZhu(detail.getBeiZhu());
|
| | | msgOrderDetailMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<MsgOrderDetail> listMsgOrderDetail(Long uid, int page) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countMsgOrderDetail(Long uid) {
|
| | | return 0;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.msg;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgAccountDetailException;
|
| | |
|
| | | public interface MsgAccountDetailService {
|
| | |
|
| | | /**
|
| | | * 添加到账户消息
|
| | | * |
| | | * @param detail
|
| | | * @throws MsgAccountDetailException
|
| | | */
|
| | | public void addMsgAccountDetail(MsgAccountDetail detail) throws MsgAccountDetailException;
|
| | |
|
| | | /**
|
| | | * 账户消息列表
|
| | | * |
| | | * @param uid
|
| | | * @param page
|
| | | * @return
|
| | | */
|
| | | public List<MsgAccountDetail> listMsgAccountDetail(Long uid, int page);
|
| | |
|
| | | /**
|
| | | * 账户消息数
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countMsgAccountDetail(Long uid);
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.msg;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgInviteDetailException;
|
| | |
|
| | | public interface MsgInviteDetailService {
|
| | | /**
|
| | | * 添加到邀请消息
|
| | | * |
| | | * @param detail
|
| | | * @throws MsgInviteDetailException
|
| | | */
|
| | | public void addMsgInviteDetail(MsgInviteDetail detail) throws MsgInviteDetailException;
|
| | |
|
| | | /**
|
| | | * 账户消息列表
|
| | | * |
| | | * @param uid
|
| | | * @param page
|
| | | * @return
|
| | | */
|
| | | public List<MsgInviteDetail> listMsgInviteDetail(Long uid, int page);
|
| | |
|
| | | /**
|
| | | * 账户消息数
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countMsgInviteDetail(Long uid);
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.msg;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgMoneyDetailException;
|
| | |
|
| | | public interface MsgMoneyDetailService {
|
| | | /**
|
| | | * 添加到资金消息
|
| | | * |
| | | * @param detail
|
| | | * @throws MsgMoneyDetailException
|
| | | */
|
| | | public void addMsgMoneyDetail(MsgMoneyDetail detail) throws MsgMoneyDetailException;
|
| | |
|
| | | /**
|
| | | * 资金消息列表
|
| | | * |
| | | * @param uid
|
| | | * @param page
|
| | | * @return
|
| | | */
|
| | | public List<MsgMoneyDetail> listMsgMoneyDetail(Long uid, int page);
|
| | |
|
| | | /**
|
| | | * 资金消息数
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countMsgMoneyDetail(Long uid);
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.msg;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | |
|
| | | public interface MsgOrderDetailService {
|
| | | /**
|
| | | * 添加到订单消息
|
| | | * |
| | | * @param detail
|
| | | * @throws MsgOrderDetailException
|
| | | */
|
| | | public void addMsgOrderDetail(MsgOrderDetail detail) throws MsgOrderDetailException;
|
| | |
|
| | | /**
|
| | | * 订单消息列表
|
| | | * |
| | | * @param uid
|
| | | * @param page
|
| | | * @return
|
| | | */
|
| | | public List<MsgOrderDetail> listMsgOrderDetail(Long uid, int page);
|
| | |
|
| | | /**
|
| | | * 订单消息数
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countMsgOrderDetail(Long uid);
|
| | | }
|
| | |
| | | //System.out.println("url"+url);
|
| | | GetMethod method = new GetMethod(url);
|
| | | //3S的响应超时
|
| | | HttpConnectionManagerParams hparams = new
|
| | | HttpConnectionManagerParams();
|
| | | HttpConnectionManagerParams hparams = new HttpConnectionManagerParams();
|
| | | hparams.setConnectionTimeout(3000);
|
| | | client.getHttpConnectionManager().setParams(hparams);
|
| | |
|
| | |
| | |
|
| | | public static String taoKeGet(Map<String, String> params) {
|
| | | // 聚石塔服务器环境 118.178.179.189
|
| | | String result = get("http://118.178.179.189/taoke/", params, false);
|
| | | if (StringUtil.isNullOrEmpty(result))
|
| | | result = get("http://gw.api.taobao.com/router/rest", params, false);
|
| | |
|
| | | // result = get("http://118.178.179.189/taoke/", params, false);
|
| | | // if (StringUtil.isNullOrEmpty(result))
|
| | | String result = get("http://gw.api.taobao.com/router/rest", params, false);
|
| | | return result;
|
| | | }
|
| | |
|
| | |
| | | package com.yeshi.fanli.util.factory.msg;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | public class MsgAccountDetailFactory {
|
| | | public final static int TYPE_WX = 1;// 微信
|
| | | public final static int TYPE_TB = 2;// 淘宝
|
| | | public final static int TYPE_PHONE = 3;// 电话
|
| | |
|
| | | /**
|
| | | * 账号绑定成功
|
| | |
| | | * @return
|
| | | */
|
| | | public static MsgAccountDetail createBindingAccount(Long uid, int type) {
|
| | |
|
| | | String msg = "";
|
| | | if (type == TYPE_PHONE) {
|
| | | msg = "<red>恭喜你手机号绑定成功<red>";
|
| | | } else if (type == TYPE_TB) {
|
| | | msg = "<red>恭喜你淘宝绑定成功<red>";
|
| | | } else if (type == TYPE_WX) {
|
| | | msg = "<red>恭喜你微信绑定成功<red>";
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(msg))
|
| | | return null;
|
| | | MsgAccountDetail detail = new MsgAccountDetail();
|
| | | detail.setBeiZhu("无");
|
| | | detail.setContent(msg);
|
| | | detail.setTitle("绑定账号");
|
| | | detail.setType(MsgTypeAccountTypeEnum.bingding);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * @return
|
| | | */
|
| | | public static MsgAccountDetail createUnBindingAccount(Long uid, int type) {
|
| | |
|
| | | String msg = "";
|
| | | if (type == TYPE_PHONE) {
|
| | | msg = "<highlight>手机号解绑成功</highlight>";
|
| | | } else if (type == TYPE_TB) {
|
| | | msg = "<highlight>淘宝解绑成功</highlight>";
|
| | | } else if (type == TYPE_WX) {
|
| | | msg = "<highlight>微信解绑成功</highlight>";
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(msg))
|
| | | return null;
|
| | | MsgAccountDetail detail = new MsgAccountDetail();
|
| | | detail.setBeiZhu("无");
|
| | | detail.setContent(msg);
|
| | | detail.setTitle("解绑账号");
|
| | | detail.setType(MsgTypeAccountTypeEnum.cancelBinding);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * @return
|
| | | */
|
| | | public static MsgAccountDetail createChangeBindingAccount(Long uid, int type) {
|
| | |
|
| | | return null;
|
| | | String msg = "";
|
| | | if (type == TYPE_PHONE) {
|
| | | msg = "<highlight>手机号更换绑定成功</highlight>";
|
| | | } else if (type == TYPE_TB) {
|
| | | msg = "<highlight>淘宝更换绑定成功</highlight>";
|
| | | } else if (type == TYPE_WX) {
|
| | | msg = "<highlight>微信更换绑定成功</highlight>";
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(msg))
|
| | | return null;
|
| | | MsgAccountDetail detail = new MsgAccountDetail();
|
| | | detail.setBeiZhu("无");
|
| | | detail.setContent(msg);
|
| | | detail.setTitle("更换绑定账号");
|
| | | detail.setType(MsgTypeAccountTypeEnum.bingdingChange);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 账号打通
|
| | | * |
| | | * @param mainUid
|
| | | * @param lessUid
|
| | | * @return
|
| | | */
|
| | | public static MsgAccountDetail createConnectAccount(Long mainUid, Long lessUid) {
|
| | | if (mainUid == null || lessUid == null)
|
| | | return null;
|
| | | String msg = String.format("恭喜你账号合并成功,由“<highlight>%s</highlight>”合并到“<highlight>%s</highlight>”", lessUid + "",
|
| | | mainUid + "");
|
| | | MsgAccountDetail detail = new MsgAccountDetail();
|
| | | detail.setBeiZhu("无");
|
| | | detail.setContent(msg);
|
| | | detail.setTitle("账号合并");
|
| | | detail.setType(MsgTypeAccountTypeEnum.connect);
|
| | | detail.setUser(new UserInfo(mainUid));
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | // TODO 账号等级
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.util.factory.msg;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail.MsgTypeInviteTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | public class MsgInviteDetailFactory {
|
| | |
|
| | | /**
|
| | | * 邀请成功
|
| | | * |
| | | * @param threeSale
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public static MsgInviteDetail createInviteSuccess(ThreeSale threeSale, Long uid, String beiZhu) {
|
| | | if (threeSale == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgInviteDetail detail = new MsgInviteDetail();
|
| | | if (StringUtil.isNullOrEmpty(beiZhu))
|
| | | detail.setBeiZhu("无");
|
| | | else
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setDesc("恭喜你,成功邀请一个队员");
|
| | | detail.setInviteUser(threeSale);
|
| | | detail.setMsgType(MsgTypeInviteTypeEnum.invite);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 扫描邀请二维码成功,但是未登录
|
| | | * |
| | | * @param threeSale
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public static MsgInviteDetail createInviteScanSuccess(ThreeSale threeSale, Long uid, String beiZhu) {
|
| | | if (threeSale == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgInviteDetail detail = new MsgInviteDetail();
|
| | | if (StringUtil.isNullOrEmpty(beiZhu))
|
| | | detail.setBeiZhu("无");
|
| | | else
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setDesc("恭喜你,有新队员加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
|
| | | detail.setInviteUser(threeSale);
|
| | | detail.setMsgType(MsgTypeInviteTypeEnum.invite);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请失败
|
| | | * |
| | | * @param threeSale
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public static MsgInviteDetail createInviteFail(ThreeSale threeSale, Long uid, String beiZhu) {
|
| | | if (threeSale == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgInviteDetail detail = new MsgInviteDetail();
|
| | | if (StringUtil.isNullOrEmpty(beiZhu))
|
| | | detail.setBeiZhu("无");
|
| | | else
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setDesc("抱歉,该队员因60天内未激活,已脱离了你的队列,可以试着重新邀请");
|
| | | detail.setInviteUser(threeSale);
|
| | | detail.setMsgType(MsgTypeInviteTypeEnum.invite);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | | }
|
| | |
| | | package com.yeshi.fanli.util.factory.msg;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayAccountValidNormalHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | public class MsgMoneyDetailFactory {
|
| | |
|
| | | /**
|
| | | * 提现申请消息
|
| | | * |
| | | * @param extract
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createExtractApplyMsg(Extract extract, Long uid, String beiZhu) {
|
| | | if (extract == null || uid == null)
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBeiZhu(StringUtil.isNullOrEmpty(beiZhu) ? "无" : beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setExtract(extract);
|
| | | detail.setMoney(extract.getMoney());
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.extract);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 提现成功消息
|
| | | * |
| | | * @param extract
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createExtractSuccessMsg(Extract extract, Long uid, String beiZhu) {
|
| | | if (extract == null || uid == null)
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBeiZhu(StringUtil.isNullOrEmpty(beiZhu) ? "无" : beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setExtract(extract);
|
| | | detail.setMoney(extract.getMoney());
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.extract);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 提现失败消息
|
| | | * |
| | | * @param extract
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createExtractFailMsg(Extract extract, Long uid, String beiZhu) {
|
| | | if (extract == null || uid == null)
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBeiZhu(StringUtil.isNullOrEmpty(beiZhu) ? "无" : beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setExtract(extract);
|
| | | detail.setMoney(extract.getMoney());
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.extract);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 账号验证消息
|
| | | * |
| | | * @param valid
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createAlipayAccountValidMsg(AlipayAccountValidNormalHistory valid, Long uid,
|
| | | String company, BigDecimal money, String beiZhu) {
|
| | | if (valid == null || uid == null || company == null)
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setAlipayAccountValid(valid);
|
| | | detail.setBeiZhu(StringUtil.isNullOrEmpty(beiZhu) ? "无" : beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setStateDesc(String
|
| | | .format("已向你的提现支付宝转入一笔来自于“%s”总额为%s元的转账,收到即提现帐号验证成功。", company, MoneyBigDecimalUtil.getWithNoZera(money))
|
| | | .toString());
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.extractValid);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 返利到账
|
| | | * |
| | | * @param money
|
| | | * @param balance
|
| | | * @param orderId
|
| | | * @param goodsCount
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createFailiMsg(BigDecimal money, BigDecimal balance, String orderId, int goodsCount,
|
| | | Long uid, String beiZhu) {
|
| | | if (money == null || balance == null || orderId == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(StringUtil.isNullOrEmpty(beiZhu) ? "无" : beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.fanli);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请赚到账
|
| | | * |
| | | * @param money
|
| | | * @param balance
|
| | | * @param orderCount
|
| | | * @param goodsCount
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createInviteMsg(BigDecimal money, BigDecimal balance, int orderCount, int goodsCount,
|
| | | Long uid, String beiZhu) {
|
| | | if (money == null || balance == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(StringUtil.isNullOrEmpty(beiZhu) ? "无" : beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.invite);
|
| | | detail.setOrderCount(orderCount);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 分享赚到账
|
| | | * |
| | | * @param money
|
| | | * @param balance
|
| | | * @param orderCount
|
| | | * @param goodsCount
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createShareMsg(BigDecimal money, BigDecimal balance, int orderCount, int goodsCount,
|
| | | Long uid, String beiZhu) {
|
| | | if (money == null || balance == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(StringUtil.isNullOrEmpty(beiZhu) ? "无" : beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.share);
|
| | | detail.setOrderCount(orderCount);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.util.factory.msg;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | | public class MsgOrderDetailFactory {
|
| | |
|
| | | /**
|
| | | * 返利订单
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param goodsCount
|
| | | * @param orderState
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param state
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createFanLiOrder(Long uid, String orderId, int goodsCount, int orderState,
|
| | | BigDecimal payMoney, BigDecimal money, int state, String beiZhu) {
|
| | | if (payMoney == null || money == null || uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setHongBaoMoney(money);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(state);
|
| | | detail.setType(MsgTypeOrderTypeEnum.fanli);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请订单
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param goodsCount
|
| | | * @param orderState
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param state
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createInviteOrder(Long uid, String orderId, int goodsCount, int orderState,
|
| | | BigDecimal payMoney, BigDecimal money, int state, String beiZhu) {
|
| | | if (payMoney == null || money == null || uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setHongBaoMoney(money);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(state);
|
| | | detail.setType(MsgTypeOrderTypeEnum.invite);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 分享订单
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param goodsCount
|
| | | * @param orderState
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param state
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createShareOrder(Long uid, String orderId, int goodsCount, int orderState,
|
| | | BigDecimal payMoney, BigDecimal money, int state, String beiZhu) {
|
| | | if (payMoney == null || money == null || uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setHongBaoMoney(money);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(state);
|
| | | detail.setType(MsgTypeOrderTypeEnum.share);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.util.factory.msg;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Calendar;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
|
| | | import com.yeshi.fanli.vo.msg.UserMsgVO;
|
| | |
|
| | | public class UserMsgVOFactory {
|
| | |
|
| | | private final static String COLOR_TITLE = "#888888";
|
| | | private final static String COLOR_CONTENT = "#000000";
|
| | | private final static String COLOR_HIGHLIGHT_CONTENT = "#E5005C";
|
| | |
|
| | | /**
|
| | | * 订单消息
|
| | | * |
| | | * @param msg
|
| | | * @return
|
| | | */
|
| | | public static UserMsgVO create(MsgOrderDetail msg) {
|
| | |
|
| | | return null;
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | |
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("共", "#000000"));
|
| | | contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", "#E5005C"));
|
| | | contentList.add(new ClientTextStyleVO("件商品", "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("商品数量", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getType().getDesc(), "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单类型", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | if (msg.getState() == MsgOrderDetail.STATE_FK)
|
| | | contentList.add(new ClientTextStyleVO("已付款", "#E5005C"));
|
| | | else if (msg.getState() == MsgOrderDetail.STATE_JS)
|
| | | contentList.add(new ClientTextStyleVO("已收货", "#E5005C"));
|
| | | else if (msg.getState() == MsgOrderDetail.STATE_SX)
|
| | | contentList.add(new ClientTextStyleVO("未付款/已退款", "#E5005C"));
|
| | | else if (msg.getState() == MsgOrderDetail.STATE_WQ)
|
| | | contentList.add(new ClientTextStyleVO("已维权", "#E5005C"));
|
| | |
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单状态", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getPayMoney()), "#E5005C"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("付款金额", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList
|
| | | .add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getHongBaoMoney()), "#E5005C"));
|
| | |
|
| | | if (msg.getType() == MsgTypeOrderTypeEnum.fanli)
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", "#888888"), contentList));
|
| | | else if (msg.getType() == MsgTypeOrderTypeEnum.share)
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("分享奖金", "#888888"), contentList));
|
| | | else if (msg.getType() == MsgTypeOrderTypeEnum.invite)
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请奖金", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), "#000000"));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", "#888888"), contentList));
|
| | | return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "订单消息",
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 资金消息
|
| | | * |
| | | * @param msg
|
| | | * @return
|
| | | */
|
| | | public static UserMsgVO create(MsgMoneyDetail msg) {
|
| | |
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | |
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
|
| | | // 提现
|
| | | if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extract) {
|
| | |
|
| | | contentList.add(new ClientTextStyleVO(
|
| | | "支付宝:" + msg.getExtract().getName() + " " + msg.getExtract().getAccount(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现账号", COLOR_CONTENT), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getExtract().getMoney()),
|
| | | COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | if (msg.getExtract().getState() == Extract.STATE_NOT_PROCESS
|
| | | || msg.getExtract().getState() == Extract.STATE_PROCESSING)
|
| | | contentList.add(new ClientTextStyleVO("人工审核中", COLOR_HIGHLIGHT_CONTENT));
|
| | | else if (msg.getExtract().getState() == Extract.STATE_PASS)
|
| | | contentList.add(new ClientTextStyleVO("已通过", COLOR_HIGHLIGHT_CONTENT));
|
| | | else if (msg.getExtract().getState() == Extract.STATE_REJECT)
|
| | | contentList.add(new ClientTextStyleVO("提现被拒绝", COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现状态", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | if (msg.getExtract().getState() == Extract.STATE_NOT_PROCESS
|
| | | || msg.getExtract().getState() == Extract.STATE_PROCESSING)
|
| | | contentList.add(new ClientTextStyleVO("无", COLOR_CONTENT));
|
| | | else if (msg.getExtract().getState() == Extract.STATE_PASS)
|
| | | contentList.add(new ClientTextStyleVO("无", COLOR_CONTENT));
|
| | | else if (msg.getExtract().getState() == Extract.STATE_REJECT)
|
| | | contentList.add(new ClientTextStyleVO(msg.getExtract().getReason(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态说明", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(
|
| | | TimeUtil.getGernalTime(msg.getExtract().getExtractTime(), "yyyy-MM-dd HH:mm"), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("预计到账", "#888888"), contentList));
|
| | |
|
| | | if (msg.getExtract().getState() == Extract.STATE_PASS) {//
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(
|
| | | TimeUtil.getGernalTime(msg.getExtract().getReceiveTime().getTime(), "yyyy-MM-dd HH:mm"),
|
| | | COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("实际到账", "#888888"), contentList));
|
| | | }
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", "#888888"), contentList));
|
| | | return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "提现",
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
|
| | | // 支付宝验证
|
| | | contentList.add(new ClientTextStyleVO(
|
| | | "支付宝:" + msg.getAlipayAccountValid().getName() + " " + msg.getAlipayAccountValid().getAccount(),
|
| | | COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现账号", COLOR_CONTENT), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getMoney()),
|
| | | COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("提现金额", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥验证成功", COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("验证状态", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getStateDesc(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态说明", "#888888"), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", "#888888"), contentList));
|
| | |
|
| | | return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "提现账号验证",
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanli) {
|
| | | // 返利到账
|
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("商品数量", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getMoney()) + "",
|
| | | COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利金额", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getBalance()) + "",
|
| | | COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("账号余额", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
|
| | |
|
| | | return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "返利到账",
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | |
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.invite || msg.getMsgType() == MsgTypeMoneyTypeEnum.share) {
|
| | |
|
| | | // 邀请奖金,分享奖金
|
| | |
|
| | | contentList.add(new ClientTextStyleVO(msg.getOrderCount() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单数量", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("共", COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO(msg.getGoodsCount() + "", COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("件商品", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖金商品", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getMoney()) + "",
|
| | | COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("到账金额", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(msg.getBalance()) + "",
|
| | | COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("账号余额", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
|
| | |
|
| | | Calendar ca = Calendar.getInstance();
|
| | | ca.setTime(msg.getCreateTime());
|
| | | ca.add(Calendar.MONTH, -1);
|
| | | String date = ca.get(Calendar.YEAR) + "年" + (ca.get(Calendar.MONTH) + 1) + "月";
|
| | |
|
| | | return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png",
|
| | | date + msg.getMsgType().getDesc(),
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 账号消息
|
| | | * |
| | | * @param msg
|
| | | * @return
|
| | | */
|
| | | public static UserMsgVO create(MsgAccountDetail msg) {
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
|
| | | return null;
|
| | | contentList.add(new ClientTextStyleVO(msg.getType().getDesc() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("事项", COLOR_TITLE), contentList));
|
| | |
|
| | | // 状态修改
|
| | | contentList = new ArrayList<>();
|
| | |
|
| | | int fromIndex = 0;
|
| | | int toIndex = 0;
|
| | | String stateDesc = msg.getContent();
|
| | | while (stateDesc.indexOf("<highlight>") > -1) {
|
| | | fromIndex = stateDesc.indexOf("<highlight>");
|
| | | toIndex = stateDesc.indexOf("</highlight>");
|
| | | String content1 = stateDesc.substring(0, fromIndex);
|
| | | String content2 = stateDesc.substring(fromIndex + "<highlight>".length(), toIndex);
|
| | | stateDesc = stateDesc.substring(toIndex + "</highlight>".length(), stateDesc.length());
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(content1)) {
|
| | | contentList.add(new ClientTextStyleVO(content1, COLOR_CONTENT));
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(content2)) {
|
| | | contentList.add(new ClientTextStyleVO(content2, COLOR_HIGHLIGHT_CONTENT));
|
| | | }
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(stateDesc)) {
|
| | | contentList.add(new ClientTextStyleVO(stateDesc, COLOR_CONTENT));
|
| | | }
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getBeiZhu() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
|
| | | return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", msg.getType().getDesc(),
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请消息
|
| | | * |
| | | * @param msg
|
| | | * @return
|
| | | */
|
| | | public static UserMsgVO create(MsgInviteDetail msg) {
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
|
| | | return null;
|
| | | contentList.add(new ClientTextStyleVO(msg.getInviteUser().getWorker().getNickName() + "", COLOR_CONTENT,
|
| | | msg.getInviteUser().getWorker().getPortrait()));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getDesc() + "", COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("说明", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getBeiZhu() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
|
| | |
|
| | | return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", msg.getMsgType().getDesc(),
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.util.mybatishandler.msg;
|
| | |
|
| | | import java.sql.CallableStatement;
|
| | | import java.sql.PreparedStatement;
|
| | | import java.sql.ResultSet;
|
| | | import java.sql.SQLException;
|
| | |
|
| | | import org.apache.ibatis.type.BaseTypeHandler;
|
| | | import org.apache.ibatis.type.JdbcType;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
|
| | |
|
| | | public class MsgTypeAccountTypeEnumHandler extends BaseTypeHandler<MsgTypeAccountTypeEnum> {
|
| | |
|
| | | @Override
|
| | | public MsgTypeAccountTypeEnum getNullableResult(ResultSet arg0, String arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | return MsgTypeAccountTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeAccountTypeEnum getNullableResult(ResultSet arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeAccountTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeAccountTypeEnum getNullableResult(CallableStatement arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeAccountTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void setNonNullParameter(PreparedStatement arg0, int arg1, MsgTypeAccountTypeEnum arg2, JdbcType arg3)
|
| | | throws SQLException {
|
| | | arg0.setString(arg1, arg2.name());
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.util.mybatishandler.msg;
|
| | |
|
| | | import java.sql.CallableStatement;
|
| | | import java.sql.PreparedStatement;
|
| | | import java.sql.ResultSet;
|
| | | import java.sql.SQLException;
|
| | |
|
| | | import org.apache.ibatis.type.BaseTypeHandler;
|
| | | import org.apache.ibatis.type.JdbcType;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail.MsgTypeInviteTypeEnum;
|
| | |
|
| | | public class MsgTypeInviteTypeEnumHandler extends BaseTypeHandler<MsgTypeInviteTypeEnum> {
|
| | |
|
| | | @Override
|
| | | public MsgTypeInviteTypeEnum getNullableResult(ResultSet arg0, String arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | return MsgTypeInviteTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeInviteTypeEnum getNullableResult(ResultSet arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeInviteTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeInviteTypeEnum getNullableResult(CallableStatement arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeInviteTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void setNonNullParameter(PreparedStatement arg0, int arg1, MsgTypeInviteTypeEnum arg2, JdbcType arg3)
|
| | | throws SQLException {
|
| | | arg0.setString(arg1, arg2.name());
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.util.mybatishandler.msg;
|
| | |
|
| | | import java.sql.CallableStatement;
|
| | | import java.sql.PreparedStatement;
|
| | | import java.sql.ResultSet;
|
| | | import java.sql.SQLException;
|
| | |
|
| | | import org.apache.ibatis.type.BaseTypeHandler;
|
| | | import org.apache.ibatis.type.JdbcType;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | |
|
| | | public class MsgTypeMoneyTypeEnumHandler extends BaseTypeHandler<MsgTypeMoneyTypeEnum> {
|
| | |
|
| | | @Override
|
| | | public MsgTypeMoneyTypeEnum getNullableResult(ResultSet arg0, String arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | return MsgTypeMoneyTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeMoneyTypeEnum getNullableResult(ResultSet arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeMoneyTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeMoneyTypeEnum getNullableResult(CallableStatement arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeMoneyTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void setNonNullParameter(PreparedStatement arg0, int arg1, MsgTypeMoneyTypeEnum arg2, JdbcType arg3)
|
| | | throws SQLException {
|
| | | arg0.setString(arg1, arg2.name());
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.util.mybatishandler.msg;
|
| | |
|
| | | import java.sql.CallableStatement;
|
| | | import java.sql.PreparedStatement;
|
| | | import java.sql.ResultSet;
|
| | | import java.sql.SQLException;
|
| | |
|
| | | import org.apache.ibatis.type.BaseTypeHandler;
|
| | | import org.apache.ibatis.type.JdbcType;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
|
| | |
|
| | | public class MsgTypeOrderTypeEnumHandler extends BaseTypeHandler<MsgTypeOrderTypeEnum> {
|
| | |
|
| | | @Override
|
| | | public MsgTypeOrderTypeEnum getNullableResult(ResultSet arg0, String arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | return MsgTypeOrderTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeOrderTypeEnum getNullableResult(ResultSet arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeOrderTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgTypeOrderTypeEnum getNullableResult(CallableStatement arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return MsgTypeOrderTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void setNonNullParameter(PreparedStatement arg0, int arg1, MsgTypeOrderTypeEnum arg2, JdbcType arg3)
|
| | | throws SQLException {
|
| | | arg0.setString(arg1, arg2.name());
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.util.mybatishandler.msg;
|
| | |
|
| | | import java.sql.CallableStatement;
|
| | | import java.sql.PreparedStatement;
|
| | | import java.sql.ResultSet;
|
| | | import java.sql.SQLException;
|
| | |
|
| | | import org.apache.ibatis.type.BaseTypeHandler;
|
| | | import org.apache.ibatis.type.JdbcType;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.UserSystemMsgTypeEnum;
|
| | |
|
| | | public class UserSystemMsgTypeEnumHandler extends BaseTypeHandler<UserSystemMsgTypeEnum> {
|
| | |
|
| | | @Override
|
| | | public UserSystemMsgTypeEnum getNullableResult(ResultSet arg0, String arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | return UserSystemMsgTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public UserSystemMsgTypeEnum getNullableResult(ResultSet arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return UserSystemMsgTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public UserSystemMsgTypeEnum getNullableResult(CallableStatement arg0, int arg1) throws SQLException {
|
| | | String key = arg0.getString(arg1);
|
| | | if (arg0.wasNull()) {
|
| | | return null;
|
| | | } else {
|
| | | // 根据数据库中的key值,定位SexEnum子类
|
| | | return UserSystemMsgTypeEnum.valueOf(key);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void setNonNullParameter(PreparedStatement arg0, int arg1, UserSystemMsgTypeEnum arg2, JdbcType arg3)
|
| | | throws SQLException {
|
| | | arg0.setString(arg1, arg2.name());
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | public class ClientTextStyleVO {
|
| | | private String content;
|
| | | private String color;
|
| | | private String img;
|
| | |
|
| | | public ClientTextStyleVO(String content, String color) {
|
| | | this.content = content;
|
| | | this.color = color;
|
| | | }
|
| | |
|
| | | public ClientTextStyleVO(String content, String color, String img) {
|
| | | this.content = content;
|
| | | this.color = color;
|
| | | this.img = img;
|
| | | }
|
| | |
|
| | | public ClientTextStyleVO(String img) {
|
| | | this.img = img;
|
| | | }
|
| | |
|
| | | public String getImg() {
|
| | | return img;
|
| | | }
|
| | |
|
| | | public void setImg(String img) {
|
| | | this.img = img;
|
| | | }
|
| | |
|
| | | public ClientTextStyleVO() {
|
| | | }
|
| | |
|