| | |
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.FilePathEnum;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | | import com.yeshi.fanli.vo.brand.BrandInfoVO;
|
| | |
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | |
|
| | | // 文件路径
|
| | | String filePath = "/img/brand/" + UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | String filePath = FilePathEnum.brand.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | String fileLink = COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | |
|
| | |
| | | @Override
|
| | | public void addShopAndGoods(long start, int count) {
|
| | | List<BrandInfo> list = brandInfoMapper.listValidAll(start, count);
|
| | | addShopAndGoods(list);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void addShopAndGoods(List<BrandInfo> list) {
|
| | | if (list == null || list.size() == 0)
|
| | | return;
|
| | |
|
| | | long startTime = java.lang.System.currentTimeMillis();
|
| | | LogHelper.test(start + "品牌更新service---addShopAndGoods" + startTime);
|
| | |
|
| | | // long startTime = java.lang.System.currentTimeMillis();
|
| | | for (BrandInfo brandInfo : list) {
|
| | | try {
|
| | | String name = brandInfo.getName();
|
| | |
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | long endTime = java.lang.System.currentTimeMillis();
|
| | | LogHelper.test(start + "品牌更新service---addShopAndGoods" + endTime + ",本次总耗时:" + (endTime - startTime) / 1000);
|
| | | // long endTime = java.lang.System.currentTimeMillis();
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'listByAlikeName-'+#key+'-'+#platform+'-'+#version")
|
| | | public BrandInfoVO listByAlikeName(String key,String platform,String version) {
|
| | | public BrandInfoVO listByAlikeName(String key, String platform, String version) {
|
| | | if (StringUtil.isNullOrEmpty(key))
|
| | | return null;
|
| | |
|
| | |
| | | if (list == null || list.size() == 0)
|
| | | return null;
|
| | |
|
| | |
|
| | | ConfigParamsDTO configParamsDTO = hongBaoManageService.getShowComputeRate(platform, version);
|
| | | ConfigParamsDTO configParamsDTO = hongBaoManageService.getShowComputeRate(platform, version);
|
| | |
|
| | | BrandInfoVO brand = list.get(0);
|
| | | List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId(1, 3, brand.getId());
|
| | |
| | | brand.setListGoods(listGoodsVO);
|
| | | return brand;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<BrandInfo> listValidOrderByUpdateTime(int page, int pageSize) {
|
| | | return brandInfoMapper.listValidAll((page - 1) * pageSize, pageSize);
|
| | | }
|
| | |
|
| | | }
|