Commit 803d18fe authored by xxxxxwwwww's avatar xxxxxwwwww

修改

parent 77a4e100
...@@ -6,4 +6,10 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -6,4 +6,10 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface OcpTenantExtentMapper extends BaseMapper<OcpTenantExtent>{ public interface OcpTenantExtentMapper extends BaseMapper<OcpTenantExtent>{
/**
*
* @param appCode
* @return
*/
int queryCount(String appCode);
} }
...@@ -50,8 +50,9 @@ public class AppRegisterServiceImpl implements AppRegisterService { ...@@ -50,8 +50,9 @@ public class AppRegisterServiceImpl implements AppRegisterService {
public ResponseVO addApp(AppRegisterDTO appRegisterDTO) { public ResponseVO addApp(AppRegisterDTO appRegisterDTO) {
int count = ocpTenantBaseMapper.queryCount(appRegisterDTO.getAppCode()); int count = ocpTenantBaseMapper.queryCount(appRegisterDTO.getAppCode());
if (count != 0) { int c = ocpTenantExtentMapper.queryCount(appRegisterDTO.getAppCode());
return ResponseVO.error("应用编码有重复"); if (count != 0 || c != 0) {
return ResponseVO.error("应用编码有重复/应用扩展表编码有重复");
} }
OcpTenantIocn ocpTenantIocn = new OcpTenantIocn(); OcpTenantIocn ocpTenantIocn = new OcpTenantIocn();
......
<?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