Browse Source

add:销售列表新增筛选条件

yonge 5 years ago
parent
commit
b2a611b914

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/SellOrderQueryInfo.java

@@ -25,6 +25,8 @@ public class SellOrderQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "结束时间",required = false)
     private Date endTime;
 
+    @ApiModelProperty(value = "用户名称或编号",required = false)
+    private String userName;
 
     public String getOrganIdList() {
         return organIdList;
@@ -73,4 +75,12 @@ public class SellOrderQueryInfo extends QueryInfo {
     public void setCooperationOrganId(Integer cooperationOrganId) {
         this.cooperationOrganId = cooperationOrganId;
     }
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
 }

+ 4 - 0
mec-biz/src/main/resources/config/mybatis/SellOrderMapper.xml

@@ -287,6 +287,7 @@
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
         SELECT COUNT(*) FROM sell_order so
+        LEFT JOIN sys_user su ON so.user_id_ = su.id_
         LEFT JOIN student_payment_order spo ON so.order_id_ = spo.id_
         <include refid="queryPageSql"/>
     </select>
@@ -296,6 +297,9 @@
             <if test="search != null and search != ''">
                 AND (so.order_no_ = #{search} OR so.trans_no_ = #{search})
             </if>
+            <if test="userName != null and userName != ''">
+                AND (so.user_id_ = concat('%',#{userName}),'%') OR su.username_ = concat('%',#{userName}),'%')
+            </if>
             <if test="organIdList != null and organIdList != ''">
                 AND FIND_IN_SET(so.organ_id_,#{organIdList})
             </if>