|
|
@@ -14,6 +14,8 @@ import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
import com.uas.platform.b2c.core.support.log.TradeBufferedLogger;
|
|
|
import com.uas.platform.b2c.core.utils.FastjsonUtils;
|
|
|
import com.uas.platform.b2c.core.utils.NumberUtil;
|
|
|
+import com.uas.platform.b2c.fa.payment.dao.InstallmentDao;
|
|
|
+import com.uas.platform.b2c.fa.payment.model.Installment;
|
|
|
import com.uas.platform.b2c.fa.settlement.dao.BillDao;
|
|
|
import com.uas.platform.b2c.fa.settlement.dao.BillInfoDao;
|
|
|
import com.uas.platform.b2c.fa.settlement.model.Bill;
|
|
|
@@ -153,6 +155,8 @@ public class PurchaseServiceImpl implements PurchaseService {
|
|
|
private PurchaseModifyingHistoryDao purchaseModifyingHistoryDao;
|
|
|
@Autowired
|
|
|
private LogisticsDao logisticsDao;
|
|
|
+ @Autowired
|
|
|
+ private InstallmentDao installmentDao;
|
|
|
|
|
|
@Override
|
|
|
public Purchase save(Purchase purchase) {
|
|
|
@@ -1321,6 +1325,26 @@ public class PurchaseServiceImpl implements PurchaseService {
|
|
|
|
|
|
@Override
|
|
|
public String modifyPurchaseDetailUnitPrice(List<PurchaseModifyingHistory> list){
|
|
|
+ //卖家改价验证
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
+ PurchaseModifyingHistory purchaseModifyingHistory = list.get(0);
|
|
|
+ PurchaseDetail purchaseDetail = purchaseDetailDao.findByDetailid(purchaseModifyingHistory.getDetailid());
|
|
|
+ Purchase purchase = purchaseDetail.getPurchase();
|
|
|
+ if (purchase != null) {
|
|
|
+ if (purchase.getInstallmentId() != null) {
|
|
|
+ Installment installment = installmentDao.findOne(purchase.getInstallmentId());
|
|
|
+ if (installment != null) {
|
|
|
+ if (com.uas.platform.b2c.core.constant.Status.TOBEPAID.value() != installment.getStatus()) {
|
|
|
+ throw new IllegalOperatorException( "此订单已付款,不可改价" );
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ throw new IllegalOperatorException( "此订单分期信息有误,请重新确认订单信息" );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ throw new IllegalOperatorException( "此订单不存在,请重新确认订单信息" );
|
|
|
+ }
|
|
|
+ }
|
|
|
Iterator<PurchaseModifyingHistory> it = list.iterator();
|
|
|
while(it.hasNext()){
|
|
|
PurchaseModifyingHistory data = it.next();
|