Browse Source

Merge remote-tracking branch 'remotes/origin/dev_thirdplatform' into dev

dev_shibei_match
jianjun 5 years ago
parent
commit
5976b848e6
  1. 25
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java
  2. 10
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java
  3. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java
  4. 7
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java
  5. 9
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeCustomerDao.xml

25
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java

@ -48,37 +48,50 @@ public interface CodeCustomerDao extends BaseDao<CodeCustomerEntity> {
List<UploadListResultDTO> selectCodeList(UploadListFormDTO formDTO); List<UploadListResultDTO> selectCodeList(UploadListFormDTO formDTO);
/** /**
* @Description 根据客户id和客户端类型获取 代码模板ID和授权方AppId
* @param customerId * @param customerId
* @param clientType * @param clientType
* @Description 根据客户id和客户端类型获取 代码模板ID和授权方AppId
* @author zxc * @author zxc
*/ */
TemplateAndAppIdResultDTO selectTemplateAndAppId(@Param("customerId") String customerId, @Param("clientType") String clientType); TemplateAndAppIdResultDTO selectTemplateAndAppId(@Param("customerId") String customerId, @Param("clientType") String clientType);
/** /**
* @Description 查询 code_customer 表ID
* @param codeAuditRecord * @param codeAuditRecord
* @Description 查询 code_customer 表ID
* @author zxc * @author zxc
*/ */
String selectCodeCustomerId(CodeAuditRecordFormDTO codeAuditRecord); String selectCodeCustomerId(CodeAuditRecordFormDTO codeAuditRecord);
/** /**
* 删除旧的上传记录 * 删除旧的上传记录
* @author zhaoqifeng *
* @date 2020/7/15 18:06
* @param customerId * @param customerId
* @param clientType * @param clientType
* @return void * @return void
* @author zhaoqifeng
* @date 2020/7/15 18:06
*/ */
void deleteCode(@Param("customerId") String customerId, @Param("clientType") String clientType); void deleteCode(@Param("customerId") String customerId, @Param("clientType") String clientType);
/** /**
* 获取审核中代码列表 * 获取审核中代码列表
* @author zhaoqifeng *
* @date 2020/7/15 18:17
* @param source * @param source
* @return java.util.List<com.epmet.dto.CodeCustomerDTO> * @return java.util.List<com.epmet.dto.CodeCustomerDTO>
* @author zhaoqifeng
* @date 2020/7/15 18:17
*/ */
List<CodeCustomerDTO> selectAuditingCodeList(@Param("source") String source); List<CodeCustomerDTO> selectAuditingCodeList(@Param("source") String source);
/**
* 获取上传代码信息
*
* @param customerId
* @param clientType
* @return com.epmet.dto.CodeCustomerDTO
* @author zhaoqifeng
* @date 2020/7/31 15:54
*/
CodeCustomerDTO selectUploadCodeByCustomer(@Param("customerId") String customerId, @Param("clientType") String clientType);
} }

10
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java

@ -112,6 +112,16 @@ public interface CodeCustomerService extends BaseService<CodeCustomerEntity> {
*/ */
List<CodeCustomerDTO> getAuditingCodeList(String source); List<CodeCustomerDTO> getAuditingCodeList(String source);
/**
* 获取上传代码信息
* @author zhaoqifeng
* @date 2020/7/31 15:52
* @param customerId
* @param clientType
* @return com.epmet.dto.CodeCustomerDTO
*/
CodeCustomerDTO getUploadCodeByCustomer(String customerId, String clientType);
/** /**
* 删除旧代码记录 * 删除旧代码记录
* @author zhaoqifeng * @author zhaoqifeng

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java

@ -119,6 +119,11 @@ public class CodeCustomerServiceImpl extends BaseServiceImpl<CodeCustomerDao, Co
return baseDao.selectAuditingCodeList(source); return baseDao.selectAuditingCodeList(source);
} }
@Override
public CodeCustomerDTO getUploadCodeByCustomer(String customerId, String clientType) {
return baseDao.selectUploadCodeByCustomer(customerId, clientType);
}
@Override @Override
public void deleteCode(String customerId, String clientType) { public void deleteCode(String customerId, String clientType) {
baseDao.deleteCode(customerId, clientType); baseDao.deleteCode(customerId, clientType);

7
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

@ -107,6 +107,13 @@ public class CodeServiceImpl implements CodeService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void upload(CodeUploadFormDTO formDTO) { public void upload(CodeUploadFormDTO formDTO) {
//获取上传代码信息
CodeCustomerDTO uploadCode = codeCustomerService.getUploadCodeByCustomer(formDTO.getCustomerId(), formDTO.getClientType());
if (null != uploadCode) {
if (CodeConstant.AUDITING.equals(uploadCode.getStatus())) {
throw new RenException("已经有正在审核的版本,请等待审核完毕或者撤回审核后再上传");
}
}
//是否授权 //是否授权
if (!customerMpService.getAuthFlag(formDTO.getCustomerId(), formDTO.getClientType())) { if (!customerMpService.getAuthFlag(formDTO.getCustomerId(), formDTO.getClientType())) {
throw new RenException("未授权"); throw new RenException("未授权");

9
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeCustomerDao.xml

@ -88,6 +88,15 @@
<select id="selectAuditingCodeList" resultType="com.epmet.dto.CodeCustomerDTO"> <select id="selectAuditingCodeList" resultType="com.epmet.dto.CodeCustomerDTO">
select * FROM code_customer WHERE DEL_FLAG = '0' AND STATUS = 'auditing' AND SOURCE = #{source} select * FROM code_customer WHERE DEL_FLAG = '0' AND STATUS = 'auditing' AND SOURCE = #{source}
</select> </select>
<select id="selectUploadCodeByCustomer" resultType="com.epmet.dto.CodeCustomerDTO">
SELECT
ID, STATUS
FROM
code_customer
WHERE CUSTOMER_ID = #{customerId}
AND CLIENT_TYPE = #{clientType}
AND DEL_FLAG = '0'
</select>
<update id="deleteCode"> <update id="deleteCode">
UPDATE code_customer UPDATE code_customer
SET SET

Loading…
Cancel
Save