Showing
3 changed files
with
24 additions
and
0 deletions
@@ -7,6 +7,10 @@ public interface StoredSellerMapper { | @@ -7,6 +7,10 @@ public interface StoredSellerMapper { | ||
7 | //获取生效的信息 | 7 | //获取生效的信息 |
8 | StoredSeller selectValidByUid(int uid); | 8 | StoredSeller selectValidByUid(int uid); |
9 | 9 | ||
10 | + //获取退驻的信息 | ||
11 | + StoredSeller selectQuitByUid(int uid); | ||
12 | + | ||
13 | + | ||
10 | int insert(StoredSeller storedSeller); | 14 | int insert(StoredSeller storedSeller); |
11 | 15 | ||
12 | int updateStatusByUid(@Param("uid") int uid, @Param("validStatus") int validStatus, @Param("expectStatus") int expectStatus, @Param("updateTime") long updateTime); | 16 | int updateStatusByUid(@Param("uid") int uid, @Param("validStatus") int validStatus, @Param("expectStatus") int expectStatus, @Param("updateTime") long updateTime); |
@@ -28,6 +28,14 @@ | @@ -28,6 +28,14 @@ | ||
28 | order by id desc limit 1 | 28 | order by id desc limit 1 |
29 | </select> | 29 | </select> |
30 | 30 | ||
31 | + <select id="selectQuitByUid" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
32 | + select | ||
33 | + <include refid="Base_Column_List" /> | ||
34 | + from stored_seller | ||
35 | + where uid = #{uid} and valid_status = 9 | ||
36 | + order by id desc limit 1 | ||
37 | + </select> | ||
38 | + | ||
31 | <insert id="insert" parameterType="com.yohoufo.dal.order.model.StoredSeller" > | 39 | <insert id="insert" parameterType="com.yohoufo.dal.order.model.StoredSeller" > |
32 | insert into stored_seller (uid, valid_status,cert_no,cert_name,operator_uid,operator_name,enter_time,quit_time, create_time, update_time,break_zhi_ma_cert) | 40 | insert into stored_seller (uid, valid_status,cert_no,cert_name,operator_uid,operator_name,enter_time,quit_time, create_time, update_time,break_zhi_ma_cert) |
33 | values (#{uid},#{validStatus}, | 41 | values (#{uid},#{validStatus}, |
@@ -70,16 +70,28 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -70,16 +70,28 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
70 | isZhiMaCert = true; | 70 | isZhiMaCert = true; |
71 | } | 71 | } |
72 | 72 | ||
73 | + | ||
74 | + //storedBefore 是否曾经入驻过 true or false ,入驻商户肯定入驻过,不是入驻商户,则判断是否有退驻信息 | ||
75 | + Boolean storedBefore = false; | ||
76 | + | ||
73 | //只有芝麻认证通过了,才去判断是否入驻商户 | 77 | //只有芝麻认证通过了,才去判断是否入驻商户 |
74 | Boolean isStoredSeller = this.isStoredSeller(uid); | 78 | Boolean isStoredSeller = this.isStoredSeller(uid); |
75 | if(!isZhiMaCert && isStoredSeller){ | 79 | if(!isZhiMaCert && isStoredSeller){ |
80 | + storedBefore = true; | ||
76 | //这种状态是不合理的,打个日志 | 81 | //这种状态是不合理的,打个日志 |
77 | logger.error("StoredSellerServiceImpl entryStatus not correct status isZhiMaCert = false ,but isStoredSeller = true ,uid is {} ",uid); | 82 | logger.error("StoredSellerServiceImpl entryStatus not correct status isZhiMaCert = false ,but isStoredSeller = true ,uid is {} ",uid); |
83 | + }else{ | ||
84 | + //查已退驻记录 | ||
85 | + StoredSeller quitStoredSeller =storedSellerMapper.selectQuitByUid(uid); | ||
86 | + if(quitStoredSeller!=null){ | ||
87 | + storedBefore=true; | ||
88 | + } | ||
78 | } | 89 | } |
79 | 90 | ||
80 | Map<String,Boolean> map=new HashMap<>(); | 91 | Map<String,Boolean> map=new HashMap<>(); |
81 | map.put("isZhiMaCert",isZhiMaCert); | 92 | map.put("isZhiMaCert",isZhiMaCert); |
82 | map.put("isStoredSeller",isStoredSeller); | 93 | map.put("isStoredSeller",isStoredSeller); |
94 | + map.put("storedBefore",storedBefore); | ||
83 | return map; | 95 | return map; |
84 | } | 96 | } |
85 | 97 |
-
Please register or login to post a comment