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

更新

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