소스 검색

fix:发放用户过滤禁用

liujunchi 2 년 전
부모
커밋
f348d38959

+ 11 - 11
cooleshow-user/user-biz/src/main/resources/config/mybatis/CouponIssueMapper.xml

@@ -33,13 +33,13 @@
             su.real_name_ as realName,
             su.username_ as username,
             ci.client_type_ as clientType,
-            ci.use_state_ as useState,
+            ci.issue_way_ as issueWay,
             ci.order_no_ as orderNo,
         from_unixtime(ci.start_time_) as startTime,
         from_unixtime(ci.end_time_) as endTime,
         from_unixtime(ci.issue_time_) as issueTime,
         from_unixtime(ci.use_time_) as useTime,
-            (case when ci.status_ = 0 then 'WITHDRAW' when  ci.end_time_ < unix_timestamp(now()) and ci.issue_way_  = 'USABLE' then 'EXPIRED' else ci.issue_way_ end ) as issueWay,
+            (case when ci.status_ = 0 then 'WITHDRAW' when  ci.end_time_ < unix_timestamp(now()) and ci.use_state_  = 'USABLE' then 'EXPIRED' else ci.use_state_ end ) as useState,
             ci.issuer_ as issuer,
             ci.remark_ as remark,
             cou.name_ as couponName,
@@ -73,24 +73,24 @@
                     or cou.name_ like concat('%',#{query.couponKeyword},'%')
                 )
             </if>
-            <if test="query.issueWay != null">
+            <if test="query.useState != null">
                 <choose>
-                    <when test="query.issueWay.code == 'EXPIRED'">
-                        and ci.end_time_ &lt; unix_timestamp(now()) and ci.issue_way_  = 'USABLE'
+                    <when test="query.useState.code == 'EXPIRED'">
+                        and ci.end_time_ &lt; unix_timestamp(now()) and ci.use_state_  = 'USABLE'
                     </when>
-                    <when test="query.issueWay.code == 'USABLE'">
-                        and ci.end_time_ &gt;= unix_timestamp(now()) and ci.issue_way_ = 'USABLE'
+                    <when test="query.useState.code == 'USABLE'">
+                        and ci.end_time_ &gt;= unix_timestamp(now()) and ci.use_state_ = 'USABLE'
                     </when>
-                    <when test="query.issueWay.code == 'WITHDRAW'">
+                    <when test="query.useState.code == 'WITHDRAW'">
                         and ci.status_ = 0
                     </when>
                     <otherwise>
-                        and ci.issue_way_ = #{query.issueWay}
+                        and ci.use_state_ = #{query.useState}
                     </otherwise>
                 </choose>
             </if>
-            <if test="query.useState != null">
-                and #{query.useState} = ci.use_state_
+            <if test="query.issueWay != null">
+                and #{query.issueWay} = ci.issue_way_
             </if>
             <if test="query.issueStartTime != null">
                 and unix_timestamp( #{query.issueStartTime}) &lt;= ci.issue_time_

+ 1 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -54,6 +54,7 @@
         </choose>
         left join sys_user su on su.id_ = t.user_id_
         <where>
+            t.lock_flag_ = 0
             <if test="keyword != null and keyword != ''">
                 and (
                 su.real_name_ like concat('%',#{keyword},'%')