plf 3 роки тому
батько
коміт
cec5b94266

+ 14 - 0
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -27,6 +27,7 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.stream.Collectors;
 
 /**
@@ -817,6 +818,19 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                 record.setDelFlag("0");
                 cmRefundShopRecordDao.insert(record);
                 payShopDifference.setRefundShopId(Integer.valueOf(refundShop.getId()));
+
+                //修改付供应商状态
+                newShopOrderDao.updatePayStatus(shopOrder.getShopOrderID(), "3");
+                List<NewShopOrder> shopOrders = newShopOrderDao.findListByOrderID(shopOrder.getOrderID());
+                AtomicBoolean isPayStatus = new AtomicBoolean(true);
+                shopOrders.forEach(s -> {
+                    if (!"3".equals(s.getPayStatus())) {
+                        isPayStatus.set(false);
+                    }
+                });
+                if (isPayStatus.get()) {
+                    newOrderDao.updatePayStatus("3", shopOrder.getOrderID());
+                }
             } else {
                 throw new Exception("退款金额异常");
             }

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp

@@ -575,7 +575,7 @@
                 </c:forEach>
             </table>
             <div class="pay-more-func">
-                <c:if test="${s.paying ne '1' and s.payStatus ne '3' and !s.modifyPayable}">
+                <c:if test="${s.paying ne '1' and s.payStatus eq '1' and !s.modifyPayable}">
                     <shiro:hasPermission name="order:cmPayShop:modifyPay">
                         <a href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改成本</a>
                     </shiro:hasPermission>