Commit 81d3f5df authored by 彭松's avatar 彭松
parents 2820f7b0 a2698750
...@@ -45,4 +45,14 @@ public class AppVo extends BaseEntityLong { ...@@ -45,4 +45,14 @@ public class AppVo extends BaseEntityLong {
*/ */
private String deviceCode; private String deviceCode;
/**
* 源app
*/
private Long sourceAppId;
/**
* 目标app
*/
private Long targetAppId;
} }
\ No newline at end of file
...@@ -27,6 +27,10 @@ public interface AppService extends ICRUDService<AppEntity, Long> { ...@@ -27,6 +27,10 @@ public interface AppService extends ICRUDService<AppEntity, Long> {
Rest<String> cloneAppsBySites(List<AppEntity> appList, List<SiteEntity> siteList, Context context); Rest<String> cloneAppsBySites(List<AppEntity> appList, List<SiteEntity> siteList, Context context);
Rest<String> cloneAppBySameSite(AppEntity appEntity, Context context);
AppDao getAppDao(); AppDao getAppDao();
} }
\ No newline at end of file
...@@ -168,6 +168,32 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService, ...@@ -168,6 +168,32 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
return rest; return rest;
} }
/**
* app应用克隆给本站点
*/
@PostMapping(value = "cloneAppBySameSite")
public Rest<Void> cloneAppBySameSite(@RequestBody AppEntity appQuery) {
String busiDesc = this.getModuleDesc() + "自助服务应用部署克隆";
Rest<Void> rest = Rest.ok(busiDesc + " 【成功】");
try {
if (ObjectUtils.isEmpty(appQuery.getSourceAppId())) {
throw new AppException("源appId不能为空!");
}
if (ObjectUtils.isEmpty(appQuery.getTargetAppId())) {
throw new AppException("目标appId不能为空!");
}
Rest<String> cloneRest = this.service.cloneAppBySameSite(appQuery, getContext());
if(YesNoEnum.NO.getValue()==cloneRest.getCode()){
return Rest.fail(cloneRest.getMsg());
}
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error("应用克隆异常", e);
rest = Rest.fail(super.convertException(e));
}
return rest;
}
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -3,6 +3,7 @@ package com.mortals.xhx.module.dept.model; ...@@ -3,6 +3,7 @@ package com.mortals.xhx.module.dept.model;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.dept.model.vo.DeptVo; import com.mortals.xhx.module.dept.model.vo.DeptVo;
...@@ -43,6 +44,7 @@ public class DeptEntity extends DeptVo { ...@@ -43,6 +44,7 @@ public class DeptEntity extends DeptVo {
/** /**
* 部门电话 * 部门电话
*/ */
@JsonInclude(JsonInclude.Include.ALWAYS)
private String deptTelphone; private String deptTelphone;
/** /**
* 部门编号 * 部门编号
...@@ -391,19 +393,19 @@ public class DeptEntity extends DeptVo { ...@@ -391,19 +393,19 @@ public class DeptEntity extends DeptVo {
this.tid = null; this.tid = null;
this.tname = null; this.tname = "";
this.name = null; this.name = "";
this.simpleName = null; this.simpleName = "";
this.siteId = null; this.siteId = null;
this.deptAbb = null; this.deptAbb = "";
this.deptTelphone = null; this.deptTelphone = "";
this.deptNumber = null; this.deptNumber = "";
this.isAutotable = 1; this.isAutotable = 1;
......
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