|
|
@ -161,11 +161,11 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData uploadList(UploadListFormDTO formDTO) { |
|
|
public PageData uploadList(UploadListFormDTO formDTO) { |
|
|
//获取小程序调用令牌
|
|
|
List<CodeCustomerDTO> auditingList = codeCustomerService.getAuditingCodeList(); |
|
|
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
if (null != auditingList && auditingList.size() > NumConstant.ZERO) { |
|
|
if (null != authInfo) { |
|
|
|
|
|
List<CodeCustomerDTO> auditingList = codeCustomerService.getAuditingCodeList(); |
|
|
|
|
|
auditingList.forEach(code -> { |
|
|
auditingList.forEach(code -> { |
|
|
|
|
|
//获取小程序调用令牌
|
|
|
|
|
|
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(code.getCustomerId(), code.getClientType()); |
|
|
//获取审核结果信息
|
|
|
//获取审核结果信息
|
|
|
CodeAuditResultDTO auditResult = codeAuditResultService.getAuditResultByCodeId(code.getId()); |
|
|
CodeAuditResultDTO auditResult = codeAuditResultService.getAuditResultByCodeId(code.getId()); |
|
|
//调用微信API获取最新审核状态
|
|
|
//调用微信API获取最新审核状态
|
|
|
@ -182,10 +182,12 @@ public class CodeServiceImpl implements CodeService { |
|
|
code.setStatus(CodeConstant.AUDIT_FAILED); |
|
|
code.setStatus(CodeConstant.AUDIT_FAILED); |
|
|
auditResult.setResult(CodeConstant.AUDIT_FAILED); |
|
|
auditResult.setResult(CodeConstant.AUDIT_FAILED); |
|
|
auditResult.setReason(result.getReason()); |
|
|
auditResult.setReason(result.getReason()); |
|
|
|
|
|
auditResult.setScreenShot(result.getScreenshot()); |
|
|
codeOperationHistoryService.updateDescribe(code.getId(), result.getReason()); |
|
|
codeOperationHistoryService.updateDescribe(code.getId(), result.getReason()); |
|
|
} else if (result.getStatus() == NumConstant.FOUR) { |
|
|
} else if (result.getStatus() == NumConstant.FOUR) { |
|
|
code.setStatus(CodeConstant.DELAY); |
|
|
code.setStatus(CodeConstant.DELAY); |
|
|
auditResult.setResult(CodeConstant.DELAY); |
|
|
auditResult.setResult(CodeConstant.DELAY); |
|
|
|
|
|
auditResult.setReason(result.getReason()); |
|
|
codeOperationHistoryService.updateDescribe(code.getId(), "审核延后"); |
|
|
codeOperationHistoryService.updateDescribe(code.getId(), "审核延后"); |
|
|
} |
|
|
} |
|
|
codeCustomerService.update(code); |
|
|
codeCustomerService.update(code); |
|
|
@ -210,7 +212,13 @@ public class CodeServiceImpl implements CodeService { |
|
|
throw new RenException("未授权"); |
|
|
throw new RenException("未授权"); |
|
|
} |
|
|
} |
|
|
//调用微信API上提交审核
|
|
|
//调用微信API上提交审核
|
|
|
WxMaCodeSubmitAuditRequest request = ConvertUtils.sourceToTarget(formDTO, WxMaCodeSubmitAuditRequest.class); |
|
|
WxMaCodeSubmitAuditRequest request = new WxMaCodeSubmitAuditRequest(); |
|
|
|
|
|
request.setVersionDesc(formDTO.getVersionDesc()); |
|
|
|
|
|
request.setFeedbackInfo(formDTO.getFeedbackInfo()); |
|
|
|
|
|
request.setFeedbackStuff(formDTO.getFeedbackStuff()); |
|
|
|
|
|
request.setItemList(formDTO.getItemList()); |
|
|
|
|
|
request.setPreviewInfo(formDTO.getPreviewInfo()); |
|
|
|
|
|
request.setUgcDeclare(formDTO.getUgcDeclare()); |
|
|
WxResult<String> wxResult = wxMaCodeService.submitAudit(authInfo.getAuthorizerAccessToken(), request); |
|
|
WxResult<String> wxResult = wxMaCodeService.submitAudit(authInfo.getAuthorizerAccessToken(), request); |
|
|
if (!wxResult.success()) { |
|
|
if (!wxResult.success()) { |
|
|
saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, |
|
|
saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, |
|
|
@ -374,6 +382,7 @@ public class CodeServiceImpl implements CodeService { |
|
|
@Override |
|
|
@Override |
|
|
public String mediaUpload(MediaUploadFormDTO formDTO) { |
|
|
public String mediaUpload(MediaUploadFormDTO formDTO) { |
|
|
try { |
|
|
try { |
|
|
|
|
|
// Result<UploadDTO> uploadDTOResult = ossFeignClient.upload(formDTO.getMedia());
|
|
|
File file = MultipartFileToFileUtils.multipartFileToFile(formDTO.getMedia()); |
|
|
File file = MultipartFileToFileUtils.multipartFileToFile(formDTO.getMedia()); |
|
|
//获取上传代码信息
|
|
|
//获取上传代码信息
|
|
|
CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); |
|
|
CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); |
|
|
|