Authored by chenchao

Merge remote-tracking branch 'origin/test6.9.10' into test6.9.10

... ... @@ -19,7 +19,10 @@ import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.AppraiseOrderGoodsMapper;
import com.yohoufo.dal.order.AppraiseOrderMapper;
import com.yohoufo.dal.order.AppraiseOrderMetaMapper;
import com.yohoufo.dal.order.model.*;
import com.yohoufo.dal.order.model.AppraiseOrder;
import com.yohoufo.dal.order.model.AppraiseOrderGoods;
import com.yohoufo.dal.order.model.AppraiseOrderMeta;
import com.yohoufo.dal.order.model.QiniuLiveRecord;
import com.yohoufo.order.common.ClientType;
import com.yohoufo.order.constants.MetaKey;
import com.yohoufo.order.convert.AppraiseOrderGoodsConvertor;
... ... @@ -27,7 +30,6 @@ import com.yohoufo.order.convert.SellerOrderConvertor;
import com.yohoufo.order.model.dto.AppraiseOrderContext;
import com.yohoufo.order.service.IExpressInfoService;
import com.yohoufo.order.service.IGoodsService;
import com.yohoufo.order.service.handler.GoodsServiceRefundHandler;
import com.yohoufo.order.service.proxy.InBoxFacade;
import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.service.proxy.UserProxyService;
... ... @@ -83,9 +85,6 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements
@Autowired
private InBoxFacade inBoxFacade;
@Autowired
private PayRefundService payRefundService;
public AppraiseOrderComputeResp compute(AppraiseOrderComputeReq req){
logger.info("in AppraiseOrderService.compute req {}", req);
... ... @@ -400,7 +399,6 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements
public int appraiseFake(AppraiseOrder appraiseOrder){
int rows;
if ((rows=super.appraiseFake(appraiseOrder))>0){
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.CHECKING_FAKE;
inBoxFacade.paidAppraiseOrderNotice(appraiseOrder.getUid(), appraiseOrder.getOrderCode(), targetStatus);
}
... ... @@ -415,14 +413,6 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements
public int unsure(AppraiseOrder appraiseOrder){
int rows;
if ((rows=super.unsure(appraiseOrder))>0){
//refund amount
new GoodsServiceRefundHandler()
.loadLogger(logger)
.loadUser(appraiseOrder.getUid())
.loadActionCase(SellerWalletDetail.Type.APPRAISE_UNSURE)
.loadRefundAction(payRefundService::refund)
.loadOrder(appraiseOrder.getOrderCode(), appraiseOrder.getParentOrderCode(), appraiseOrder.getPayment(), appraiseOrder.getAmount())
.refund();
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE;
inBoxFacade.paidAppraiseOrderNotice(appraiseOrder.getUid(), appraiseOrder.getOrderCode(), targetStatus);
}
... ...
... ... @@ -44,7 +44,8 @@ public class CertificationController {
public ApiResponse alipayCertification(RealNameAuthorizeReqVO reqVO) throws GatewayException {
logger.info("CertificationController.alipayCertification: Enter alipayCertification param reqVO is {}", reqVO);
//若版本低于6.9.9, 提示升级版本
if(configReader.getBoolean("ufo.user.idCertUpdateVersionSwitch",false) && reqVO.getApp_version().compareTo("6.9.9") < 0){
if(configReader.getBoolean("ufo.user.idCertUpdateVersionSwitch",false) && compareVersion(reqVO.getApp_version(), "6.9.10") < 0){
logger.info("CertificationController.alipayCertification: version need update, version is {}, uid is {}", reqVO.getApp_version(), reqVO.getUid());
throw new VersionNotSupportException();
}
//(1) 必要参数的校验
... ... @@ -75,7 +76,8 @@ public class CertificationController {
public ApiResponse alipayCertifyResultQuery(RealNameAuthorizeReqVO reqVO) throws GatewayException {
logger.info("CertificationController.alipayCertifyResultQuery: Enter. RealNameAuthorizeReqVO is {}", reqVO);
//若版本低于6.9.9提示升级版本
if(configReader.getBoolean("ufo.user.idCertUpdateVersionSwitch",false) && reqVO.getApp_version().compareTo("6.9.9") < 0){
if(configReader.getBoolean("ufo.user.idCertUpdateVersionSwitch",false) && compareVersion(reqVO.getApp_version(), "6.9.10") < 0 ){
logger.info("CertificationController.alipayCertifyResultQuery: version need update, version is {}, uid is {}", reqVO.getApp_version(), reqVO.getUid());
throw new VersionNotSupportException();
}
//(1) 校验请求的参数
... ... @@ -89,6 +91,31 @@ public class CertificationController {
}
private int compareVersion(String curVersion,String sysVersion){
boolean isCurBlank = StringUtils.isBlank(curVersion);
boolean isSysBlank = StringUtils.isBlank(sysVersion);
if(isCurBlank && isSysBlank){
return 0;
}
if(isCurBlank){
return -1;
}
if(isSysBlank){
return 1;
}
String[] curArr = curVersion.split("\\.");
String[] sysArr = sysVersion.split("\\.");
for(int i=0;i<3;i++){
int cur = Integer.parseInt(curArr[i]);
int sys = Integer.parseInt(sysArr[i]);
if(cur != sys){
return cur-sys;
}
}
return 0;
}
... ...