admin
2020-10-27 b6853bf0a1411e39360f184b3bee5836010dbd22
CMQ接口优化
7个文件已修改
55 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5S11Controller.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/src/main/java/com/qcloud/cmq/Account.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java
@@ -6,6 +6,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.SystemEnum;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -40,9 +41,9 @@
    private DeviceSexService deviceSexService;
    
    /**
     * 改变性别
     *
     * @param acceptData
     * @param sex
     * @param out
@@ -63,6 +64,7 @@
    
    /**
     * 获取导航栏内容
     *
     * @param acceptData
     * @param uid
     * @param out
@@ -78,6 +80,13 @@
            list.addAll(listNavbar);
        } 
        
        //非板栗快省删除网页类导航
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).getType() == NavbarTypeEnum.web && acceptData.getSystem() != SystemEnum.blks) {
                list.remove(i--);
            }
        }
        if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
            for (int i = 0; i < list.size(); i ++) {
                NavbarTypeEnum type = list.get(i).getType();
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -979,7 +979,7 @@
        JSONObject data = new JSONObject();
        JSONArray array = new JSONArray();
        PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter,uid+"");
        PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter,Constant.PDD_SEARCH_CUSTOMER_PARAMS);
        if (result != null) {
            count = result.getTotalCount();
            Gson gson = JsonUtil.getApiCommonGson();
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5S11Controller.java
@@ -70,8 +70,8 @@
        if (StringUtil.isNullOrEmpty(token)) {
            try {
                TaoKeOfficialActivityConvertResultDTO dto = TaoKeApiUtil.officialActivityConvert("19507100253",
                        "1574926757600", info.getRelationId());
                String link = dto.getShort_click_url();
                        "20150318020001156", info.getRelationId());
                String link = dto.getClick_url();
                if (!StringUtil.isNullOrEmpty(link)) {
                    token = TaoKeApiUtil.getTKToken("http://img.flqapp.com/resource/s11/banner.jpg", "【天猫双12】上亿红包等你来拆!",
@@ -125,8 +125,8 @@
        if (StringUtil.isNullOrEmpty(token)) {
            try {
                TaoKeOfficialActivityConvertResultDTO dto = TaoKeApiUtil.officialActivityConvert("19507100253",
                        "1574926757600", info.getRelationId());
                String link = dto.getShort_click_url();
                        "20150318020001158", info.getRelationId());
                String link = dto.getClick_url();
                if (!StringUtil.isNullOrEmpty(link)) {
                    token = TaoKeApiUtil.getTKToken("http://img.flqapp.com/resource/s11/banner.jpg", "预售商品付定金,得奖金!",
                            link);
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarServiceImpl.java
@@ -336,7 +336,7 @@
    }
    @Override
    @Cacheable(value = "configCache", key = "'listQueryEffectiveNavbar'")
    @Cacheable(value = "configCache", key = "'listQueryEffectiveNavbar-'+#system")
    public List<HomeNavbar> listQueryEffectiveNavbar(SystemEnum system) {
        return homeNavbarMapper.listQueryEffective(system);
    }
@@ -350,7 +350,7 @@
    
    
    @Override
    @Cacheable(value = "configCache", key = "'listQueryFixedNavbar'")
    @Cacheable(value = "configCache", key = "'listQueryFixedNavbar-'+#system")
    public List<HomeNavbar> listQueryFixedNavbar(SystemEnum system) {
        return homeNavbarMapper.listQueryFixedNavbar(system);
    }
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java
@@ -306,6 +306,18 @@
            Gson gson = new GsonBuilder().disableHtmlEscaping().create();
            return gson.fromJson(resultArray.optJSONObject(0).toString(), type);
        }
        return null;
    }
    public static PDDPromotionUrl convertResourceUrl(String pid) {
        Map<String, String> map = new HashMap<>();
        map.put("type", "pdd.ddk.resource.url.gen");
        map.put("pid", pid);
        map.put("resource_type", "39998");
        map.put("url", "https://mobile.yangkeduo.com/attendance.html?_pdd_fs=1&_pdd_tc=ffffff&_pdd_sbs=1&type=1&id=155075");
        String result = baseRequest(map);
        System.out.println(result);
        return null;
    }
utils/pom.xml
@@ -9,7 +9,7 @@
  </parent>
  <groupId>com.yeshi</groupId>
  <artifactId>utils</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <version>0.0.2-SNAPSHOT</version>
  <name>utils</name>
  <url>http://maven.apache.org</url>
  <properties>
utils/src/main/java/com/qcloud/cmq/Account.java
@@ -80,7 +80,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
    /**
@@ -101,7 +101,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
    /**
@@ -129,7 +129,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
        int totalCount = jsonObj.getInt("totalCount");
        JSONArray jsonArray = jsonObj.getJSONArray("queueList");
@@ -192,7 +192,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
@@ -214,7 +214,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }
@@ -242,7 +242,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
        int totalCount = jsonObj.getInt("totalCount");
@@ -337,7 +337,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),code+"");
    }
@@ -365,7 +365,7 @@
        JSONObject jsonObj = new JSONObject(result);
        int code = jsonObj.getInt("code");
        if(code != 0)
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId"));
            throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code"));
    }