| | |
| | |
|
| | | List<TaoBaoGoodsBrief> gList = recommendGoodsDeleteHistoryService
|
| | | .filterGoods(acceptData.getDevice(), result.getTaoBaoGoodsBriefs());
|
| | |
|
| | | // filter
|
| | | try {
|
| | | gList = daTaoKeGoodsDetailService.filterTaoBaoGoods(gList);
|
| | | } catch (Exception e) {
|
| | | }
|
| | |
|
| | | // 设备推荐
|
| | | if (gList != null)
|
| | | for (TaoBaoGoodsBrief goods : gList) {
|
| | |
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.ShareHotGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
| | | public void listPreGoods(String callback, AcceptData acceptData, String kw, PrintWriter out) {
|
| | | // 大淘客数据,更新
|
| | | List<TaoBaoGoodsBrief> list = shareHotGoodsService.listPreGoods();
|
| | | BigDecimal rate = hongBaoManageService.getFanLiRate();
|
| | | JSONArray array = new JSONArray();
|
| | | Gson gson = new Gson();
|
| | | for (TaoBaoGoodsBrief goods : list) {
|
| | | array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(goods, rate + "", null)));
|
| | | array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(goods, "100", null)));
|
| | | }
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(array)));
|
| | | }
|
| | |
| | | */
|
| | | @RequestMapping(value = "listSelectedGoods", method = RequestMethod.GET)
|
| | | public void listSelectedGoods(String callback, AcceptData acceptData, String day, PrintWriter out) {
|
| | | if (StringUtil.isNullOrEmpty(day)) {
|
| | | day = TimeUtil.getGernalTime(System.currentTimeMillis() + 1000 * 60 * 60 * 24L, "yyyy-MM-dd");
|
| | | }
|
| | |
|
| | | List<ShareHotGoods> listGoods = shareHotGoodsService.listByDay(day);
|
| | | BigDecimal rate = hongBaoManageService.getFanLiRate();
|
| | | JSONArray array = new JSONArray();
|
| | |
| | | import com.yeshi.fanli.service.inter.lable.LabelService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
| | | @Resource
|
| | | private TaoBaoClassRelationMapper taoBaoClassRelationMapper;
|
| | |
|
| | | |
| | | @Resource
|
| | | private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "qualityCache",key="'listQueryByCouponAmount-'+#start+'-'+#key+'-'+#endAmount+'-'+#startPropor")
|
| | | public List<QualityFactory> listQueryByCouponAmount(long start, int count, Integer key, |
| | | Integer endAmount, Integer startPropor){
|
| | | public List<QualityFactory> listQueryByCouponAmount(long start, int count, Integer key, Integer endAmount,
|
| | | Integer startPropor) {
|
| | | return qualityFactoryMapper.listQueryByCouponAmount(start, count, key, endAmount, startPropor);
|
| | | }
|
| | |
|
| | |
| | | public long countQueryByCouponAmount(Integer key, Integer endAmount, Integer startPropor){
|
| | | return qualityFactoryMapper.countQueryByCouponAmount(key, endAmount, startPropor);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "qualityCache",key="'listQueryByFlashSale-'+#start")
|
| | |
| | | public List<QualityFactory> listFlashSaleRandGoods() {
|
| | | return qualityFactoryMapper.listFlashSaleRandGoods();
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 小金额查询:9.9/19.9/29.9/49.9
|
| | |
| | | * @param labId
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryByKeyAndlabIDs(long start, int count,String key, List<Long> listId, Integer sort,
|
| | | Long systemCid, Integer hasQuan, Integer userType, Integer biz30day,Integer startprice, Integer endprice) {
|
| | | return qualityFactoryMapper.listQueryByKeyAndlabIDs(start, count, key, listId, sort,systemCid, hasQuan, userType,
|
| | | biz30day, startprice, endprice);
|
| | | public List<QualityFactory> listQueryByKeyAndlabIDs(long start, int count, String key, List<Long> listId,
|
| | | Integer sort, Long systemCid, Integer hasQuan, Integer userType, Integer biz30day, Integer startprice,
|
| | | Integer endprice) {
|
| | | return qualityFactoryMapper.listQueryByKeyAndlabIDs(start, count, key, listId, sort, systemCid, hasQuan,
|
| | | userType, biz30day, startprice, endprice);
|
| | | }
|
| | |
|
| | |
|
| | | public long countQueryKeyAndlabIDs(String key, List<Long> listId, Long systemCid, Integer hasQuan, Integer userType,
|
| | | Integer biz30day,Integer startprice, Integer endprice) {
|
| | |
| | | startprice, endprice);
|
| | | }
|
| | |
|
| | | public long countQueryByKey(String key, Long systemCid,Integer hasQuan, Integer userType,
|
| | | Integer biz30day,Integer startprice, Integer endprice) {
|
| | | public long countQueryByKey(String key, Long systemCid, Integer hasQuan, Integer userType, Integer biz30day,
|
| | | Integer startprice, Integer endprice) {
|
| | |
|
| | | return qualityFactoryMapper.countQueryByKey(key, systemCid,hasQuan, userType, biz30day,
|
| | | startprice, endprice);
|
| | | return qualityFactoryMapper.countQueryByKey(key, systemCid, hasQuan, userType, biz30day, startprice, endprice);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | return qualityFactoryMapper.countQuery(null, cid, null, null, 1);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | @Cacheable(value = "qualityCache",key="'listQueryByRebateAmount-'+#start+'-'+#proportion+'-'+#endAmount+'-'+#endAmount+'-'+#tkRate")
|
| | | public List<QualityFactory> listQueryByRebateAmount(long start, int count,String proportion,
|
| | | Integer startAmount, Integer endAmount, double tkRate){
|
| | | public List<QualityFactory> listQueryByRebateAmount(long start, int count, String proportion, Integer startAmount,
|
| | | Integer endAmount, double tkRate) {
|
| | | return qualityFactoryMapper.listQueryByRebateAmount(start, count, proportion, startAmount, endAmount, tkRate);
|
| | | }
|
| | |
|
| | |
| | | public long countQueryByRebateAmount(String proportion, Integer startAmount, Integer endAmount, double tkRate){
|
| | | return qualityFactoryMapper.countQueryByRebateAmount(proportion, startAmount, endAmount, tkRate);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | //@Cacheable(value = "qualityCache",key="'queryToCouponColumn-'+#start")
|
| | |
| | | return qualityFactoryMapper.countQueryToCouponColumn();
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 首页最底部@商品信息流
|
| | | */
|
| | | @Override
|
| | | public List<QualityFactory> listRecommend(long start, int count, Double proportion, Integer commision, Integer couponAmount,
|
| | | double tkRate, Double couponRatio) {
|
| | | return qualityFactoryMapper.listRecommendToIndex(start, count, proportion, commision, couponAmount, tkRate, couponRatio);
|
| | | public List<QualityFactory> listRecommend(long start, int count, Double proportion, Integer commision,
|
| | | Integer couponAmount, double tkRate, Double couponRatio) {
|
| | | return qualityFactoryMapper.listRecommendToIndex(start, count, proportion, commision, couponAmount, tkRate,
|
| | | couponRatio);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countRecommend(Double proportion, Integer commision, Integer couponAmount, double tkRate, Double couponRatio) {
|
| | | public long countRecommend(Double proportion, Integer commision, Integer couponAmount, double tkRate,
|
| | | Double couponRatio) {
|
| | | return qualityFactoryMapper.countRecommendToIndex(proportion, commision, couponAmount, tkRate, couponRatio);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<QualityFactory> listRecommendBykey(long start, int count, String key, Integer hasQuan,
|
| | | Integer userType, Double startprice, Double endprice, Double startTkRate, Double endTkRate, Integer sort) {
|
| | | return qualityFactoryMapper.listRecommendBykey(start, count, key, hasQuan, userType,
|
| | | startprice, endprice, startTkRate, endTkRate, sort);
|
| | | public List<QualityFactory> listRecommendBykey(long start, int count, String key, Integer hasQuan, Integer userType,
|
| | | Double startprice, Double endprice, Double startTkRate, Double endTkRate, Integer sort) {
|
| | | return qualityFactoryMapper.listRecommendBykey(start, count, key, hasQuan, userType, startprice, endprice,
|
| | | startTkRate, endTkRate, sort);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countRecommendBykey(String key, Integer hasQuan, Integer userType,
|
| | | Double startprice, Double endprice, Double startTkRate, Double endTkRate) {
|
| | | return qualityFactoryMapper.countRecommendBykey(key, hasQuan, userType, startprice, endprice, startTkRate, endTkRate);
|
| | | public long countRecommendBykey(String key, Integer hasQuan, Integer userType, Double startprice, Double endprice,
|
| | | Double startTkRate, Double endTkRate) {
|
| | | return qualityFactoryMapper.countRecommendBykey(key, hasQuan, userType, startprice, endprice, startTkRate,
|
| | | endTkRate);
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 首页最底部@商品信息流
|
| | |
| | | pop = Double.parseDouble(proportion);
|
| | | }
|
| | |
|
| | | List<QualityFactory> listQuery = |
| | | listRecommend(start, count, pop, commision, couponAmount, tkRate, couponRatio);
|
| | | List<QualityFactory> listQuery = listRecommend(start, count, pop, commision, couponAmount, tkRate, couponRatio);
|
| | |
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | JSONArray array = new JSONArray();
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create();
|
| | | //遍历列表数据
|
| | | //
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | for (QualityFactory quality : listQuery) {
|
| | |
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = quality.getTaoBaoGoodsBrief();
|
| | |
|
| | | if (taoBaoGoodsBrief == null) {
|
| | | continue;
|
| | | if (quality.getTaoBaoGoodsBrief() != null)
|
| | | goodsList.add(quality.getTaoBaoGoodsBrief());
|
| | | }
|
| | |
|
| | | try {
|
| | | goodsList = daTaoKeGoodsDetailService.filterTaoBaoGoods(goodsList);
|
| | | } catch (Exception e) {
|
| | | }
|
| | |
|
| | | for (TaoBaoGoodsBrief taoBaoGoodsBrief : goodsList) {
|
| | | int biz30day = taoBaoGoodsBrief.getBiz30day();
|
| | | if (biz30day >= 10000) {
|
| | | double sales = biz30day;
|
| | |
| | |
|
| | | @Override
|
| | | public List<QualityFactory> recommendByAuctionId(Long auctionId){
|
| | | |
| | |
|
| | | List<Long> list = new ArrayList<Long>();
|
| | | list.add(auctionId);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<QualityFactory> listQueryEverydayRob(long start, int count, BigDecimal zkPrice, |
| | | BigDecimal minQuanPrice, BigDecimal maxQuanPrice) {
|
| | | public List<QualityFactory> listQueryEverydayRob(long start, int count, BigDecimal zkPrice, BigDecimal minQuanPrice,
|
| | | BigDecimal maxQuanPrice) {
|
| | | return qualityFactoryMapper.listQueryEverydayRob(start, count, zkPrice, minQuanPrice, maxQuanPrice);
|
| | | }
|
| | |
|
| | |
| | | package com.yeshi.fanli.service.impl.taobao;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collections;
|
| | | import java.util.Comparator;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.goods.taobao.dataoke.DaTaoKeGoodsDetailV2Dao;
|
| | | import com.yeshi.fanli.dao.taobao.ShareHotGoodsDao;
|
| | | import com.yeshi.fanli.entity.taobao.ShareHotGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.service.inter.taobao.ShareHotGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
|
| | | import com.yeshi.fanli.util.BeanUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | public List<DaTaoKeDetailV2> listPreShareHotGoods() {
|
| | | DaTaoKeGoodsDetailV2Dao daTaoKeGoodsDetailV2Dao = BeanUtil.getBean(DaTaoKeGoodsDetailV2Dao.class);
|
| | | Map<Long, DaTaoKeDetailV2> map = new HashMap<>();
|
| | | List<DaTaoKeDetailV2> list = daTaoKeGoodsDetailV2Dao.listPreShareHotGoods(20, "monthSales");
|
| | | System.out.println(list);
|