Commit 29357c18 authored by diaoruifeng's avatar diaoruifeng
parents 62b73e65 5acf550b
......@@ -6,4 +6,10 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OcpTenantExtentMapper extends BaseMapper<OcpTenantExtent>{
/**
*
* @param appCode
* @return
*/
int queryCount(String appCode);
}
......@@ -50,8 +50,9 @@ public class AppRegisterServiceImpl implements AppRegisterService {
public ResponseVO addApp(AppRegisterDTO appRegisterDTO) {
int count = ocpTenantBaseMapper.queryCount(appRegisterDTO.getAppCode());
if (count != 0) {
return ResponseVO.error("应用编码有重复");
int c = ocpTenantExtentMapper.queryCount(appRegisterDTO.getAppCode());
if (count != 0 || c != 0) {
return ResponseVO.error("应用编码有重复/应用扩展表编码有重复");
}
OcpTenantIocn ocpTenantIocn = new OcpTenantIocn();
......
......@@ -13,13 +13,12 @@
from ocp_tenant_base base
INNER JOIN ocp_tenant_iocn icon ON base.tenant_code = icon.code_no
INNER JOIN ocp_tenant_extent extent ON extent.tenant_code = base.tenant_code
INNER JOIN ocp_tenant_group g ON g.tenant_group_code = base.tenant_group_code
WHERE icon.iocn_type = 'tenant' and icon.iocn_kind is null
WHERE icon.iocn_type = 'tenant' and icon.iocn_kind is null and base.is_delete = '0'
<if test="dto.kind != null and dto.kind != ''">
and base.professional_kind like '${dto.kind}'
</if>
<if test="dto.type != null and dto.type != ''">
and g.tenant_group_name like '${dto.type}'
and base.tenant_group_code like '${dto.type}'
</if>
</select>
......
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pms.ocp.mapper.OcpTenantExtentMapper">
<select id="queryCount" resultType="java.lang.Integer">
select count(0)
from ocp_tenant_extent
where tenant_code = #{appCode}
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment