| | |
| | | JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex);
|
| | |
|
| | | // 2、顶部轮播图
|
| | | List<SwiperPicture> topPicList = getSwiperByCard("index_top",acceptData);
|
| | | List<SwiperPicture> topPicList = getSwiperByCard("index_top", acceptData);
|
| | | if (topPicList == null) {
|
| | | topPicList = new ArrayList<SwiperPicture>();
|
| | | }
|
| | |
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
|
| | | // 如果IOS当前版本处于审核状态就不返回
|
| | | } else {
|
| | | invitePicList = getSwiperByCard("index_invite",acceptData);
|
| | | invitePicList = getSwiperByCard("index_invite", acceptData);
|
| | | }
|
| | |
|
| | | if (invitePicList == null) {
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | List<SwiperPicture> invitePicList = getSwiperByCard("index_invite",acceptData);
|
| | | List<SwiperPicture> invitePicList = getSwiperByCard("index_invite", acceptData);
|
| | |
|
| | | return invitePicList;
|
| | | }
|
| | |
| | | */
|
| | | @RequestMapping(value = "getSpecialActivities")
|
| | | public void getSpecialActivities(AcceptData acceptData, Long uid, PrintWriter out, String callback) {
|
| | | int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
|
| | | List<Special> listSpecial = specialService.listByVersion(0, Integer.MAX_VALUE, "special_activities",
|
| | | platformCode, Integer.parseInt(acceptData.getVersion()));
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | |
|
| | | List<Special> list = new ArrayList<Special>();
|
| | | if (listSpecial != null) {
|
| | |
| | |
|
| | | LogHelper.test("获取PID耗时:" + (java.lang.System.currentTimeMillis() - startTime));
|
| | |
|
| | | final List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | // final List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | // 是否在服务端进行转链
|
| | | boolean convertInServer = configService.isConvertTaoBaoLinkInServer();
|
| | |
|
| | |
| | | }
|
| | |
|
| | | if (goods != null) {
|
| | | goodsList.add(goods);
|
| | | final TaoBaoGoodsBrief newGoods = goods;
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | TaoBaoGoodsBrief tb = null;
|
| | | if (goodsList.size() > 0) {
|
| | | tb = goodsList.get(0);
|
| | | }
|
| | | TaoBaoGoodsBrief tb = goods;
|
| | |
|
| | | if (tb == null) {
|
| | | out.print(JsonUtil.loadFalseResult(2, "商品不存在"));
|
| | |
| | | tb.setImgList(new ArrayList<>());
|
| | | }
|
| | |
|
| | | tb.getImgList().add(0, tb.getPictUrl());
|
| | | // tb.getImgList().add(0, tb.getPictUrl());
|
| | |
|
| | | List<String> finalImgList = new ArrayList<>();
|
| | | for (String img : tb.getImgList()) {
|
| | |
| | | if (!StringUtil.isNullOrEmpty(tb.getPictUrlWhite()))
|
| | | finalImgList.add(0, tb.getPictUrlWhite());
|
| | |
|
| | | // 移除相同图片
|
| | | if (finalImgList.size() > 0)
|
| | | for (int i = 0; i < finalImgList.size(); i++) {
|
| | | if (i < finalImgList.size() - 1)
|
| | | if (TbImgUtil.getTBSizeImg(finalImgList.get(i), 600)
|
| | | .equalsIgnoreCase(TbImgUtil.getTBSizeImg(finalImgList.get(i + 1), 600))) {
|
| | | finalImgList.remove(i--);
|
| | | }
|
| | | }
|
| | |
|
| | | tb.setImgList(finalImgList);
|
| | |
|
| | | // 大淘客商品过滤
|
| | | try {
|
| | | goods = daTaoKeGoodsDetailService.filterTaoBaoGoods(goods);
|
| | |
| | | WHERE sp.`b_state` = 0
|
| | | AND IF(sp.b_start_time IS NULL,TRUE, sp.b_start_time<![CDATA[<=]]> NOW())
|
| | | AND IF(sp.b_end_time IS NULL,TRUE, sp.b_end_time <![CDATA[>=]]> NOW())
|
| | | <if test="platform == 1 and versionCode!=null">
|
| | | |
| | | <if test="platform!=null and platform == 1 and versionCode!=null">
|
| | | AND IF(sp.`b_min_android_version_code` IS NOT NULL, #{versionCode}<![CDATA[>=]]> sp.b_min_android_version_code,TRUE)
|
| | | </if>
|
| | | <if test="platform == 2 and versionCode!=null">
|
| | | <if test="platform!=null and platform == 2 and versionCode!=null">
|
| | | AND IF(sp.`b_min_ios_version_code` IS NOT NULL, #{versionCode}<![CDATA[>=]]> sp.b_min_ios_version_code,TRUE)
|
| | | </if>
|
| | | <include refid="Sex_Screen" />
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws Exception {
|
| | | List<Special> listSpecial = specialMapper.queryByListPrimaryKey(list);
|
| | | for (Special special : listSpecial) {
|
| | |
| | | COSManager.getInstance().deleteFile(subPicture);
|
| | | }
|
| | | }
|
| | | |
| | | if (listSpecial != null)
|
| | | for (Special special : listSpecial) {
|
| | | List<AdActivityVersionControl> versionList = adActivityVersionControlService
|
| | | .listByTypeAndSourceId(AdActivityType.special, special.getId());
|
| | | if (versionList != null)
|
| | | for (AdActivityVersionControl control : versionList)
|
| | | adActivityVersionControlService.deleteByPrimaryKey(control.getId());
|
| | | }
|
| | | return specialMapper.deleteBatchByPrimaryKey(list);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "specialCache", key = "'listByVersion-'+#start+'-'+#count+'-'+#card+'-'+#platform+'-'+#versionCode")
|
| | | public List<Special> listByVersion(long start, int count, String card, Integer platform, Integer versionCode) {
|
| | | return specialMapper.listByVersion(start, count, card, platform, versionCode);
|
| | | public List<Special> listByVersion(long start, int count, String card, String platform, Integer versionCode) {
|
| | | List<Special> specialList = specialMapper.listByPlaceKey(card, null, null, null);
|
| | | filterSpecial(specialList, platform, versionCode);
|
| | | return specialList;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws SwiperPictureException {
|
| | |
|
| | | List<SwiperPicture> listSwiper = swiperPictureMapper.queryByListPrimaryKey(list);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (listSwiper != null)
|
| | | for (SwiperPicture picture : listSwiper) {
|
| | | List<AdActivityVersionControl> versionList = adActivityVersionControlService
|
| | | .listByTypeAndSourceId(AdActivityType.banner, picture.getId());
|
| | | if (versionList != null)
|
| | | for (AdActivityVersionControl control : versionList)
|
| | | adActivityVersionControlService.deleteByPrimaryKey(control.getId());
|
| | | }
|
| | | return swiperPictureMapper.deleteBatchByPrimaryKey(list);
|
| | | }
|
| | |
|
| | |
| | | * @param versionCode
|
| | | * @return
|
| | | */
|
| | | public List<Special> listByVersion(long start, int count, String card, Integer platform, Integer versionCode);
|
| | | public List<Special> listByVersion(long start, int count, String card, String platform, Integer versionCode);
|
| | |
|
| | |
|
| | | /**
|