| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | | import com.yeshi.fanli.exception.homemodule.HomeNavbarException;
|
| | | import com.yeshi.fanli.exception.homemodule.SpecialException;
|
| | |
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialPlaceService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.FilePathEnum;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | |
|
| | |
| | | record.setParams(null);
|
| | | } else if (!StringUtil.isJson(params)) {
|
| | | throw new SpecialException(1, "跳转参数非JSON格式");
|
| | | } else {
|
| | | record.setParams(params.trim());
|
| | | }
|
| | |
|
| | | String startTime_str = record.getStartTime_str();
|
| | |
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | |
|
| | | // 文件路径
|
| | | String filePath = "/img/special/" + UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | String filePath =FilePathEnum.special.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | String fileLink = COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void updateOrder(Long id, Integer moveType, Integer sex) throws SpecialException {
|
| | |
|
| | | if (id == null || moveType == null || (!moveType.equals(1) && !moveType.equals(-1)) || sex == null) {
|
| | |
| | | }
|
| | |
|
| | | @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;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | if (hour < 6) {// 0-6点之间不进入自购立减的页面
|
| | | s.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("tlj_own_buy_nogoods"));
|
| | | params.put("url", configService.get(ConfigKeyEnum.tljOwnBuyNogoods.getKey()));
|
| | | s.setParams(params.toString());
|
| | | } else {
|
| | | // 查询专题详情
|