Authored by qinchao

二次入驻接口

... ... @@ -7,6 +7,10 @@ public interface StoredSellerMapper {
//获取生效的信息
StoredSeller selectValidByUid(int uid);
//获取退驻的信息
StoredSeller selectQuitByUid(int uid);
int insert(StoredSeller storedSeller);
int updateStatusByUid(@Param("uid") int uid, @Param("validStatus") int validStatus, @Param("expectStatus") int expectStatus, @Param("updateTime") long updateTime);
... ...
... ... @@ -28,6 +28,14 @@
order by id desc limit 1
</select>
<select id="selectQuitByUid" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from stored_seller
where uid = #{uid} and valid_status = 9
order by id desc limit 1
</select>
<insert id="insert" parameterType="com.yohoufo.dal.order.model.StoredSeller" >
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)
values (#{uid},#{validStatus},
... ...
... ... @@ -70,16 +70,28 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
isZhiMaCert = true;
}
//storedBefore 是否曾经入驻过 true or false ,入驻商户肯定入驻过,不是入驻商户,则判断是否有退驻信息
Boolean storedBefore = false;
//只有芝麻认证通过了,才去判断是否入驻商户
Boolean isStoredSeller = this.isStoredSeller(uid);
if(!isZhiMaCert && isStoredSeller){
storedBefore = true;
//这种状态是不合理的,打个日志
logger.error("StoredSellerServiceImpl entryStatus not correct status isZhiMaCert = false ,but isStoredSeller = true ,uid is {} ",uid);
}else{
//查已退驻记录
StoredSeller quitStoredSeller =storedSellerMapper.selectQuitByUid(uid);
if(quitStoredSeller!=null){
storedBefore=true;
}
}
Map<String,Boolean> map=new HashMap<>();
map.put("isZhiMaCert",isZhiMaCert);
map.put("isStoredSeller",isStoredSeller);
map.put("storedBefore",storedBefore);
return map;
}
... ...