| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaobaoMeterial;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.goods.facade.entity.taobao.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.service.inter.goods.CommonTemplateContentService;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaobaoMeterialService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | |
| | |
|
| | | @Service
|
| | | public class CommonTemplateContentServiceImpl implements CommonTemplateContentService {
|
| | |
|
| | | @Resource
|
| | | private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
|
| | |
|
| | | @Resource
|
| | | private DaTaoKeGoodsDetailV2Service daTaoKeGoodsDetailV2Service;
|
| | |
| | | return navList;
|
| | | }
|
| | |
|
| | | @Cacheable(value = "commonContentCache", key = "#type+'-'+#cid+'-'+#page+'-'+#pageSize")
|
| | | @Cacheable(value = "commonContentCache", key = "#type+'-'+#cid+'-'+#page+'-'+#pageSize+'-'+#system")
|
| | | @Override
|
| | | public CommonContentResult getContentList(CommonContentTypeEnum type, String cid, int page, int pageSize) {
|
| | | public CommonContentResult getContentList(CommonContentTypeEnum type, String cid, int page, int pageSize, SystemEnum system) {
|
| | | CommonContentResult result = null;
|
| | | if (type == CommonContentTypeEnum._9k9) {
|
| | | result = get9K9Content(cid, page, pageSize);
|
| | |
| | | } else if (type == CommonContentTypeEnum.chaoPinReMai) {
|
| | | result = getChaoPinReMaiContent(cid, page, pageSize);
|
| | | } else if (type == CommonContentTypeEnum.chaoSheng) {
|
| | | result = getCaoShengContent(cid, page, pageSize);
|
| | | result = getCaoShengContent(cid, page, pageSize,system);
|
| | | } else if (type == CommonContentTypeEnum.haoQuan) {
|
| | | result = getHaoQuanContent(cid, page, pageSize);
|
| | | } else if (type == CommonContentTypeEnum.mianDan) {
|
| | |
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | private CommonContentResult getCaoShengContent(String cid, int page, int pageSize) {
|
| | | private CommonContentResult getCaoShengContent(String cid, int page, int pageSize, SystemEnum system) {
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | | Integer startAmount = null;
|
| | | Integer endAmount = null;
|
| | |
| | |
|
| | | double tkRate = 20.00;
|
| | |
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate(system);
|
| | | List<QualityFactory> listQuery = qualityGoodsService.listQueryByRebateAmount((page - 1) * pageSize, pageSize,
|
| | | proportion.toString(), startAmount, endAmount, tkRate);
|
| | |
|