| 
						
						
							
								
							
						
						
					 | 
					@ -31,10 +31,7 @@ import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.web.multipart.MultipartFile; | 
					 | 
					 | 
					import org.springframework.web.multipart.MultipartFile; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.io.File; | 
					 | 
					 | 
					import java.io.File; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					import java.util.ArrayList; | 
					 | 
					 | 
					import java.util.*; | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.Collections; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.Comparator; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.List; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					import java.util.stream.Collectors; | 
					 | 
					 | 
					import java.util.stream.Collectors; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					/** | 
					 | 
					 | 
					/** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -149,7 +146,8 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							CustomerDTO customerDTO = new CustomerDTO(); | 
					 | 
					 | 
							CustomerDTO customerDTO = new CustomerDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							customerDTO.setId(formDTO.getCustomerId()); | 
					 | 
					 | 
							customerDTO.setId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							PaCustomerDTO paCustomerDTO = paCustomerService.get(formDTO.getCustomerId()); | 
					 | 
					 | 
							PaCustomerDTO paCustomerDTO = paCustomerService.get(formDTO.getCustomerId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
							//删除旧的开发版本
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerService.deleteCommitCode(formDTO.getCustomerId(),formDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//将上传信息存入表中
 | 
					 | 
					 | 
							//将上传信息存入表中
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							CodeCustomerDTO codeCustomerDTO = ConvertUtils.sourceToTarget(formDTO, CodeCustomerDTO.class); | 
					 | 
					 | 
							CodeCustomerDTO codeCustomerDTO = ConvertUtils.sourceToTarget(formDTO, CodeCustomerDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerDTO.setCustomerName(paCustomerDTO.getCustomerName()); | 
					 | 
					 | 
							codeCustomerDTO.setCustomerName(paCustomerDTO.getCustomerName()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -157,6 +155,7 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerDTO.setExtJson(extJson); | 
					 | 
					 | 
							codeCustomerDTO.setExtJson(extJson); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerDTO.setAppId(authInfo.getAuthorizerAppid()); | 
					 | 
					 | 
							codeCustomerDTO.setAppId(authInfo.getAuthorizerAppid()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerDTO.setStatus(CodeConstant.UNAUDITED); | 
					 | 
					 | 
							codeCustomerDTO.setStatus(CodeConstant.UNAUDITED); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerDTO.setCommitTime(new Date()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							String codeId = codeCustomerService.save(codeCustomerDTO); | 
					 | 
					 | 
							String codeId = codeCustomerService.save(codeCustomerDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							saveOperation(formDTO.getCustomerId(), formDTO.getClientType(), codeId, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, "上传成功"); | 
					 | 
					 | 
							saveOperation(formDTO.getCustomerId(), formDTO.getClientType(), codeId, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, "上传成功"); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -172,16 +171,22 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							CodeVersionInfoResultDTO resultDTO = new CodeVersionInfoResultDTO(); | 
					 | 
					 | 
							CodeVersionInfoResultDTO resultDTO = new CodeVersionInfoResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//开发版本
 | 
					 | 
					 | 
							//开发版本
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							CodeCustomerDTO commit = codeCustomerService.getCommitInfo(formDTO.getCustomerId(), formDTO.getClientType()); | 
					 | 
					 | 
							CodeCustomerDTO commit = codeCustomerService.getCommitInfo(formDTO.getCustomerId(), formDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getCommit().setCodeId(commit.getId()); | 
					 | 
					 | 
							if (null != commit) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getCommit().setCodeInfo(commit.getUserDesc()); | 
					 | 
					 | 
								CodeVersionInfoResultDTO.CommitBean commitBean = new CodeVersionInfoResultDTO.CommitBean(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getCommit().setModelId(commit.getTemplateId()); | 
					 | 
					 | 
								commitBean.setCodeId(commit.getId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getCommit().setVersion(commit.getUserVersion()); | 
					 | 
					 | 
								commitBean.setCodeInfo(commit.getUserDesc()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getCommit().setCommitTime(DateUtils.format(commit.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); | 
					 | 
					 | 
								commitBean.setModelId(commit.getTemplateId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								commitBean.setVersion(commit.getUserVersion()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								commitBean.setCommitTime(DateUtils.format(commit.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								resultDTO.setCommit(commitBean); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//审核版本
 | 
					 | 
					 | 
							//审核版本
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							CodeCustomerDTO audit = codeCustomerService.getAuditInfo(formDTO.getCustomerId(), formDTO.getClientType()); | 
					 | 
					 | 
							CodeCustomerDTO audit = codeCustomerService.getAuditInfo(formDTO.getCustomerId(), formDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getAudit().setCodeId(audit.getId()); | 
					 | 
					 | 
							if(null != audit) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getAudit().setVersion(audit.getUserVersion()); | 
					 | 
					 | 
								CodeVersionInfoResultDTO.AuditBean auditBean = new CodeVersionInfoResultDTO.AuditBean(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getAudit().setCodeInfo(audit.getUserDesc()); | 
					 | 
					 | 
								auditBean.setCodeId(audit.getId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								auditBean.setVersion(audit.getUserVersion()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								auditBean.setCodeInfo(audit.getUserDesc()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								if (CodeConstant.AUDITING.equals(audit.getStatus())) { | 
					 | 
					 | 
								if (CodeConstant.AUDITING.equals(audit.getStatus())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									//获取小程序调用令牌
 | 
					 | 
					 | 
									//获取小程序调用令牌
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); | 
					 | 
					 | 
									AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -216,19 +221,26 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
										codeAuditResultService.update(auditResult); | 
					 | 
					 | 
										codeAuditResultService.update(auditResult); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									} | 
					 | 
					 | 
									} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								} | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getAudit().setStatus(audit.getStatus()); | 
					 | 
					 | 
								auditBean.setStatus(audit.getStatus()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getAudit().setCommitTime(DateUtils.format(audit.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); | 
					 | 
					 | 
								auditBean.setCommitTime(DateUtils.format(audit.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getAudit().setAuditTime(DateUtils.format(audit.getAuditTime(), DateUtils.DATE_TIME_PATTERN)); | 
					 | 
					 | 
								auditBean.setAuditTime(DateUtils.format(audit.getAuditTime(), DateUtils.DATE_TIME_PATTERN)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								resultDTO.setAudit(auditBean); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//线上版本
 | 
					 | 
					 | 
							//线上版本
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							CodeCustomerDTO release = codeCustomerService.getReleaseInfo(formDTO.getCustomerId(), formDTO.getClientType()); | 
					 | 
					 | 
							CodeCustomerDTO release = codeCustomerService.getReleaseInfo(formDTO.getCustomerId(), formDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setCodeId(release.getId()); | 
					 | 
					 | 
							if(null != release) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setCodeInfo(release.getUserDesc()); | 
					 | 
					 | 
								CodeVersionInfoResultDTO.ReleaseBean releaseBean = new CodeVersionInfoResultDTO.ReleaseBean(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setCommitTime(DateUtils.format(release.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); | 
					 | 
					 | 
								releaseBean.setCodeId(release.getId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setAuditTime(DateUtils.format(release.getAuditTime(), DateUtils.DATE_TIME_PATTERN)); | 
					 | 
					 | 
								releaseBean.setCodeInfo(release.getUserDesc()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setReleaseTime(DateUtils.format(release.getReleaseTime(), DateUtils.DATE_TIME_PATTERN)); | 
					 | 
					 | 
								releaseBean.setCommitTime(DateUtils.format(release.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setReleaseType(release.getReleaseType()); | 
					 | 
					 | 
								releaseBean.setAuditTime(DateUtils.format(release.getAuditTime(), DateUtils.DATE_TIME_PATTERN)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setGrayPercentage(release.getGaryPercentage()); | 
					 | 
					 | 
								releaseBean.setReleaseTime(DateUtils.format(release.getReleaseTime(), DateUtils.DATE_TIME_PATTERN)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							resultDTO.getRelease().setVersion(release.getUserVersion()); | 
					 | 
					 | 
								releaseBean.setReleaseType(release.getReleaseType()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								releaseBean.setGrayPercentage(release.getGaryPercentage()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								releaseBean.setVersion(release.getUserVersion()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								resultDTO.setRelease(releaseBean); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							return resultDTO; | 
					 | 
					 | 
							return resultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -245,7 +257,16 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							if (null == authInfo) { | 
					 | 
					 | 
							if (null == authInfo) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								throw new RenException("未授权"); | 
					 | 
					 | 
								throw new RenException("未授权"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
							//获取上传代码信息
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							CodeCustomerDTO uploadCode = codeCustomerService.getUploadCodeByCustomer(formDTO.getCodeId(), codeCustomerDTO.getCustomerId(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									codeCustomerDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (null != uploadCode) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								if (CodeConstant.AUDITING.equals(uploadCode.getStatus())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									throw new RenException("已经有正在审核的版本"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								} else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									codeCustomerService.deleteById(uploadCode.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//调用微信API上提交审核
 | 
					 | 
					 | 
							//调用微信API上提交审核
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							WxMaCodeSubmitAuditRequest request = new WxMaCodeSubmitAuditRequest(); | 
					 | 
					 | 
							WxMaCodeSubmitAuditRequest request = new WxMaCodeSubmitAuditRequest(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							request.setVersionDesc(formDTO.getVersionDesc()); | 
					 | 
					 | 
							request.setVersionDesc(formDTO.getVersionDesc()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -292,6 +313,7 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//更新代码表状态
 | 
					 | 
					 | 
							//更新代码表状态
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerDTO.setStatus(CodeConstant.AUDITING); | 
					 | 
					 | 
							codeCustomerDTO.setStatus(CodeConstant.AUDITING); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerDTO.setAuditTime(new Date()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerService.update(codeCustomerDTO); | 
					 | 
					 | 
							codeCustomerService.update(codeCustomerDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), | 
					 | 
					 | 
							saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									CodeConstant.OPER_SUBMIT, "审核中"); | 
					 | 
					 | 
									CodeConstant.OPER_SUBMIT, "审核中"); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -370,6 +392,9 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//更新代码表状态
 | 
					 | 
					 | 
							//更新代码表状态
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerDTO.setStatus(CodeConstant.RELEASE_SUCCESS); | 
					 | 
					 | 
							codeCustomerDTO.setStatus(CodeConstant.RELEASE_SUCCESS); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerDTO.setReleaseTime(new Date()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerDTO.setReleaseType("total"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerDTO.setGaryPercentage(NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							codeCustomerService.update(codeCustomerDTO); | 
					 | 
					 | 
							codeCustomerService.update(codeCustomerDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), | 
					 | 
					 | 
							saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									CodeConstant.OPER_RELEASE, "发布成功"); | 
					 | 
					 | 
									CodeConstant.OPER_RELEASE, "发布成功"); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -467,7 +492,6 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						public PageData history(CodeCommonFormDTO formDTO) { | 
					 | 
					 | 
						public PageData history(CodeCommonFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							PageHelper.startPage(formDTO.getPage(), formDTO.getLimit()); | 
					 | 
					 | 
							PageHelper.startPage(formDTO.getPage(), formDTO.getLimit()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//获取上传代码信息
 | 
					 | 
					 | 
							//获取上传代码信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					//		CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId());
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							List<CodeHistoryResultDTO> list = codeOperationHistoryService.getHistoryList(formDTO.getCodeId()); | 
					 | 
					 | 
							List<CodeHistoryResultDTO> list = codeOperationHistoryService.getHistoryList(formDTO.getCodeId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							PageInfo<CodeHistoryResultDTO> pageInfo = new PageInfo<>(list); | 
					 | 
					 | 
							PageInfo<CodeHistoryResultDTO> pageInfo = new PageInfo<>(list); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							return new PageData<>(list, pageInfo.getTotal()); | 
					 | 
					 | 
							return new PageData<>(list, pageInfo.getTotal()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -553,6 +577,57 @@ public class CodeServiceImpl implements CodeService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							return paCustomerService.getCustomerList(formDTO); | 
					 | 
					 | 
							return paCustomerService.getCustomerList(formDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						@Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						public void speedUpAudit(CodeCommonFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							//获取上传代码信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							//获取小程序调用令牌
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (null == authInfo) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								throw new RenException("未授权"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							//获取审核结果信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							CodeAuditResultDTO codeAuditResultDTO = codeAuditResultService.getAuditResultByCodeId(formDTO.getCodeId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							//调用微信API 加急审核
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							WxMaSpeedUpAuditReq speedRequest = new WxMaSpeedUpAuditReq(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							speedRequest.setAuditId(codeAuditResultDTO.getAuditId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							WxResult wxSpeedResult = wxMaCodeService.speedUpAudit(authInfo.getAuthorizerAccessToken(), speedRequest); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (!wxSpeedResult.success()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
										codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxSpeedResult.getErrorMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								throw new RenException(wxSpeedResult.getErrorCode(), wxSpeedResult.getErrorMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						@Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						public void grayRelease(CodeCommonFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						@Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						public void revertGrayRelease(CodeCommonFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						@Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						public void revertCodeRelease(CodeCommonFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							//获取上传代码信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							//获取小程序调用令牌
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (null == authInfo) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								throw new RenException("未授权"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							WxResult wxSpeedResult = wxMaCodeService.revertCodeRelease(authInfo.getAuthorizerAccessToken()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (!wxSpeedResult.success()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
										codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxSpeedResult.getErrorMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								throw new RenException(wxSpeedResult.getErrorCode(), wxSpeedResult.getErrorMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerService.revertCodeRelease(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							codeCustomerService.deleteById(codeCustomerDTO.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						private void saveOperation(String customerId, String clientType, String codeId, String version, String operation, String describe) { | 
					 | 
					 | 
						private void saveOperation(String customerId, String clientType, String codeId, String version, String operation, String describe) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							CodeOperationHistoryDTO operationDTO = new CodeOperationHistoryDTO(); | 
					 | 
					 | 
							CodeOperationHistoryDTO operationDTO = new CodeOperationHistoryDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							operationDTO.setCustomerId(customerId); | 
					 | 
					 | 
							operationDTO.setCustomerId(customerId); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |