|
@@ -151,7 +151,8 @@ public class TaobaoServiceImpl implements TaobaoService {
|
|
151
|
|
151
|
|
|
152
|
ThirdPartyWares thirdPartyWares = new ThirdPartyWares();
|
152
|
ThirdPartyWares thirdPartyWares = new ThirdPartyWares();
|
|
153
|
thirdPartyWares.setType(5);
|
153
|
thirdPartyWares.setType(5);
|
|
154
|
- Number commissionRate = obj.get("commissionRate")!=null?(Number)obj.get("commissionRate"):(((Number)obj.get("commission_rate")).doubleValue()*0.01);
|
|
|
|
|
|
154
|
+ // 当前 淘宝联盟账号等级为初级 的总收益的 33%;中级 66%; 高级 100% -10%服务手续费
|
|
|
|
155
|
+ Number commissionRate = obj.get("commissionRate")!=null?(double)obj.get("commissionRate")*0.25:(((Number)obj.get("commission_rate")).doubleValue()*0.01);
|
|
155
|
thirdPartyWares.setCommission_rate(commissionRate);//佣金比例
|
156
|
thirdPartyWares.setCommission_rate(commissionRate);//佣金比例
|
|
156
|
|
157
|
|
|
157
|
Number market_price = obj.get("originalPrice") != null ? (Number)obj.get("originalPrice") : new Double(obj.get("zk_final_price").toString());
|
158
|
Number market_price = obj.get("originalPrice") != null ? (Number)obj.get("originalPrice") : new Double(obj.get("zk_final_price").toString());
|
|
@@ -200,6 +201,7 @@ public class TaobaoServiceImpl implements TaobaoService {
|
|
200
|
public Object saveThirdPartGood(){
|
201
|
public Object saveThirdPartGood(){
|
|
201
|
//定时执行180次3.6万条数据存入数据库
|
202
|
//定时执行180次3.6万条数据存入数据库
|
|
202
|
int aa=1;
|
203
|
int aa=1;
|
|
|
|
204
|
+ thirdPartyGoodsDao.deleteByType(1);
|
|
203
|
for(int i=1;i<=180;i++){
|
205
|
for(int i=1;i<=180;i++){
|
|
204
|
log.info("=================================开始循环第"+i+"次=========================");
|
206
|
log.info("=================================开始循环第"+i+"次=========================");
|
|
205
|
List<ThirdPartyWares> thirdPartyWaresList =selectTaobaoWaresList(i+"",200+"",null);
|
207
|
List<ThirdPartyWares> thirdPartyWaresList =selectTaobaoWaresList(i+"",200+"",null);
|
|
@@ -320,7 +322,8 @@ public class TaobaoServiceImpl implements TaobaoService {
|
|
320
|
waresDetail.setCouponEndTime(dateFormat.format(dateFormat.parse((String) jsonObjects.get("couponEndTime"))));
|
322
|
waresDetail.setCouponEndTime(dateFormat.format(dateFormat.parse((String) jsonObjects.get("couponEndTime"))));
|
|
321
|
}
|
323
|
}
|
|
322
|
//佣金 已经
|
324
|
//佣金 已经
|
|
323
|
- double yongjin = waresDetail.getZk_final_price().doubleValue() * Double.parseDouble(jsonObjects.get("commissionRate").toString())/100;
|
|
|
|
|
|
325
|
+ // 当前 淘宝联盟账号等级为初级 的总收益的 33%;中级 66%; 高级 100% -10%服务手续费
|
|
|
|
326
|
+ double yongjin = waresDetail.getZk_final_price().doubleValue() * Double.parseDouble(jsonObjects.get("commissionRate").toString())/100*0.25;
|
|
324
|
BigDecimal pv=null;//新增pv值 pv=佣金=养老金
|
327
|
BigDecimal pv=null;//新增pv值 pv=佣金=养老金
|
|
325
|
BigDecimal yanglaojin=null; //养老金=pv
|
328
|
BigDecimal yanglaojin=null; //养老金=pv
|
|
326
|
BigDecimal yongjin_obj=new BigDecimal(yongjin).setScale(2,BigDecimal.ROUND_HALF_UP);
|
329
|
BigDecimal yongjin_obj=new BigDecimal(yongjin).setScale(2,BigDecimal.ROUND_HALF_UP);
|