Commit 190186aa authored by 郭凡凡's avatar 郭凡凡

更新

parent d3cb0278
......@@ -212,10 +212,10 @@ public class ApiBasicManagementController {
public ResponseVO<PageInfo<OcpApiBase>> selectByCondition(@RequestParam(required = false) String apiCode,
@RequestParam(required = false) String apiName,
@RequestParam(required = false) String apiCenterCode,
@RequestParam(required = false) Integer pageNum,
@RequestParam(required = false) Integer currentPage,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String apiGroupCode) {
return apiBasicManagementService.selectByCondition(apiCode, apiName, apiCenterCode, pageNum, pageSize, apiGroupCode);
return apiBasicManagementService.selectByCondition(apiCode, apiName, apiCenterCode, currentPage, pageSize, apiGroupCode);
}
......
......@@ -28,7 +28,7 @@ public class AppRegisterDTO {
@ApiModelProperty("应用图标")
@NotBlank(message = "应用图标不能为空", groups = CreateGroups.class)
private String imgUrl;
private byte[] imgUrl;
@ApiModelProperty("应用名称")
@NotBlank(message = "应用名称不能为空", groups = CreateGroups.class)
......@@ -165,11 +165,11 @@ public class AppRegisterDTO {
this.time = time;
}
public String getImgUrl() {
public byte[] getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
public void setImgUrl(byte[] imgUrl) {
this.imgUrl = imgUrl;
}
......
......@@ -20,7 +20,7 @@ public class ImgDTO {
@ApiModelProperty(value = "应用预览url")
@NotBlank(message = "应用预览url不能为空", groups = CreateGroups.class)
private String img;
private byte[] img;
public String getTenantCode() {
return tenantCode;
......@@ -30,11 +30,11 @@ public class ImgDTO {
this.tenantCode = tenantCode;
}
public String getImg() {
public byte[] getImg() {
return img;
}
public void setImg(String img) {
public void setImg(byte[] img) {
this.img = img;
}
}
......
......@@ -40,7 +40,7 @@ public class OcpTenantIocn implements Serializable {
* 应用调用的服务数量图标数据
*/
@ApiModelProperty(value = "应用调用的服务数量图标数据")
private Object iocn;
private byte[] iocn;
@ApiModelProperty(value = "图片类型")
private Object iocnKind;
......@@ -77,11 +77,11 @@ public class OcpTenantIocn implements Serializable {
this.codeNo = codeNo;
}
public Object getIocn() {
public byte[] getIocn() {
return iocn;
}
public void setIocn(Object iocn) {
public void setIocn(byte[] iocn) {
this.iocn = iocn;
}
......
......@@ -86,12 +86,12 @@ public interface ApiBasicManagementService extends IService<OcpApiBase> {
* @param apiCode
* @param apiName
* @param apiCenterCode
* @param pageNum
* @param currentPage
* @param pageSize
* @param apiGroupCode
* @return
*/
ResponseVO<PageInfo<OcpApiBase>> selectByCondition(String apiCode, String apiName, String apiCenterCode,Integer pageNum,Integer pageSize,String apiGroupCode);
ResponseVO<PageInfo<OcpApiBase>> selectByCondition(String apiCode, String apiName, String apiCenterCode,Integer currentPage,Integer pageSize,String apiGroupCode);
/**
* 省侧-应用接入申请-查询组中所有中心
......
......@@ -262,17 +262,16 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl<ApiBasicManagemen
* @param apiName
* @param apiCenterCode
* @param apiGroupCode
* @param pageNum
* @param currentPage
* @param pageSize
* @return
*/
public ResponseVO<PageInfo<OcpApiBase>> selectByCondition(String apiCode, String apiName,String apiCenterCode ,Integer pageNum, Integer pageSize, String apiGroupCode) {
if (pageNum == null || pageSize == null) {
public ResponseVO<PageInfo<OcpApiBase>> selectByCondition(String apiCode, String apiName,String apiCenterCode ,Integer currentPage, Integer pageSize, String apiGroupCode) {
if (currentPage == null || pageSize == null) {
return ResponseVO.error("分页参数不能为空");
}
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(currentPage, pageSize);
List<OcpApiBase> list = apiBasicManagementMapper.selectByCondition(apiCode, apiName, apiCenterCode,apiGroupCode);
PageInfo<OcpApiBase> pageInfo = new PageInfo<>(list);
return ResponseVO.ok(pageInfo);
......
......@@ -24,7 +24,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 应用注册业务接口实现
*
......@@ -56,24 +55,23 @@ public class AppRegisterServiceImpl implements AppRegisterService {
ocpTenantIocn.setIocn(appRegisterDTO.getImgUrl());
int n = ocpTenantIocnMapper.insert(ocpTenantIocn);
OcpTenantExtent ocpTenantExtent = new OcpTenantExtent();
ocpTenantExtent.setTenantCtime(new Date());
ocpTenantExtent.setTenantCode(appRegisterDTO.getAppCode());
ocpTenantExtent.setClusterName(appRegisterDTO.getGroup());
ocpTenantExtent.setDeploymentName(appRegisterDTO.getDeploymentName());
ocpTenantExtent.setIsDelete((short) 0);
int j = ocpTenantExtentMapper.insert(ocpTenantExtent);
OcpTenantGroup ocpTenantGroup = new OcpTenantGroup();
ocpTenantGroup.setTenantGroupUserId(appRegisterDTO.getUserId());
ocpTenantGroup.setTenantGroupUserName(appRegisterDTO.getUserName());
ocpTenantGroup.setTenantGroupCtime(new Timestamp(System.currentTimeMillis()));
ocpTenantGroup.setTenantGroupCode(GUIDGenerator.generate32(true));
ocpTenantGroup.setTenantGroupName(appRegisterDTO.getType());
ocpTenantGroup.setIsDelete((short) 0);
int m = ocpTenantGroupMapper.insert(ocpTenantGroup);
OcpTenantBase ocpTenantBase = new OcpTenantBase();
ocpTenantBase.setTenantUserId(appRegisterDTO.getUserId());
ocpTenantBase.setTenantName(appRegisterDTO.getAppName());
......@@ -85,9 +83,9 @@ public class AppRegisterServiceImpl implements AppRegisterService {
ocpTenantBase.setTenantVersion(appRegisterDTO.getVersion());
ocpTenantBase.setTenantCtime(new Timestamp(System.currentTimeMillis()));
ocpTenantBase.setTenantGroupCode(ocpTenantGroup.getTenantGroupCode());
ocpTenantBase.setIsDelete((short) 0);
int i = ocpTenantBaseMapper.insert(ocpTenantBase);
if (n > 0 && i > 0 && j > 0 && m > 0) {
return ResponseVO.ok();
}
......
......@@ -409,6 +409,8 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
String tenantCode = ocpBaseTiocnDto.getTenantCode();
OcpTenantBase ocpTenantBase = new OcpTenantBase();
BeanUtils.copyProperties(ocpBaseTiocnDto, ocpTenantBase);
ocpTenantBase.setIsDelete((short) 0);
ocpTenantBase.setTenantCtime(new Timestamp(System.currentTimeMillis()));
LambdaQueryWrapper<OcpTenantBase> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
lambdaQueryWrapper2.eq(OcpTenantBase::getTenantCode, tenantCode);
// boolean flag = this.update(ocpTenantBase, lambdaQueryWrapper2);
......@@ -437,11 +439,10 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
//添加新的数据到图标表
OcpTenantIocn ocpTenantIocn = new OcpTenantIocn();
String iocn = ocpBaseTiocnDto.getIocn();
String ownerCompanyCode = ocpBaseTiocnDto.getOwnerCompanyCode();
ocpTenantIocn.setCodeNo(tenantCode);
ocpTenantIocn.setIocnType("tenant");
ocpTenantIocn.setIocn(iocn);
// ocpTenantIocn.setIocn(ocpBaseTiocnDto.getIocn());
ocpTenantIocn.setCompanyCode(ownerCompanyCode);
boolean save = ocpTenantIocnService.save(ocpTenantIocn);
if (save) {
......
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