Merge remote-tracking branch 'origin/div' into div
| | |
| | | package com.yeshi.fanli.dao.mybatis.msg; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra; |
| | | |
| | | public interface MsgExtraMapper extends BaseMapper<MsgExtra> { |
| | | |
| | | MsgExtra getByRidAndType(@Param("rid")Long rid, @Param("type")String type); |
| | | } |
| | |
| | | @Table("yeshi_ec_msg_account")
|
| | | public class MsgAccountDetail {
|
| | | public enum MsgTypeAccountTypeEnum {
|
| | | bingding("账号绑定"),
|
| | | cancelBinding("取消绑定"),
|
| | | bingdingChange("绑定更换"),
|
| | | update("账号修改"),
|
| | | level("账号等级"),
|
| | | connect("账号合并"),
|
| | | taoBaoAuthFail("账号绑定"),
|
| | | changeCode("账号修改"),
|
| | | vipApply("账户升级"),
|
| | | vipPgrade("等级成长");
|
| | | bingding("账号绑定", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | cancelBinding("取消绑定", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | bingdingChange("绑定更换", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | update("账号修改", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | level("账号等级", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | connect("账号合并", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | taoBaoAuthFail("账号绑定", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | changeCode("账号修改", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | vipApply("账户升级", "http://img.flqapp.com/resource/msg/icon_msg_account.png"),
|
| | | vipPgrade("等级成长","http://img.flqapp.com/resource/msg/icon_msg_account.png");
|
| | | |
| | | private final String desc;
|
| | | private final String icon;
|
| | |
|
| | | private MsgTypeAccountTypeEnum(String desc) {
|
| | | private MsgTypeAccountTypeEnum(String desc, String icon) {
|
| | | this.desc = desc;
|
| | | this.icon = icon;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | |
| | | public String getIcon() {
|
| | | return icon;
|
| | | }
|
| | | }
|
| | |
|
| | | @Column(name = "ma_id")
|
| | |
| | | @Table("yeshi_ec_msg_invite")
|
| | | public class MsgInviteDetail {
|
| | | public enum MsgTypeInviteTypeEnum {
|
| | | invite("邀请消息"),
|
| | | exchangeCode("恭喜你,邀请码兑换成功"),
|
| | | receiveGift("领取礼品"),
|
| | | fansUpgrade("粉丝升级"),
|
| | | fansDivorced("脱离提醒"),
|
| | | inviteSucceed("邀请提醒");
|
| | | |
| | | invite("邀请消息","http://img.flqapp.com/resource/msg/icon_msg_invite.png"),
|
| | | exchangeCode("恭喜你,邀请码兑换成功","http://img.flqapp.com/resource/msg/icon_msg_invite.png"),
|
| | | receiveGift("领取礼品","http://img.flqapp.com/resource/msg/icon_msg_invite.png"),
|
| | | fansUpgrade("粉丝升级","http://img.flqapp.com/resource/msg/icon_msg_invite.png"),
|
| | | fansDivorced("脱离提醒","http://img.flqapp.com/resource/msg/icon_msg_invite.png"),
|
| | | inviteSucceed("邀请提醒","http://img.flqapp.com/resource/msg/icon_msg_invite.png");
|
| | |
|
| | | private final String desc;
|
| | |
|
| | | private MsgTypeInviteTypeEnum(String desc) {
|
| | | private final String icon;
|
| | | |
| | | private MsgTypeInviteTypeEnum(String desc, String icon) {
|
| | | this.desc = desc;
|
| | | this.icon = icon;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | |
| | | public String getIcon() {
|
| | | return icon;
|
| | | }
|
| | | }
|
| | |
|
| | | @Column(name = "mi_id")
|
| | |
| | | @Table("yeshi_ec_msg_money")
|
| | | public class MsgMoneyDetail {
|
| | | public enum MsgTypeMoneyTypeEnum {
|
| | | fanli("资金到账"),
|
| | | share("资金到账"),
|
| | | invite("资金到账"),
|
| | | extract("提现"),
|
| | | fanliWeiQuan("资金退回"),
|
| | | shareWeiQuan("资金退回"),
|
| | | extractAutoWX("自动提现"),
|
| | | extractValid("提现账号验证"),
|
| | | inviteWeiQuan("团队奖金扣除"),
|
| | | orderReward("返利奖励"),
|
| | | systemEqualize("系统补齐"),
|
| | | fanliElme("返利到账"),
|
| | | subSidy("额外补贴"),
|
| | | redPackGiveOff("赠送红包完成"),
|
| | | redPackReceiveOff("赠送红包领取"),
|
| | | redPackGiveBack("红包退回"),
|
| | | redPackExchangePass("红包提现成功"),
|
| | | redPackExchangeReject("红包提现失败"),
|
| | | redPackOneStageReward("第一阶段-立得现金-成功邀请好友"),
|
| | | redPackTwoStageReward("第二阶段-递增奖励-好友完成订单"),
|
| | | redPackThreeStageReward("第三阶段-连续奖励-好友完成订单"),
|
| | | redPackUseSuccess("红包使用成功"),
|
| | | redPackUseFail("红包使用失败"),
|
| | | redPackForbid("红包封禁"),
|
| | | redPackForbidRemove("红包解封"),
|
| | | redPackDeduct("红包扣除"),
|
| | | orderTeamReward("团队奖励");
|
| | | fanli("资金到账", "http://img.flqapp.com/resource/msg/icon_msg_fanli.png"),
|
| | | share("资金到账", "http://img.flqapp.com/resource/msg/icon_msg_share_money.png"),
|
| | | invite("资金到账", "http://img.flqapp.com/resource/msg/icon_msg_invite_money.png"),
|
| | | extract("提现", "http://img.flqapp.com/resource/msg/icon_msg_extract.png"),
|
| | | fanliWeiQuan("资金退回","http://img.flqapp.com/resource/msg/icon_msg_fanli.png"),
|
| | | shareWeiQuan("资金退回", "http://img.flqapp.com/resource/msg/icon_msg_share_money.png"),
|
| | | extractAutoWX("自动提现", "http://img.flqapp.com/resource/money_detail/icon_system.png"),
|
| | | extractValid("提现账号验证", "http://img.flqapp.com/resource/msg/icon_msg_extract.png"),
|
| | | inviteWeiQuan("团队奖金扣除", "http://img.flqapp.com/resource/msg/icon_msg_invite_money.png"),
|
| | | orderReward("返利奖励","http://img.flqapp.com/resource/msg/icon_msg_order_reward.png"),
|
| | | systemEqualize("系统补齐","http://img.flqapp.com/resource/money_detail/icon_system.png"),
|
| | | fanliElme("返利到账", "http://img.flqapp.com/resource/msg/icon_msg_fanli.png"),
|
| | | subSidy("额外补贴", "http://img.flqapp.com/resource/msg/icon_msg_subsidy.png"),
|
| | | redPackGiveOff("赠送红包完成", "http://img.flqapp.com/resource/msg/icon_hongbao_give.png"),
|
| | | redPackReceiveOff("赠送红包领取","http://img.flqapp.com/resource/msg/icon_hongbao_give.png"),
|
| | | redPackGiveBack("红包退回", "http://img.flqapp.com/resource/msg/icon_hongbao_give.png"),
|
| | | redPackExchangePass("红包提现成功", "http://img.flqapp.com/resource/msg/icon_hongbao_tixian.png"),
|
| | | redPackExchangeReject("红包提现失败", "http://img.flqapp.com/resource/msg/icon_hongbao_tixian.png"),
|
| | | redPackOneStageReward("第一阶段-立得现金-成功邀请好友","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | redPackTwoStageReward("第二阶段-递增奖励-好友完成订单","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | redPackThreeStageReward("第三阶段-连续奖励-好友完成订单","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | redPackUseSuccess("红包使用成功","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | redPackUseFail("红包使用失败","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | redPackForbid("红包封禁","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | redPackForbidRemove("红包解封","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | redPackDeduct("红包扣除","http://img.flqapp.com/img/tlj/icon_tlj.png"),
|
| | | orderTeamReward("团队奖励","http://img.flqapp.com/resource/msg/icon_msg_team_reward.png");
|
| | |
|
| | | private final String desc;
|
| | | private final String icon;
|
| | |
|
| | | private MsgTypeMoneyTypeEnum(String desc) {
|
| | | private MsgTypeMoneyTypeEnum(String desc, String icon) {
|
| | | this.desc = desc;
|
| | | this.icon = icon;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | |
| | | public String getIcon() {
|
| | | return icon;
|
| | | }
|
| | | }
|
| | |
|
| | | @Column(name = "mm_id")
|
| | |
| | | couponActivate("免单券激活","http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png"),
|
| | | taoLiJin("推广红包","http://img.flqapp.com/resource/msg/icon_msg_other_tlj.png"),
|
| | | taoLiJinExchange("推广红包兑换金币","http://img.flqapp.com/resource/msg/icon_msg_other_system_give.png"),
|
| | | give("赠送",""),
|
| | | give("赠送","http://img.flqapp.com/resource/msg/icon_msg_other_integral.png"),
|
| | | exchange("金币兑换","http://img.flqapp.com/resource/msg/icon_msg_other_integral.png"),
|
| | | goldCoin("金币","http://img.flqapp.com/resource/msg/icon_msg_other_integral.png"),
|
| | | firstOrderReward("粉丝首单奖励邀请人金币","http://img.flqapp.com/resource/msg/icon_msg_other_integral.png"),
|
| | |
| | | <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" />
|
| | | <result column="extraInfo" property="extraInfo" jdbcType="VARCHAR"/>
|
| | | <association property="user" column="ma_uid"
|
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
|
| | | <id column="ma_uid" property="id" jdbcType="BIGINT" />
|
| | |
| | |
|
| | |
|
| | | <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 d.*,t.`mea_content` AS extraInfo from yeshi_ec_msg_account d
|
| | | LEFT JOIN `yeshi_ec_msg_extra` t ON (t.`mea_rid` = d.`ma_id` AND t.`mea_type` = 'account')
|
| | | where d.ma_uid = #{uid,jdbcType=BIGINT} |
| | | order by d.ma_update_time desc |
| | | limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | | <select id="countByUid" resultType="java.lang.Long"
|
| | |
| | | <if test="createTime != null">mea_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where mea_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="getByRidAndType" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_msg_extra d |
| | | WHERE d.`mea_rid` = #{rid} AND d.`mea_type` = #{type} |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <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" />
|
| | |
|
| | | <result column="extraInfo" property="extraInfo" jdbcType="VARCHAR"/>
|
| | | <association property="inviteUser" column="mi_invite_id"
|
| | | javaType="com.yeshi.fanli.entity.bus.user.ThreeSale">
|
| | | <id column="mi_invite_id" property="id" jdbcType="BIGINT" />
|
| | |
| | |
|
| | |
|
| | | <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 <include refid="Base_Column_List" />,u.`id`,u.`nick_name`,u.`portrait`,
|
| | | te.`mea_content` AS extraInfo 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` |
| | | LEFT JOIN `yeshi_ec_msg_extra` te ON (te.`mea_rid` = i.`mi_id` AND te.`mea_type` = 'invite')
|
| | | where mi_uid = #{uid} |
| | | order by mi_update_time desc |
| | | limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | |
|
| | |
| | | <result column="mm_order_type" property="orderType" jdbcType="INTEGER" />
|
| | | <result column="mm_desc" property="desc" jdbcType="VARCHAR" />
|
| | | <result column="mm_content" property="content" jdbcType="VARCHAR" />
|
| | | <result column="extraInfo" property="extraInfo" jdbcType="VARCHAR"/>
|
| | | <association property="user" column="mm_uid"
|
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
|
| | | <id column="mm_uid" property="id" jdbcType="BIGINT" />
|
| | |
| | | #{sourceId,jdbcType=BIGINT} and mm_type=#{type}
|
| | | </select>
|
| | | <select id="listByUid" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | , mm_source_id as mm_source_id_extract, mm_source_id as
|
| | | mm_source_id_alipayvalid from yeshi_ec_msg_money where mm_uid =
|
| | | #{uid,jdbcType=BIGINT} order by mm_update_time desc limit
|
| | | #{start},#{count}
|
| | | select d.*, d.mm_source_id as mm_source_id_extract, d.mm_source_id as mm_source_id_alipayvalid |
| | | ,t.`mea_content` AS extraInfo from yeshi_ec_msg_money d
|
| | | LEFT JOIN `yeshi_ec_msg_extra` t ON (t.`mea_rid` = d.`mm_id` AND t.`mea_type` = 'money')
|
| | | where d.mm_uid =#{uid,jdbcType=BIGINT} order by d.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
|
| | |
| | | <result column="mo_source_id" property="sourceId" jdbcType="BIGINT" />
|
| | | <result column="mo_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
| | | <result column="mo_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | <result column="extraInfo" property="extraInfo" jdbcType="VARCHAR"/>
|
| | | <association property="user" column="mo_uid"
|
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
|
| | | <id column="mo_uid" property="id" jdbcType="BIGINT" />
|
| | |
| | | from yeshi_ec_msg_other where mo_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <select id="listByUid" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_msg_other where mo_uid = #{uid,jdbcType=BIGINT} order by
|
| | | mo_create_time desc limit #{start},#{count}
|
| | | select d.*, t.`mea_content` AS extraInfo from yeshi_ec_msg_other d
|
| | | LEFT JOIN `yeshi_ec_msg_extra` t ON (t.`mea_rid` = d.`mo_id` AND t.`mea_type` = 'other')
|
| | | where mo_uid = #{uid,jdbcType=BIGINT} |
| | | order by mo_create_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_other where mo_uid
|
| | |
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgMoneyDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | 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.money.msg.MsgMoneyDetailService;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private UserMsgReadStateService userMsgReadStateService;
|
| | | |
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | |
|
| | | @Override
|
| | | public void addMsgMoneyDetail(MsgMoneyDetail detail) throws MsgMoneyDetailException {
|
| | |
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } else {
|
| | | MsgMoneyDetail update = new MsgMoneyDetail();
|
| | | update.setId(msg.getId());
|
| | |
| | | update.setRead(false);
|
| | | update.setStateDesc(detail.getStateDesc());
|
| | | msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
|
| | | msgExtraService.updateMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | }
|
| | |
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
|
| | | if (detail.getAlipayAccountValid() == null || detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | |
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } else {
|
| | | MsgMoneyDetail update = new MsgMoneyDetail();
|
| | | update.setId(msg.getId());
|
| | |
| | | update.setRead(false);
|
| | | update.setStateDesc(detail.getStateDesc());
|
| | | msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
|
| | | msgExtraService.updateMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | }
|
| | |
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.fanli) {
|
| | | if (detail.getMoney() == null || detail.getGoodsCount() == 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);
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.fanliWeiQuan
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.inviteWeiQuan
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.shareWeiQuan) {
|
| | | if (detail.getMoney() == 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.orderReward) {
|
| | | if (detail.getMoney() == 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.systemEqualize) {
|
| | | if (detail.getMoney() == 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.extractAutoWX) {
|
| | | if (detail.getMoney() == null || detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | |
|
| | | MsgMoneyDetail msg = msgMoneyDetailMapper.selectBySourceIdAndMsgType(detail.getExtract().getId(),
|
| | | MsgTypeMoneyTypeEnum.extractAutoWX);
|
| | | 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.redPackGiveOff
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackReceiveOff
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackGiveBack
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangePass
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangeReject
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackOneStageReward
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackTwoStageReward
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackThreeStageReward
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseFail
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseSuccess
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackDeduct
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbidRemove
|
| | | || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbid) {
|
| | | if (detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.subSidy) {
|
| | | if (detail.getMoney() == null || detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.orderTeamReward) {
|
| | | if (detail.getMoney() == null || detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.fanliElme) {
|
| | | if (detail.getMoney() == null || detail.getUser() == null)
|
| | | } else {
|
| | | if(detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | |
| | | msgExtraMapper.insertSelective(msgExtra);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void updateMsgExtra(long rid, String content, String type) {
|
| | | MsgExtra msgExtra = msgExtraMapper.getByRidAndType(rid, type);
|
| | | if (msgExtra == null) {
|
| | | addMsgExtra(rid, content, type);
|
| | | } else {
|
| | | MsgExtra upExtra = new MsgExtra();
|
| | | upExtra.setId(msgExtra.getId());
|
| | | upExtra.setContent(content);
|
| | | msgExtraMapper.updateByPrimaryKeySelective(upExtra);
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.order.msg;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.push.PushContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | 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;
|
| | | import com.yeshi.fanli.entity.config.push.PushMsgFactory;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.factory.msg.MsgOrderDetailFactory;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
|
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVOFactory;
|
| | |
|
| | | @Service
|
| | | public class UserOrderMsgNotificationServiceImpl implements UserOrderMsgNotificationService {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFanLiStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFanLiOrder(uid, orderId, orderType, 0, orderState, payMoney,
|
| | | money, null);
|
| | | // 暂时不推送
|
| | | try {
|
| | | msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | |
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createShareOrder(uid, orderId, orderType, 0, orderState, payMoney,
|
| | | money, null);
|
| | | // 暂时不推送
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderInviteStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderInviteStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, 0, orderState,
|
| | | payMoney, money, null);
|
| | | // 暂时不推送
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | |
|
| | | }
|
| | |
|
| | | private String getShortName(String name) {
|
| | | if (name != null && name.length() > 2) {
|
| | | return name.charAt(0) + "**" + name.charAt(name.length() - 1);
|
| | | }
|
| | | return name;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareFirstLevelStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney,
|
| | | BigDecimal money, int goodsCount, int orderState, String sourceUserName) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, goodsCount, orderState,
|
| | | payMoney, money, String.format("由直接粉丝【%s】分享", getShortName(sourceUserName)));
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (money == null || money.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createInviteOrderStatisticed(orderType, orderId, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareFirstLevelStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney,
|
| | | BigDecimal money, int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, 0, orderState,
|
| | | payMoney, money, null);
|
| | | // 暂时不推送
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFoundSuccess(Long uid, String orderId, int orderSource, int type, BigDecimal payMoney, BigDecimal money, int goodsCount, Date submitTime) {
|
| | | createOrderFoundSuccess(uid, orderId, orderSource, type, goodsCount, payMoney, money, submitTime, "");
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFoundFail(Long uid, String orderId, BigDecimal payMoney, int orderType, Date happendDate) {
|
| | | createOrderFoundFail(uid, orderId, null);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderElmeStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createElmeOrder(uid, orderId, orderType, orderState, payMoney,
|
| | | money, null);
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (payMoney == null || payMoney.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderElmeStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createElmeOrder(uid, orderId, orderType, orderState, payMoney,
|
| | | money, null);
|
| | | // 暂时不推送
|
| | | try {
|
| | | msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * 创建订单被统计消息
|
| | |
| | | * @param beiZhu 备注信息 - 非必填
|
| | | * @return
|
| | | */
|
| | | @Transactional
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private void addOrderStatistics(Long uid, String orderId, int source, int type, int goodsCount,
|
| | | BigDecimal payMoney, BigDecimal money, Date downTime, String beiZhu, boolean needNotify) {
|
| | | try {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 订单找回成功
|
| | | * @param uid
|
| | | * @param orderId 订单号
|
| | | * @param source 订单来源:淘宝、京东、天猫
|
| | | * @param type 订单类型:自购、分享、团队
|
| | | * @param goodsCount 商品数量
|
| | | * @param payMoney 付款金额
|
| | | * @param money 返利金额
|
| | | * @param submitTime 提交时间
|
| | | * @param beiZhu 备注信息 - 非必填
|
| | | * @return
|
| | | */
|
| | | private void createOrderFoundSuccess(Long uid, String orderId, int source, int type, int goodsCount,
|
| | | BigDecimal payMoney, BigDecimal money, Date submitTime, String beiZhu) {
|
| | |
|
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void orderFoundSuccess(Long uid, String orderId, int orderSource, int type, BigDecimal payMoney, BigDecimal money, int goodsCount, Date submitTime) {
|
| | | try {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createOrderFoundSuccess(uid, orderId, source, type, goodsCount, payMoney, money, submitTime, beiZhu);
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createOrderFoundSuccess(uid, orderId, orderSource, type, goodsCount, payMoney, money, submitTime, "");
|
| | | // 消息
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFoundFail(Long uid, String orderId) {
|
| | | try {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createOrderFoundFail(uid, orderId, "");
|
| | | // 消息
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | // 消息内容
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 订单找回失败
|
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | private void createOrderFoundFail(Long uid, String orderId, String beiZhu) {
|
| | | try {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createOrderFoundFail(uid, orderId, beiZhu);
|
| | | // 消息
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | |
| | | private MsgExtraService msgExtraService;
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void bindingSuccess(Long uid, int type) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_BIND);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_BIND));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void unBindingSuccess(Long uid, int type) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_UNBIND);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_UNBIND));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void changeBindingSuccess(Long uid, int type) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_CHANGE);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_CHANGE));
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void connectSuccess(Long uid, Long lessUid) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createConnectAccount(uid, lessUid);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void userRank(Long uid, String orderType, int orderCount, String rankName) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createUserRank(uid, orderType, orderCount, rankName);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void taoBaoAuthFail(Long uid, String taoBaoNickName, String reason) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createBindFail(uid, MsgAccountDetailFactory.TYPE_TB, |
| | | MsgAccountDetailFactory.WAY_CHANGE, reason);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail(MsgAccountDetailFactory.createBindFail(uid, MsgAccountDetailFactory.TYPE_TB, |
| | | MsgAccountDetailFactory.WAY_CHANGE, reason));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void createChangeInviteCode(Long uid, String oldCode, String newCode) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createChangeInviteCode(uid, oldCode, newCode);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail(MsgAccountDetailFactory.createChangeInviteCode(uid, oldCode, newCode));
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void vipPreUpgrade(Long uid, String originalName, String upName, int days, long targetNum1, Long targetNum2,Integer type) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.vipPreUpgrade(uid, originalName, upName, days, targetNum1,
|
| | | targetNum2, type, null);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail( MsgAccountDetailFactory.vipPreUpgrade(uid, originalName, upName, days, targetNum1,
|
| | | targetNum2, type, null));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void vipUpgradeSuccess(Long uid, int days) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.vipUpgradeSuccess(uid, days);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail(MsgAccountDetailFactory.vipUpgradeSuccess(uid, days));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void vipUpgradeFail(Long uid, String reason) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.vipUpgradeFail(uid, reason);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | saveDetail(MsgAccountDetailFactory.vipUpgradeFail(uid, reason));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void teacherInvite(Long uid, String nickname,String kefuName, String kefuWX) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.teacherInvite(uid, nickname, kefuName, kefuWX);
|
| | | saveDetail(MsgAccountDetailFactory.teacherInvite(uid, nickname, kefuName, kefuWX));
|
| | | }
|
| | | |
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void teacherSuccess(Long uid, int days, String kefuName, String kefuWX) {
|
| | | saveDetail(MsgAccountDetailFactory.teacherSuccess(uid, days, kefuName, kefuWX));
|
| | | }
|
| | | |
| | | |
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private void saveDetail(MsgAccountDetail detail) {
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void teacherSuccess(Long uid, int days, String kefuName, String kefuWX) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.teacherSuccess(uid, days, kefuName, kefuWX);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | public interface MsgExtraService {
|
| | |
|
| | | public void addMsgExtra(long rid, String content, String type);
|
| | |
|
| | | |
| | | |
| | | public void updateMsgExtra(long rid, String content, String type);
|
| | |
|
| | | }
|
| | |
| | | public void orderFanLiStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, Date downTime);
|
| | |
|
| | | /**
|
| | | * 返利订单状态改变
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderFanLiStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState);
|
| | |
|
| | | /**
|
| | | * 分享订单统计
|
| | |
| | | public void orderShareStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, Date downTime);
|
| | |
|
| | | /**
|
| | | * 分享订单状态改变
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderShareStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState);
|
| | | |
| | |
|
| | | /**
|
| | | * 邀请订单统计
|
| | |
| | | public void orderInviteStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, Date downTime);
|
| | |
|
| | | /**
|
| | | * 邀请订单状态改变
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderInviteStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState);
|
| | |
|
| | | public void orderShareFirstLevelStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney,
|
| | | BigDecimal money, int goodsCount, int orderState, String sourceUserName);
|
| | |
|
| | | /**
|
| | | * 分享订单状态改变
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderShareFirstLevelStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney,
|
| | | BigDecimal money, int orderState);
|
| | |
|
| | | /**
|
| | | * 订单找回成功
|
| | |
| | | * @param orderType
|
| | | * 1-淘宝
|
| | | */
|
| | | public void orderFoundFail(Long uid, String orderId, BigDecimal payMoney, int orderType, Date happendDate);
|
| | | public void orderFoundFail(Long uid, String orderId);
|
| | |
|
| | | /**
|
| | | * 饿了么订单统计
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param orderType
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderElmeStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState);
|
| | |
|
| | | /**
|
| | | * 饿了么订单状态改变
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param orderType
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderElmeStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState);
|
| | |
|
| | | }
|
| | |
| | | public void changeBindingSuccess(Long uid, int type);
|
| | |
|
| | | /**
|
| | | * 账号合并成功
|
| | | * |
| | | * @param uid
|
| | | * @param lessUid
|
| | | */
|
| | | public void connectSuccess(Long uid, Long lessUid);
|
| | |
|
| | | /**
|
| | | * 用户等级变化
|
| | | * |
| | | * @param uid
|
| | | * @param orderType
|
| | | * -订单类型(邀请订单/返利订单/分享订单)
|
| | | * @param orderCount
|
| | | * @param rankName
|
| | | */
|
| | | public void userRank(Long uid, String orderType, int orderCount, String rankName);
|
| | |
|
| | | /**
|
| | | * 淘宝授权失败
|
| | | *
|
| | | * @param uid
|
| | |
| | | return detail;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 账号解绑成功
|
| | | * |
| | | * @param uid
|
| | | * @param type
|
| | | * @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;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 账号更换成功
|
| | | * |
| | | * @param uid
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public static MsgAccountDetail createChangeBindingAccount(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.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;
|
| | | }
|
| | |
|
| | | // 账号等级
|
| | | public static MsgAccountDetail createUserRank(Long uid, String orderType, int orderCount, String rankName) {
|
| | | if (uid == null || rankName == null)
|
| | | return null;
|
| | | |
| | |
|
| | | String msg = String.format(
|
| | | "恭喜你,上月<highlight>%s</highlight>订单达到<highlight>%s</highlight>单,已为你升级为<highlight>%s</highlight>用户,将会获得对应的福利和特权。",
|
| | | orderType, orderCount + "", rankName);
|
| | | MsgAccountDetail detail = new MsgAccountDetail();
|
| | | detail.setBeiZhu("无");
|
| | | detail.setContent(msg);
|
| | | detail.setTitle("账号等级");
|
| | | detail.setType(MsgTypeAccountTypeEnum.level);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | // 淘宝授权失败
|
| | | public static MsgAccountDetail createTaoBaoAuthFail(Long uid, String taoBaoNickName, String reason) {
|
| | | if (uid == null || reason == null)
|
| | | return null;
|
| | |
|
| | | JSONArray msg = new JSONArray();
|
| | | JSONObject item = new JSONObject();
|
| | | item.put("name", "账号");
|
| | | item.put("content", String.format("淘宝昵称[%s]", taoBaoNickName));
|
| | | msg.add(item);
|
| | |
|
| | | item = new JSONObject();
|
| | | item.put("name", "原因");
|
| | | item.put("content", reason);
|
| | | msg.add(item);
|
| | |
|
| | | MsgAccountDetail detail = new MsgAccountDetail();
|
| | | detail.setBeiZhu("无");
|
| | | detail.setContent(msg.toString());
|
| | | detail.setTitle("淘宝账号授权失败");
|
| | | detail.setType(MsgTypeAccountTypeEnum.taoBaoAuthFail);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * 普通会员、高级会员自动提升
|
| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | 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;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
| | |
|
| | | 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 orderType, int goodsCount,
|
| | | int orderState, BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | if (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.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(orderState);
|
| | | 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 orderType, int goodsCount,
|
| | | int orderState, BigDecimal payMoney, BigDecimal money, 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.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(orderState);
|
| | | 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 orderType, int goodsCount,
|
| | | int orderState, BigDecimal payMoney, BigDecimal money, 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.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(orderState);
|
| | | detail.setType(MsgTypeOrderTypeEnum.share);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 订单找回
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * -订单号
|
| | | * @param isSuccess-是否找回成功
|
| | | * @param payMoney
|
| | | * @param orderType
|
| | | * 1-淘宝订单 3-拼多多订单 4-京东订单
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createFoundOrder(Long uid, String orderId, boolean isSuccess, BigDecimal payMoney,
|
| | | int orderType, Date happendDate, String beiZhu) {
|
| | | if (orderId == null || uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(isSuccess ? 1 : 0);
|
| | | detail.setType(MsgTypeOrderTypeEnum.found);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setHappendDate(happendDate);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 饿了么订单消息
|
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param orderType
|
| | | * @param orderState
|
| | | * @param payMoney
|
| | | * @param money
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createElmeOrder(Long uid, String orderId, int orderType,
|
| | | int orderState, BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | if (uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setHongBaoMoney(money);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(orderState);
|
| | | detail.setType(MsgTypeOrderTypeEnum.elme);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | | |
| | |
|
| | | |
| | |
|
| | |
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | public static UserMsgVO create(MsgMoneyDetail msg) {
|
| | |
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | // 新版消息
|
| | | if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
|
| | | Gson gson = new Gson();
|
| | | items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
|
| | |
|
| | | UserMsgVO userMsgVO = new UserMsgVO();
|
| | | userMsgVO.setIcon(msg.getMsgType().getIcon());
|
| | | userMsgVO.setTitle(msg.getMsgType().getDesc());
|
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | }
|
| | | |
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
|
| | | // 提现
|
| | |
| | | */
|
| | | public static UserMsgVO create(MsgAccountDetail msg) {
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | // 新版消息
|
| | | if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
|
| | | Gson gson = new Gson();
|
| | | items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
|
| | |
|
| | | UserMsgVO userMsgVO = new UserMsgVO();
|
| | | userMsgVO.setIcon(msg.getType().getIcon());
|
| | | userMsgVO.setTitle(msg.getType().getDesc());
|
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | }
|
| | | |
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
|
| | | if (msg.getType() == MsgTypeAccountTypeEnum.vipPgrade) {// 等级升级
|
| | |
| | | */
|
| | | public static UserMsgVO create(MsgInviteDetail msg) {
|
| | | MsgTypeInviteTypeEnum msgType = msg.getMsgType();
|
| | | |
| | | // 新版消息
|
| | | if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
|
| | | Gson gson = new Gson();
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
|
| | |
|
| | | UserMsgVO userMsgVO = new UserMsgVO();
|
| | | userMsgVO.setIcon(msg.getMsgType().getIcon());
|
| | | userMsgVO.setTitle(msg.getMsgType().getDesc());
|
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | }
|
| | | |
| | | |
| | | if (msgType != null && msgType == MsgTypeInviteTypeEnum.receiveGift) {
|
| | | if (StringUtil.isNullOrEmpty(msg.getDesc()))
|
| | | return null;
|
| | |
| | | */
|
| | | public static UserMsgVO create(MsgOtherDetail msg) {
|
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | // 新版消息
|
| | | if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
|
| | | Gson gson = new Gson();
|
| | | items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
|
| | |
|
| | | UserMsgVO userMsgVO = new UserMsgVO();
|
| | | userMsgVO.setIcon(msg.getType().getIcon());
|
| | | userMsgVO.setTitle(msg.getType().getDesc());
|
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | }
|
| | | |
| | | String icon = null;
|
| | |
|
| | | if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan
|
| | | || msg.getType() == MsgTypeOtherTypeEnum.couponWelfareMianDan
|
| | | || msg.getType() == MsgTypeOtherTypeEnum.couponReward
|