|
@@ -446,7 +446,7 @@ public class NewOrderController extends BaseController {
|
|
o.setShouldPayTotalTax(o.getTotalAddedValueTax());
|
|
o.setShouldPayTotalTax(o.getTotalAddedValueTax());
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if(null==o.getSkuId()){
|
|
|
|
|
|
+ if (null == o.getSkuId()) {
|
|
//赠品
|
|
//赠品
|
|
o.setSkuId(productDao.findSkuIdByPromotionsId(o.getPromotionsId()));
|
|
o.setSkuId(productDao.findSkuIdByPromotionsId(o.getPromotionsId()));
|
|
}
|
|
}
|
|
@@ -707,10 +707,11 @@ public class NewOrderController extends BaseController {
|
|
String flag = "0";
|
|
String flag = "0";
|
|
if (StringUtils.isNotBlank(costPrice) && buyPrice > Double.valueOf(costPrice)) {
|
|
if (StringUtils.isNotBlank(costPrice) && buyPrice > Double.valueOf(costPrice)) {
|
|
// 查询复购价格库 比较复购价格库中的购买价格与这一次的购买价格
|
|
// 查询复购价格库 比较复购价格库中的购买价格与这一次的购买价格
|
|
- RepeatPurchasePrice p = repeatPurchasePriceService.getLastBuyPrice(clubID, uID, product.getProductID());
|
|
|
|
|
|
+ RepeatPurchasePrice p = repeatPurchasePriceService.getLastBuyPrice(clubID, uID, op.getSkuId());
|
|
if (p == null) {
|
|
if (p == null) {
|
|
NewCmShop shop = newCmShopService.get(product.getShopID().toString());
|
|
NewCmShop shop = newCmShopService.get(product.getShopID().toString());
|
|
p = new RepeatPurchasePrice();
|
|
p = new RepeatPurchasePrice();
|
|
|
|
+ p.setSkuId(product.getSkuId());
|
|
p.setClubId(clubID);
|
|
p.setClubId(clubID);
|
|
p.setUserId(u.getUserID());
|
|
p.setUserId(u.getUserID());
|
|
p.setCurrentPrice(buyPrice.toString());
|
|
p.setCurrentPrice(buyPrice.toString());
|
|
@@ -731,6 +732,7 @@ public class NewOrderController extends BaseController {
|
|
}
|
|
}
|
|
RepeatPurchasePriceHistory r = new RepeatPurchasePriceHistory();
|
|
RepeatPurchasePriceHistory r = new RepeatPurchasePriceHistory();
|
|
r.setClubId(clubID);
|
|
r.setClubId(clubID);
|
|
|
|
+ r.setSkuId(op.getSkuId());
|
|
r.setUserId(u.getUserID());
|
|
r.setUserId(u.getUserID());
|
|
r.setPrice(buyPrice.toString());
|
|
r.setPrice(buyPrice.toString());
|
|
r.setOrderId(orderID);
|
|
r.setOrderId(orderID);
|