Commit fcfa07f4 authored by 郭凡凡's avatar 郭凡凡

Merge remote-tracking branch 'origin/master'

parents 4f1574ba 71129270
...@@ -77,7 +77,7 @@ public class OcpApiTreeController { ...@@ -77,7 +77,7 @@ public class OcpApiTreeController {
if (flag){ if (flag){
return ResponseVO.ok(); return ResponseVO.ok();
} }
return ResponseVO.error("您输入的服务编码重复,请重新输入"); return ResponseVO.error("您输入的服务名称重复,请重新输入");
} }
@PostMapping("/deletetree") @PostMapping("/deletetree")
@ApiOperation("服务树分类--删除") @ApiOperation("服务树分类--删除")
......
...@@ -68,7 +68,7 @@ public class OcpTenantController { ...@@ -68,7 +68,7 @@ public class OcpTenantController {
if (falg){ if (falg){
return ResponseVO.ok("修改成功!"); return ResponseVO.ok("修改成功!");
} }
return ResponseVO.error("应用code已经存在!"); return ResponseVO.error("应用名称已经存在!");
} }
@PostMapping("/tenantdelete") @PostMapping("/tenantdelete")
@ApiModelProperty("删除服务") @ApiModelProperty("删除服务")
......
...@@ -21,4 +21,9 @@ public interface OcpTenantBaseMapper extends BaseMapper<OcpTenantBase> { ...@@ -21,4 +21,9 @@ public interface OcpTenantBaseMapper extends BaseMapper<OcpTenantBase> {
* @return * @return
*/ */
int queryCount(String appCode); int queryCount(String appCode);
List<OcpTenantBase> selcctCodeList(String ocpTenantGroup);
int queryName(String appName);
} }
...@@ -100,7 +100,8 @@ public class PmsApiMangageApi { ...@@ -100,7 +100,8 @@ public class PmsApiMangageApi {
@ApiModelProperty("上级code") @ApiModelProperty("上级code")
private String apiGroupPcode; private String apiGroupPcode;
@ApiModelProperty("服务类型")
private String professionalKind;
@ApiModelProperty("分层树层级 1中台层 2中心层 3 服务组层 4服务层 ") @ApiModelProperty("分层树层级 1中台层 2中心层 3 服务组层 4服务层 ")
private String apiGroupLevel; private String apiGroupLevel;
...@@ -172,6 +173,14 @@ public class PmsApiMangageApi { ...@@ -172,6 +173,14 @@ public class PmsApiMangageApi {
this.objIds = objIds; this.objIds = objIds;
} }
public String getProfessionalKind() {
return professionalKind;
}
public void setProfessionalKind(String professionalKind) {
this.professionalKind = professionalKind;
}
public boolean getBoole() { public boolean getBoole() {
return boole; return boole;
} }
......
...@@ -137,7 +137,8 @@ public class OcpApiBaseVo implements Serializable { ...@@ -137,7 +137,8 @@ public class OcpApiBaseVo implements Serializable {
@ApiModelProperty("分层树层级 1中台层 2中心层 3 服务组层 4服务层 ") @ApiModelProperty("分层树层级 1中台层 2中心层 3 服务组层 4服务层 ")
private String apiGroupLevel; private String apiGroupLevel;
@ApiModelProperty("所属专业; ts:输电,t:变电, dc:直流,ds配电,tc:技术,pl计划 im综合")
private String professionalKind;
// //
@ApiModelProperty("图标种类tenant:应用图标api:服务图标") @ApiModelProperty("图标种类tenant:应用图标api:服务图标")
private String iocnType; private String iocnType;
...@@ -151,6 +152,30 @@ public class OcpApiBaseVo implements Serializable { ...@@ -151,6 +152,30 @@ public class OcpApiBaseVo implements Serializable {
@ApiModelProperty("所属公司可能会根据公司分区") @ApiModelProperty("所属公司可能会根据公司分区")
private String companyCode; private String companyCode;
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getProfessionalKind() {
return professionalKind;
}
public void setProfessionalKind(String professionalKind) {
this.professionalKind = professionalKind;
}
public String getApiGroupCode() { public String getApiGroupCode() {
return apiGroupCode; return apiGroupCode;
} }
......
...@@ -51,8 +51,9 @@ public class AppRegisterServiceImpl implements AppRegisterService { ...@@ -51,8 +51,9 @@ public class AppRegisterServiceImpl implements AppRegisterService {
int count = ocpTenantBaseMapper.queryCount(appRegisterDTO.getAppCode()); int count = ocpTenantBaseMapper.queryCount(appRegisterDTO.getAppCode());
int c = ocpTenantExtentMapper.queryCount(appRegisterDTO.getAppCode()); int c = ocpTenantExtentMapper.queryCount(appRegisterDTO.getAppCode());
if (count != 0 || c != 0) { int nc = ocpTenantBaseMapper.queryName(appRegisterDTO.getAppName());
return ResponseVO.error("应用编码有重复/应用扩展表编码有重复"); if (count != 0 || c != 0 || nc != 0) {
return ResponseVO.error("应用编码有重复/应用扩展表编码有重复/应用名称有重复");
} }
OcpTenantIocn ocpTenantIocn = new OcpTenantIocn(); OcpTenantIocn ocpTenantIocn = new OcpTenantIocn();
......
...@@ -16,12 +16,14 @@ import com.pms.ocp.model.entity.OcpTenantGroup; ...@@ -16,12 +16,14 @@ import com.pms.ocp.model.entity.OcpTenantGroup;
import com.pms.ocp.service.OcpApiTreeService; import com.pms.ocp.service.OcpApiTreeService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.javassist.runtime.Desc;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Stream; import java.util.stream.Stream;
...@@ -41,6 +43,8 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -41,6 +43,8 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
@Autowired @Autowired
private OcpApiBaseMapper ocpApiBaseMapper; private OcpApiBaseMapper ocpApiBaseMapper;
/** /**
* 服务树分类 * 服务树分类
* *
...@@ -83,7 +87,6 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -83,7 +87,6 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
// Stream<OcpApiGroup> apiGroupStream1 = ocpApiGroupStream.filter(ocp -> ocp.getApiGroupName().equals(ocpApiGroup.getApiGroupName())); // Stream<OcpApiGroup> apiGroupStream1 = ocpApiGroupStream.filter(ocp -> ocp.getApiGroupName().equals(ocpApiGroup.getApiGroupName()));
List<OcpApiGroup> ocpApiGroups1 = mapper.selectGroupName(ocpApiGroup.getApiGroupName()); List<OcpApiGroup> ocpApiGroups1 = mapper.selectGroupName(ocpApiGroup.getApiGroupName());
OcpApiGroup ocpApi = new OcpApiGroup(); OcpApiGroup ocpApi = new OcpApiGroup();
if (ocpApiGroups1.size() == 0) { if (ocpApiGroups1.size() == 0) {
ocpApi.setApiGroupPromotionType(ocpApiGroup.getApiGroupPromotionType()); ocpApi.setApiGroupPromotionType(ocpApiGroup.getApiGroupPromotionType());
...@@ -123,14 +126,16 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -123,14 +126,16 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
boolean falg = true; boolean falg = true;
List<OcpApiGroup> ocpApiGroups = mapper.selectList(null); List<OcpApiGroup> ocpApiGroups = mapper.selectList(null);
for (OcpApiGroup apiGroup : ocpApiGroups) { for (OcpApiGroup apiGroup : ocpApiGroups) {
String code = apiGroup.getApiGroupCode(); String name = apiGroup.getApiGroupName();
if (code == ocpApiGroup.getApiGroupCode()) { if (name.equals(ocpApiGroup.getApiGroupName())) {
falg = false; falg = false;
break; break;
} }
} }
if (falg) {
ocpApiGroup.setApiGroupMtime(timestamp); ocpApiGroup.setApiGroupMtime(timestamp);
mapper.updateById(ocpApiGroup); mapper.updateById(ocpApiGroup);
}
return falg; return falg;
} }
...@@ -170,12 +175,13 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -170,12 +175,13 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
LambdaQueryWrapper<OcpApiGroup> qw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OcpApiGroup> qw = new LambdaQueryWrapper<>();
if (StringUtils.isBlank(pageGroupDto.getKeyword())) { if (StringUtils.isBlank(pageGroupDto.getKeyword())) {
if (StringUtils.isBlank(pageGroupDto.getApiGroupCode())) { if (StringUtils.isBlank(pageGroupDto.getApiGroupCode())) {
qw.eq(OcpApiGroup::getApiGroupPromotionType, pageGroupDto.getApiGroupPromotionType()); qw.eq(OcpApiGroup::getApiGroupPromotionType, pageGroupDto.getApiGroupPromotionType()).orderByDesc(OcpApiGroup::getApiGroupMtime);
mapper.selectPage(pageInfo, qw); mapper.selectPage(pageInfo, qw);
} else if (!(StringUtils.isNotBlank(pageGroupDto.getApiGroupPcode()))) { } else if (!(StringUtils.isNotBlank(pageGroupDto.getApiGroupPcode()))) {
List<OcpApiGroup> ocpApiGroups = mapper.selectLists(pageGroupDto.getApiGroupPromotionType(), pageGroupDto.getApiGroupCode()); List<OcpApiGroup> ocpApiGroups = mapper.selectLists(pageGroupDto.getApiGroupPromotionType(), pageGroupDto.getApiGroupCode());
qw.eq(OcpApiGroup::getApiGroupPromotionType, pageGroupDto.getApiGroupPromotionType()).and(c -> c.eq(OcpApiGroup::getApiGroupPcode, pageGroupDto.getApiGroupCode())); qw.eq(OcpApiGroup::getApiGroupPromotionType, pageGroupDto.getApiGroupPromotionType()).and(c -> c.eq(OcpApiGroup::getApiGroupPcode, pageGroupDto.getApiGroupCode())).orderByDesc(OcpApiGroup::getApiGroupMtime);
pageInfo.setRecords(ocpApiGroups); pageInfo.setRecords(ocpApiGroups);
mapper.selectPage(pageInfo, qw); mapper.selectPage(pageInfo, qw);
List<OcpApiGroup> records = pageInfo.getRecords(); List<OcpApiGroup> records = pageInfo.getRecords();
...@@ -189,12 +195,12 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -189,12 +195,12 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
} else if (StringUtils.isNotBlank(pageGroupDto.getKeyword())) { } else if (StringUtils.isNotBlank(pageGroupDto.getKeyword())) {
if (StringUtils.isBlank(pageGroupDto.getApiGroupCode())){ if (StringUtils.isBlank(pageGroupDto.getApiGroupCode())){
LambdaQueryWrapper<OcpApiGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpApiGroup::getApiGroupName, pageGroupDto.getKeyword())) LambdaQueryWrapper<OcpApiGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpApiGroup::getApiGroupName, pageGroupDto.getKeyword()))
.and(c->c.eq(OcpApiGroup::getApiGroupPromotionType,pageGroupDto.getApiGroupPromotionType())); .and(c->c.eq(OcpApiGroup::getApiGroupPromotionType,pageGroupDto.getApiGroupPromotionType())).orderByDesc(OcpApiGroup::getApiGroupMtime);
mapper.selectPage(pageInfo, ocpTenantGroupLambdaQueryWrapper); mapper.selectPage(pageInfo, ocpTenantGroupLambdaQueryWrapper);
}else if (StringUtils.isNotBlank(pageGroupDto.getApiGroupCode())) { }else if (StringUtils.isNotBlank(pageGroupDto.getApiGroupCode())) {
LambdaQueryWrapper<OcpApiGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpApiGroup::getApiGroupName, pageGroupDto.getKeyword())) LambdaQueryWrapper<OcpApiGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpApiGroup::getApiGroupName, pageGroupDto.getKeyword()))
.and(c -> c.eq(OcpApiGroup::getApiGroupPcode, pageGroupDto.getApiGroupCode())); .and(c -> c.eq(OcpApiGroup::getApiGroupPcode, pageGroupDto.getApiGroupCode())).orderByDesc(OcpApiGroup::getApiGroupMtime);
mapper.selectPage(pageInfo, ocpTenantGroupLambdaQueryWrapper); mapper.selectPage(pageInfo, ocpTenantGroupLambdaQueryWrapper);
} }
} }
......
...@@ -77,7 +77,7 @@ public class OcpTenantIocnServiceImpl extends ServiceImpl<OcpTenantIocnMapper, O ...@@ -77,7 +77,7 @@ public class OcpTenantIocnServiceImpl extends ServiceImpl<OcpTenantIocnMapper, O
} }
}*/ }*/
//pish //
List<OcpTenantGroupIocnDto> lists = new ArrayList<>(); List<OcpTenantGroupIocnDto> lists = new ArrayList<>();
List<OcpTenantGroupIocnDto> groupIocnDtos = ocpTenantBaseMapper.selectAlls(); List<OcpTenantGroupIocnDto> groupIocnDtos = ocpTenantBaseMapper.selectAlls();
for (OcpTenantGroupIocnDto groupIocnDto : groupIocnDtos) { for (OcpTenantGroupIocnDto groupIocnDto : groupIocnDtos) {
......
...@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.pms.ocp.common.utils.RandomStringUtils; import com.pms.ocp.common.utils.RandomStringUtils;
import com.pms.ocp.mapper.OcpTenantBaseMapper;
import com.pms.ocp.mapper.TenantBasicManagementMapper; import com.pms.ocp.mapper.TenantBasicManagementMapper;
import com.pms.ocp.mapper.TenantMapper; import com.pms.ocp.mapper.TenantMapper;
import com.pms.ocp.model.dto.*; import com.pms.ocp.model.dto.*;
import com.pms.ocp.model.entity.OcpTenantBase;
import com.pms.ocp.model.entity.OcpTenantGroup; import com.pms.ocp.model.entity.OcpTenantGroup;
import com.pms.ocp.service.TenantService; import com.pms.ocp.service.TenantService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -32,6 +34,10 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup> ...@@ -32,6 +34,10 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
@Autowired @Autowired
private TenantBasicManagementMapper tenantBasicMapper; private TenantBasicManagementMapper tenantBasicMapper;
@Autowired
private OcpTenantBaseMapper ocpTenantBaseMapper;
/** /**
* 应用树分类管理 * 应用树分类管理
* *
...@@ -64,6 +70,12 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup> ...@@ -64,6 +70,12 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
@Override @Override
public OcpTenantGroup getTenanInster(TenanBaseDto tenanBaseDto) { public OcpTenantGroup getTenanInster(TenanBaseDto tenanBaseDto) {
boolean falg = true; boolean falg = true;
if (StringUtils.isNotBlank(tenanBaseDto.getTenantGroupCode())) {
List<OcpTenantBase> ocpTenantBases = ocpTenantBaseMapper.selcctCodeList(tenanBaseDto.getTenantGroupCode());
if (ocpTenantBases.size() > 0) {
falg = false;
}
}
OcpTenantGroup group = new OcpTenantGroup(); OcpTenantGroup group = new OcpTenantGroup();
String randomString = RandomStringUtils.getRandomString(6); String randomString = RandomStringUtils.getRandomString(6);
...@@ -105,8 +117,11 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup> ...@@ -105,8 +117,11 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
tenanBaseDto.setClassIfy(tenanBaseDto.getTenantGroupCode()); tenanBaseDto.setClassIfy(tenanBaseDto.getTenantGroupCode());
tenantMapper.insert(group); tenantMapper.insert(group);
} }
return group; return group;
} }
/** /**
...@@ -121,15 +136,17 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup> ...@@ -121,15 +136,17 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
boolean falg = true; boolean falg = true;
List<OcpTenantGroup> ocpTenantGroupList = tenantMapper.selectList(null); List<OcpTenantGroup> ocpTenantGroupList = tenantMapper.selectList(null);
for (OcpTenantGroup ocpApiGroup : ocpTenantGroupList) { for (OcpTenantGroup ocpApiGroup : ocpTenantGroupList) {
String code = ocpTenantGroup.getTenantGroupCode(); String name = ocpTenantGroup.getTenantGroupName();
if (code == ocpApiGroup.getTenantGroupCode()) { if (name.equals(ocpApiGroup.getTenantGroupName())) {
falg = false; falg = false;
break; break;
} }
} }
if (falg) {
OcpTenantGroup ocpTenantGroup1 = new OcpTenantGroup(); OcpTenantGroup ocpTenantGroup1 = new OcpTenantGroup();
ocpTenantGroup1.setTenantGroupMtime(timestamp); ocpTenantGroup1.setTenantGroupMtime(timestamp);
tenantMapper.updateById(ocpTenantGroup); tenantMapper.updateById(ocpTenantGroup);
}
return falg; return falg;
} }
...@@ -176,18 +193,17 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup> ...@@ -176,18 +193,17 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
if (StringUtils.isBlank(keyword)) { if (StringUtils.isBlank(keyword)) {
if (StringUtils.isBlank(lev) || "1".equals(lev)) { if (StringUtils.isBlank(lev) || "1".equals(lev)) {
LambdaQueryWrapper<OcpTenantGroup> eq = qw.eq(OcpTenantGroup::getTenantGroupCompanyCode, tenantGroupCompanyCode); LambdaQueryWrapper<OcpTenantGroup> eq = qw.eq(OcpTenantGroup::getTenantGroupCompanyCode, tenantGroupCompanyCode).orderByDesc(OcpTenantGroup::getTenantGroupMtime);
tenantMapper.selectPage(page, eq); tenantMapper.selectPage(page, eq);
} else if ("2".equals(lev) || "3".equals(lev)) { } else if ("2".equals(lev) || "3".equals(lev)) {
LambdaQueryWrapper<OcpTenantGroup> eq = qw.or(wq -> wq.eq(OcpTenantGroup::getTenantGroupCompanyCode, tenantGroupCompanyCode)) LambdaQueryWrapper<OcpTenantGroup> eq = qw.or(wq -> wq.eq(OcpTenantGroup::getTenantGroupCompanyCode, tenantGroupCompanyCode))
.eq(OcpTenantGroup::getTenantGroupPcode, tenantGroupCode); .eq(OcpTenantGroup::getTenantGroupPcode, tenantGroupCode).orderByDesc(OcpTenantGroup::getTenantGroupMtime);
tenantMapper.selectPage(page, eq); tenantMapper.selectPage(page, eq);
} }
} else if (!(StringUtils.isBlank(keyword))) { } else if (!(StringUtils.isBlank(keyword))) {
LambdaQueryWrapper<OcpTenantGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpTenantGroup::getTenantGroupCompanyCode, keyword)) LambdaQueryWrapper<OcpTenantGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpTenantGroup::getTenantGroupCompanyCode, keyword))
.or().like(OcpTenantGroup::getTenantGroupName, keyword) .or().like(OcpTenantGroup::getTenantGroupName, keyword)
.or().like(OcpTenantGroup::getTenantGroupPcode, keyword) .orderByDesc(OcpTenantGroup::getTenantGroupMtime);
.or().like(OcpTenantGroup::getTenantGroupUserName, keyword);
tenantMapper.selectPage(page, ocpTenantGroupLambdaQueryWrapper); tenantMapper.selectPage(page, ocpTenantGroupLambdaQueryWrapper);
// OcpTenantGroup ocpTenantGroup1 = new OcpTenantGroup(); // OcpTenantGroup ocpTenantGroup1 = new OcpTenantGroup();
...@@ -204,6 +220,21 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup> ...@@ -204,6 +220,21 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
record.setClassIfy(ocpTenantGroup1.getTenantGroupName()); record.setClassIfy(ocpTenantGroup1.getTenantGroupName());
} }
} }
if (StringUtils.isBlank(tenantGroupCode)) {
List<OcpTenantGroup> records = page.getRecords();
for (OcpTenantGroup record : records) {
record.setClassIfy(record.getTenantGroupName());
}
}
if (StringUtils.isNotBlank(tenantGroupCode)) {
OcpTenantGroup ocpTenantGroup1 = tenantMapper.selectGroupName(tenantGroupCode);
String tenantGroupName = ocpTenantGroup1.getTenantGroupName();
List<OcpTenantGroup> records = page.getRecords();
for (OcpTenantGroup record : records) {
record.setClassIfy(tenantGroupName);
}
}
return page; return page;
......
...@@ -2,7 +2,7 @@ spring: ...@@ -2,7 +2,7 @@ spring:
datasource: datasource:
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
username: postgres username: postgres
password: 1234 password: root
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
# jdbc-url: jdbc:postgresql://192.168.43.20:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true # jdbc-url: jdbc:postgresql://192.168.43.20:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
# jdbc-url: jdbc:postgresql://172.20.10.9:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true # jdbc-url: jdbc:postgresql://172.20.10.9:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
......
<?xml version="1.0" encoding="utf-8" ?> <?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" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pms.ocp.mapper.OcpTenantBaseMapper"> <mapper namespace="com.pms.ocp.mapper.OcpTenantBaseMapper">
<select id="getOtbList" resultType="com.pms.ocp.model.entity.OcpTenantBase">
select *
from ocp_tenant_base otb
LEFT JOIN ocp_tenant_extent ote
on otb.tenant_code = ote.tenant_code
where otb.obj_id = #{objId}
</select>
<select id="updataIsDelect" resultType="com.pms.ocp.model.entity.OcpTenantBase"> <select id="updataIsDelect" resultType="com.pms.ocp.model.entity.OcpTenantBase">
UPDATE ocp_tenant_base UPDATE ocp_tenant_base
...@@ -32,4 +25,19 @@ ...@@ -32,4 +25,19 @@
where tenant_code = #{appCode} where tenant_code = #{appCode}
</select> </select>
<select id="queryName" resultType="java.lang.Integer">
select count(0)
from ocp_tenant_base
where tenant_name = #{appName}
</select>
<select id="selcctCodeList" resultType="java.lang.Integer">
select *
from ocp_tenant_base
where tenant_group_code = #{tenantGroupCode}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
<insert id="addPamm"> <insert id="addPamm">
insert into ocp_api_base(obj_id,api_code,api_name,api_group_code,api_promotion,api_req, insert into ocp_api_base(obj_id,api_code,api_name,api_group_code,api_promotion,api_req,
api_resp,api_url,api_ctime,api_mtime,api_user_id,api_unit,owner_company_code,is_delete, api_resp,api_url,api_ctime,api_mtime,api_user_id,api_unit,owner_company_code,is_delete,
api_zone,api_layer,api_version,api_center_code,api_description,api_user_name) api_zone,api_layer,api_version,api_center_code,api_description,api_user_name,professional_kind)
values (#{objId},#{apiCode},#{apiName},#{apiGroupCode},#{apiPromotion},#{apiReq}, values (#{objId},#{apiCode},#{apiName},#{apiGroupCode},#{apiPromotion},#{apiReq},
#{apiResp},#{apiUrl},#{apiCtime},#{apiMtime},#{apiUserId},#{apiUnit},#{ownerCompanyCode}, #{apiResp},#{apiUrl},#{apiCtime},#{apiMtime},#{apiUserId},#{apiUnit},#{ownerCompanyCode},
#{isDelete},#{apiZone},#{apiLayer},#{apiVersion},#{apiCenterCode},#{apiDescription},#{apiUserName}) #{isDelete},#{apiZone},#{apiLayer},#{apiVersion},#{apiCenterCode},#{apiDescription},#{apiUserName},#{professionalKind})
</insert> </insert>
......
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