Authored by qinchao

Merge branch 'dev_fix_1128qc' into test6.8.2

... ... @@ -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},
... ...
... ... @@ -9,7 +9,6 @@ import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo;
import com.yohobuy.ufo.model.order.bo.OrderInfo;
import com.yohobuy.ufo.model.order.common.OrderCodeType;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.resp.PageResp;
import com.yohoufo.common.alarm.CommonAlarmEventPublisher;
import com.yohoufo.common.caller.UfoServiceCaller;
... ... @@ -20,7 +19,6 @@ import com.yohoufo.order.common.Payment;
import com.yohoufo.order.model.request.PaymentRequest;
import com.yohoufo.order.model.response.PrepayResponse;
import com.yohoufo.order.service.cache.CacheCleaner;
import com.yohoufo.order.service.cache.CacheKeyBuilder;
import com.yohoufo.order.service.impl.PaymentServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -325,10 +323,14 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
if (sw.getStatus() == null || sw.getStatus() == 0) {
return new com.yohoufo.common.ApiResponse(400, "钱包不可用", null);
}
StoredSeller storedSeller =storedSellerService.getValidStoredSeller(uid);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
JSONObject result = new JSONObject();
result.put("all", sw.getAmount().add(sw.getLockAmount()).setScale(2).toString());
result.put("locked", sw.getLockAmount().setScale(2).toString());
result.put("avail", sw.getAmount().setScale(2).toString());
result.put("entryTime",(storedSeller==null&&storedSeller.getEnterTime()>0)?"":sdf.format(1000L*storedSeller.getEnterTime()));
return new com.yohoufo.common.ApiResponse(200, "查询成功", result);
}
... ...
... ... @@ -70,6 +70,10 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
isZhiMaCert = true;
}
//storedBefore 是否曾经入驻过 true or false ,入驻商户肯定入驻过,不是入驻商户,则判断是否有退驻信息
Boolean storedBefore = false;
//只有芝麻认证通过了,才去判断是否入驻商户
Boolean isStoredSeller = this.isStoredSeller(uid);
if(!isZhiMaCert && isStoredSeller){
... ... @@ -77,9 +81,20 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
logger.error("StoredSellerServiceImpl entryStatus not correct status isZhiMaCert = false ,but isStoredSeller = true ,uid is {} ",uid);
}
if(isStoredSeller){
storedBefore = true;
}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;
}
... ...