Pārlūkot izejas kodu

订单增加过滤页面

周箭河 5 gadi atpakaļ
vecāks
revīzija
dc0d0a919b

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPaymentOrderQueryInfo.java

@@ -26,6 +26,9 @@ public class StudentPaymentOrderQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "分部编号",required = false)
     private String organId;
 
+    @ApiModelProperty(value = "支付方式",required = false)
+    private String paymentChannel;
+
     public String getOrganId() {
         return organId;
     }
@@ -81,4 +84,12 @@ public class StudentPaymentOrderQueryInfo extends QueryInfo {
     public void setPaymentStatus(String paymentStatus) {
         this.paymentStatus = paymentStatus;
     }
+
+    public String getPaymentChannel() {
+        return paymentChannel;
+    }
+
+    public void setPaymentChannel(String paymentChannel) {
+        this.paymentChannel = paymentChannel;
+    }
 }

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -177,6 +177,9 @@
             <if test="paymentStatus != null">
                 AND spo.status_ = #{paymentStatus}
             </if>
+            <if test="paymentChannel != null">
+                AND spo.payment_channel_ NOT IN (#{paymentChannel})
+            </if>
         </where>
     </sql>
 

+ 10 - 0
mec-web/src/main/java/com/ym/mec/web/controller/StudentPaymentOrderController.java

@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -24,6 +25,12 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 public class StudentPaymentOrderController extends BaseController {
 
+    @Value("${payment.hiddenMode}")
+    private Boolean hiddenMode;
+
+    @Value("${payment.channel}")
+    private String channel;
+
     @Autowired
     private StudentPaymentOrderService studentPaymentOrderService;
     @Autowired
@@ -47,6 +54,9 @@ public class StudentPaymentOrderController extends BaseController {
                 queryInfo.setOrganId(employee.getOrganIdList());
             }
         }
+        if(hiddenMode){
+            queryInfo.setPaymentChannel(channel);
+        }
         return succeed(studentPaymentOrderService.queryPage(queryInfo));
     }