Authored by qinchao

Merge branch 'dev_fix_1128qc' into test6.8.2

@@ -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},
@@ -9,7 +9,6 @@ import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo; @@ -9,7 +9,6 @@ import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo;
9 import com.yohobuy.ufo.model.order.bo.OrderInfo; 9 import com.yohobuy.ufo.model.order.bo.OrderInfo;
10 import com.yohobuy.ufo.model.order.common.OrderCodeType; 10 import com.yohobuy.ufo.model.order.common.OrderCodeType;
11 import com.yohobuy.ufo.model.order.common.OrderStatus; 11 import com.yohobuy.ufo.model.order.common.OrderStatus;
12 -import com.yohobuy.ufo.model.order.common.TabType;  
13 import com.yohobuy.ufo.model.order.resp.PageResp; 12 import com.yohobuy.ufo.model.order.resp.PageResp;
14 import com.yohoufo.common.alarm.CommonAlarmEventPublisher; 13 import com.yohoufo.common.alarm.CommonAlarmEventPublisher;
15 import com.yohoufo.common.caller.UfoServiceCaller; 14 import com.yohoufo.common.caller.UfoServiceCaller;
@@ -20,7 +19,6 @@ import com.yohoufo.order.common.Payment; @@ -20,7 +19,6 @@ import com.yohoufo.order.common.Payment;
20 import com.yohoufo.order.model.request.PaymentRequest; 19 import com.yohoufo.order.model.request.PaymentRequest;
21 import com.yohoufo.order.model.response.PrepayResponse; 20 import com.yohoufo.order.model.response.PrepayResponse;
22 import com.yohoufo.order.service.cache.CacheCleaner; 21 import com.yohoufo.order.service.cache.CacheCleaner;
23 -import com.yohoufo.order.service.cache.CacheKeyBuilder;  
24 import com.yohoufo.order.service.impl.PaymentServiceImpl; 22 import com.yohoufo.order.service.impl.PaymentServiceImpl;
25 import org.slf4j.Logger; 23 import org.slf4j.Logger;
26 import org.slf4j.LoggerFactory; 24 import org.slf4j.LoggerFactory;
@@ -325,10 +323,14 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -325,10 +323,14 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
325 if (sw.getStatus() == null || sw.getStatus() == 0) { 323 if (sw.getStatus() == null || sw.getStatus() == 0) {
326 return new com.yohoufo.common.ApiResponse(400, "钱包不可用", null); 324 return new com.yohoufo.common.ApiResponse(400, "钱包不可用", null);
327 } 325 }
  326 +
  327 + StoredSeller storedSeller =storedSellerService.getValidStoredSeller(uid);
  328 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
328 JSONObject result = new JSONObject(); 329 JSONObject result = new JSONObject();
329 result.put("all", sw.getAmount().add(sw.getLockAmount()).setScale(2).toString()); 330 result.put("all", sw.getAmount().add(sw.getLockAmount()).setScale(2).toString());
330 result.put("locked", sw.getLockAmount().setScale(2).toString()); 331 result.put("locked", sw.getLockAmount().setScale(2).toString());
331 result.put("avail", sw.getAmount().setScale(2).toString()); 332 result.put("avail", sw.getAmount().setScale(2).toString());
  333 + result.put("entryTime",(storedSeller==null&&storedSeller.getEnterTime()>0)?"":sdf.format(1000L*storedSeller.getEnterTime()));
332 return new com.yohoufo.common.ApiResponse(200, "查询成功", result); 334 return new com.yohoufo.common.ApiResponse(200, "查询成功", result);
333 } 335 }
334 336
@@ -70,6 +70,10 @@ public class StoreSellerServiceImpl implements IStoredSellerService { @@ -70,6 +70,10 @@ 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){
@@ -77,9 +81,20 @@ public class StoreSellerServiceImpl implements IStoredSellerService { @@ -77,9 +81,20 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
77 logger.error("StoredSellerServiceImpl entryStatus not correct status isZhiMaCert = false ,but isStoredSeller = true ,uid is {} ",uid); 81 logger.error("StoredSellerServiceImpl entryStatus not correct status isZhiMaCert = false ,but isStoredSeller = true ,uid is {} ",uid);
78 } 82 }
79 83
  84 + if(isStoredSeller){
  85 + storedBefore = true;
  86 + }else{
  87 + //查已退驻记录
  88 + StoredSeller quitStoredSeller =storedSellerMapper.selectQuitByUid(uid);
  89 + if(quitStoredSeller!=null){
  90 + storedBefore=true;
  91 + }
  92 + }
  93 +
80 Map<String,Boolean> map=new HashMap<>(); 94 Map<String,Boolean> map=new HashMap<>();
81 map.put("isZhiMaCert",isZhiMaCert); 95 map.put("isZhiMaCert",isZhiMaCert);
82 map.put("isStoredSeller",isStoredSeller); 96 map.put("isStoredSeller",isStoredSeller);
  97 + map.put("storedBefore",storedBefore);
83 return map; 98 return map;
84 } 99 }
85 100