zouxuan 5 miesięcy temu
rodzic
commit
b4706c440a

+ 3 - 2
mec-application/src/main/java/com/ym/mec/student/controller/RepairController.java

@@ -19,6 +19,7 @@ import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
@@ -51,10 +52,10 @@ public class RepairController extends BaseController {
         if(studentGoodsSell.getUserId() == null){
             studentGoodsSell.setUserId(sysUserService.getUserId());
         }
-        if (studentGoodsSell.getIsRepeatPay() == false) {
+        if (!studentGoodsSell.getIsRepeatPay()) {
             List<StudentPaymentOrder> list = studentPaymentOrderService.queryByCondition(GroupType.GOODS_SELL, null, studentGoodsSell.getUserId(), DealStatusEnum.ING,
                     OrderTypeEnum.GOODS_SELL);
-            if (list.size() > 0) {
+            if (CollectionUtils.isNotEmpty(list)) {
             	StudentPaymentOrder applyOrder = list.get(list.size() - 1);
             	// 查询订单状态
                 PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder);