admin
2019-08-02 90b211c63f9d596aa90b508f76eb916a30b68731
Merge remote-tracking branch 'origin/div' into div
13个文件已修改
251 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/HotSearchAdminController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/HotSearchMapper.java 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDCategoryInfo.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDCouponInfo.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDFilter.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDShopInfo.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/goods/HotSearchMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/config/HotSearchService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/HotSearchAdminController.java
@@ -70,7 +70,7 @@
     * @param out
     */
    @RequestMapping(value = "newHotSearchList")
    public void newHotSearchList(String callback, Integer pageIndex, String key, Long systemId,
    public void newHotSearchList(String callback, Integer pageIndex, String key, Long systemId, Integer useType,
            PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
@@ -80,13 +80,13 @@
        int pageSize = Constant.PAGE_SIZE;
        try {
            List<HotSearch> list = hotSearchService.listQuery(pageIndex - 1, pageSize, key, systemId);
            List<HotSearch> list = hotSearchService.listQuery(pageIndex - 1, pageSize, key, systemId, useType);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无更多数据"));
                return;
            }
            int count = hotSearchService.countList(key, systemId);
            int count = hotSearchService.countList(key, systemId, useType);
            int totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1;
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -141,7 +141,7 @@
    @RequestMapping(value = "getUserOrderList")
    public void getUserOrderList(String callback, Integer pageIndex, Integer pageSize, Integer keyType, 
            String key,    Integer state, Integer type, Integer orderState, String startTime, String endTime,
            Integer source, PrintWriter out) {
            Integer sourceType, PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
@@ -163,16 +163,12 @@
        }
        try {
            long count = 0;
            // 查询列表
            List<CommonOrderVO> list = commonOrderService.listQuery((pageIndex - 1) * pageSize, pageSize, keyType, key,
                    state, type, orderState, startTime, endTime, source);
                    state, type, orderState, startTime, endTime, sourceType);
            if (list != null && list.size() > 0) {
                // 统计总数
                count = commonOrderService.countQuery(keyType, key, state, type, orderState, startTime, endTime, source);
            }
            long count = commonOrderService.countQuery(keyType, key, state, type, orderState, startTime, endTime, sourceType);
            // 查询是否维权
            for (CommonOrderVO order : list) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -712,7 +712,7 @@
        try {
            ShareGoodsRecordDTO shareRecord = userShareGoodsRecordService.addRecordGoodsDetail(uid, goodsId,
                    Constant.SOURCE_TYPE_JD);
                    Constant.SOURCE_TYPE_PDD);
            shareInfo.setShareId(shareRecord.getRedisKey());
        } catch (Exception e) {
            try {
@@ -732,7 +732,7 @@
                history.setUser(new UserInfo(uid));
                history.setHongbao(shareMoney);
                history.setCreateTime(new Date());
                history.setGoodsType(Constant.SOURCE_TYPE_JD);
                history.setGoodsType(Constant.SOURCE_TYPE_PDD);
                history.setTkCode(null);
                history.setLink(null);
                history.setQuanLink(null);
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/HotSearchMapper.java
@@ -1,29 +1,29 @@
package com.yeshi.fanli.dao.mybatis.goods;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.search.HotSearch;
public interface HotSearchMapper extends BaseMapper<HotSearch>{
    /**
     * 查询
     * @param start
     * @param count
     * @param key
     * @param systemId
     * @return
     */
    List<HotSearch> listQuery(@Param("start") long start, @Param("count") int count,
            @Param("key") String key, @Param("systemId")Long systemId);
    /**
     * 查询统计
     * @param key
     * @param systemId
     * @return
     */
    int countQuery(@Param("key") String key, @Param("systemId")Long systemId);
package com.yeshi.fanli.dao.mybatis.goods;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.search.HotSearch;
public interface HotSearchMapper extends BaseMapper<HotSearch>{
    /**
     * 查询
     * @param start
     * @param count
     * @param key
     * @param systemId
     * @return
     */
    List<HotSearch> listQuery(@Param("start") long start, @Param("count") int count,
            @Param("key") String key, @Param("systemId")Long systemId, @Param("useType")Integer useType);
    /**
     * 查询统计
     * @param key
     * @param systemId
     * @return
     */
    int countQuery(@Param("key") String key, @Param("systemId")Long systemId, @Param("useType")Integer useType);
}
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDCategoryInfo.java
@@ -1,46 +1,65 @@
package com.yeshi.fanli.dto.jd;
public class JDCategoryInfo {
private Long cid1;
private Long cid2;
private Long cid3;
private String cid1Name;
private String cid2Name;
private String cid3Name;
public Long getCid1() {
    return cid1;
}
public void setCid1(Long cid1) {
    this.cid1 = cid1;
}
public Long getCid2() {
    return cid2;
}
public void setCid2(Long cid2) {
    this.cid2 = cid2;
}
public Long getCid3() {
    return cid3;
}
public void setCid3(Long cid3) {
    this.cid3 = cid3;
}
public String getCid1Name() {
    return cid1Name;
}
public void setCid1Name(String cid1Name) {
    this.cid1Name = cid1Name;
}
public String getCid2Name() {
    return cid2Name;
}
public void setCid2Name(String cid2Name) {
    this.cid2Name = cid2Name;
}
public String getCid3Name() {
    return cid3Name;
}
public void setCid3Name(String cid3Name) {
    this.cid3Name = cid3Name;
}
import java.io.Serializable;
public class JDCategoryInfo implements Serializable {
    /**
         *
         */
    private static final long serialVersionUID = 1L;
    private Long cid1;
    private Long cid2;
    private Long cid3;
    private String cid1Name;
    private String cid2Name;
    private String cid3Name;
    public Long getCid1() {
        return cid1;
    }
    public void setCid1(Long cid1) {
        this.cid1 = cid1;
    }
    public Long getCid2() {
        return cid2;
    }
    public void setCid2(Long cid2) {
        this.cid2 = cid2;
    }
    public Long getCid3() {
        return cid3;
    }
    public void setCid3(Long cid3) {
        this.cid3 = cid3;
    }
    public String getCid1Name() {
        return cid1Name;
    }
    public void setCid1Name(String cid1Name) {
        this.cid1Name = cid1Name;
    }
    public String getCid2Name() {
        return cid2Name;
    }
    public void setCid2Name(String cid2Name) {
        this.cid2Name = cid2Name;
    }
    public String getCid3Name() {
        return cid3Name;
    }
    public void setCid3Name(String cid3Name) {
        this.cid3Name = cid3Name;
    }
}
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDCouponInfo.java
@@ -1,8 +1,13 @@
package com.yeshi.fanli.dto.jd;
import java.io.Serializable;
import java.math.BigDecimal;
public class JDCouponInfo {
public class JDCouponInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer bindType;//券种类 (优惠券种类:0 - 全品类,1 - 限品类(自营商品),2 - 限店铺,3 - 店铺限商品券)
    private BigDecimal discount;//券面额
    private String link;//券链接
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDFilter.java
@@ -1,9 +1,16 @@
package com.yeshi.fanli.dto.jd;
import java.io.Serializable;
import java.util.List;
public class JDFilter {
public class JDFilter implements Serializable{
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    // 佣金
    public final static String SORTNAME_COMMISSION = "commission";
    // 佣金比例
fanli/src/main/java/com/yeshi/fanli/dto/jd/JDShopInfo.java
@@ -1,6 +1,13 @@
package com.yeshi.fanli.dto.jd;
public class JDShopInfo {
import java.io.Serializable;
public class JDShopInfo implements Serializable{
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private Integer shopId;
    private String shopName;
    public Integer getShopId() {
fanli/src/main/java/com/yeshi/fanli/mapping/goods/HotSearchMapper.xml
@@ -43,6 +43,7 @@
        WHERE 1=1 
        <if test="systemId != null">AND sp.`system_id` = #{systemId}</if>
        <if test="key != null and key != ''">AND hc.`name` LIKE '%#{key}%'</if>
        <if test="useType != null">AND hc.`use_type` = #{useType}</if>
        )A 
    LEFT JOIN  yeshi_ec_hot_search h ON A.hid = h.`id`
    ORDER BY h.`orderby` DESC
@@ -59,6 +60,7 @@
        <if test="key != null and key != ''">
            AND hc.`name` LIKE '%#{key}%'
        </if>
        <if test="useType != null">AND hc.`use_type` = #{useType}</if>
  </select>
  
</mapper>
fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java
@@ -54,9 +54,9 @@
    
    @Override
    public List<HotSearch> listQuery(int start, int count, String key, Long systemId) throws Exception {
    public List<HotSearch> listQuery(int start, int count, String key, Long systemId, Integer useType) throws Exception {
        
        List<HotSearch> listObj = hotSearchMapper.listQuery(start, count, key, systemId);
        List<HotSearch> listObj = hotSearchMapper.listQuery(start, count, key, systemId, useType);
        if (listObj == null || listObj.size() == 0) {
            return null;
@@ -120,8 +120,8 @@
    }
    
    @Override
    public int countList(String key, Long systemId) {
        return hotSearchMapper.countQuery(key, systemId);
    public int countList(String key, Long systemId, Integer useType) {
        return hotSearchMapper.countQuery(key, systemId, useType);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
@@ -248,7 +248,7 @@
    
    @Override
    public void isCommonTemplateRightPDD(String template) throws ShareGoodsTextTemplateException {
        String[] keys = new String[] { "{标题}", "{商品原价}", "{月销量}", "{短链接}", "{多多口令}" };
        String[] keys = new String[] { "{标题}", "{商品原价}", "{月销量}", "{短链接}"};
        int keysCount = 0;
        for (String key : keys)
            if (template != null && template.contains(key))
@@ -371,18 +371,23 @@
        if (!hasCoupon) {
            template = template.replace("{标题}", goods.getGoodsName()).replace("{商品原价}",  BigDecimalUtil.getWithNoZera(price).toString())
                    .replace("{总销量}", goods.getSalesTip()).replace("{短链接}", shortLink);
            if (StringUtil.isNullOrEmpty(token)) {
                template = template.replace("复制本条信息,{多多口令}打开拼多多", "点击链接,打开拼多多");
            } else {
                template = template.replace("{多多口令}", token);
            }
        } else {
            BigDecimal amount =  MoneyBigDecimalUtil.div(new BigDecimal(goods.getCouponDiscount()), hundred);
            template = template.replace("{标题}", goods.getGoodsName()).replace("{商品原价}", BigDecimalUtil.getWithNoZera(price).toString())
                    .replace("{总销量}", goods.getSalesTip()).replace("{短链接}", shortLink)
                    .replace("{优惠券面额}", BigDecimalUtil.getWithNoZera(amount).toString())
                    .replace("{优惠券价}", BigDecimalUtil.getWithNoZera(PinDuoDuoUtil.getQuanPrice(goods)).toString());
        }
        if (StringUtil.isNullOrEmpty(token)) {
            template = template.replace("{多多口令}打开拼多多,", "");
        } else {
            template = template.replace("{多多口令}", token);
            if (StringUtil.isNullOrEmpty(token)) {
                template = template.replace("{多多口令}", "");
            } else {
                template = template.replace("{多多口令}", token);
            }
        }
        
        return template;
fanli/src/main/java/com/yeshi/fanli/service/inter/config/HotSearchService.java
@@ -13,8 +13,8 @@
    void updateHotSearch(HotSearch hotSearch);
    public List<HotSearch> listQuery(int start, int count, String key, Long systemId) throws Exception;
    public List<HotSearch> listQuery(int start, int count, String key, Long systemId, Integer useType) throws Exception;
    int countList(String key, Long systemId);
    int countList(String key, Long systemId, Integer useType);
}
fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java
@@ -104,7 +104,6 @@
                textStyleVO.setContent("京东自营");
                textStyleVO.setColor("#E42219");
                labels.add(textStyleVO);
                goodsInfo.setLabels(labels);
            }
            // 拼团价
            JDPingouInfo pinGouInfo = otherDTO.getPinGouInfo();
@@ -117,12 +116,12 @@
                }
                ClientTextStyleVO textStyleVO = new ClientTextStyleVO();
                textStyleVO.setContent("拼购");
                textStyleVO.setColor("#FF9600");
                textStyleVO.setColor("#E42219");
                labels.add(textStyleVO);
                goodsInfo.setLabels(labels);
            } else {
                goodsInfo.setPriceName("京东价");
            }
            goodsInfo.setLabels(labels);
        } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
            goodsInfo.setSalesType(4); // 总销量
            goodsInfo.setPriceName("拼团价");
@@ -431,6 +430,7 @@
        // 京东自营标签
        String owner = goods.getOwner();
        if (!StringUtil.isNullOrEmpty(owner) && "g".equalsIgnoreCase(owner)) {
            goodsInfo.setShopType(21); // 京东自营
            if (labels == null) {
                labels = new ArrayList<ClientTextStyleVO>();
            }
@@ -438,8 +438,6 @@
            textStyleVO.setContent("京东自营");
            textStyleVO.setColor("#E42219");
            labels.add(textStyleVO);
            goodsInfo.setLabels(labels);
            goodsInfo.setShopType(21); // 京东自营
        } else {
            goodsInfo.setShopType(20); // 京东
        }
@@ -455,13 +453,13 @@
            }
            ClientTextStyleVO textStyleVO = new ClientTextStyleVO();
            textStyleVO.setContent("拼购");
            textStyleVO.setColor("#FF9600");
            textStyleVO.setColor("#E42219");
            labels.add(textStyleVO);
            goodsInfo.setLabels(labels);
        } else {
            goodsInfo.setZkPrice(goods.getPrice());
            goodsInfo.setPriceName("京东价");
        }
        goodsInfo.setLabels(labels);
        
        // 店铺信息
        JDShopInfo shopInfo = goods.getShopInfo();