| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
| | | private BrandInfoMapper brandInfoMapper;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | | |
| | | @Resource
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private QualityGoodsService qualityGoodsService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsBriefService taoBaoGoodsBriefService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService;
|
| | |
|
| | | @Resource
|
| | | private BrandClassShopService brandClassShopService;
|
| | |
|
| | | @Resource
|
| | | private BrandShopCaheDao brandShopCaheDao;
|
| | |
|
| | | @Resource
|
| | | private BrandGoodsCaheService brandGoodsCaheService;
|
| | |
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(record);
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(record, SystemEnum.blks);
|
| | |
|
| | | BrandInfo update = new BrandInfo();
|
| | | update.setId(record.getId());
|
| | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'listValidBrandInfoCache-'+#cid")
|
| | | public List<BrandInfo> listValidBrandInfoCache(Long cid) {
|
| | | public List<BrandInfo> listValidBrandInfoCache(Long cid,SystemEnum system) {
|
| | | List<BrandInfo> listInfo = new ArrayList<BrandInfo>();
|
| | |
|
| | | List<TaoBaoShop> listShop = brandClassShopService.listEffectiveClassShop(cid);
|
| | | List<TaoBaoShop> listShop = brandClassShopService.listEffectiveClassShop(cid,system);
|
| | | if (listShop == null || listShop.size() == 0)
|
| | | return listInfo;
|
| | | for (TaoBaoShop taoBaoShop : listShop) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'listBrandInfoCache-'+#start+'-'+#start +'-'+#cid+'-'+#platform+'-'+#version")
|
| | | public List<BrandInfoVO> listBrandInfoCache(long start, int count, Long cid, String platform, String version) {
|
| | | @Cacheable(value = "brandCache", key = "'listBrandInfoCache-'+#start+'-'+#start +'-'+#cid+'-'+#platform+'-'+#version+'-'+#system")
|
| | | public List<BrandInfoVO> listBrandInfoCache(long start, int count, Long cid, String platform, String version,SystemEnum system) {
|
| | | List<BrandInfoVO> listInfo = new ArrayList<BrandInfoVO>();
|
| | |
|
| | | List<TaoBaoShopVO> listShop = brandClassShopService.listEffectiveShop(start, count, cid, platform, version);
|
| | | List<TaoBaoShopVO> listShop = brandClassShopService.listEffectiveShop(start, count, cid, platform, version,system);
|
| | | if (listShop == null || listShop.size() == 0)
|
| | | return listInfo;
|
| | |
|
| | |
| | | if (StringUtil.isNullOrEmpty(name) && StringUtil.isNullOrEmpty(searchKey))
|
| | | continue;
|
| | | // 添加商品
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(brandInfo);
|
| | | BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(brandInfo, SystemEnum.blks);
|
| | |
|
| | | BrandInfo updateInfo = new BrandInfo();
|
| | | updateInfo.setId(brandInfo.getId());
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public long countValidByCidToApp(Long cid) {
|
| | | return brandInfoMapper.countValidByCidToApp(cid);
|
| | | public long countValidByCidToApp(Long cid, SystemEnum system) {
|
| | | return brandInfoMapper.countValidByCidToApp(cid,system);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'listValidByCidToApp-'+#cid")
|
| | | public List<BrandInfo> listValidByCidToApp(Long cid) {
|
| | | @Cacheable(value = "brandCache", key = "'listValidByCidToApp-'+#cid+'-'+#system")
|
| | | public List<BrandInfo> listValidByCidToApp(Long cid, SystemEnum system) {
|
| | | if (cid == null)
|
| | | return null;
|
| | | return brandInfoMapper.listValidByCidToApp(cid);
|
| | | return brandInfoMapper.listValidByCidToApp(cid,system);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "brandCache", key = "'listValidToApp-'+#start+'-'+#cid")
|
| | | @Cacheable(value = "brandCache", key = "'listValidToApp-'+#start+'-'+#cid+'-'+#system")
|
| | | @Override
|
| | | public List<BrandInfoVO> listValidToApp(long start, int count, Long cid, String platform, String version) {
|
| | | List<BrandInfoVO> list = brandInfoMapper.listBrandInfoVO(start, count, cid);
|
| | | public List<BrandInfoVO> listValidToApp(long start, int count, Long cid, String platform, String version,SystemEnum system) {
|
| | | List<BrandInfoVO> list = brandInfoMapper.listBrandInfoVO(start, count, cid,system);
|
| | | if (list == null || list.size() == 0)
|
| | | return null;
|
| | |
|
| | | ConfigParamsDTO configParamsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version);
|
| | | ConfigParamsDTO configParamsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version,system);
|
| | |
|
| | | List<BrandInfoVO> listInfo = new ArrayList<BrandInfoVO>();
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'listByAlikeName-'+#key+'-'+#platform+'-'+#version")
|
| | | public BrandInfoVO listByAlikeName(String key, String platform, String version) {
|
| | | @Cacheable(value = "brandCache", key = "'listByAlikeName-'+#key+'-'+#platform+'-'+#version+'-'+#system")
|
| | | public BrandInfoVO listByAlikeName(String key, String platform, String version,SystemEnum system) {
|
| | | if (StringUtil.isNullOrEmpty(key))
|
| | | return null;
|
| | |
|
| | |
| | | if (list == null || list.size() == 0)
|
| | | return null;
|
| | |
|
| | | ConfigParamsDTO configParamsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version);
|
| | | ConfigParamsDTO configParamsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version, system);
|
| | |
|
| | | BrandInfoVO brand = list.get(0);
|
| | | List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId(1, 3, brand.getId());
|