Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -144,6 +144,10 @@ public enum ErrorCodeEnum {
|
|||||||
|
|
||||||
TIME_FALSE(109002, "结束时间不能早于开始时间",null),
|
TIME_FALSE(109002, "结束时间不能早于开始时间",null),
|
||||||
|
|
||||||
|
BUSINESS_ID_NOT_EXIST(109003, "kdzBusinessId解析异常,请检查",null),
|
||||||
|
|
||||||
|
VERIFY_MD5_FALSE(109004, "验签失败,请检查",null),
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class KdzApiServiceImpl implements KdzApiService {
|
|||||||
String kdzBusinessId = request.getKdzBusinessId();
|
String kdzBusinessId = request.getKdzBusinessId();
|
||||||
String lineId = splitMethod(kdzBusinessId);
|
String lineId = splitMethod(kdzBusinessId);
|
||||||
if (StringUtil.isBlank(lineId)){
|
if (StringUtil.isBlank(lineId)){
|
||||||
throw new ServiceException("kdzBusinessId解析异常,请检查");
|
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||||
}
|
}
|
||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||||
if (Objects.isNull(lineInfoDO)){
|
if (Objects.isNull(lineInfoDO)){
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class KdzApiController {
|
|||||||
@RequestBody XfsgOpenApiRequest request) {
|
@RequestBody XfsgOpenApiRequest request) {
|
||||||
log.info("auditResult requestBody :{}", JSONObject.toJSONString(request));
|
log.info("auditResult requestBody :{}", JSONObject.toJSONString(request));
|
||||||
if(!verifyMD5(request,eid)){
|
if(!verifyMD5(request,eid)){
|
||||||
return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
return ResponseResult.fail(ErrorCodeEnum.VERIFY_MD5_FALSE);
|
||||||
}
|
}
|
||||||
if(eid == null || request.getBizContent() == null){
|
if(eid == null || request.getBizContent() == null){
|
||||||
return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
return ResponseResult.fail(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
@@ -46,11 +46,8 @@ public class KdzApiController {
|
|||||||
//用户唯一标识id
|
//用户唯一标识id
|
||||||
sb.append("timestamp=").append(request.getTimestamp()).append("&");
|
sb.append("timestamp=").append(request.getTimestamp()).append("&");
|
||||||
//企业唯一标识enterpriseId
|
//企业唯一标识enterpriseId
|
||||||
sb.append("enterpriseId=").append(eid).append("&");
|
sb.append("enterpriseId=").append(eid);
|
||||||
sb.append("bizContent=").append(request.getBizContent());
|
|
||||||
|
|
||||||
String md5 = EncryptUtil.xfsgMd5(sb.toString());
|
String md5 = EncryptUtil.xfsgMd5(sb.toString());
|
||||||
|
|
||||||
return md5.equals(request.getSign());
|
return md5.equals(request.getSign());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user