Authored by qinchao

鉴定接口返回数据

... ... @@ -37,9 +37,7 @@ public class AppraiseController {
@IgnoreSignature
public ApiResponse appraiseFail(@RequestBody AppraiseExpressInfoBo appraiseExpressInfoBo) {
logger.info("in appraise Fail, req {}", appraiseExpressInfoBo);
boolean result = appraiseService.appraiseFail(appraiseExpressInfoBo.getExpressCompanyId(), appraiseExpressInfoBo.getOrderCode(), appraiseExpressInfoBo.getWayBillCode(),appraiseExpressInfoBo.getDepotNum());
return new ApiResponse.ApiResponseBuilder().code(200)
.data(result).message("").build();
return appraiseService.appraiseFail(appraiseExpressInfoBo.getExpressCompanyId(), appraiseExpressInfoBo.getOrderCode(), appraiseExpressInfoBo.getWayBillCode(),appraiseExpressInfoBo.getDepotNum());
}
/**
... ... @@ -51,9 +49,7 @@ public class AppraiseController {
@IgnoreSignature
public ApiResponse appraiseSuccess(@RequestBody AppraiseExpressInfoBo appraiseExpressInfoBo) {
logger.info("in appraiseSuccess, req {}", appraiseExpressInfoBo);
boolean result = appraiseService.appraiseSuccess(appraiseExpressInfoBo.getExpressCompanyId(), appraiseExpressInfoBo.getOrderCode(), appraiseExpressInfoBo.getWayBillCode(),appraiseExpressInfoBo.getDepotNum());
return new ApiResponse.ApiResponseBuilder().code(200)
.data(result).message("").build();
return appraiseService.appraiseSuccess(appraiseExpressInfoBo.getExpressCompanyId(), appraiseExpressInfoBo.getOrderCode(), appraiseExpressInfoBo.getWayBillCode(),appraiseExpressInfoBo.getDepotNum());
}
}
... ...
... ... @@ -2,6 +2,7 @@ package com.yohoufo.order.service.impl;
import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.alarm.EventBusPublisher;
import com.yohoufo.common.alarm.SmsAlarmEvent;
import com.yohoufo.common.utils.DateUtil;
... ... @@ -67,7 +68,8 @@ public class AppraiseService {
TransferService transferService;
public boolean appraiseSuccess(Integer expressCompanyId, Long orderCode, String wayBillCode,Integer depotNum){
public ApiResponse appraiseSuccess(Integer expressCompanyId, Long orderCode, String wayBillCode,Integer depotNum){
ApiResponse apiResponse=new ApiResponse();
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
if (buyerOrder == null){
... ... @@ -133,6 +135,9 @@ public class AppraiseService {
AlarmConfig alarmConfig = AlarmConfig.APPRAISE_SUCCESS;
SmsAlarmEvent smsAlarmEvent = new SmsAlarmEvent(alarmConfig.getRefundName(), alarmConfig.name(), content);
EventBusPublisher.publishEvent(smsAlarmEvent);
apiResponse.setCode(400);
apiResponse.setMessage(content);
}finally {
// 更新买家订单状态
LOGGER.info("appraiseSuccess update buyer order {} ", buyerOrder);
... ... @@ -166,7 +171,7 @@ public class AppraiseService {
sellerOrder.getStatus(), expectSOStatus);
}
}
return true;
return apiResponse;
}
... ... @@ -179,7 +184,8 @@ public class AppraiseService {
* @param wayBillCode
* @return
*/
public boolean appraiseFail(Integer expressCompanyId, Long orderCode, String wayBillCode,Integer depotNum){
public ApiResponse appraiseFail(Integer expressCompanyId, Long orderCode, String wayBillCode, Integer depotNum){
ApiResponse apiResponse=new ApiResponse();
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
if (buyerOrder == null){
... ... @@ -235,6 +241,8 @@ public class AppraiseService {
SmsAlarmEvent smsAlarmEvent = new SmsAlarmEvent(alarmConfig.getRefundName(), alarmConfig.name(), content);
EventBusPublisher.publishEvent(smsAlarmEvent);
apiResponse.setCode(400);
apiResponse.setMessage(content);
}finally {
// 更新买家订单状态 为鉴定不通过
OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;
... ... @@ -243,8 +251,8 @@ public class AppraiseService {
DateUtil.getCurrentTimeSecond());
//更新物流信息,写到最后
expressInfoService.appraiseFail(sellerUid, expressCompanyId, orderCode, wayBillCode, depotNum);
return true;
}
return apiResponse;
}
}
... ...
package com.yohoufo.user.controller.passport;
import com.yoho.core.rest.annotation.ServiceDesc;
import com.yoho.tools.common.beans.ApiResponse;
import com.yohoufo.common.annotation.IgnoreSession;
import com.yohoufo.common.annotation.IgnoreSignature;
import com.yohoufo.common.exception.GatewayException;
import com.yohoufo.dal.user.model.UserAuthorizeInfo;
import com.yohoufo.user.helper.HideDataUtil;
import com.yohoufo.user.requestVO.RealNameAuthorizeReqVO;
import com.yohoufo.user.responseVO.AuthorizeResultRespVO;
import com.yohoufo.user.service.IRealNameAuthorizeService;
import com.yohoufo.user.service.risk.GraphVerifyService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 用户身份通过银行卡实名认证
* Created by craig.qin on 2018/9/11.
*/
@RestController
@RequestMapping(value="/user/realNameAuthorize")
@ServiceDesc("userRealNameAuthorize")
public class RealNameAuthorize4PlatformController {
private Logger logger = LoggerFactory.getLogger(RealNameAuthorize4PlatformController.class);
@Autowired
IRealNameAuthorizeService realNameAuthorizeService;
@Autowired
GraphVerifyService graphVerifyService;
/**
* 查询支付宝信息
* 提供给运营平台使用
* @return
*/
@RequestMapping(value="/aliPayAccountQuery")
@IgnoreSession
@IgnoreSignature
public ApiResponse aliPayAccountQuery(@RequestBody Integer uid) {
logger.info("enter RealNameAuthorizeController aliPayAccountQuery authorize info param uid is {}", uid);
//获取
UserAuthorizeInfo info= realNameAuthorizeService.getValidAuthorizeInfo(uid);
return new ApiResponse.ApiResponseBuilder().code(200)
.data(info).message("").build();
}
}
... ...