yujian
2019-11-25 806bfd1be601735121afcf252ceeaf8f06fd6464
品牌修改
10个文件已修改
282 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/brand/BrandInfoMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/brand/BrandInfo.java 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgMoneyDetail.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/brand/BrandInfoMapper.xml 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackForbidServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/brand/BrandInfoMapper.java
@@ -5,7 +5,6 @@
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.brand.BrandClass;
import com.yeshi.fanli.entity.brand.BrandInfo;
import com.yeshi.fanli.vo.brand.BrandInfoVO;
fanli/src/main/java/com/yeshi/fanli/entity/brand/BrandInfo.java
@@ -15,55 +15,68 @@
 *
 */
@Table("yeshi_ec_brand_info")
public class BrandInfo implements Serializable{
public class BrandInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Expose
    @Column(name = "bf_id")
    private Long id;
    @Column(name = "bf_cid")
    private BrandClass brandClass;// 分类
    @Expose
    @Column(name = "bf_name")
    private String name; // 品牌名称
    @Column(name = "bf_shop_key")
    private String shopKey; // 店铺匹配词
    @Column(name = "bf_search_key")
    private String searchKey; // 搜索词
    @Expose
    @Column(name = "bf_icon")
    private String icon; // 品牌logo
    
    @Column(name = "bf_shop_key")
    private String shopKey; // 店铺匹配词
    @Column(name = "bf_search_key")
    private String searchKey; // 搜索词
    @Column(name = "bf_shop_key_jd")
    private String shopKeyJD; // 店铺匹配词
    @Column(name = "bf_search_key_jd")
    private String searchKeyJD; // 搜索词
    @Column(name = "bf_shop_key_pdd")
    private String shopKeyPDD; // 店铺匹配词
    @Column(name = "bf_search_key_pdd")
    private String searchKeyPDD; // 搜索词
    @Column(name = "bf_goods_total")
    private Integer goodsTotal; // 拥有商品数量
    @Column(name = "bf_shop_total")
    private Integer shopTotal; // 拥有商品数量
    @Column(name = "bf_weight")
    private Double weight; // 权重:值越大越前
    @Column(name = "bf_state")
    private Integer state;// 状态:0停用 1启用
    @Column(name = "bf_create_time")
    private Date createTime;
    @Column(name = "bf_update_time")
    private Date updateTime;
    public BrandInfo() {}
    public BrandInfo() {
    }
    public BrandInfo(Long id) {
        this.id = id;
    }
    public Long getId() {
        return id;
    }
@@ -128,7 +141,6 @@
        this.updateTime = updateTime;
    }
    public Integer getGoodsTotal() {
        return goodsTotal;
    }
@@ -152,4 +164,44 @@
    public void setShopKey(String shopKey) {
        this.shopKey = shopKey;
    }
    public String getShopKeyJD() {
        return shopKeyJD;
    }
    public void setShopKeyJD(String shopKeyJD) {
        this.shopKeyJD = shopKeyJD;
    }
    public String getSearchKeyJD() {
        return searchKeyJD;
    }
    public void setSearchKeyJD(String searchKeyJD) {
        this.searchKeyJD = searchKeyJD;
    }
    public String getShopKeyPDD() {
        return shopKeyPDD;
    }
    public void setShopKeyPDD(String shopKeyPDD) {
        this.shopKeyPDD = shopKeyPDD;
    }
    public String getSearchKeyPDD() {
        return searchKeyPDD;
    }
    public void setSearchKeyPDD(String searchKeyPDD) {
        this.searchKeyPDD = searchKeyPDD;
    }
    public Integer getShopTotal() {
        return shopTotal;
    }
    public void setShopTotal(Integer shopTotal) {
        this.shopTotal = shopTotal;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgMoneyDetail.java
@@ -42,7 +42,8 @@
        redPackThreeStageReward("第三阶段-连续奖励-好友完成订单"),
        redPackUseSuccess("红包使用成功"),
        redPackUseFail("红包使用失败"),
        redPackForbid("红包功能封禁");
        redPackForbid("红包封禁"),
        redPackDeduct("红包扣除");
        private final String desc;
fanli/src/main/java/com/yeshi/fanli/mapping/brand/BrandInfoMapper.xml
@@ -5,50 +5,69 @@
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.brand.BrandInfo">
    <id column="bf_id" property="id" jdbcType="BIGINT"/>
    <result column="bf_name" property="name" jdbcType="VARCHAR"/>
    <result column="bf_icon" property="icon" jdbcType="VARCHAR"/>
    <result column="bf_shop_key" property="shopKey" jdbcType="VARCHAR"/>
    <result column="bf_search_key" property="searchKey" jdbcType="VARCHAR"/>
    <result column="bf_icon" property="icon" jdbcType="VARCHAR"/>
    <result column="bf_shop_key_jd" property="shopKeyJD" jdbcType="VARCHAR"/>
    <result column="bf_search_key_jd" property="searchKeyJD" jdbcType="VARCHAR"/>
    <result column="bf_shop_key_pdd" property="shopKeyPDD" jdbcType="VARCHAR"/>
    <result column="bf_search_key_pdd" property="searchKeyPDD" jdbcType="VARCHAR"/>
    <result column="bf_goods_total" property="goodsTotal" jdbcType="INTEGER"/>
    <result column="bf_weight" property="weight" jdbcType="VARCHAR"/>
    <result column="bf_shop_total" property="shopTotal" jdbcType="INTEGER"/>
    <result column="bf_weight" property="weight" jdbcType="DOUBLE"/>
    <result column="bf_state" property="state" jdbcType="INTEGER"/>
    <result column="bf_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="bf_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    <association column="bf_cid" property="brandClass" javaType="com.yeshi.fanli.entity.brand.BrandClass">
        <id column="bf_cid" property="id" jdbcType="BIGINT" />    
    </association>
  </resultMap>
  
   <resultMap id="ResultVOMap" type="com.yeshi.fanli.vo.brand.BrandInfoVO">
    <id column="bf_id" property="id" jdbcType="BIGINT"/>
  <resultMap id="ResultVOMap" type="com.yeshi.fanli.vo.brand.BrandInfoVO">
    <id column="bf_id" property="id" jdbcType="BIGINT"/>
    <result column="bf_name" property="name" jdbcType="VARCHAR"/>
    <result column="bf_shop_key" property="shopKey" jdbcType="VARCHAR"/>
    <result column="bf_search_key" property="searchKey" jdbcType="VARCHAR"/>
    <result column="bf_icon" property="icon" jdbcType="VARCHAR"/>
    <result column="bf_weight" property="weight" jdbcType="DOUBLE"/>
    <result column="bf_shop_key" property="shopKey" jdbcType="VARCHAR"/>
    <result column="bf_search_key" property="searchKey" jdbcType="VARCHAR"/>
    <result column="bf_shop_key_jd" property="shopKeyJD" jdbcType="VARCHAR"/>
    <result column="bf_search_key_jd" property="searchKeyJD" jdbcType="VARCHAR"/>
    <result column="bf_shop_key_pdd" property="shopKeyPDD" jdbcType="VARCHAR"/>
    <result column="bf_search_key_pdd" property="searchKeyPDD" jdbcType="VARCHAR"/>
    <result column="bf_goods_total" property="goodsTotal" jdbcType="INTEGER"/>
    <result column="bf_shop_total" property="shopTotal" jdbcType="INTEGER"/>
    <result column="bf_weight" property="weight" jdbcType="DOUBLE"/>
    <result column="bf_state" property="state" jdbcType="INTEGER"/>
    <result column="bf_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="bf_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    <association column="bf_cid" property="brandClass" javaType="com.yeshi.fanli.entity.brand.BrandClass">
    <association column="bf_cid" property="brandClass" javaType="com.yeshi.fanli.entity.brand.BrandClass">
        <id column="bf_cid" property="id" jdbcType="BIGINT" />    
    </association>
  </resultMap>
  
  <sql id="Base_Column_List">bf_id,bf_cid,bf_name,bf_shop_key,bf_search_key,bf_icon,bf_goods_total,bf_weight,bf_state,bf_create_time,bf_update_time</sql>
  <sql id="Base_Column_List">bf_id,bf_cid,bf_name,bf_icon,bf_shop_key,bf_search_key,bf_shop_key_jd,bf_search_key_jd,bf_shop_key_pdd,bf_search_key_pdd,bf_goods_total,bf_shop_total,bf_weight,bf_state,bf_create_time,bf_update_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_brand_info where bf_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_brand_info where bf_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.brand.BrandInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_info (bf_id,bf_cid,bf_name,bf_shop_key,bf_search_key,bf_icon,bf_goods_total,bf_weight,bf_state,bf_create_time,bf_update_time) values (#{id,jdbcType=BIGINT},#{brandClass.id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{shopKey,jdbcType=VARCHAR},#{searchKey,jdbcType=VARCHAR},#{icon,jdbcType=VARCHAR},#{goodsTotal,jdbcType=INTEGER},#{weight,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.brand.BrandInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_info (bf_id,bf_cid,bf_name,bf_icon,bf_shop_key,bf_search_key,bf_shop_key_jd,bf_search_key_jd,bf_shop_key_pdd,bf_search_key_pdd,bf_goods_total,bf_shop_total,bf_weight,bf_state,bf_create_time,bf_update_time) values (#{id,jdbcType=BIGINT},#{brandClass.id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{icon,jdbcType=VARCHAR},#{shopKey,jdbcType=VARCHAR},#{searchKey,jdbcType=VARCHAR},#{shopKeyJD,jdbcType=VARCHAR},#{searchKeyJD,jdbcType=VARCHAR},#{shopKeyPDD,jdbcType=VARCHAR},#{searchKeyPDD,jdbcType=VARCHAR},#{goodsTotal,jdbcType=INTEGER},#{shopTotal,jdbcType=INTEGER},#{weight,jdbcType=DOUBLE},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.brand.BrandInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_brand_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">bf_id,</if>
      <if test="brandClass != null">bf_cid,</if>
      <if test="name != null">bf_name,</if>
      <if test="icon != null">bf_icon,</if>
      <if test="shopKey != null">bf_shop_key,</if>
      <if test="searchKey != null">bf_search_key,</if>
      <if test="icon != null">bf_icon,</if>
      <if test="shopKeyJD != null">bf_shop_key_jd,</if>
      <if test="searchKeyJD != null">bf_search_key_jd,</if>
      <if test="shopKeyPDD != null">bf_shop_key_pdd,</if>
      <if test="searchKeyPDD != null">bf_search_key_pdd,</if>
      <if test="goodsTotal != null">bf_goods_total,</if>
      <if test="shopTotal != null">bf_shop_total,</if>
      <if test="weight != null">bf_weight,</if>
      <if test="state != null">bf_state,</if>
      <if test="createTime != null">bf_create_time,</if>
@@ -58,32 +77,43 @@
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="brandClass != null">#{brandClass.id,jdbcType=BIGINT},</if>
      <if test="name != null">#{name,jdbcType=VARCHAR},</if>
      <if test="icon != null">#{icon,jdbcType=VARCHAR},</if>
      <if test="shopKey != null">#{shopKey,jdbcType=VARCHAR},</if>
      <if test="searchKey != null">#{searchKey,jdbcType=VARCHAR},</if>
      <if test="icon != null">#{icon,jdbcType=VARCHAR},</if>
      <if test="shopKeyJD != null">#{shopKeyJD,jdbcType=VARCHAR},</if>
      <if test="searchKeyJD != null">#{searchKeyJD,jdbcType=VARCHAR},</if>
      <if test="shopKeyPDD != null">#{shopKeyPDD,jdbcType=VARCHAR},</if>
      <if test="searchKeyPDD != null">#{searchKeyPDD,jdbcType=VARCHAR},</if>
      <if test="goodsTotal != null">#{goodsTotal,jdbcType=INTEGER},</if>
      <if test="weight != null">#{weight,jdbcType=VARCHAR},</if>
      <if test="shopTotal != null">#{shopTotal,jdbcType=INTEGER},</if>
      <if test="weight != null">#{weight,jdbcType=DOUBLE},</if>
      <if test="state != null">#{state,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.brand.BrandInfo">update yeshi_ec_brand_info set bf_cid = #{brandClass.id,jdbcType=BIGINT},bf_name = #{name,jdbcType=VARCHAR},bf_shop_key = #{shopKey,jdbcType=VARCHAR},bf_search_key = #{searchKey,jdbcType=VARCHAR},bf_icon = #{icon,jdbcType=VARCHAR},bf_goods_total = #{goodsTotal,jdbcType=INTEGER},bf_weight = #{weight,jdbcType=VARCHAR},bf_state = #{state,jdbcType=INTEGER},bf_create_time = #{createTime,jdbcType=TIMESTAMP},bf_update_time = #{updateTime,jdbcType=TIMESTAMP} where bf_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.brand.BrandInfo">update yeshi_ec_brand_info set bf_cid = #{brandClass.id,jdbcType=BIGINT},bf_name = #{name,jdbcType=VARCHAR},bf_icon = #{icon,jdbcType=VARCHAR},bf_shop_key = #{shopKey,jdbcType=VARCHAR},bf_search_key = #{searchKey,jdbcType=VARCHAR},bf_shop_key_jd = #{shopKeyJD,jdbcType=VARCHAR},bf_search_key_jd = #{searchKeyJD,jdbcType=VARCHAR},bf_shop_key_pdd = #{shopKeyPDD,jdbcType=VARCHAR},bf_search_key_pdd = #{searchKeyPDD,jdbcType=VARCHAR},bf_goods_total = #{goodsTotal,jdbcType=INTEGER},bf_shop_total = #{shopTotal,jdbcType=INTEGER},bf_weight = #{weight,jdbcType=DOUBLE},bf_state = #{state,jdbcType=INTEGER},bf_create_time = #{createTime,jdbcType=TIMESTAMP},bf_update_time = #{updateTime,jdbcType=TIMESTAMP} where bf_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.brand.BrandInfo">update yeshi_ec_brand_info
    <set>
      <if test="brandClass != null">bf_cid=#{brandClass.id,jdbcType=BIGINT},</if>
      <if test="name != null">bf_name=#{name,jdbcType=VARCHAR},</if>
      <if test="icon != null">bf_icon=#{icon,jdbcType=VARCHAR},</if>
      <if test="shopKey != null">bf_shop_key=#{shopKey,jdbcType=VARCHAR},</if>
      <if test="searchKey != null">bf_search_key=#{searchKey,jdbcType=VARCHAR},</if>
      <if test="icon != null">bf_icon=#{icon,jdbcType=VARCHAR},</if>
      <if test="shopKeyJD != null">bf_shop_key_jd=#{shopKeyJD,jdbcType=VARCHAR},</if>
      <if test="searchKeyJD != null">bf_search_key_jd=#{searchKeyJD,jdbcType=VARCHAR},</if>
      <if test="shopKeyPDD != null">bf_shop_key_pdd=#{shopKeyPDD,jdbcType=VARCHAR},</if>
      <if test="searchKeyPDD != null">bf_search_key_pdd=#{searchKeyPDD,jdbcType=VARCHAR},</if>
      <if test="goodsTotal != null">bf_goods_total=#{goodsTotal,jdbcType=INTEGER},</if>
      <if test="weight != null">bf_weight=#{weight,jdbcType=VARCHAR},</if>
      <if test="shopTotal != null">bf_shop_total=#{shopTotal,jdbcType=INTEGER},</if>
      <if test="weight != null">bf_weight=#{weight,jdbcType=DOUBLE},</if>
      <if test="state != null">bf_state=#{state,jdbcType=INTEGER},</if>
      <if test="createTime != null">bf_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">bf_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where bf_id = #{id,jdbcType=BIGINT}
  </update>
  <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
   <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
    delete from yeshi_ec_brand_info WHERE bf_id in
        <foreach collection="list" item="item" open="(" close=")"
            separator=",">#{item}</foreach>
@@ -91,7 +121,7 @@
   
  <select id="listBrandInfoVO" resultMap="ResultVOMap">
      SELECT * FROM yeshi_ec_brand_info d
    WHERE d.`bf_state` = 1 AND d.bf_goods_total <![CDATA[>=]]> 3
    WHERE d.`bf_state` = 1 AND d.bf_goods_total <![CDATA[>=]]> 3  AND d.bf_shop_total <![CDATA[>]]> 0
         <if test="cid != null">AND d.`bf_cid` = #{cid} </if>
    ORDER BY d.`bf_weight` DESC,d.bf_id
    LIMIT ${start},${count}
@@ -99,13 +129,14 @@
  
  <select id="countBrandInfo" resultType="Long">
      SELECT IFNULL(COUNT(d.`bf_id`),0) FROM yeshi_ec_brand_info d
    WHERE d.`bf_state` = 1 AND d.bf_goods_total <![CDATA[>=]]> 3
    WHERE d.`bf_state` = 1 AND d.bf_goods_total <![CDATA[>=]]> 3  AND d.bf_shop_total <![CDATA[>]]> 0
         <if test="cid != null">AND d.`bf_cid` = #{cid} </if>
  </select>
  
  <select id="listValidByCidToApp" resultMap="BaseResultMap">
      SELECT * FROM yeshi_ec_brand_info d
    WHERE d.`bf_state` = 1 AND d.`bf_cid` = #{cid}  AND d.bf_goods_total <![CDATA[>=]]> 3
    WHERE d.`bf_state` = 1 AND d.`bf_cid` = #{cid}  AND d.bf_goods_total <![CDATA[>=]]>3
          AND d.bf_shop_total <![CDATA[>]]> 0
    ORDER BY d.`bf_weight` DESC
  </select>
  
@@ -117,7 +148,7 @@
  <select id="countValidByCidToApp" resultType="Long">
      SELECT IFNULL(COUNT(d.`bf_id`),0) FROM yeshi_ec_brand_info d
    WHERE d.`bf_state` = 1  <if test="cid != null">AND d.`bf_cid` = #{cid} </if>
          AND d.bf_goods_total <![CDATA[>=]]> 3
          AND d.bf_goods_total <![CDATA[>=]]> 3  AND d.bf_shop_total <![CDATA[>]]> 0
  </select>
  
  <select id="listValidAll" resultMap="BaseResultMap">
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java
@@ -68,15 +68,21 @@
     * @return
     */
    private int addBrandGoodsTB(BrandInfo brandInfo) {
        Date date = new Date();
        String shopKey = brandInfo.getShopKey();
        if (StringUtil.isNullOrEmpty(shopKey))
            shopKey = brandInfo.getName();
        if (StringUtil.isNullOrEmpty(shopKey)) {
            // 删除之前的
            brandGoodsCaheDao.removeByDate(brandInfo.getId(), 1 , date);
            // 删除店铺
            brandShopCaheService.removeByDateAndType(brandInfo.getId(), 11, date);
            return 0;
        }
        
        String searchKey = brandInfo.getSearchKey();
        if (StringUtil.isNullOrEmpty(searchKey))
            searchKey = brandInfo.getName();
        
        Date date = new Date();
        SearchFilter filter = new SearchFilter();
        filter.setKey(searchKey);
        filter.setPage(1);
@@ -133,18 +139,23 @@
     * @return
     */
    private int addBrandGoodsJD(BrandInfo brandInfo) {
        String shopKey = brandInfo.getShopKey();
        if (StringUtil.isNullOrEmpty(shopKey))
            shopKey = brandInfo.getName();
        Date date = new Date();
        String shopKey = brandInfo.getShopKeyJD();
        if (StringUtil.isNullOrEmpty(shopKey)) {
            // 删除店铺
            brandShopCaheService.removeByDateAndType(brandInfo.getId(), 20, date);
            // 删除之前
            brandGoodsCaheDao.removeByDate(brandInfo.getId(), 2 , date);
            return 0;
        }
        
        String searchKey = brandInfo.getSearchKey();
        String searchKey = brandInfo.getSearchKeyJD();
        if (StringUtil.isNullOrEmpty(searchKey))
            searchKey = brandInfo.getName();
        
        int count = 0;
        JDSearchResult result = null;
        String way = configService.get("jd_api_search_key");
        Date date = new Date();
        
        // 删除店铺
        brandShopCaheService.removeByDateAndType(brandInfo.getId(), 20, date);
@@ -213,7 +224,17 @@
     * @return
     */
    private int addBrandGoodsPDD(BrandInfo brandInfo) {
        String searchKey = brandInfo.getSearchKey();
        Date date = new Date();
        String shopKey = brandInfo.getShopKeyPDD();
        if (StringUtil.isNullOrEmpty(shopKey)) {
            // 删除之前
            brandGoodsCaheDao.removeByDate(brandInfo.getId(), 3, date);
            // 删除之前店铺
            brandShopCaheService.removeByDateAndType(brandInfo.getId(), 30, date);
            return 0;
        }
        String searchKey = brandInfo.getSearchKeyPDD();
        if (StringUtil.isNullOrEmpty(searchKey))
            searchKey = brandInfo.getName();
        
@@ -225,7 +246,6 @@
        PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter);
        
        int count = 0;
        Date date = new Date();
        
        if (result != null) {
            List<PDDGoodsDetail> goodsList = result.getGoodsList();
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
@@ -21,6 +21,7 @@
import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
import com.yeshi.fanli.entity.brand.BrandGoodsCahe;
import com.yeshi.fanli.entity.brand.BrandInfo;
import com.yeshi.fanli.entity.brand.BrandShopCahe;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.entity.taobao.TaoBaoShop;
@@ -149,6 +150,13 @@
                public void run() {
                    int goodsTotal = brandGoodsCaheService.addBrandGoods(record);
                    record.setGoodsTotal(goodsTotal);
                    List<BrandShopCahe> listshop = brandShopCaheService.getByBrandId(record.getId());
                    if (listshop == null) {
                        record.setShopTotal(0);
                    } else {
                        record.setShopTotal(listshop.size());
                    }
                    brandInfoMapper.updateByPrimaryKeySelective(record);
                }
            });
@@ -288,6 +296,13 @@
            BrandInfo updateInfo = new BrandInfo();
            updateInfo.setId(brandInfo.getId());
            updateInfo.setGoodsTotal((int)goodsTotal);
            List<BrandShopCahe> listshop = brandShopCaheService.getByBrandId(brandInfo.getId());
            if (listshop == null) {
                updateInfo.setShopTotal(0);
            } else {
                updateInfo.setShopTotal(listshop.size());
            }
            brandInfoMapper.updateByPrimaryKeySelective(updateInfo);
        }
    }
@@ -310,6 +325,13 @@
            brandInfo.setGoodsTotal(goodsTotal);
            brandInfo.setUpdateTime(new Date());
            List<BrandShopCahe> listshop = brandShopCaheService.getByBrandId(brandInfo.getId());
            if (listshop == null) {
                brandInfo.setShopTotal(0);
            } else {
                brandInfo.setShopTotal(listshop.size());
            }
            brandInfoMapper.updateByPrimaryKeySelective(brandInfo);
        }
    }
@@ -325,7 +347,7 @@
    }
    @Override
    @Cacheable(value = "brandCache", key = "'listValidByCidToApp-'+#cid")
//    @Cacheable(value = "brandCache", key = "'listValidByCidToApp-'+#cid")
    public List<BrandInfo> listValidByCidToApp(Long cid) {
        if (cid == null)
            return null;
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java
@@ -81,11 +81,11 @@
     */
    @Override
    public void addBrandShopPDD(BrandInfo brandInfo) {
        String shopKey = brandInfo.getShopKey();
        String shopKey = brandInfo.getShopKeyPDD();
        if (StringUtil.isNullOrEmpty(shopKey))
            shopKey = brandInfo.getName();
            return;
        
        String searchKey = brandInfo.getSearchKey();
        String searchKey = brandInfo.getSearchKeyPDD();
        if (StringUtil.isNullOrEmpty(searchKey))
            searchKey = brandInfo.getName();
        
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java
@@ -136,6 +136,7 @@
                || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackThreeStageReward
                || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseFail
                || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseSuccess
                || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackDeduct
                || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbid) {
            if (detail.getUser() == null)
                throw new MsgMoneyDetailException(2, "消息信息不全");
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackForbidServiceImpl.java
@@ -108,7 +108,7 @@
        dto.setTime(time);
        dto.setReason("红包产生、使用、赠送环节涉嫌违规");
        dto.setHandle("清空所有红包余额");
        userMoneyMsgNotificationService.redPackMsg(record.getUid(), MsgTypeMoneyTypeEnum.redPackForbid, new Gson().toJson(dto), "封禁信息无法申诉,请按照规则使用红包功能");
        userMoneyMsgNotificationService.redPackMsg(uid, MsgTypeMoneyTypeEnum.redPackForbid, new Gson().toJson(dto), "封禁无法申诉,请按照规则使用红包功能  ");
    }
    
@@ -131,6 +131,13 @@
        } catch (RedPackDetailException e) {
            throw new RedPackForbidException(1, e.getMsg());
        }
        //消息
        MsgRedPackExchangeContentDTO dto = new MsgRedPackExchangeContentDTO();
        dto.setBalance(redPackBalanceService.getBalance(uid).setScale(2).toString());
        dto.setMoney(money.setScale(2).toString());
        dto.setReason("红包产生、使用、赠送环节涉嫌违规");
        userMoneyMsgNotificationService.redPackMsg(uid, MsgTypeMoneyTypeEnum.redPackDeduct, new Gson().toJson(dto), "扣除金额无法申诉,请按照规则获得红包");
    }
    
    @Override
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -770,6 +770,35 @@
            return new UserMsgVO("http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackDeduct) { // 红包扣除消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除金额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("¥" + dto.getBalance(), COLOR_HIGHLIGHT_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO("http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackOneStageReward
                || msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackTwoStageReward
                || msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackThreeStageReward) { // 红包邀请获得