yujian
2019-08-22 11c098089f8c4714188e91032e5a19e8fe94bf96
Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

# Conflicts:
# fanli/src/main/java/com/yeshi/fanli/mapping/integral/IntegralTaskRecordMapper.xml
6个文件已修改
61 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/IntegralControllerV2.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/integral/IntegralTaskRecordMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/integral/IntegralGetService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/IntegralControllerV2.java
@@ -528,7 +528,6 @@
        try {
            record = integralGetService.addEventStatistic(uid, event, null);
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        if (record == null) {
            out.print(JsonUtil.loadFalseResult("添加失败"));
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -10,6 +10,7 @@
import java.util.regex.Pattern;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Controller;
@@ -34,6 +35,7 @@
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
import com.yeshi.fanli.exception.integral.IntegralGetException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.exception.user.TokenRecordException;
import com.yeshi.fanli.log.LogHelper;
@@ -41,6 +43,7 @@
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.config.SuperHotSearchService;
import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
import com.yeshi.fanli.service.inter.integral.IntegralGetService;
import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
@@ -114,6 +117,9 @@
    @Resource
    private TokenRecordService tokenRecordService;
    @Resource
    private IntegralGetService integralGetService;
    /**
     * 粘贴板信息推荐
     * 
@@ -141,7 +147,6 @@
                return;
            }
        }
        TaoBaoGoodsBrief tb = null;
        String URL_REGEX = "(((http|https)://)|(www\\.))[a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,6}(:[0-9]{1,4})?(/[a-zA-Z0-9\\&%_\\./-~-]*)?";
@@ -243,7 +248,6 @@
            return;
        }
        JSONObject data = new JSONObject();
        
        if(VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) {
@@ -265,7 +269,8 @@
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            data.put("type", 3);
            data.put("goods", gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods, null, fanLiRate, shareRate)));
            data.put("goods",
                    gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods, null, fanLiRate, shareRate)));
            out.print(JsonUtil.loadTrueResult(data));
            return;
        }
@@ -339,9 +344,9 @@
        return false;
    }
    /**
     * 口令领取
     *
     * @param acceptData
     * @param kw
     * @param goodsType
@@ -356,8 +361,6 @@
            out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
        }
    }
    
    /**
     * 搜索候选词
@@ -411,7 +414,7 @@
     */
    @RequestMapping(value = "searchGoods")
    public void searchGoods(AcceptData acceptData, Integer goodsType, String key, Integer page, String filter,
            Integer order, PrintWriter out) {
            Integer order, Long uid, HttpSession session, PrintWriter out) {
        if (goodsType == null || goodsType < 1 || goodsType > 3) {
            out.print(JsonUtil.loadFalseResult(1, "请传递正确平台参数"));
            return;
@@ -428,6 +431,30 @@
        }
        final String searchkey = key.trim();
        if (uid != null) {
            if (page == 1) {
                session.setAttribute("searchFirstTime", System.currentTimeMillis());
            } else if (page == 2) {
                Long lastTime = (Long) session.getAttribute("searchFirstTime");
                if (lastTime != null && System.currentTimeMillis() - lastTime >= 15 * 1000L) {// 超过15s浏览
                    ThreadUtil.run(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                // 增加金币
                                integralGetService.addSearchResultScan(uid,key);
                            } catch (IntegralGetException e) {
                                e.printStackTrace();
                            }
                        }
                    });
                }
            }
        }
        executor.execute(new Runnable() {
            @Override
            public void run() {
fanli/src/main/java/com/yeshi/fanli/mapping/integral/IntegralTaskRecordMapper.xml
@@ -172,10 +172,9 @@
        </if>
        <if test="maxTime!=null">
            and #{maxTime}>ir_uid
            and #{maxTime}>ir_create_time
        </if>
    </select>
    <select id="countByTaskIdTodayNum" resultType="Integer">
        SELECT IFNULL(COUNT(tr.`ir_id`),0) FROM yeshi_ec_integral_task_record tr
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java
@@ -145,7 +145,7 @@
        } else if (type == CommonContentTypeEnum.chaoPinReMai) {
            navList = getCommonNav();
        } else if (type == CommonContentTypeEnum.mianDan) {
            navList = getCommonNav();
            navList = new ArrayList<>();
        }
        return navList;
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java
@@ -4,6 +4,7 @@
import javax.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.entity.integral.IntegralTask;
@@ -14,6 +15,7 @@
import com.yeshi.fanli.service.inter.integral.IntegralGetService;
import com.yeshi.fanli.service.inter.integral.IntegralTaskRecordService;
import com.yeshi.fanli.service.inter.integral.IntegralTaskService;
import com.yeshi.fanli.util.RedisManager;
import net.sf.json.JSONObject;
@@ -25,6 +27,9 @@
    @Resource
    private IntegralTaskRecordService integralTaskRecordService;
    @Resource
    private RedisManager redisManager;
    @Override
    public IntegralTaskRecord addEventStatistic(Long uid, String event, JSONObject params) throws IntegralGetException {
@@ -84,15 +89,14 @@
    }
    @Cacheable(value = "integralGetCache", key = "'addSearchResultScan-'+#uid+'-'+kw")
    @Override
    public void addSearchResultScan(Long uid) throws IntegralGetException {
        // TODO Auto-generated method stub
    public void addSearchResultScan(Long uid, String kw) throws IntegralGetException {
        System.out.println("搜索");
    }
    @Override
    public void addShareInvite(Long uid) throws IntegralGetException {
        // TODO Auto-generated method stub
    }
fanli/src/main/java/com/yeshi/fanli/service/inter/integral/IntegralGetService.java
@@ -39,7 +39,7 @@
     * @param uid
     * @throws IntegralGetException
     */
    public void addSearchResultScan(Long uid) throws IntegralGetException;
    public void addSearchResultScan(Long uid,String kw) throws IntegralGetException;
    /**
     * 分享邀请图