提交 739701e4 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibz-lite,应用]

上级 bb701eff
...@@ -4,7 +4,7 @@ export default { ...@@ -4,7 +4,7 @@ export default {
id: "标识", id: "标识",
label: "名称", label: "名称",
servicename: "服务名", servicename: "服务名",
pssystemid: "系统标识", systemid: "系统标识",
addr: "地址", addr: "地址",
}, },
views: { views: {
......
...@@ -3,7 +3,7 @@ export default { ...@@ -3,7 +3,7 @@ export default {
id: "标识", id: "标识",
label: "名称", label: "名称",
servicename: "服务名", servicename: "服务名",
pssystemid: "系统标识", systemid: "系统标识",
addr: "地址", addr: "地址",
}, },
views: { views: {
......
...@@ -10,6 +10,10 @@ export default { ...@@ -10,6 +10,10 @@ export default {
system_name: "系统", system_name: "系统",
ds_id: "数据源标识", ds_id: "数据源标识",
ds_name: "数据源", ds_name: "数据源",
module_id: "模块标识",
module_name: "模块",
ext_params: "扩展参数",
show_order: "排序",
}, },
views: { views: {
pickupview: { pickupview: {
......
...@@ -9,6 +9,10 @@ export default { ...@@ -9,6 +9,10 @@ export default {
system_name: "系统", system_name: "系统",
ds_id: "数据源标识", ds_id: "数据源标识",
ds_name: "数据源", ds_name: "数据源",
module_id: "模块标识",
module_name: "模块",
ext_params: "扩展参数",
show_order: "排序",
}, },
views: { views: {
pickupview: { pickupview: {
......
...@@ -3,8 +3,9 @@ export default { ...@@ -3,8 +3,9 @@ export default {
fields: { fields: {
id: "模块标识", id: "模块标识",
name: "模块名称", name: "模块名称",
codename: "代码名称", code_name: "代码名称",
systemid: "系统标识", system_id: "系统标识",
show_order: "排序",
}, },
views: { views: {
pickupgridview: { pickupgridview: {
......
...@@ -2,8 +2,9 @@ export default { ...@@ -2,8 +2,9 @@ export default {
fields: { fields: {
id: "模块标识", id: "模块标识",
name: "模块名称", name: "模块名称",
codename: "代码名称", code_name: "代码名称",
systemid: "系统标识", system_id: "系统标识",
show_order: "排序",
}, },
views: { views: {
pickupgridview: { pickupgridview: {
......
...@@ -37,7 +37,7 @@ export default class DefaultModel { ...@@ -37,7 +37,7 @@ export default class DefaultModel {
}, },
{ {
name: 'n_systemid_eq', name: 'n_systemid_eq',
prop: 'pssystemid', prop: 'systemid',
dataType: 'PICKUP', dataType: 'PICKUP',
}, },
] ]
......
...@@ -72,7 +72,7 @@ export default class MainModel { ...@@ -72,7 +72,7 @@ export default class MainModel {
}, },
{ {
name: 'systemid', name: 'systemid',
prop: 'pssystemid', prop: 'systemid',
dataType: 'PICKUP', dataType: 'PICKUP',
}, },
{ {
......
...@@ -28,7 +28,7 @@ export default class MainModel { ...@@ -28,7 +28,7 @@ export default class MainModel {
return [ return [
{ {
name: 'systemid', name: 'systemid',
prop: 'pssystemid', prop: 'systemid',
dataType: 'PICKUP', dataType: 'PICKUP',
isEditable:true isEditable:true
}, },
......
...@@ -25,7 +25,7 @@ export default class PickupViewpickupviewpanelModel { ...@@ -25,7 +25,7 @@ export default class PickupViewpickupviewpanelModel {
name: 'servicename', name: 'servicename',
}, },
{ {
name: 'pssystemid', name: 'systemid',
}, },
{ {
name: 'addr', name: 'addr',
......
...@@ -51,6 +51,11 @@ export default class MainModel { ...@@ -51,6 +51,11 @@ export default class MainModel {
prop: 'logic_name', prop: 'logic_name',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{
name: 'moduleid',
prop: 'module_id',
dataType: 'PICKUP',
},
{ {
name: 'entityname', name: 'entityname',
prop: 'entity_name', prop: 'entity_name',
......
...@@ -42,6 +42,18 @@ export default class PickupViewpickupviewpanelModel { ...@@ -42,6 +42,18 @@ export default class PickupViewpickupviewpanelModel {
{ {
name: 'ds_name', name: 'ds_name',
}, },
{
name: 'module_id',
},
{
name: 'module_name',
},
{
name: 'ext_params',
},
{
name: 'show_order',
},
] ]
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "blade_visual",resultMap = "BladeVisualResultMap") @TableName(value = "blade_visual", resultMap = "BladeVisualResultMap")
public class BladeVisual extends EntityMP implements Serializable { public class BladeVisual extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,7 +47,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -47,7 +47,7 @@ public class BladeVisual extends EntityMP implements Serializable {
* 主键 * 主键
*/ */
@DEField(isKeyField = true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
...@@ -92,7 +92,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -92,7 +92,7 @@ public class BladeVisual extends EntityMP implements Serializable {
*/ */
@DEField(name = "create_time", preType = DEPredefinedFieldType.CREATEDATE) @DEField(name = "create_time", preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "create_time", fill = FieldFill.INSERT) @TableField(value = "create_time", fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "createtime", format = "yyyy-MM-dd HH:mm:ss") @JSONField(name = "createtime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("createtime") @JsonProperty("createtime")
private Timestamp createtime; private Timestamp createtime;
...@@ -117,7 +117,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -117,7 +117,7 @@ public class BladeVisual extends EntityMP implements Serializable {
*/ */
@DEField(name = "update_time", preType = DEPredefinedFieldType.UPDATEDATE) @DEField(name = "update_time", preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "update_time") @TableField(value = "update_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "updatetime", format = "yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatetime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatetime") @JsonProperty("updatetime")
private Timestamp updatetime; private Timestamp updatetime;
...@@ -133,7 +133,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -133,7 +133,7 @@ public class BladeVisual extends EntityMP implements Serializable {
* 是否已删除 * 是否已删除
*/ */
@DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "0", logicdelval = "1") @DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "0", logicdelval = "1")
@TableLogic(value= "0", delval = "1") @TableLogic(value = "0", delval = "1")
@TableField(value = "is_deleted") @TableField(value = "is_deleted")
@JSONField(name = "isdeleted") @JSONField(name = "isdeleted")
@JsonProperty("isdeleted") @JsonProperty("isdeleted")
...@@ -145,70 +145,70 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -145,70 +145,70 @@ public class BladeVisual extends EntityMP implements Serializable {
* 设置 [大屏标题] * 设置 [大屏标题]
*/ */
public void setTitle(String title) { public void setTitle(String title) {
this.title = title ; this.title = title;
this.modify("title",title); this.modify("title", title);
} }
/** /**
* 设置 [大屏类型] * 设置 [大屏类型]
*/ */
public void setCategory(Integer category) { public void setCategory(Integer category) {
this.category = category ; this.category = category;
this.modify("category",category); this.modify("category", category);
} }
/** /**
* 设置 [发布密码] * 设置 [发布密码]
*/ */
public void setPassword(String password) { public void setPassword(String password) {
this.password = password ; this.password = password;
this.modify("password",password); this.modify("password", password);
} }
/** /**
* 设置 [大屏背景] * 设置 [大屏背景]
*/ */
public void setBackgroundurl(String backgroundurl) { public void setBackgroundurl(String backgroundurl) {
this.backgroundurl = backgroundurl ; this.backgroundurl = backgroundurl;
this.modify("background_url",backgroundurl); this.modify("background_url", backgroundurl);
} }
/** /**
* 设置 [状态] * 设置 [状态]
*/ */
public void setStatus(Integer status) { public void setStatus(Integer status) {
this.status = status ; this.status = status;
this.modify("status",status); this.modify("status", status);
} }
/** /**
* 设置 [创建部门] * 设置 [创建部门]
*/ */
public void setCreatedept(Long createdept) { public void setCreatedept(Long createdept) {
this.createdept = createdept ; this.createdept = createdept;
this.modify("create_dept",createdept); this.modify("create_dept", createdept);
} }
/** /**
* 设置 [创建人] * 设置 [创建人]
*/ */
public void setCreateuser(Long createuser) { public void setCreateuser(Long createuser) {
this.createuser = createuser ; this.createuser = createuser;
this.modify("create_user",createuser); this.modify("create_user", createuser);
} }
/** /**
* 设置 [修改人] * 设置 [修改人]
*/ */
public void setUpdateuser(Long updateuser) { public void setUpdateuser(Long updateuser) {
this.updateuser = updateuser ; this.updateuser = updateuser;
this.modify("update_user",updateuser); this.modify("update_user", updateuser);
} }
@Override @Override
public Serializable getDefaultKey(boolean gen) { public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId(); return IdWorker.getId();
} }
/** /**
* 复制当前对象数据到目标对象(粘贴重置) * 复制当前对象数据到目标对象(粘贴重置)
...@@ -220,7 +220,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -220,7 +220,7 @@ public class BladeVisual extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id"); this.reset("id");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "blade_visual_category",resultMap = "BladeVisualCategoryResultMap") @TableName(value = "blade_visual_category", resultMap = "BladeVisualCategoryResultMap")
public class BladeVisualCategory extends EntityMP implements Serializable { public class BladeVisualCategory extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,7 +47,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -47,7 +47,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
* 主键 * 主键
*/ */
@DEField(isKeyField = true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
...@@ -71,7 +71,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -71,7 +71,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
* 是否已删除 * 是否已删除
*/ */
@DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "1", logicdelval = "0") @DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "1", logicdelval = "0")
@TableLogic(value= "1", delval = "0") @TableLogic(value = "1", delval = "0")
@TableField(value = "is_deleted") @TableField(value = "is_deleted")
@JSONField(name = "isdeleted") @JSONField(name = "isdeleted")
@JsonProperty("isdeleted") @JsonProperty("isdeleted")
...@@ -83,22 +83,22 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -83,22 +83,22 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
* 设置 [分类键值] * 设置 [分类键值]
*/ */
public void setCategorykey(String categorykey) { public void setCategorykey(String categorykey) {
this.categorykey = categorykey ; this.categorykey = categorykey;
this.modify("category_key",categorykey); this.modify("category_key", categorykey);
} }
/** /**
* 设置 [分类名称] * 设置 [分类名称]
*/ */
public void setCategoryvalue(String categoryvalue) { public void setCategoryvalue(String categoryvalue) {
this.categoryvalue = categoryvalue ; this.categoryvalue = categoryvalue;
this.modify("category_value",categoryvalue); this.modify("category_value", categoryvalue);
} }
@Override @Override
public Serializable getDefaultKey(boolean gen) { public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId(); return IdWorker.getId();
} }
/** /**
* 复制当前对象数据到目标对象(粘贴重置) * 复制当前对象数据到目标对象(粘贴重置)
...@@ -110,7 +110,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -110,7 +110,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id"); this.reset("id");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "blade_visual_config",resultMap = "BladeVisualConfigResultMap") @TableName(value = "blade_visual_config", resultMap = "BladeVisualConfigResultMap")
public class BladeVisualConfig extends EntityMP implements Serializable { public class BladeVisualConfig extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,7 +47,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable { ...@@ -47,7 +47,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
* 主键 * 主键
*/ */
@DEField(isKeyField = true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
...@@ -80,30 +80,30 @@ public class BladeVisualConfig extends EntityMP implements Serializable { ...@@ -80,30 +80,30 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
* 设置 [可视化表主键] * 设置 [可视化表主键]
*/ */
public void setVisualid(Long visualid) { public void setVisualid(Long visualid) {
this.visualid = visualid ; this.visualid = visualid;
this.modify("visual_id",visualid); this.modify("visual_id", visualid);
} }
/** /**
* 设置 [组件json] * 设置 [组件json]
*/ */
public void setComponent(String component) { public void setComponent(String component) {
this.component = component ; this.component = component;
this.modify("component",component); this.modify("component", component);
} }
/** /**
* 设置 [配置json] * 设置 [配置json]
*/ */
public void setDetail(String detail) { public void setDetail(String detail) {
this.detail = detail ; this.detail = detail;
this.modify("detail",detail); this.modify("detail", detail);
} }
@Override @Override
public Serializable getDefaultKey(boolean gen) { public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId(); return IdWorker.getId();
} }
/** /**
* 复制当前对象数据到目标对象(粘贴重置) * 复制当前对象数据到目标对象(粘贴重置)
...@@ -115,7 +115,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable { ...@@ -115,7 +115,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id"); this.reset("id");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "blade_visual_map",resultMap = "BladeVisualMapResultMap") @TableName(value = "blade_visual_map", resultMap = "BladeVisualMapResultMap")
public class BladeVisualMap extends EntityMP implements Serializable { public class BladeVisualMap extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,7 +47,7 @@ public class BladeVisualMap extends EntityMP implements Serializable { ...@@ -47,7 +47,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
* 主键 * 主键
*/ */
@DEField(isKeyField = true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
...@@ -72,22 +72,22 @@ public class BladeVisualMap extends EntityMP implements Serializable { ...@@ -72,22 +72,22 @@ public class BladeVisualMap extends EntityMP implements Serializable {
* 设置 [地图名称] * 设置 [地图名称]
*/ */
public void setName(String name) { public void setName(String name) {
this.name = name ; this.name = name;
this.modify("name",name); this.modify("name", name);
} }
/** /**
* 设置 [地图数据] * 设置 [地图数据]
*/ */
public void setData(String data) { public void setData(String data) {
this.data = data ; this.data = data;
this.modify("data",data); this.modify("data", data);
} }
@Override @Override
public Serializable getDefaultKey(boolean gen) { public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId(); return IdWorker.getId();
} }
/** /**
* 复制当前对象数据到目标对象(粘贴重置) * 复制当前对象数据到目标对象(粘贴重置)
...@@ -99,7 +99,7 @@ public class BladeVisualMap extends EntityMP implements Serializable { ...@@ -99,7 +99,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id"); this.reset("id");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface BladeVisualCategoryMapper extends BaseMapper<BladeVisualCategory>{ public interface BladeVisualCategoryMapper extends BaseMapper<BladeVisualCategory> {
Page<BladeVisualCategory> searchDefault(IPage page, @Param("srf") BladeVisualCategorySearchContext context, @Param("ew") Wrapper<BladeVisualCategory> wrapper) ; Page<BladeVisualCategory> searchDefault(IPage page, @Param("srf") BladeVisualCategorySearchContext context, @Param("ew") Wrapper<BladeVisualCategory> wrapper);
@Override @Override
BladeVisualCategory selectById(Serializable id); BladeVisualCategory selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface BladeVisualCategoryMapper extends BaseMapper<BladeVisualCategor ...@@ -30,13 +30,13 @@ public interface BladeVisualCategoryMapper extends BaseMapper<BladeVisualCategor
int update(@Param(Constants.ENTITY) BladeVisualCategory entity, @Param("ew") Wrapper<BladeVisualCategory> updateWrapper); int update(@Param(Constants.ENTITY) BladeVisualCategory entity, @Param("ew") Wrapper<BladeVisualCategory> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
......
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface BladeVisualConfigMapper extends BaseMapper<BladeVisualConfig>{ public interface BladeVisualConfigMapper extends BaseMapper<BladeVisualConfig> {
Page<BladeVisualConfig> searchDefault(IPage page, @Param("srf") BladeVisualConfigSearchContext context, @Param("ew") Wrapper<BladeVisualConfig> wrapper) ; Page<BladeVisualConfig> searchDefault(IPage page, @Param("srf") BladeVisualConfigSearchContext context, @Param("ew") Wrapper<BladeVisualConfig> wrapper);
@Override @Override
BladeVisualConfig selectById(Serializable id); BladeVisualConfig selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface BladeVisualConfigMapper extends BaseMapper<BladeVisualConfig>{ ...@@ -30,13 +30,13 @@ public interface BladeVisualConfigMapper extends BaseMapper<BladeVisualConfig>{
int update(@Param(Constants.ENTITY) BladeVisualConfig entity, @Param("ew") Wrapper<BladeVisualConfig> updateWrapper); int update(@Param(Constants.ENTITY) BladeVisualConfig entity, @Param("ew") Wrapper<BladeVisualConfig> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
......
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface BladeVisualMapMapper extends BaseMapper<BladeVisualMap>{ public interface BladeVisualMapMapper extends BaseMapper<BladeVisualMap> {
Page<BladeVisualMap> searchDefault(IPage page, @Param("srf") BladeVisualMapSearchContext context, @Param("ew") Wrapper<BladeVisualMap> wrapper) ; Page<BladeVisualMap> searchDefault(IPage page, @Param("srf") BladeVisualMapSearchContext context, @Param("ew") Wrapper<BladeVisualMap> wrapper);
@Override @Override
BladeVisualMap selectById(Serializable id); BladeVisualMap selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface BladeVisualMapMapper extends BaseMapper<BladeVisualMap>{ ...@@ -30,13 +30,13 @@ public interface BladeVisualMapMapper extends BaseMapper<BladeVisualMap>{
int update(@Param(Constants.ENTITY) BladeVisualMap entity, @Param("ew") Wrapper<BladeVisualMap> updateWrapper); int update(@Param(Constants.ENTITY) BladeVisualMap entity, @Param("ew") Wrapper<BladeVisualMap> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
......
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface BladeVisualMapper extends BaseMapper<BladeVisual>{ public interface BladeVisualMapper extends BaseMapper<BladeVisual> {
Page<BladeVisual> searchDefault(IPage page, @Param("srf") BladeVisualSearchContext context, @Param("ew") Wrapper<BladeVisual> wrapper) ; Page<BladeVisual> searchDefault(IPage page, @Param("srf") BladeVisualSearchContext context, @Param("ew") Wrapper<BladeVisual> wrapper);
@Override @Override
BladeVisual selectById(Serializable id); BladeVisual selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface BladeVisualMapper extends BaseMapper<BladeVisual>{ ...@@ -30,13 +30,13 @@ public interface BladeVisualMapper extends BaseMapper<BladeVisual>{
int update(@Param(Constants.ENTITY) BladeVisual entity, @Param("ew") Wrapper<BladeVisual> updateWrapper); int update(@Param(Constants.ENTITY) BladeVisual entity, @Param("ew") Wrapper<BladeVisual> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
......
...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[BladeVisualCategory] 服务对象接口 * 实体[BladeVisualCategory] 服务对象接口
*/ */
public interface IBladeVisualCategoryService extends IService<BladeVisualCategory>{ public interface IBladeVisualCategoryService extends IService<BladeVisualCategory> {
boolean create(BladeVisualCategory et) ; boolean create(BladeVisualCategory et);
void createBatch(List<BladeVisualCategory> list) ; void createBatch(List<BladeVisualCategory> list);
boolean update(BladeVisualCategory et) ; boolean update(BladeVisualCategory et);
void updateBatch(List<BladeVisualCategory> list) ; void updateBatch(List<BladeVisualCategory> list);
boolean remove(Long key) ; boolean remove(Long key);
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList);
BladeVisualCategory get(Long key) ; BladeVisualCategory get(Long key);
BladeVisualCategory getDraft(BladeVisualCategory et) ; BladeVisualCategory getDraft(BladeVisualCategory et);
boolean checkKey(BladeVisualCategory et) ; boolean checkKey(BladeVisualCategory et);
boolean save(BladeVisualCategory et) ; boolean save(BladeVisualCategory et);
void saveBatch(List<BladeVisualCategory> list) ; void saveBatch(List<BladeVisualCategory> list);
Page<BladeVisualCategory> searchDefault(BladeVisualCategorySearchContext context) ; Page<BladeVisualCategory> searchDefault(BladeVisualCategorySearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[BladeVisualConfig] 服务对象接口 * 实体[BladeVisualConfig] 服务对象接口
*/ */
public interface IBladeVisualConfigService extends IService<BladeVisualConfig>{ public interface IBladeVisualConfigService extends IService<BladeVisualConfig> {
boolean create(BladeVisualConfig et) ; boolean create(BladeVisualConfig et);
void createBatch(List<BladeVisualConfig> list) ; void createBatch(List<BladeVisualConfig> list);
boolean update(BladeVisualConfig et) ; boolean update(BladeVisualConfig et);
void updateBatch(List<BladeVisualConfig> list) ; void updateBatch(List<BladeVisualConfig> list);
boolean remove(Long key) ; boolean remove(Long key);
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList);
BladeVisualConfig get(Long key) ; BladeVisualConfig get(Long key);
BladeVisualConfig getDraft(BladeVisualConfig et) ; BladeVisualConfig getDraft(BladeVisualConfig et);
boolean checkKey(BladeVisualConfig et) ; boolean checkKey(BladeVisualConfig et);
boolean save(BladeVisualConfig et) ; boolean save(BladeVisualConfig et);
void saveBatch(List<BladeVisualConfig> list) ; void saveBatch(List<BladeVisualConfig> list);
Page<BladeVisualConfig> searchDefault(BladeVisualConfigSearchContext context) ; Page<BladeVisualConfig> searchDefault(BladeVisualConfigSearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[BladeVisualMap] 服务对象接口 * 实体[BladeVisualMap] 服务对象接口
*/ */
public interface IBladeVisualMapService extends IService<BladeVisualMap>{ public interface IBladeVisualMapService extends IService<BladeVisualMap> {
boolean create(BladeVisualMap et) ; boolean create(BladeVisualMap et);
void createBatch(List<BladeVisualMap> list) ; void createBatch(List<BladeVisualMap> list);
boolean update(BladeVisualMap et) ; boolean update(BladeVisualMap et);
void updateBatch(List<BladeVisualMap> list) ; void updateBatch(List<BladeVisualMap> list);
boolean remove(Long key) ; boolean remove(Long key);
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList);
BladeVisualMap get(Long key) ; BladeVisualMap get(Long key);
BladeVisualMap getDraft(BladeVisualMap et) ; BladeVisualMap getDraft(BladeVisualMap et);
boolean checkKey(BladeVisualMap et) ; boolean checkKey(BladeVisualMap et);
boolean save(BladeVisualMap et) ; boolean save(BladeVisualMap et);
void saveBatch(List<BladeVisualMap> list) ; void saveBatch(List<BladeVisualMap> list);
Page<BladeVisualMap> searchDefault(BladeVisualMapSearchContext context) ; Page<BladeVisualMap> searchDefault(BladeVisualMapSearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[BladeVisual] 服务对象接口 * 实体[BladeVisual] 服务对象接口
*/ */
public interface IBladeVisualService extends IService<BladeVisual>{ public interface IBladeVisualService extends IService<BladeVisual> {
boolean create(BladeVisual et) ; boolean create(BladeVisual et);
void createBatch(List<BladeVisual> list) ; void createBatch(List<BladeVisual> list);
boolean update(BladeVisual et) ; boolean update(BladeVisual et);
void updateBatch(List<BladeVisual> list) ; void updateBatch(List<BladeVisual> list);
boolean remove(Long key) ; boolean remove(Long key);
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList);
BladeVisual get(Long key) ; BladeVisual get(Long key);
BladeVisual getDraft(BladeVisual et) ; BladeVisual getDraft(BladeVisual et);
boolean checkKey(BladeVisual et) ; boolean checkKey(BladeVisual et);
boolean save(BladeVisual et) ; boolean save(BladeVisual et);
void saveBatch(List<BladeVisual> list) ; void saveBatch(List<BladeVisual> list);
Page<BladeVisual> searchDefault(BladeVisualSearchContext context) ; Page<BladeVisual> searchDefault(BladeVisualSearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -57,36 +57,36 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg ...@@ -57,36 +57,36 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void createBatch(List<BladeVisualCategory> list) { public void createBatch(List<BladeVisualCategory> list) {
this.saveBatch(list,batchSize); this.saveBatch(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisualCategory et) { public boolean update(BladeVisualCategory et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("id", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<BladeVisualCategory> list) { public void updateBatch(List<BladeVisualCategory> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(Long key) { public boolean remove(Long key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -100,11 +100,11 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg ...@@ -100,11 +100,11 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Transactional @Transactional
public BladeVisualCategory get(Long key) { public BladeVisualCategory get(Long key) {
BladeVisualCategory et = getById(key); BladeVisualCategory et = getById(key);
if(et==null){ if(et == null){
et=new BladeVisualCategory(); et = new BladeVisualCategory();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -116,7 +116,7 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg ...@@ -116,7 +116,7 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override @Override
public boolean checkKey(BladeVisualCategory et) { public boolean checkKey(BladeVisualCategory et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -57,36 +57,36 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM ...@@ -57,36 +57,36 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void createBatch(List<BladeVisualConfig> list) { public void createBatch(List<BladeVisualConfig> list) {
this.saveBatch(list,batchSize); this.saveBatch(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisualConfig et) { public boolean update(BladeVisualConfig et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("id", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<BladeVisualConfig> list) { public void updateBatch(List<BladeVisualConfig> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(Long key) { public boolean remove(Long key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -100,11 +100,11 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM ...@@ -100,11 +100,11 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Transactional @Transactional
public BladeVisualConfig get(Long key) { public BladeVisualConfig get(Long key) {
BladeVisualConfig et = getById(key); BladeVisualConfig et = getById(key);
if(et==null){ if(et == null){
et=new BladeVisualConfig(); et = new BladeVisualConfig();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -116,7 +116,7 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM ...@@ -116,7 +116,7 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override @Override
public boolean checkKey(BladeVisualConfig et) { public boolean checkKey(BladeVisualConfig et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -57,36 +57,36 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper, ...@@ -57,36 +57,36 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void createBatch(List<BladeVisualMap> list) { public void createBatch(List<BladeVisualMap> list) {
this.saveBatch(list,batchSize); this.saveBatch(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisualMap et) { public boolean update(BladeVisualMap et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("id", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<BladeVisualMap> list) { public void updateBatch(List<BladeVisualMap> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(Long key) { public boolean remove(Long key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -100,11 +100,11 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper, ...@@ -100,11 +100,11 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Transactional @Transactional
public BladeVisualMap get(Long key) { public BladeVisualMap get(Long key) {
BladeVisualMap et = getById(key); BladeVisualMap et = getById(key);
if(et==null){ if(et == null){
et=new BladeVisualMap(); et = new BladeVisualMap();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -116,7 +116,7 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper, ...@@ -116,7 +116,7 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override @Override
public boolean checkKey(BladeVisualMap et) { public boolean checkKey(BladeVisualMap et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -57,36 +57,36 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade ...@@ -57,36 +57,36 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void createBatch(List<BladeVisual> list) { public void createBatch(List<BladeVisual> list) {
this.saveBatch(list,batchSize); this.saveBatch(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisual et) { public boolean update(BladeVisual et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("id", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<BladeVisual> list) { public void updateBatch(List<BladeVisual> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(Long key) { public boolean remove(Long key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -100,11 +100,11 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade ...@@ -100,11 +100,11 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Transactional @Transactional
public BladeVisual get(Long key) { public BladeVisual get(Long key) {
BladeVisual et = getById(key); BladeVisual et = getById(key);
if(et==null){ if(et == null){
et=new BladeVisual(); et = new BladeVisual();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -116,7 +116,7 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade ...@@ -116,7 +116,7 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override @Override
public boolean checkKey(BladeVisual et) { public boolean checkKey(BladeVisual et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -39,7 +39,7 @@ public class DstAPI extends EntityBase implements Serializable { ...@@ -39,7 +39,7 @@ public class DstAPI extends EntityBase implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(name = "apiid" , isKeyField=true) @DEField(name = "apiid", isKeyField = true)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
......
...@@ -39,7 +39,7 @@ public class DstApp extends EntityBase implements Serializable { ...@@ -39,7 +39,7 @@ public class DstApp extends EntityBase implements Serializable {
/** /**
* 应用标识 * 应用标识
*/ */
@DEField(name = "appid" , isKeyField=true) @DEField(name = "appid", isKeyField = true)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZCOMPONENT",resultMap = "DstComponentResultMap") @TableName(value = "IBZCOMPONENT", resultMap = "DstComponentResultMap")
public class DstComponent extends EntityMP implements Serializable { public class DstComponent extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,8 +46,8 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -46,8 +46,8 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 部件标识 * 部件标识
*/ */
@DEField(name = "cid" , isKeyField = true) @DEField(name = "cid", isKeyField = true)
@TableId(value= "cid",type=IdType.ASSIGN_UUID) @TableId(value = "cid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
...@@ -141,56 +141,56 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -141,56 +141,56 @@ public class DstComponent extends EntityMP implements Serializable {
* 设置 [名称] * 设置 [名称]
*/ */
public void setName(String name) { public void setName(String name) {
this.name = name ; this.name = name;
this.modify("cname",name); this.modify("cname", name);
} }
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName) { public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName;
this.modify("codename",codeName); this.modify("codename", codeName);
} }
/** /**
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId) { public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId;
this.modify("systemid",systemId); this.modify("systemid", systemId);
} }
/** /**
* 设置 [应用标识] * 设置 [应用标识]
*/ */
public void setAppId(String appId) { public void setAppId(String appId) {
this.appId = appId ; this.appId = appId;
this.modify("appid",appId); this.modify("appid", appId);
} }
/** /**
* 设置 [类型] * 设置 [类型]
*/ */
public void setType(String type) { public void setType(String type) {
this.type = type ; this.type = type;
this.modify("ctype",type); this.modify("ctype", type);
} }
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId) { public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId;
this.modify("entityid",entityId); this.modify("entityid", entityId);
} }
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setConfig(String config) { public void setConfig(String config) {
this.config = config ; this.config = config;
this.modify("cfg",config); this.modify("cfg", config);
} }
...@@ -198,7 +198,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -198,7 +198,7 @@ public class DstComponent extends EntityMP implements Serializable {
* 获取 [部件标识] * 获取 [部件标识]
*/ */
public String getId() { public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)) {
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
return id; return id;
...@@ -220,7 +220,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -220,7 +220,7 @@ public class DstComponent extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("cid"); this.reset("cid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZCFG",resultMap = "DstConfigResultMap") @TableName(value = "IBZCFG", resultMap = "DstConfigResultMap")
public class DstConfig extends EntityMP implements Serializable { public class DstConfig extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,7 +47,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -47,7 +47,7 @@ public class DstConfig extends EntityMP implements Serializable {
* 标识 * 标识
*/ */
@DEField(isKeyField = true) @DEField(isKeyField = true)
@TableId(value= "cfgid",type=IdType.ASSIGN_UUID) @TableId(value = "cfgid", type = IdType.ASSIGN_UUID)
@JSONField(name = "cfg_id") @JSONField(name = "cfg_id")
@JsonProperty("cfg_id") @JsonProperty("cfg_id")
private String cfgId; private String cfgId;
...@@ -92,7 +92,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -92,7 +92,7 @@ public class DstConfig extends EntityMP implements Serializable {
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate") @TableField(value = "updatedate")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "update_date", format = "yyyy-MM-dd HH:mm:ss") @JSONField(name = "update_date", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("update_date") @JsonProperty("update_date")
private Timestamp updateDate; private Timestamp updateDate;
...@@ -111,32 +111,32 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -111,32 +111,32 @@ public class DstConfig extends EntityMP implements Serializable {
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId) { public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId;
this.modify("systemid",systemId); this.modify("systemid", systemId);
} }
/** /**
* 设置 [配置类型] * 设置 [配置类型]
*/ */
public void setCfgType(String cfgType) { public void setCfgType(String cfgType) {
this.cfgType = cfgType ; this.cfgType = cfgType;
this.modify("cfgtype",cfgType); this.modify("cfgtype", cfgType);
} }
/** /**
* 设置 [引用类型] * 设置 [引用类型]
*/ */
public void setTargetType(String targetType) { public void setTargetType(String targetType) {
this.targetType = targetType ; this.targetType = targetType;
this.modify("targettype",targetType); this.modify("targettype", targetType);
} }
/** /**
* 设置 [配置内容] * 设置 [配置内容]
*/ */
public void setCfg(String cfg) { public void setCfg(String cfg) {
this.cfg = cfg ; this.cfg = cfg;
this.modify("cfg",cfg); this.modify("cfg", cfg);
} }
...@@ -144,7 +144,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -144,7 +144,7 @@ public class DstConfig extends EntityMP implements Serializable {
* 获取 [标识] * 获取 [标识]
*/ */
public String getCfgId() { public String getCfgId() {
if(ObjectUtils.isEmpty(cfgId)){ if(ObjectUtils.isEmpty(cfgId)) {
cfgId=(String)getDefaultKey(true); cfgId=(String)getDefaultKey(true);
} }
return cfgId; return cfgId;
...@@ -166,7 +166,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -166,7 +166,7 @@ public class DstConfig extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("cfgid"); this.reset("cfgid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZDATASOURCE",resultMap = "DstDataSourceResultMap") @TableName(value = "IBZDATASOURCE", resultMap = "DstDataSourceResultMap")
public class DstDataSource extends EntityMP implements Serializable { public class DstDataSource extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,8 +46,8 @@ public class DstDataSource extends EntityMP implements Serializable { ...@@ -46,8 +46,8 @@ public class DstDataSource extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(defaultValue = "dsname" , defaultValueType = DEFieldDefaultValueType.PARAM , isKeyField = true) @DEField(defaultValue = "dsname", defaultValueType = DEFieldDefaultValueType.PARAM, isKeyField = true)
@TableId(value= "dsid",type=IdType.ASSIGN_UUID) @TableId(value = "dsid", type = IdType.ASSIGN_UUID)
@JSONField(name = "ds_id") @JSONField(name = "ds_id")
@JsonProperty("ds_id") @JsonProperty("ds_id")
private String dsId; private String dsId;
...@@ -79,24 +79,24 @@ public class DstDataSource extends EntityMP implements Serializable { ...@@ -79,24 +79,24 @@ public class DstDataSource extends EntityMP implements Serializable {
* 设置 [数据源名称] * 设置 [数据源名称]
*/ */
public void setDsName(String dsName) { public void setDsName(String dsName) {
this.dsName = dsName ; this.dsName = dsName;
this.modify("dsname",dsName); this.modify("dsname", dsName);
} }
/** /**
* 设置 [类型] * 设置 [类型]
*/ */
public void setDsType(String dsType) { public void setDsType(String dsType) {
this.dsType = dsType ; this.dsType = dsType;
this.modify("dstype",dsType); this.modify("dstype", dsType);
} }
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setDsCfg(String dsCfg) { public void setDsCfg(String dsCfg) {
this.dsCfg = dsCfg ; this.dsCfg = dsCfg;
this.modify("dscfg",dsCfg); this.modify("dscfg", dsCfg);
} }
...@@ -110,7 +110,7 @@ public class DstDataSource extends EntityMP implements Serializable { ...@@ -110,7 +110,7 @@ public class DstDataSource extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("dsid"); this.reset("dsid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -39,7 +39,7 @@ public class DstMicroservice extends EntityBase implements Serializable { ...@@ -39,7 +39,7 @@ public class DstMicroservice extends EntityBase implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(name = "msid" , isKeyField=true) @DEField(name = "msid", isKeyField = true)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
...@@ -62,10 +62,9 @@ public class DstMicroservice extends EntityBase implements Serializable { ...@@ -62,10 +62,9 @@ public class DstMicroservice extends EntityBase implements Serializable {
/** /**
* 系统标识 * 系统标识
*/ */
@DEField(name = "systemid") @JSONField(name = "systemId")
@JSONField(name = "pSSystemId") @JsonProperty("systemId")
@JsonProperty("pSSystemId") private String systemid;
private String pssystemid;
/** /**
* 地址 * 地址
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZROUTER",resultMap = "DstRouterResultMap") @TableName(value = "IBZROUTER", resultMap = "DstRouterResultMap")
public class DstRouter extends EntityMP implements Serializable { public class DstRouter extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,8 +46,8 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -46,8 +46,8 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 路径标识 * 路径标识
*/ */
@DEField(name = "routerid" , isKeyField = true) @DEField(name = "routerid", isKeyField = true)
@TableId(value= "routerid",type=IdType.ASSIGN_UUID) @TableId(value = "routerid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
...@@ -133,56 +133,56 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -133,56 +133,56 @@ public class DstRouter extends EntityMP implements Serializable {
* 设置 [路径名称] * 设置 [路径名称]
*/ */
public void setName(String name) { public void setName(String name) {
this.name = name ; this.name = name;
this.modify("routername",name); this.modify("routername", name);
} }
/** /**
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId) { public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId;
this.modify("systemid",systemId); this.modify("systemid", systemId);
} }
/** /**
* 设置 [应用标识] * 设置 [应用标识]
*/ */
public void setAppId(String appId) { public void setAppId(String appId) {
this.appId = appId ; this.appId = appId;
this.modify("appid",appId); this.modify("appid", appId);
} }
/** /**
* 设置 [路径] * 设置 [路径]
*/ */
public void setPath(String path) { public void setPath(String path) {
this.path = path ; this.path = path;
this.modify("routerpath",path); this.modify("routerpath", path);
} }
/** /**
* 设置 [父路径标识] * 设置 [父路径标识]
*/ */
public void setParentid(String parentid) { public void setParentid(String parentid) {
this.parentid = parentid ; this.parentid = parentid;
this.modify("parentid",parentid); this.modify("parentid", parentid);
} }
/** /**
* 设置 [meta] * 设置 [meta]
*/ */
public void setMeta(String meta) { public void setMeta(String meta) {
this.meta = meta ; this.meta = meta;
this.modify("meta",meta); this.modify("meta", meta);
} }
/** /**
* 设置 [组件] * 设置 [组件]
*/ */
public void setComponent(String component) { public void setComponent(String component) {
this.component = component ; this.component = component;
this.modify("component",component); this.modify("component", component);
} }
...@@ -190,7 +190,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -190,7 +190,7 @@ public class DstRouter extends EntityMP implements Serializable {
* 获取 [路径标识] * 获取 [路径标识]
*/ */
public String getId() { public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)) {
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
return id; return id;
...@@ -212,7 +212,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -212,7 +212,7 @@ public class DstRouter extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("routerid"); this.reset("routerid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZVIEW",resultMap = "DstViewResultMap") @TableName(value = "IBZVIEW", resultMap = "DstViewResultMap")
public class DstView extends EntityMP implements Serializable { public class DstView extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,8 +46,8 @@ public class DstView extends EntityMP implements Serializable { ...@@ -46,8 +46,8 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(name = "viewid" , isKeyField = true) @DEField(name = "viewid", isKeyField = true)
@TableId(value= "viewid",type=IdType.ASSIGN_UUID) @TableId(value = "viewid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
...@@ -134,48 +134,48 @@ public class DstView extends EntityMP implements Serializable { ...@@ -134,48 +134,48 @@ public class DstView extends EntityMP implements Serializable {
* 设置 [名称] * 设置 [名称]
*/ */
public void setName(String name) { public void setName(String name) {
this.name = name ; this.name = name;
this.modify("viewname",name); this.modify("viewname", name);
} }
/** /**
* 设置 [视图路径] * 设置 [视图路径]
*/ */
public void setPath(String path) { public void setPath(String path) {
this.path = path ; this.path = path;
this.modify("viewpath",path); this.modify("viewpath", path);
} }
/** /**
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId) { public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId;
this.modify("systemid",systemId); this.modify("systemid", systemId);
} }
/** /**
* 设置 [应用标识] * 设置 [应用标识]
*/ */
public void setAppId(String appId) { public void setAppId(String appId) {
this.appId = appId ; this.appId = appId;
this.modify("appid",appId); this.modify("appid", appId);
} }
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId) { public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId;
this.modify("entityid",entityId); this.modify("entityid", entityId);
} }
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setConfig(String config) { public void setConfig(String config) {
this.config = config ; this.config = config;
this.modify("cfg",config); this.modify("cfg", config);
} }
...@@ -183,7 +183,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -183,7 +183,7 @@ public class DstView extends EntityMP implements Serializable {
* 获取 [标识] * 获取 [标识]
*/ */
public String getId() { public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)) {
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
return id; return id;
...@@ -205,7 +205,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -205,7 +205,7 @@ public class DstView extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("viewid"); this.reset("viewid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZDATASET",resultMap = "MetaDataSetResultMap") @TableName(value = "IBZDATASET", resultMap = "MetaDataSetResultMap")
public class MetaDataSet extends EntityMP implements Serializable { public class MetaDataSet extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,7 +47,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -47,7 +47,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
* 标识 * 标识
*/ */
@DEField(isKeyField = true) @DEField(isKeyField = true)
@TableId(value= "datasetid",type=IdType.ASSIGN_UUID) @TableId(value = "datasetid", type = IdType.ASSIGN_UUID)
@JSONField(name = "dataset_id") @JSONField(name = "dataset_id")
@JsonProperty("dataset_id") @JsonProperty("dataset_id")
private String datasetId; private String datasetId;
...@@ -108,48 +108,48 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -108,48 +108,48 @@ public class MetaDataSet extends EntityMP implements Serializable {
* 设置 [名称] * 设置 [名称]
*/ */
public void setDatasetName(String datasetName) { public void setDatasetName(String datasetName) {
this.datasetName = datasetName ; this.datasetName = datasetName;
this.modify("datasetname",datasetName); this.modify("datasetname", datasetName);
} }
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId) { public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId;
this.modify("entityid",entityId); this.modify("entityid", entityId);
} }
/** /**
* 设置 [实体] * 设置 [实体]
*/ */
public void setEntityName(String entityName) { public void setEntityName(String entityName) {
this.entityName = entityName ; this.entityName = entityName;
this.modify("entityname",entityName); this.modify("entityname", entityName);
} }
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName) { public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName;
this.modify("codename",codeName); this.modify("codename", codeName);
} }
/** /**
* 设置 [代码] * 设置 [代码]
*/ */
public void setDsCode(String dsCode) { public void setDsCode(String dsCode) {
this.dsCode = dsCode ; this.dsCode = dsCode;
this.modify("dscode",dsCode); this.modify("dscode", dsCode);
} }
/** /**
* 设置 [模型] * 设置 [模型]
*/ */
public void setDsModel(String dsModel) { public void setDsModel(String dsModel) {
this.dsModel = dsModel ; this.dsModel = dsModel;
this.modify("dsmodel",dsModel); this.modify("dsmodel", dsModel);
} }
...@@ -157,7 +157,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -157,7 +157,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
* 获取 [标识] * 获取 [标识]
*/ */
public String getDatasetId() { public String getDatasetId() {
if(ObjectUtils.isEmpty(datasetId)){ if(ObjectUtils.isEmpty(datasetId)) {
datasetId=(String)getDefaultKey(true); datasetId=(String)getDefaultKey(true);
} }
return datasetId; return datasetId;
...@@ -179,7 +179,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -179,7 +179,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("datasetid"); this.reset("datasetid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZFIELD",resultMap = "MetaFieldResultMap") @TableName(value = "IBZFIELD", resultMap = "MetaFieldResultMap")
public class MetaField extends EntityMP implements Serializable { public class MetaField extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,7 +47,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -47,7 +47,7 @@ public class MetaField extends EntityMP implements Serializable {
* 属性标识 * 属性标识
*/ */
@DEField(isKeyField = true) @DEField(isKeyField = true)
@TableId(value= "fieldid",type=IdType.ASSIGN_UUID) @TableId(value = "fieldid", type = IdType.ASSIGN_UUID)
@JSONField(name = "field_id") @JSONField(name = "field_id")
@JsonProperty("field_id") @JsonProperty("field_id")
private String fieldId; private String fieldId;
...@@ -293,192 +293,192 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -293,192 +293,192 @@ public class MetaField extends EntityMP implements Serializable {
* 设置 [属性名称] * 设置 [属性名称]
*/ */
public void setFieldName(String fieldName) { public void setFieldName(String fieldName) {
this.fieldName = fieldName ; this.fieldName = fieldName;
this.modify("fieldname",fieldName); this.modify("fieldname", fieldName);
} }
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName) { public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName;
this.modify("codename",codeName); this.modify("codename", codeName);
} }
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId) { public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId;
this.modify("entityid",entityId); this.modify("entityid", entityId);
} }
/** /**
* 设置 [实体名称] * 设置 [实体名称]
*/ */
public void setEntityName(String entityName) { public void setEntityName(String entityName) {
this.entityName = entityName ; this.entityName = entityName;
this.modify("entityname",entityName); this.modify("entityname", entityName);
} }
/** /**
* 设置 [属性逻辑名] * 设置 [属性逻辑名]
*/ */
public void setFieldLogicName(String fieldLogicName) { public void setFieldLogicName(String fieldLogicName) {
this.fieldLogicName = fieldLogicName ; this.fieldLogicName = fieldLogicName;
this.modify("fieldlogicname",fieldLogicName); this.modify("fieldlogicname", fieldLogicName);
} }
/** /**
* 设置 [引用属性标识] * 设置 [引用属性标识]
*/ */
public void setRefFieldId(String refFieldId) { public void setRefFieldId(String refFieldId) {
this.refFieldId = refFieldId ; this.refFieldId = refFieldId;
this.modify("reffieldid",refFieldId); this.modify("reffieldid", refFieldId);
} }
/** /**
* 设置 [引用属性名称] * 设置 [引用属性名称]
*/ */
public void setRefFieldName(String refFieldName) { public void setRefFieldName(String refFieldName) {
this.refFieldName = refFieldName ; this.refFieldName = refFieldName;
this.modify("reffieldname",refFieldName); this.modify("reffieldname", refFieldName);
} }
/** /**
* 设置 [引用关系标识] * 设置 [引用关系标识]
*/ */
public void setRelationId(String relationId) { public void setRelationId(String relationId) {
this.relationId = relationId ; this.relationId = relationId;
this.modify("relationid",relationId); this.modify("relationid", relationId);
} }
/** /**
* 设置 [引用关系] * 设置 [引用关系]
*/ */
public void setRelationName(String relationName) { public void setRelationName(String relationName) {
this.relationName = relationName ; this.relationName = relationName;
this.modify("relationname",relationName); this.modify("relationname", relationName);
} }
/** /**
* 设置 [主键] * 设置 [主键]
*/ */
public void setKeyField(Integer keyField) { public void setKeyField(Integer keyField) {
this.keyField = keyField ; this.keyField = keyField;
this.modify("keyfield",keyField); this.modify("keyfield", keyField);
} }
/** /**
* 设置 [主信息] * 设置 [主信息]
*/ */
public void setMajorField(Integer majorField) { public void setMajorField(Integer majorField) {
this.majorField = majorField ; this.majorField = majorField;
this.modify("majorfield",majorField); this.modify("majorfield", majorField);
} }
/** /**
* 设置 [联合主键] * 设置 [联合主键]
*/ */
public void setUnionKey(String unionKey) { public void setUnionKey(String unionKey) {
this.unionKey = unionKey ; this.unionKey = unionKey;
this.modify("unionkey",unionKey); this.modify("unionkey", unionKey);
} }
/** /**
* 设置 [属性类型] * 设置 [属性类型]
*/ */
public void setFieldType(String fieldType) { public void setFieldType(String fieldType) {
this.fieldType = fieldType ; this.fieldType = fieldType;
this.modify("fieldtype",fieldType); this.modify("fieldtype", fieldType);
} }
/** /**
* 设置 [预定义类型] * 设置 [预定义类型]
*/ */
public void setPredefined(String predefined) { public void setPredefined(String predefined) {
this.predefined = predefined ; this.predefined = predefined;
this.modify("predefined",predefined); this.modify("predefined", predefined);
} }
/** /**
* 设置 [数据字典] * 设置 [数据字典]
*/ */
public void setDict(String dict) { public void setDict(String dict) {
this.dict = dict ; this.dict = dict;
this.modify("dict",dict); this.modify("dict", dict);
} }
/** /**
* 设置 [允许为空] * 设置 [允许为空]
*/ */
public void setNullable(Integer nullable) { public void setNullable(Integer nullable) {
this.nullable = nullable ; this.nullable = nullable;
this.modify("nullable",nullable); this.modify("nullable", nullable);
} }
/** /**
* 设置 [物理属性] * 设置 [物理属性]
*/ */
public void setPhysicalField(Integer physicalField) { public void setPhysicalField(Integer physicalField) {
this.physicalField = physicalField ; this.physicalField = physicalField;
this.modify("physicalfield",physicalField); this.modify("physicalfield", physicalField);
} }
/** /**
* 设置 [数据类型] * 设置 [数据类型]
*/ */
public void setDataType(String dataType) { public void setDataType(String dataType) {
this.dataType = dataType ; this.dataType = dataType;
this.modify("datatype",dataType); this.modify("datatype", dataType);
} }
/** /**
* 设置 [长度] * 设置 [长度]
*/ */
public void setDataLength(Integer dataLength) { public void setDataLength(Integer dataLength) {
this.dataLength = dataLength ; this.dataLength = dataLength;
this.modify("datalength",dataLength); this.modify("datalength", dataLength);
} }
/** /**
* 设置 [精度] * 设置 [精度]
*/ */
public void setDataPreci(Integer dataPreci) { public void setDataPreci(Integer dataPreci) {
this.dataPreci = dataPreci ; this.dataPreci = dataPreci;
this.modify("datapreci",dataPreci); this.modify("datapreci", dataPreci);
} }
/** /**
* 设置 [逻辑表达式] * 设置 [逻辑表达式]
*/ */
public void setExpression(String expression) { public void setExpression(String expression) {
this.expression = expression ; this.expression = expression;
this.modify("expression",expression); this.modify("expression", expression);
} }
/** /**
* 设置 [扩展属性] * 设置 [扩展属性]
*/ */
public void setExtensionField(Integer extensionField) { public void setExtensionField(Integer extensionField) {
this.extensionField = extensionField ; this.extensionField = extensionField;
this.modify("extensionfield",extensionField); this.modify("extensionfield", extensionField);
} }
/** /**
* 设置 [审计] * 设置 [审计]
*/ */
public void setIsEnableAudit(Integer isEnableAudit) { public void setIsEnableAudit(Integer isEnableAudit) {
this.isEnableAudit = isEnableAudit ; this.isEnableAudit = isEnableAudit;
this.modify("isenableaudit",isEnableAudit); this.modify("isenableaudit", isEnableAudit);
} }
/** /**
* 设置 [排序] * 设置 [排序]
*/ */
public void setShowOrder(Integer showOrder) { public void setShowOrder(Integer showOrder) {
this.showOrder = showOrder ; this.showOrder = showOrder;
this.modify("showorder",showOrder); this.modify("showorder", showOrder);
} }
...@@ -486,7 +486,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -486,7 +486,7 @@ public class MetaField extends EntityMP implements Serializable {
* 获取 [属性标识] * 获取 [属性标识]
*/ */
public String getFieldId() { public String getFieldId() {
if(ObjectUtils.isEmpty(fieldId)){ if(ObjectUtils.isEmpty(fieldId)) {
fieldId=(String)getDefaultKey(true); fieldId=(String)getDefaultKey(true);
} }
return fieldId; return fieldId;
...@@ -508,7 +508,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -508,7 +508,7 @@ public class MetaField extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("fieldid"); this.reset("fieldid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -39,7 +39,7 @@ public class MetaLookup extends EntityBase implements Serializable { ...@@ -39,7 +39,7 @@ public class MetaLookup extends EntityBase implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
......
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZMODEL",resultMap = "MetaModelResultMap") @TableName(value = "IBZMODEL", resultMap = "MetaModelResultMap")
public class MetaModel extends EntityMP implements Serializable { public class MetaModel extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,8 +46,8 @@ public class MetaModel extends EntityMP implements Serializable { ...@@ -46,8 +46,8 @@ public class MetaModel extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(name = "modelid" , isKeyField = true) @DEField(name = "modelid", isKeyField = true)
@TableId(value= "modelid",type=IdType.ASSIGN_UUID) @TableId(value = "modelid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
...@@ -81,24 +81,24 @@ public class MetaModel extends EntityMP implements Serializable { ...@@ -81,24 +81,24 @@ public class MetaModel extends EntityMP implements Serializable {
* 设置 [名称] * 设置 [名称]
*/ */
public void setName(String name) { public void setName(String name) {
this.name = name ; this.name = name;
this.modify("modelname",name); this.modify("modelname", name);
} }
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName) { public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName;
this.modify("codename",codeName); this.modify("codename", codeName);
} }
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setConfig(String config) { public void setConfig(String config) {
this.config = config ; this.config = config;
this.modify("modelcfg",config); this.modify("modelcfg", config);
} }
...@@ -112,7 +112,7 @@ public class MetaModel extends EntityMP implements Serializable { ...@@ -112,7 +112,7 @@ public class MetaModel extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("modelid"); this.reset("modelid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -26,56 +26,132 @@ import org.springframework.data.annotation.Transient; ...@@ -26,56 +26,132 @@ import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit; import cn.ibizlab.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/** /**
* [模块] 对象 * 实体[模块]
*/ */
@Builder
@Getter @Getter
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @JsonIgnoreProperties(value = "handler")
public class MetaModule extends EntityBase implements Serializable { @TableName(value = "IBZMODULE", resultMap = "MetaModuleResultMap")
public class MetaModule extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 模块标识 * 模块标识
*/ */
@DEField(name = "moduleid" , isKeyField=true) @DEField(name = "moduleid", isKeyField = true)
@TableId(value = "moduleid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
/** /**
* 模块名称 * 模块名称
*/ */
@DEField(name = "modulename") @DEField(name = "modulename")
@TableField(value = "modulename")
@JSONField(name = "name") @JSONField(name = "name")
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
/** /**
* 代码名称 * 代码名称
*/ */
@JSONField(name = "codeName") @TableField(value = "codename")
@JsonProperty("codeName") @JSONField(name = "code_name")
private String codename; @JsonProperty("code_name")
private String codeName;
/** /**
* 系统标识 * 系统标识
*/ */
@JSONField(name = "systemId") @TableField(value = "systemid")
@JsonProperty("systemId") @JSONField(name = "system_id")
private String systemid; @JsonProperty("system_id")
private String systemId;
/**
* 排序
*/
@TableField(value = "showorder")
@JSONField(name = "show_order")
@JsonProperty("show_order")
private Integer showOrder;
/** /**
* *
*/ */
@JSONField(name = "system") @JsonIgnore
@JsonProperty("system") @JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.core.lite.domain.DstSystem system; private cn.ibizlab.core.lite.domain.DstSystem system;
/**
* 设置 [模块名称]
*/
public void setName(String name) {
this.name = name;
this.modify("modulename", name);
}
/**
* 设置 [代码名称]
*/
public void setCodeName(String codeName) {
this.codeName = codeName;
this.modify("codename", codeName);
}
/**
* 设置 [系统标识]
*/
public void setSystemId(String systemId) {
this.systemId = systemId;
this.modify("systemid", systemId);
}
/**
* 设置 [排序]
*/
public void setShowOrder(Integer showOrder) {
this.showOrder = showOrder;
this.modify("showorder", showOrder);
}
/**
* 获取 [模块标识]
*/
public String getId() {
if(ObjectUtils.isEmpty(id)) {
id=(String)getDefaultKey(true);
}
return id;
}
@Override
public Serializable getDefaultKey(boolean gen) {
if((!ObjectUtils.isEmpty(this.getSystemId()))&&(!ObjectUtils.isEmpty(this.getCodeName())))
return DigestUtils.md5DigestAsHex(String.format("%s||%s" ,this.getSystemId(),this.getCodeName()).getBytes());
return null;
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("moduleid");
return super.copyTo(targetEntity, bIncEmpty);
}
} }
...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZRELATION",resultMap = "MetaRelationshipResultMap") @TableName(value = "IBZRELATION", resultMap = "MetaRelationshipResultMap")
public class MetaRelationship extends EntityMP implements Serializable { public class MetaRelationship extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,8 +46,8 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -46,8 +46,8 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 关系标识 * 关系标识
*/ */
@DEField(name = "relationid" , isKeyField = true) @DEField(name = "relationid", isKeyField = true)
@TableId(value= "relationid",type=IdType.ASSIGN_UUID) @TableId(value = "relationid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
...@@ -146,72 +146,72 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -146,72 +146,72 @@ public class MetaRelationship extends EntityMP implements Serializable {
* 设置 [lookup] * 设置 [lookup]
*/ */
public void setLookup(List<cn.ibizlab.core.lite.domain.MetaLookup> lookup) { public void setLookup(List<cn.ibizlab.core.lite.domain.MetaLookup> lookup) {
this.lookup = lookup ; this.lookup = lookup;
this.modify("lookup",(lookup!=null)?lookup:(new ArrayList())); this.modify("lookup", (lookup!=null)?lookup:(new ArrayList()));
} }
/** /**
* 设置 [关系名称] * 设置 [关系名称]
*/ */
public void setName(String name) { public void setName(String name) {
this.name = name ; this.name = name;
this.modify("relationname",name); this.modify("relationname", name);
} }
/** /**
* 设置 [类型] * 设置 [类型]
*/ */
public void setRelationType(String relationType) { public void setRelationType(String relationType) {
this.relationType = relationType ; this.relationType = relationType;
this.modify("reltype",relationType); this.modify("reltype", relationType);
} }
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName) { public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName;
this.modify("codename",codeName); this.modify("codename", codeName);
} }
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId) { public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId;
this.modify("entityid",entityId); this.modify("entityid", entityId);
} }
/** /**
* 设置 [实体名称] * 设置 [实体名称]
*/ */
public void setEntityName(String entityName) { public void setEntityName(String entityName) {
this.entityName = entityName ; this.entityName = entityName;
this.modify("entityname",entityName); this.modify("entityname", entityName);
} }
/** /**
* 设置 [引用实体标识] * 设置 [引用实体标识]
*/ */
public void setRefEntityId(String refEntityId) { public void setRefEntityId(String refEntityId) {
this.refEntityId = refEntityId ; this.refEntityId = refEntityId;
this.modify("refentityid",refEntityId); this.modify("refentityid", refEntityId);
} }
/** /**
* 设置 [引用实体名称] * 设置 [引用实体名称]
*/ */
public void setRefEntityName(String refEntityName) { public void setRefEntityName(String refEntityName) {
this.refEntityName = refEntityName ; this.refEntityName = refEntityName;
this.modify("refentityname",refEntityName); this.modify("refentityname", refEntityName);
} }
/** /**
* 设置 [嵌套代码名称] * 设置 [嵌套代码名称]
*/ */
public void setNestedName(String nestedName) { public void setNestedName(String nestedName) {
this.nestedName = nestedName ; this.nestedName = nestedName;
this.modify("nestedname",nestedName); this.modify("nestedname", nestedName);
} }
...@@ -219,7 +219,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -219,7 +219,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
* 获取 [关系标识] * 获取 [关系标识]
*/ */
public String getId() { public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)) {
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
return id; return id;
...@@ -241,7 +241,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -241,7 +241,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
@Override @Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) { public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("relationid"); this.reset("relationid");
return super.copyTo(targetEntity,bIncEmpty); return super.copyTo(targetEntity, bIncEmpty);
} }
} }
......
...@@ -97,6 +97,27 @@ public class MetaEntitySearchContext extends QueryWrapperContext<MetaEntity> { ...@@ -97,6 +97,27 @@ public class MetaEntitySearchContext extends QueryWrapperContext<MetaEntity> {
this.getSearchCond().like("dsname", n_dsname_like); this.getSearchCond().like("dsname", n_dsname_like);
} }
} }
private String n_moduleid_eq;//[模块标识]
public void setN_moduleid_eq(String n_moduleid_eq) {
this.n_moduleid_eq = n_moduleid_eq;
if(!ObjectUtils.isEmpty(this.n_moduleid_eq)){
this.getSearchCond().eq("moduleid", n_moduleid_eq);
}
}
private String n_modulename_eq;//[模块]
public void setN_modulename_eq(String n_modulename_eq) {
this.n_modulename_eq = n_modulename_eq;
if(!ObjectUtils.isEmpty(this.n_modulename_eq)){
this.getSearchCond().eq("modulename", n_modulename_eq);
}
}
private String n_modulename_like;//[模块]
public void setN_modulename_like(String n_modulename_like) {
this.n_modulename_like = n_modulename_like;
if(!ObjectUtils.isEmpty(this.n_modulename_like)){
this.getSearchCond().like("modulename", n_modulename_like);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -17,20 +17,52 @@ import org.springframework.util.ObjectUtils; ...@@ -17,20 +17,52 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.SearchContextBase; import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.lite.domain.MetaModule;
/** /**
* ServiceApi数据实体[MetaModule] 查询条件对象 * 关系型数据实体[MetaModule] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class MetaModuleSearchContext extends SearchContextBase { public class MetaModuleSearchContext extends QueryWrapperContext<MetaModule> {
private String n_modulename_like;//[模块名称]
private String n_modulename_like;//[模块名称]
public void setN_modulename_like(String n_modulename_like) {
this.n_modulename_like = n_modulename_like;
if(!ObjectUtils.isEmpty(this.n_modulename_like)){
this.getSearchCond().like("modulename", n_modulename_like);
}
}
private String n_codename_eq;//[代码名称] private String n_codename_eq;//[代码名称]
public void setN_codename_eq(String n_codename_eq) {
this.n_codename_eq = n_codename_eq;
if(!ObjectUtils.isEmpty(this.n_codename_eq)){
this.getSearchCond().eq("codename", n_codename_eq);
}
}
private String n_systemid_eq;//[系统标识] private String n_systemid_eq;//[系统标识]
public void setN_systemid_eq(String n_systemid_eq) {
this.n_systemid_eq = n_systemid_eq;
if(!ObjectUtils.isEmpty(this.n_systemid_eq)){
this.getSearchCond().eq("systemid", n_systemid_eq);
}
}
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("modulename", query)
);
}
}
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface DstComponentMapper extends BaseMapper<DstComponent>{ public interface DstComponentMapper extends BaseMapper<DstComponent> {
Page<DstComponent> searchDefault(IPage page, @Param("srf") DstComponentSearchContext context, @Param("ew") Wrapper<DstComponent> wrapper) ; Page<DstComponent> searchDefault(IPage page, @Param("srf") DstComponentSearchContext context, @Param("ew") Wrapper<DstComponent> wrapper);
@Override @Override
DstComponent selectById(Serializable id); DstComponent selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface DstComponentMapper extends BaseMapper<DstComponent>{ ...@@ -30,13 +30,13 @@ public interface DstComponentMapper extends BaseMapper<DstComponent>{
int update(@Param(Constants.ENTITY) DstComponent entity, @Param("ew") Wrapper<DstComponent> updateWrapper); int update(@Param(Constants.ENTITY) DstComponent entity, @Param("ew") Wrapper<DstComponent> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,10 +62,10 @@ public interface DstComponentMapper extends BaseMapper<DstComponent>{ ...@@ -62,10 +62,10 @@ public interface DstComponentMapper extends BaseMapper<DstComponent>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<DstComponent> selectByAppId(@Param("id") Serializable id) ; List<DstComponent> selectByAppId(@Param("id") Serializable id);
List<DstComponent> selectBySystemId(@Param("pssystemid") Serializable pssystemid) ; List<DstComponent> selectBySystemId(@Param("pssystemid") Serializable pssystemid);
List<DstComponent> selectByEntityId(@Param("entity_id") Serializable entity_id) ; List<DstComponent> selectByEntityId(@Param("entity_id") Serializable entity_id);
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface DstConfigMapper extends BaseMapper<DstConfig>{ public interface DstConfigMapper extends BaseMapper<DstConfig> {
Page<DstConfig> searchDefault(IPage page, @Param("srf") DstConfigSearchContext context, @Param("ew") Wrapper<DstConfig> wrapper) ; Page<DstConfig> searchDefault(IPage page, @Param("srf") DstConfigSearchContext context, @Param("ew") Wrapper<DstConfig> wrapper);
@Override @Override
DstConfig selectById(Serializable id); DstConfig selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface DstConfigMapper extends BaseMapper<DstConfig>{ ...@@ -30,13 +30,13 @@ public interface DstConfigMapper extends BaseMapper<DstConfig>{
int update(@Param(Constants.ENTITY) DstConfig entity, @Param("ew") Wrapper<DstConfig> updateWrapper); int update(@Param(Constants.ENTITY) DstConfig entity, @Param("ew") Wrapper<DstConfig> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,6 +62,6 @@ public interface DstConfigMapper extends BaseMapper<DstConfig>{ ...@@ -62,6 +62,6 @@ public interface DstConfigMapper extends BaseMapper<DstConfig>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<DstConfig> selectBySystemId(@Param("pssystemid") Serializable pssystemid) ; List<DstConfig> selectBySystemId(@Param("pssystemid") Serializable pssystemid);
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface DstDataSourceMapper extends BaseMapper<DstDataSource>{ public interface DstDataSourceMapper extends BaseMapper<DstDataSource> {
Page<DstDataSource> searchDefault(IPage page, @Param("srf") DstDataSourceSearchContext context, @Param("ew") Wrapper<DstDataSource> wrapper) ; Page<DstDataSource> searchDefault(IPage page, @Param("srf") DstDataSourceSearchContext context, @Param("ew") Wrapper<DstDataSource> wrapper);
@Override @Override
DstDataSource selectById(Serializable id); DstDataSource selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface DstDataSourceMapper extends BaseMapper<DstDataSource>{ ...@@ -30,13 +30,13 @@ public interface DstDataSourceMapper extends BaseMapper<DstDataSource>{
int update(@Param(Constants.ENTITY) DstDataSource entity, @Param("ew") Wrapper<DstDataSource> updateWrapper); int update(@Param(Constants.ENTITY) DstDataSource entity, @Param("ew") Wrapper<DstDataSource> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
......
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface DstRouterMapper extends BaseMapper<DstRouter>{ public interface DstRouterMapper extends BaseMapper<DstRouter> {
Page<DstRouter> searchDefault(IPage page, @Param("srf") DstRouterSearchContext context, @Param("ew") Wrapper<DstRouter> wrapper) ; Page<DstRouter> searchDefault(IPage page, @Param("srf") DstRouterSearchContext context, @Param("ew") Wrapper<DstRouter> wrapper);
@Override @Override
DstRouter selectById(Serializable id); DstRouter selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface DstRouterMapper extends BaseMapper<DstRouter>{ ...@@ -30,13 +30,13 @@ public interface DstRouterMapper extends BaseMapper<DstRouter>{
int update(@Param(Constants.ENTITY) DstRouter entity, @Param("ew") Wrapper<DstRouter> updateWrapper); int update(@Param(Constants.ENTITY) DstRouter entity, @Param("ew") Wrapper<DstRouter> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,10 +62,10 @@ public interface DstRouterMapper extends BaseMapper<DstRouter>{ ...@@ -62,10 +62,10 @@ public interface DstRouterMapper extends BaseMapper<DstRouter>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<DstRouter> selectByAppId(@Param("id") Serializable id) ; List<DstRouter> selectByAppId(@Param("id") Serializable id);
List<DstRouter> selectByParentid(@Param("id") Serializable id) ; List<DstRouter> selectByParentid(@Param("id") Serializable id);
List<DstRouter> selectBySystemId(@Param("pssystemid") Serializable pssystemid) ; List<DstRouter> selectBySystemId(@Param("pssystemid") Serializable pssystemid);
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface DstSystemMapper extends BaseMapper<DstSystem>{ public interface DstSystemMapper extends BaseMapper<DstSystem> {
Page<DstSystem> searchDefault(IPage page, @Param("srf") DstSystemSearchContext context, @Param("ew") Wrapper<DstSystem> wrapper) ; Page<DstSystem> searchDefault(IPage page, @Param("srf") DstSystemSearchContext context, @Param("ew") Wrapper<DstSystem> wrapper);
@Override @Override
DstSystem selectById(Serializable id); DstSystem selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface DstSystemMapper extends BaseMapper<DstSystem>{ ...@@ -30,13 +30,13 @@ public interface DstSystemMapper extends BaseMapper<DstSystem>{
int update(@Param(Constants.ENTITY) DstSystem entity, @Param("ew") Wrapper<DstSystem> updateWrapper); int update(@Param(Constants.ENTITY) DstSystem entity, @Param("ew") Wrapper<DstSystem> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
......
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface DstViewMapper extends BaseMapper<DstView>{ public interface DstViewMapper extends BaseMapper<DstView> {
Page<DstView> searchDefault(IPage page, @Param("srf") DstViewSearchContext context, @Param("ew") Wrapper<DstView> wrapper) ; Page<DstView> searchDefault(IPage page, @Param("srf") DstViewSearchContext context, @Param("ew") Wrapper<DstView> wrapper);
@Override @Override
DstView selectById(Serializable id); DstView selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface DstViewMapper extends BaseMapper<DstView>{ ...@@ -30,13 +30,13 @@ public interface DstViewMapper extends BaseMapper<DstView>{
int update(@Param(Constants.ENTITY) DstView entity, @Param("ew") Wrapper<DstView> updateWrapper); int update(@Param(Constants.ENTITY) DstView entity, @Param("ew") Wrapper<DstView> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,10 +62,10 @@ public interface DstViewMapper extends BaseMapper<DstView>{ ...@@ -62,10 +62,10 @@ public interface DstViewMapper extends BaseMapper<DstView>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<DstView> selectByAppId(@Param("id") Serializable id) ; List<DstView> selectByAppId(@Param("id") Serializable id);
List<DstView> selectBySystemId(@Param("pssystemid") Serializable pssystemid) ; List<DstView> selectBySystemId(@Param("pssystemid") Serializable pssystemid);
List<DstView> selectByEntityId(@Param("entity_id") Serializable entity_id) ; List<DstView> selectByEntityId(@Param("entity_id") Serializable entity_id);
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface MetaDataSetMapper extends BaseMapper<MetaDataSet>{ public interface MetaDataSetMapper extends BaseMapper<MetaDataSet> {
Page<MetaDataSet> searchDefault(IPage page, @Param("srf") MetaDataSetSearchContext context, @Param("ew") Wrapper<MetaDataSet> wrapper) ; Page<MetaDataSet> searchDefault(IPage page, @Param("srf") MetaDataSetSearchContext context, @Param("ew") Wrapper<MetaDataSet> wrapper);
@Override @Override
MetaDataSet selectById(Serializable id); MetaDataSet selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface MetaDataSetMapper extends BaseMapper<MetaDataSet>{ ...@@ -30,13 +30,13 @@ public interface MetaDataSetMapper extends BaseMapper<MetaDataSet>{
int update(@Param(Constants.ENTITY) MetaDataSet entity, @Param("ew") Wrapper<MetaDataSet> updateWrapper); int update(@Param(Constants.ENTITY) MetaDataSet entity, @Param("ew") Wrapper<MetaDataSet> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,6 +62,6 @@ public interface MetaDataSetMapper extends BaseMapper<MetaDataSet>{ ...@@ -62,6 +62,6 @@ public interface MetaDataSetMapper extends BaseMapper<MetaDataSet>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<MetaDataSet> selectByEntityId(@Param("entity_id") Serializable entity_id) ; List<MetaDataSet> selectByEntityId(@Param("entity_id") Serializable entity_id);
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface MetaEntityMapper extends BaseMapper<MetaEntity>{ public interface MetaEntityMapper extends BaseMapper<MetaEntity> {
Page<MetaEntity> searchDefault(IPage page, @Param("srf") MetaEntitySearchContext context, @Param("ew") Wrapper<MetaEntity> wrapper) ; Page<MetaEntity> searchDefault(IPage page, @Param("srf") MetaEntitySearchContext context, @Param("ew") Wrapper<MetaEntity> wrapper);
@Override @Override
MetaEntity selectById(Serializable id); MetaEntity selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface MetaEntityMapper extends BaseMapper<MetaEntity>{ ...@@ -30,13 +30,13 @@ public interface MetaEntityMapper extends BaseMapper<MetaEntity>{
int update(@Param(Constants.ENTITY) MetaEntity entity, @Param("ew") Wrapper<MetaEntity> updateWrapper); int update(@Param(Constants.ENTITY) MetaEntity entity, @Param("ew") Wrapper<MetaEntity> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,8 +62,10 @@ public interface MetaEntityMapper extends BaseMapper<MetaEntity>{ ...@@ -62,8 +62,10 @@ public interface MetaEntityMapper extends BaseMapper<MetaEntity>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<MetaEntity> selectByDsId(@Param("ds_id") Serializable ds_id) ; List<MetaEntity> selectByDsId(@Param("ds_id") Serializable ds_id);
List<MetaEntity> selectBySystemId(@Param("pssystemid") Serializable pssystemid);
List<MetaEntity> selectBySystemId(@Param("pssystemid") Serializable pssystemid) ; List<MetaEntity> selectByModuleId(@Param("id") Serializable id);
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface MetaFieldMapper extends BaseMapper<MetaField>{ public interface MetaFieldMapper extends BaseMapper<MetaField> {
Page<MetaField> searchDefault(IPage page, @Param("srf") MetaFieldSearchContext context, @Param("ew") Wrapper<MetaField> wrapper) ; Page<MetaField> searchDefault(IPage page, @Param("srf") MetaFieldSearchContext context, @Param("ew") Wrapper<MetaField> wrapper);
@Override @Override
MetaField selectById(Serializable id); MetaField selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface MetaFieldMapper extends BaseMapper<MetaField>{ ...@@ -30,13 +30,13 @@ public interface MetaFieldMapper extends BaseMapper<MetaField>{
int update(@Param(Constants.ENTITY) MetaField entity, @Param("ew") Wrapper<MetaField> updateWrapper); int update(@Param(Constants.ENTITY) MetaField entity, @Param("ew") Wrapper<MetaField> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,10 +62,10 @@ public interface MetaFieldMapper extends BaseMapper<MetaField>{ ...@@ -62,10 +62,10 @@ public interface MetaFieldMapper extends BaseMapper<MetaField>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<MetaField> selectByEntityId(@Param("entity_id") Serializable entity_id) ; List<MetaField> selectByEntityId(@Param("entity_id") Serializable entity_id);
List<MetaField> selectByRefFieldId(@Param("field_id") Serializable field_id) ; List<MetaField> selectByRefFieldId(@Param("field_id") Serializable field_id);
List<MetaField> selectByRelationId(@Param("id") Serializable id) ; List<MetaField> selectByRelationId(@Param("id") Serializable id);
} }
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface MetaModelMapper extends BaseMapper<MetaModel>{ public interface MetaModelMapper extends BaseMapper<MetaModel> {
Page<MetaModel> searchDefault(IPage page, @Param("srf") MetaModelSearchContext context, @Param("ew") Wrapper<MetaModel> wrapper) ; Page<MetaModel> searchDefault(IPage page, @Param("srf") MetaModelSearchContext context, @Param("ew") Wrapper<MetaModel> wrapper);
@Override @Override
MetaModel selectById(Serializable id); MetaModel selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface MetaModelMapper extends BaseMapper<MetaModel>{ ...@@ -30,13 +30,13 @@ public interface MetaModelMapper extends BaseMapper<MetaModel>{
int update(@Param(Constants.ENTITY) MetaModel entity, @Param("ew") Wrapper<MetaModel> updateWrapper); int update(@Param(Constants.ENTITY) MetaModel entity, @Param("ew") Wrapper<MetaModel> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
......
package cn.ibizlab.core.lite.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.lite.domain.MetaModule;
import cn.ibizlab.core.lite.filter.MetaModuleSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface MetaModuleMapper extends BaseMapper<MetaModule> {
Page<MetaModule> searchDefault(IPage page, @Param("srf") MetaModuleSearchContext context, @Param("ew") Wrapper<MetaModule> wrapper);
@Override
MetaModule selectById(Serializable id);
@Override
int insert(MetaModule entity);
@Override
int updateById(@Param(Constants.ENTITY) MetaModule entity);
@Override
int update(@Param(Constants.ENTITY) MetaModule entity, @Param("ew") Wrapper<MetaModule> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<MetaModule> selectBySystemId(@Param("pssystemid") Serializable pssystemid);
}
...@@ -17,9 +17,9 @@ import java.io.Serializable; ...@@ -17,9 +17,9 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public interface MetaRelationshipMapper extends BaseMapper<MetaRelationship>{ public interface MetaRelationshipMapper extends BaseMapper<MetaRelationship> {
Page<MetaRelationship> searchDefault(IPage page, @Param("srf") MetaRelationshipSearchContext context, @Param("ew") Wrapper<MetaRelationship> wrapper) ; Page<MetaRelationship> searchDefault(IPage page, @Param("srf") MetaRelationshipSearchContext context, @Param("ew") Wrapper<MetaRelationship> wrapper);
@Override @Override
MetaRelationship selectById(Serializable id); MetaRelationship selectById(Serializable id);
@Override @Override
...@@ -30,13 +30,13 @@ public interface MetaRelationshipMapper extends BaseMapper<MetaRelationship>{ ...@@ -30,13 +30,13 @@ public interface MetaRelationshipMapper extends BaseMapper<MetaRelationship>{
int update(@Param(Constants.ENTITY) MetaRelationship entity, @Param("ew") Wrapper<MetaRelationship> updateWrapper); int update(@Param(Constants.ENTITY) MetaRelationship entity, @Param("ew") Wrapper<MetaRelationship> updateWrapper);
@Override @Override
int deleteById(Serializable id); int deleteById(Serializable id);
/** /**
* 自定义查询SQL * 自定义查询SQL
* @param sql * @param sql
* @return * @return
*/ */
@Select("${sql}") @Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param); List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/** /**
* 自定义更新SQL * 自定义更新SQL
...@@ -62,8 +62,8 @@ public interface MetaRelationshipMapper extends BaseMapper<MetaRelationship>{ ...@@ -62,8 +62,8 @@ public interface MetaRelationshipMapper extends BaseMapper<MetaRelationship>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<MetaRelationship> selectByEntityId(@Param("entity_id") Serializable entity_id) ; List<MetaRelationship> selectByEntityId(@Param("entity_id") Serializable entity_id);
List<MetaRelationship> selectByRefEntityId(@Param("entity_id") Serializable entity_id) ; List<MetaRelationship> selectByRefEntityId(@Param("entity_id") Serializable entity_id);
} }
...@@ -22,20 +22,20 @@ import cn.ibizlab.core.lite.filter.DstAPISearchContext; ...@@ -22,20 +22,20 @@ import cn.ibizlab.core.lite.filter.DstAPISearchContext;
/** /**
* 实体[DstAPI] 服务对象接口 * 实体[DstAPI] 服务对象接口
*/ */
public interface IDstAPIService{ public interface IDstAPIService {
boolean create(DstAPI et) ; boolean create(DstAPI et);
void createBatch(List<DstAPI> list) ; void createBatch(List<DstAPI> list);
boolean update(DstAPI et) ; boolean update(DstAPI et);
void updateBatch(List<DstAPI> list) ; void updateBatch(List<DstAPI> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstAPI get(String key) ; DstAPI get(String key);
DstAPI getDraft(DstAPI et) ; DstAPI getDraft(DstAPI et);
boolean checkKey(DstAPI et) ; boolean checkKey(DstAPI et);
boolean save(DstAPI et) ; boolean save(DstAPI et);
void saveBatch(List<DstAPI> list) ; void saveBatch(List<DstAPI> list);
Page<DstAPI> searchDefault(DstAPISearchContext context) ; Page<DstAPI> searchDefault(DstAPISearchContext context);
List<DstAPI> selectByMsId(String id); List<DstAPI> selectByMsId(String id);
void removeByMsId(String id); void removeByMsId(String id);
List<DstAPI> selectBySystemId(String pssystemid); List<DstAPI> selectBySystemId(String pssystemid);
......
...@@ -22,20 +22,20 @@ import cn.ibizlab.core.lite.filter.DstAppSearchContext; ...@@ -22,20 +22,20 @@ import cn.ibizlab.core.lite.filter.DstAppSearchContext;
/** /**
* 实体[DstApp] 服务对象接口 * 实体[DstApp] 服务对象接口
*/ */
public interface IDstAppService{ public interface IDstAppService {
boolean create(DstApp et) ; boolean create(DstApp et);
void createBatch(List<DstApp> list) ; void createBatch(List<DstApp> list);
boolean update(DstApp et) ; boolean update(DstApp et);
void updateBatch(List<DstApp> list) ; void updateBatch(List<DstApp> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstApp get(String key) ; DstApp get(String key);
DstApp getDraft(DstApp et) ; DstApp getDraft(DstApp et);
boolean checkKey(DstApp et) ; boolean checkKey(DstApp et);
boolean save(DstApp et) ; boolean save(DstApp et);
void saveBatch(List<DstApp> list) ; void saveBatch(List<DstApp> list);
Page<DstApp> searchDefault(DstAppSearchContext context) ; Page<DstApp> searchDefault(DstAppSearchContext context);
List<DstApp> selectBySystemid(String pssystemid); List<DstApp> selectBySystemid(String pssystemid);
void removeBySystemid(String pssystemid); void removeBySystemid(String pssystemid);
......
...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[DstComponent] 服务对象接口 * 实体[DstComponent] 服务对象接口
*/ */
public interface IDstComponentService extends IService<DstComponent>{ public interface IDstComponentService extends IService<DstComponent> {
boolean create(DstComponent et) ; boolean create(DstComponent et);
void createBatch(List<DstComponent> list) ; void createBatch(List<DstComponent> list);
boolean update(DstComponent et) ; boolean update(DstComponent et);
void updateBatch(List<DstComponent> list) ; void updateBatch(List<DstComponent> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstComponent get(String key) ; DstComponent get(String key);
DstComponent getDraft(DstComponent et) ; DstComponent getDraft(DstComponent et);
boolean checkKey(DstComponent et) ; boolean checkKey(DstComponent et);
boolean save(DstComponent et) ; boolean save(DstComponent et);
void saveBatch(List<DstComponent> list) ; void saveBatch(List<DstComponent> list);
DstComponent sync(DstComponent et) ; DstComponent sync(DstComponent et);
Page<DstComponent> searchDefault(DstComponentSearchContext context) ; Page<DstComponent> searchDefault(DstComponentSearchContext context);
List<DstComponent> selectByAppId(String id); List<DstComponent> selectByAppId(String id);
void removeByAppId(String id); void removeByAppId(String id);
List<DstComponent> selectBySystemId(String pssystemid); List<DstComponent> selectBySystemId(String pssystemid);
......
...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[DstConfig] 服务对象接口 * 实体[DstConfig] 服务对象接口
*/ */
public interface IDstConfigService extends IService<DstConfig>{ public interface IDstConfigService extends IService<DstConfig> {
boolean create(DstConfig et) ; boolean create(DstConfig et);
void createBatch(List<DstConfig> list) ; void createBatch(List<DstConfig> list);
boolean update(DstConfig et) ; boolean update(DstConfig et);
void updateBatch(List<DstConfig> list) ; void updateBatch(List<DstConfig> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstConfig get(String key) ; DstConfig get(String key);
DstConfig getDraft(DstConfig et) ; DstConfig getDraft(DstConfig et);
boolean checkKey(DstConfig et) ; boolean checkKey(DstConfig et);
DstConfig reset(DstConfig et) ; DstConfig reset(DstConfig et);
boolean save(DstConfig et) ; boolean save(DstConfig et);
void saveBatch(List<DstConfig> list) ; void saveBatch(List<DstConfig> list);
Page<DstConfig> searchDefault(DstConfigSearchContext context) ; Page<DstConfig> searchDefault(DstConfigSearchContext context);
List<DstConfig> selectBySystemId(String pssystemid); List<DstConfig> selectBySystemId(String pssystemid);
void removeBySystemId(String pssystemid); void removeBySystemId(String pssystemid);
/** /**
......
...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[DstDataSource] 服务对象接口 * 实体[DstDataSource] 服务对象接口
*/ */
public interface IDstDataSourceService extends IService<DstDataSource>{ public interface IDstDataSourceService extends IService<DstDataSource> {
boolean create(DstDataSource et) ; boolean create(DstDataSource et);
void createBatch(List<DstDataSource> list) ; void createBatch(List<DstDataSource> list);
boolean update(DstDataSource et) ; boolean update(DstDataSource et);
void updateBatch(List<DstDataSource> list) ; void updateBatch(List<DstDataSource> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstDataSource get(String key) ; DstDataSource get(String key);
DstDataSource getDraft(DstDataSource et) ; DstDataSource getDraft(DstDataSource et);
boolean checkKey(DstDataSource et) ; boolean checkKey(DstDataSource et);
boolean save(DstDataSource et) ; boolean save(DstDataSource et);
void saveBatch(List<DstDataSource> list) ; void saveBatch(List<DstDataSource> list);
Page<DstDataSource> searchDefault(DstDataSourceSearchContext context) ; Page<DstDataSource> searchDefault(DstDataSourceSearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -22,22 +22,22 @@ import cn.ibizlab.core.lite.filter.DstMicroserviceSearchContext; ...@@ -22,22 +22,22 @@ import cn.ibizlab.core.lite.filter.DstMicroserviceSearchContext;
/** /**
* 实体[DstMicroservice] 服务对象接口 * 实体[DstMicroservice] 服务对象接口
*/ */
public interface IDstMicroserviceService{ public interface IDstMicroserviceService {
boolean create(DstMicroservice et) ; boolean create(DstMicroservice et);
void createBatch(List<DstMicroservice> list) ; void createBatch(List<DstMicroservice> list);
boolean update(DstMicroservice et) ; boolean update(DstMicroservice et);
void updateBatch(List<DstMicroservice> list) ; void updateBatch(List<DstMicroservice> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstMicroservice get(String key) ; DstMicroservice get(String key);
DstMicroservice getDraft(DstMicroservice et) ; DstMicroservice getDraft(DstMicroservice et);
boolean checkKey(DstMicroservice et) ; boolean checkKey(DstMicroservice et);
boolean save(DstMicroservice et) ; boolean save(DstMicroservice et);
void saveBatch(List<DstMicroservice> list) ; void saveBatch(List<DstMicroservice> list);
Page<DstMicroservice> searchDefault(DstMicroserviceSearchContext context) ; Page<DstMicroservice> searchDefault(DstMicroserviceSearchContext context);
List<DstMicroservice> selectByPssystemid(String pssystemid); List<DstMicroservice> selectBySystemid(String pssystemid);
void removeByPssystemid(String pssystemid); void removeBySystemid(String pssystemid);
} }
......
...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[DstRouter] 服务对象接口 * 实体[DstRouter] 服务对象接口
*/ */
public interface IDstRouterService extends IService<DstRouter>{ public interface IDstRouterService extends IService<DstRouter> {
boolean create(DstRouter et) ; boolean create(DstRouter et);
void createBatch(List<DstRouter> list) ; void createBatch(List<DstRouter> list);
boolean update(DstRouter et) ; boolean update(DstRouter et);
void updateBatch(List<DstRouter> list) ; void updateBatch(List<DstRouter> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstRouter get(String key) ; DstRouter get(String key);
DstRouter getDraft(DstRouter et) ; DstRouter getDraft(DstRouter et);
boolean checkKey(DstRouter et) ; boolean checkKey(DstRouter et);
boolean save(DstRouter et) ; boolean save(DstRouter et);
void saveBatch(List<DstRouter> list) ; void saveBatch(List<DstRouter> list);
Page<DstRouter> searchDefault(DstRouterSearchContext context) ; Page<DstRouter> searchDefault(DstRouterSearchContext context);
List<DstRouter> selectByAppId(String id); List<DstRouter> selectByAppId(String id);
void removeByAppId(String id); void removeByAppId(String id);
List<DstRouter> selectByParentid(String id); List<DstRouter> selectByParentid(String id);
......
...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[DstSystem] 服务对象接口 * 实体[DstSystem] 服务对象接口
*/ */
public interface IDstSystemService extends IService<DstSystem>{ public interface IDstSystemService extends IService<DstSystem> {
boolean create(DstSystem et) ; boolean create(DstSystem et);
void createBatch(List<DstSystem> list) ; void createBatch(List<DstSystem> list);
boolean update(DstSystem et) ; boolean update(DstSystem et);
void updateBatch(List<DstSystem> list) ; void updateBatch(List<DstSystem> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstSystem get(String key) ; DstSystem get(String key);
DstSystem getDraft(DstSystem et) ; DstSystem getDraft(DstSystem et);
boolean checkKey(DstSystem et) ; boolean checkKey(DstSystem et);
boolean save(DstSystem et) ; boolean save(DstSystem et);
void saveBatch(List<DstSystem> list) ; void saveBatch(List<DstSystem> list);
DstSystem syncSysModel(DstSystem et) ; DstSystem syncSysModel(DstSystem et);
Page<DstSystem> searchDefault(DstSystemSearchContext context) ; Page<DstSystem> searchDefault(DstSystemSearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[DstView] 服务对象接口 * 实体[DstView] 服务对象接口
*/ */
public interface IDstViewService extends IService<DstView>{ public interface IDstViewService extends IService<DstView> {
boolean create(DstView et) ; boolean create(DstView et);
void createBatch(List<DstView> list) ; void createBatch(List<DstView> list);
boolean update(DstView et) ; boolean update(DstView et);
void updateBatch(List<DstView> list) ; void updateBatch(List<DstView> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
DstView get(String key) ; DstView get(String key);
DstView getDraft(DstView et) ; DstView getDraft(DstView et);
boolean checkKey(DstView et) ; boolean checkKey(DstView et);
boolean save(DstView et) ; boolean save(DstView et);
void saveBatch(List<DstView> list) ; void saveBatch(List<DstView> list);
Page<DstView> searchDefault(DstViewSearchContext context) ; Page<DstView> searchDefault(DstViewSearchContext context);
List<DstView> selectByAppId(String id); List<DstView> selectByAppId(String id);
void removeByAppId(String id); void removeByAppId(String id);
List<DstView> selectBySystemId(String pssystemid); List<DstView> selectBySystemId(String pssystemid);
......
...@@ -23,23 +23,23 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,23 +23,23 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[MetaDataSet] 服务对象接口 * 实体[MetaDataSet] 服务对象接口
*/ */
public interface IMetaDataSetService extends IService<MetaDataSet>{ public interface IMetaDataSetService extends IService<MetaDataSet> {
boolean create(MetaDataSet et) ; boolean create(MetaDataSet et);
void createBatch(List<MetaDataSet> list) ; void createBatch(List<MetaDataSet> list);
boolean update(MetaDataSet et) ; boolean update(MetaDataSet et);
void updateBatch(List<MetaDataSet> list) ; void updateBatch(List<MetaDataSet> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
MetaDataSet get(String key) ; MetaDataSet get(String key);
MetaDataSet getDraft(MetaDataSet et) ; MetaDataSet getDraft(MetaDataSet et);
boolean checkKey(MetaDataSet et) ; boolean checkKey(MetaDataSet et);
boolean save(MetaDataSet et) ; boolean save(MetaDataSet et);
void saveBatch(List<MetaDataSet> list) ; void saveBatch(List<MetaDataSet> list);
Page<MetaDataSet> searchDefault(MetaDataSetSearchContext context) ; Page<MetaDataSet> searchDefault(MetaDataSetSearchContext context);
List<MetaDataSet> selectByEntityId(String entity_id); List<MetaDataSet> selectByEntityId(String entity_id);
void removeByEntityId(String entity_id); void removeByEntityId(String entity_id);
void saveByEntityId(String entity_id,List<MetaDataSet> list) ; void saveByEntityId(String entity_id, List<MetaDataSet> list) ;
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -23,24 +23,26 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,24 +23,26 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[MetaEntity] 服务对象接口 * 实体[MetaEntity] 服务对象接口
*/ */
public interface IMetaEntityService extends IService<MetaEntity>{ public interface IMetaEntityService extends IService<MetaEntity> {
boolean create(MetaEntity et) ; boolean create(MetaEntity et);
void createBatch(List<MetaEntity> list) ; void createBatch(List<MetaEntity> list);
boolean update(MetaEntity et) ; boolean update(MetaEntity et);
void updateBatch(List<MetaEntity> list) ; void updateBatch(List<MetaEntity> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
MetaEntity get(String key) ; MetaEntity get(String key);
MetaEntity getDraft(MetaEntity et) ; MetaEntity getDraft(MetaEntity et);
boolean checkKey(MetaEntity et) ; boolean checkKey(MetaEntity et);
boolean save(MetaEntity et) ; boolean save(MetaEntity et);
void saveBatch(List<MetaEntity> list) ; void saveBatch(List<MetaEntity> list);
Page<MetaEntity> searchDefault(MetaEntitySearchContext context) ; Page<MetaEntity> searchDefault(MetaEntitySearchContext context);
List<MetaEntity> selectByDsId(String ds_id); List<MetaEntity> selectByDsId(String ds_id);
void removeByDsId(String ds_id); void removeByDsId(String ds_id);
List<MetaEntity> selectBySystemId(String pssystemid); List<MetaEntity> selectBySystemId(String pssystemid);
void removeBySystemId(String pssystemid); void removeBySystemId(String pssystemid);
List<MetaEntity> selectByModuleId(String id);
void removeByModuleId(String id);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -23,23 +23,23 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,23 +23,23 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[MetaField] 服务对象接口 * 实体[MetaField] 服务对象接口
*/ */
public interface IMetaFieldService extends IService<MetaField>{ public interface IMetaFieldService extends IService<MetaField> {
boolean create(MetaField et) ; boolean create(MetaField et);
void createBatch(List<MetaField> list) ; void createBatch(List<MetaField> list);
boolean update(MetaField et) ; boolean update(MetaField et);
void updateBatch(List<MetaField> list) ; void updateBatch(List<MetaField> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
MetaField get(String key) ; MetaField get(String key);
MetaField getDraft(MetaField et) ; MetaField getDraft(MetaField et);
boolean checkKey(MetaField et) ; boolean checkKey(MetaField et);
boolean save(MetaField et) ; boolean save(MetaField et);
void saveBatch(List<MetaField> list) ; void saveBatch(List<MetaField> list);
Page<MetaField> searchDefault(MetaFieldSearchContext context) ; Page<MetaField> searchDefault(MetaFieldSearchContext context);
List<MetaField> selectByEntityId(String entity_id); List<MetaField> selectByEntityId(String entity_id);
void removeByEntityId(String entity_id); void removeByEntityId(String entity_id);
void saveByEntityId(String entity_id,List<MetaField> list) ; void saveByEntityId(String entity_id, List<MetaField> list) ;
List<MetaField> selectByRefFieldId(String field_id); List<MetaField> selectByRefFieldId(String field_id);
void removeByRefFieldId(String field_id); void removeByRefFieldId(String field_id);
List<MetaField> selectByRelationId(String id); List<MetaField> selectByRelationId(String id);
......
...@@ -22,23 +22,23 @@ import cn.ibizlab.core.lite.filter.MetaLookupSearchContext; ...@@ -22,23 +22,23 @@ import cn.ibizlab.core.lite.filter.MetaLookupSearchContext;
/** /**
* 实体[MetaLookup] 服务对象接口 * 实体[MetaLookup] 服务对象接口
*/ */
public interface IMetaLookupService{ public interface IMetaLookupService {
boolean create(MetaLookup et) ; boolean create(MetaLookup et);
void createBatch(List<MetaLookup> list) ; void createBatch(List<MetaLookup> list);
boolean update(MetaLookup et) ; boolean update(MetaLookup et);
void updateBatch(List<MetaLookup> list) ; void updateBatch(List<MetaLookup> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
MetaLookup get(String key) ; MetaLookup get(String key);
MetaLookup getDraft(MetaLookup et) ; MetaLookup getDraft(MetaLookup et);
boolean checkKey(MetaLookup et) ; boolean checkKey(MetaLookup et);
boolean save(MetaLookup et) ; boolean save(MetaLookup et);
void saveBatch(List<MetaLookup> list) ; void saveBatch(List<MetaLookup> list);
Page<MetaLookup> searchDefault(MetaLookupSearchContext context) ; Page<MetaLookup> searchDefault(MetaLookupSearchContext context);
List<MetaLookup> selectByRelationid(String id); List<MetaLookup> selectByRelationid(String id);
void removeByRelationid(String id); void removeByRelationid(String id);
void saveByRelationid(String id,List<MetaLookup> list) ; void saveByRelationid(String id, List<MetaLookup> list) ;
} }
......
...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,21 +23,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[MetaModel] 服务对象接口 * 实体[MetaModel] 服务对象接口
*/ */
public interface IMetaModelService extends IService<MetaModel>{ public interface IMetaModelService extends IService<MetaModel> {
boolean create(MetaModel et) ; boolean create(MetaModel et);
void createBatch(List<MetaModel> list) ; void createBatch(List<MetaModel> list);
boolean update(MetaModel et) ; boolean update(MetaModel et);
void updateBatch(List<MetaModel> list) ; void updateBatch(List<MetaModel> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
MetaModel get(String key) ; MetaModel get(String key);
MetaModel getDraft(MetaModel et) ; MetaModel getDraft(MetaModel et);
MetaModel change(MetaModel et) ; MetaModel change(MetaModel et);
boolean checkKey(MetaModel et) ; boolean checkKey(MetaModel et);
boolean save(MetaModel et) ; boolean save(MetaModel et);
void saveBatch(List<MetaModel> list) ; void saveBatch(List<MetaModel> list);
Page<MetaModel> searchDefault(MetaModelSearchContext context) ; Page<MetaModel> searchDefault(MetaModelSearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -18,28 +18,42 @@ import org.springframework.cache.annotation.CacheEvict; ...@@ -18,28 +18,42 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.lite.domain.MetaModule; import cn.ibizlab.core.lite.domain.MetaModule;
import cn.ibizlab.core.lite.filter.MetaModuleSearchContext; import cn.ibizlab.core.lite.filter.MetaModuleSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[MetaModule] 服务对象接口 * 实体[MetaModule] 服务对象接口
*/ */
public interface IMetaModuleService{ public interface IMetaModuleService extends IService<MetaModule> {
boolean create(MetaModule et) ; boolean create(MetaModule et);
void createBatch(List<MetaModule> list) ; void createBatch(List<MetaModule> list);
boolean update(MetaModule et) ; boolean update(MetaModule et);
void updateBatch(List<MetaModule> list) ; void updateBatch(List<MetaModule> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
MetaModule get(String key) ; MetaModule get(String key);
MetaModule getDraft(MetaModule et) ; MetaModule getDraft(MetaModule et);
boolean checkKey(MetaModule et) ; boolean checkKey(MetaModule et);
boolean save(MetaModule et) ; boolean save(MetaModule et);
void saveBatch(List<MetaModule> list) ; void saveBatch(List<MetaModule> list);
Page<MetaModule> searchDefault(MetaModuleSearchContext context) ; Page<MetaModule> searchDefault(MetaModuleSearchContext context);
List<MetaModule> selectBySystemid(String pssystemid); List<MetaModule> selectBySystemId(String pssystemid);
void removeBySystemid(String pssystemid); void removeBySystemId(String pssystemid);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -23,26 +23,26 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,26 +23,26 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[MetaRelationship] 服务对象接口 * 实体[MetaRelationship] 服务对象接口
*/ */
public interface IMetaRelationshipService extends IService<MetaRelationship>{ public interface IMetaRelationshipService extends IService<MetaRelationship> {
boolean create(MetaRelationship et) ; boolean create(MetaRelationship et);
void createBatch(List<MetaRelationship> list) ; void createBatch(List<MetaRelationship> list);
boolean update(MetaRelationship et) ; boolean update(MetaRelationship et);
void updateBatch(List<MetaRelationship> list) ; void updateBatch(List<MetaRelationship> list);
boolean remove(String key) ; boolean remove(String key);
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList);
MetaRelationship get(String key) ; MetaRelationship get(String key);
MetaRelationship getDraft(MetaRelationship et) ; MetaRelationship getDraft(MetaRelationship et);
boolean checkKey(MetaRelationship et) ; boolean checkKey(MetaRelationship et);
boolean save(MetaRelationship et) ; boolean save(MetaRelationship et);
void saveBatch(List<MetaRelationship> list) ; void saveBatch(List<MetaRelationship> list);
Page<MetaRelationship> searchDefault(MetaRelationshipSearchContext context) ; Page<MetaRelationship> searchDefault(MetaRelationshipSearchContext context);
List<MetaRelationship> selectByEntityId(String entity_id); List<MetaRelationship> selectByEntityId(String entity_id);
void removeByEntityId(String entity_id); void removeByEntityId(String entity_id);
void saveByEntityId(String entity_id,List<MetaRelationship> list) ; void saveByEntityId(String entity_id, List<MetaRelationship> list) ;
List<MetaRelationship> selectByRefEntityId(String entity_id); List<MetaRelationship> selectByRefEntityId(String entity_id);
void removeByRefEntityId(String entity_id); void removeByRefEntityId(String entity_id);
void saveByRefEntityId(String entity_id,List<MetaRelationship> list) ; void saveByRefEntityId(String entity_id, List<MetaRelationship> list) ;
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -64,7 +64,7 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -64,7 +64,7 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
...@@ -79,10 +79,10 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -79,10 +79,10 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional @Transactional
public boolean update(DstComponent et) { public boolean update(DstComponent et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cid",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("cid", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
...@@ -90,13 +90,13 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -90,13 +90,13 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional @Transactional
public void updateBatch(List<DstComponent> list) { public void updateBatch(List<DstComponent> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -110,11 +110,11 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -110,11 +110,11 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional @Transactional
public DstComponent get(String key) { public DstComponent get(String key) {
DstComponent et = getById(key); DstComponent et = getById(key);
if(et==null){ if(et == null){
et=new DstComponent(); et = new DstComponent();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -127,7 +127,7 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -127,7 +127,7 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Override @Override
public boolean checkKey(DstComponent et) { public boolean checkKey(DstComponent et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -60,7 +60,7 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig ...@@ -60,7 +60,7 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getCfgId()),et); CachedBeanCopier.copy(get(et.getCfgId()), et);
return true; return true;
} }
...@@ -73,23 +73,23 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig ...@@ -73,23 +73,23 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override @Override
@Transactional @Transactional
public boolean update(DstConfig et) { public boolean update(DstConfig et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cfgid",et.getCfgId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("cfgid", et.getCfgId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getCfgId()),et); CachedBeanCopier.copy(get(et.getCfgId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<DstConfig> list) { public void updateBatch(List<DstConfig> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -103,11 +103,11 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig ...@@ -103,11 +103,11 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Transactional @Transactional
public DstConfig get(String key) { public DstConfig get(String key) {
DstConfig et = getById(key); DstConfig et = getById(key);
if(et==null){ if(et == null){
et=new DstConfig(); et = new DstConfig();
et.setCfgId(key); et.setCfgId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -119,7 +119,7 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig ...@@ -119,7 +119,7 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override @Override
public boolean checkKey(DstConfig et) { public boolean checkKey(DstConfig et) {
return (!ObjectUtils.isEmpty(et.getCfgId()))&&(!Objects.isNull(this.getById(et.getCfgId()))); return (!ObjectUtils.isEmpty(et.getCfgId())) && (!Objects.isNull(this.getById(et.getCfgId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -60,36 +60,36 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D ...@@ -60,36 +60,36 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getDsId()),et); CachedBeanCopier.copy(get(et.getDsId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void createBatch(List<DstDataSource> list) { public void createBatch(List<DstDataSource> list) {
this.saveBatch(list,batchSize); this.saveBatch(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(DstDataSource et) { public boolean update(DstDataSource et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("dsid",et.getDsId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("dsid", et.getDsId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getDsId()),et); CachedBeanCopier.copy(get(et.getDsId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<DstDataSource> list) { public void updateBatch(List<DstDataSource> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -103,11 +103,11 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D ...@@ -103,11 +103,11 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Transactional @Transactional
public DstDataSource get(String key) { public DstDataSource get(String key) {
DstDataSource et = getById(key); DstDataSource et = getById(key);
if(et==null){ if(et == null){
et=new DstDataSource(); et = new DstDataSource();
et.setDsId(key); et.setDsId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -119,7 +119,7 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D ...@@ -119,7 +119,7 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override @Override
public boolean checkKey(DstDataSource et) { public boolean checkKey(DstDataSource et) {
return (!ObjectUtils.isEmpty(et.getDsId()))&&(!Objects.isNull(this.getById(et.getDsId()))); return (!ObjectUtils.isEmpty(et.getDsId())) && (!Objects.isNull(this.getById(et.getDsId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -100,14 +100,14 @@ public class DstMicroserviceServiceImpl implements IDstMicroserviceService { ...@@ -100,14 +100,14 @@ public class DstMicroserviceServiceImpl implements IDstMicroserviceService {
@Override @Override
public List<DstMicroservice> selectByPssystemid(String pssystemid) { public List<DstMicroservice> selectBySystemid(String pssystemid) {
return null; return null;
} }
@Override @Override
public void removeByPssystemid(String pssystemid) { public void removeBySystemid(String pssystemid) {
Set<String> delIds=new HashSet<String>(); Set<String> delIds=new HashSet<String>();
for(DstMicroservice before:selectByPssystemid(pssystemid)){ for(DstMicroservice before:selectBySystemid(pssystemid)){
delIds.add(before.getId()); delIds.add(before.getId());
} }
if(delIds.size()>0) if(delIds.size()>0)
......
...@@ -62,7 +62,7 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter ...@@ -62,7 +62,7 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
...@@ -75,23 +75,23 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter ...@@ -75,23 +75,23 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override @Override
@Transactional @Transactional
public boolean update(DstRouter et) { public boolean update(DstRouter et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("routerid",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("routerid", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<DstRouter> list) { public void updateBatch(List<DstRouter> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -105,11 +105,11 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter ...@@ -105,11 +105,11 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Transactional @Transactional
public DstRouter get(String key) { public DstRouter get(String key) {
DstRouter et = getById(key); DstRouter et = getById(key);
if(et==null){ if(et == null){
et=new DstRouter(); et = new DstRouter();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -121,7 +121,7 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter ...@@ -121,7 +121,7 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override @Override
public boolean checkKey(DstRouter et) { public boolean checkKey(DstRouter et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -63,6 +63,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -63,6 +63,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.core.lite.service.IMetaEntityService metaentityService; protected cn.ibizlab.core.lite.service.IMetaEntityService metaentityService;
@Autowired
@Lazy
protected cn.ibizlab.core.lite.service.IMetaModuleService metamoduleService;
protected int batchSize = 500; protected int batchSize = 500;
...@@ -72,36 +75,36 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -72,36 +75,36 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getPssystemid()),et); CachedBeanCopier.copy(get(et.getPssystemid()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void createBatch(List<DstSystem> list) { public void createBatch(List<DstSystem> list) {
this.saveBatch(list,batchSize); this.saveBatch(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(DstSystem et) { public boolean update(DstSystem et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("pssystemid",et.getPssystemid()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("pssystemid", et.getPssystemid()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getPssystemid()),et); CachedBeanCopier.copy(get(et.getPssystemid()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<DstSystem> list) { public void updateBatch(List<DstSystem> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -115,11 +118,11 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -115,11 +118,11 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Transactional @Transactional
public DstSystem get(String key) { public DstSystem get(String key) {
DstSystem et = getById(key); DstSystem et = getById(key);
if(et==null){ if(et == null){
et=new DstSystem(); et = new DstSystem();
et.setPssystemid(key); et.setPssystemid(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -131,7 +134,7 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -131,7 +134,7 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override @Override
public boolean checkKey(DstSystem et) { public boolean checkKey(DstSystem et) {
return (!ObjectUtils.isEmpty(et.getPssystemid()))&&(!Objects.isNull(this.getById(et.getPssystemid()))); return (!ObjectUtils.isEmpty(et.getPssystemid())) && (!Objects.isNull(this.getById(et.getPssystemid())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -64,7 +64,7 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -64,7 +64,7 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
...@@ -79,10 +79,10 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -79,10 +79,10 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional @Transactional
public boolean update(DstView et) { public boolean update(DstView et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("viewid",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("viewid", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
...@@ -90,13 +90,13 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -90,13 +90,13 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional @Transactional
public void updateBatch(List<DstView> list) { public void updateBatch(List<DstView> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -110,11 +110,11 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -110,11 +110,11 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional @Transactional
public DstView get(String key) { public DstView get(String key) {
DstView et = getById(key); DstView et = getById(key);
if(et==null){ if(et == null){
et=new DstView(); et = new DstView();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -127,7 +127,7 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -127,7 +127,7 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Override @Override
public boolean checkKey(DstView et) { public boolean checkKey(DstView et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -61,7 +61,7 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -61,7 +61,7 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getDatasetId()),et); CachedBeanCopier.copy(get(et.getDatasetId()), et);
return true; return true;
} }
...@@ -76,10 +76,10 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -76,10 +76,10 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional @Transactional
public boolean update(MetaDataSet et) { public boolean update(MetaDataSet et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("datasetid",et.getDatasetId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("datasetid", et.getDatasetId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getDatasetId()),et); CachedBeanCopier.copy(get(et.getDatasetId()), et);
return true; return true;
} }
...@@ -87,13 +87,13 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -87,13 +87,13 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional @Transactional
public void updateBatch(List<MetaDataSet> list) { public void updateBatch(List<MetaDataSet> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -107,11 +107,11 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -107,11 +107,11 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional @Transactional
public MetaDataSet get(String key) { public MetaDataSet get(String key) {
MetaDataSet et = getById(key); MetaDataSet et = getById(key);
if(et==null){ if(et == null){
et=new MetaDataSet(); et = new MetaDataSet();
et.setDatasetId(key); et.setDatasetId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -124,7 +124,7 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -124,7 +124,7 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Override @Override
public boolean checkKey(MetaDataSet et) { public boolean checkKey(MetaDataSet et) {
return (!ObjectUtils.isEmpty(et.getDatasetId()))&&(!Objects.isNull(this.getById(et.getDatasetId()))); return (!ObjectUtils.isEmpty(et.getDatasetId())) && (!Objects.isNull(this.getById(et.getDatasetId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -69,6 +69,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -69,6 +69,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.core.lite.service.IDstSystemService dstsystemService; protected cn.ibizlab.core.lite.service.IDstSystemService dstsystemService;
@Autowired
@Lazy
protected cn.ibizlab.core.lite.service.IMetaModuleService metamoduleService;
protected int batchSize = 500; protected int batchSize = 500;
...@@ -79,11 +82,11 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -79,11 +82,11 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets()); metadatasetService.saveByEntityId(et.getEntityId(), et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields()); metafieldService.saveByEntityId(et.getEntityId(), et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys()); metarelationshipService.saveByEntityId(et.getEntityId(), et.getParentEntitys());
metarelationshipService.saveByRefEntityId(et.getEntityId(),et.getSubEntitys()); metarelationshipService.saveByRefEntityId(et.getEntityId(), et.getSubEntitys());
CachedBeanCopier.copy(get(et.getEntityId()),et); CachedBeanCopier.copy(get(et.getEntityId()), et);
return true; return true;
} }
...@@ -98,14 +101,14 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -98,14 +101,14 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional @Transactional
public boolean update(MetaEntity et) { public boolean update(MetaEntity et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("entityid",et.getEntityId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("entityid", et.getEntityId()))) {
return false; return false;
} }
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets()); metadatasetService.saveByEntityId(et.getEntityId(), et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields()); metafieldService.saveByEntityId(et.getEntityId(), et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys()); metarelationshipService.saveByEntityId(et.getEntityId(), et.getParentEntitys());
metarelationshipService.saveByRefEntityId(et.getEntityId(),et.getSubEntitys()); metarelationshipService.saveByRefEntityId(et.getEntityId(), et.getSubEntitys());
CachedBeanCopier.copy(get(et.getEntityId()),et); CachedBeanCopier.copy(get(et.getEntityId()), et);
return true; return true;
} }
...@@ -113,7 +116,7 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -113,7 +116,7 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional @Transactional
public void updateBatch(List<MetaEntity> list) { public void updateBatch(List<MetaEntity> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
...@@ -123,7 +126,7 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -123,7 +126,7 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
metafieldService.removeByEntityId(key) ; metafieldService.removeByEntityId(key) ;
metarelationshipService.removeByEntityId(key) ; metarelationshipService.removeByEntityId(key) ;
metarelationshipService.removeByRefEntityId(key) ; metarelationshipService.removeByRefEntityId(key) ;
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -137,11 +140,11 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -137,11 +140,11 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional @Transactional
public MetaEntity get(String key) { public MetaEntity get(String key) {
MetaEntity et = getById(key); MetaEntity et = getById(key);
if(et==null){ if(et == null){
et=new MetaEntity(); et = new MetaEntity();
et.setEntityId(key); et.setEntityId(key);
} }
else{ else {
et.setDataSets(metadatasetService.selectByEntityId(key)); et.setDataSets(metadatasetService.selectByEntityId(key));
et.setFields(metafieldService.selectByEntityId(key)); et.setFields(metafieldService.selectByEntityId(key));
et.setParentEntitys(metarelationshipService.selectByEntityId(key)); et.setParentEntitys(metarelationshipService.selectByEntityId(key));
...@@ -158,7 +161,7 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -158,7 +161,7 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Override @Override
public boolean checkKey(MetaEntity et) { public boolean checkKey(MetaEntity et) {
return (!ObjectUtils.isEmpty(et.getEntityId()))&&(!Objects.isNull(this.getById(et.getEntityId()))); return (!ObjectUtils.isEmpty(et.getEntityId())) && (!Objects.isNull(this.getById(et.getEntityId())));
} }
@Override @Override
@Transactional @Transactional
...@@ -213,6 +216,15 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -213,6 +216,15 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
this.remove(new QueryWrapper<MetaEntity>().eq("systemid",pssystemid)); this.remove(new QueryWrapper<MetaEntity>().eq("systemid",pssystemid));
} }
@Override
public List<MetaEntity> selectByModuleId(String id) {
return baseMapper.selectByModuleId(id);
}
@Override
public void removeByModuleId(String id) {
this.remove(new QueryWrapper<MetaEntity>().eq("moduleid",id));
}
/** /**
* 查询集合 数据集 * 查询集合 数据集
...@@ -250,6 +262,16 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -250,6 +262,16 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
} }
et.setSystemName(system.getPssystemname()); et.setSystemName(system.getPssystemname());
} }
//实体关系[DER1N_META_ENTITY_META_MODULE_MODULEID]
if(!ObjectUtils.isEmpty(et.getModuleId())){
cn.ibizlab.core.lite.domain.MetaModule module=et.getModule();
if(ObjectUtils.isEmpty(module)){
cn.ibizlab.core.lite.domain.MetaModule majorEntity=metamoduleService.get(et.getModuleId());
et.setModule(majorEntity);
module=majorEntity;
}
et.setModuleName(module.getName());
}
} }
......
...@@ -66,7 +66,7 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -66,7 +66,7 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getFieldId()),et); CachedBeanCopier.copy(get(et.getFieldId()), et);
return true; return true;
} }
...@@ -81,10 +81,10 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -81,10 +81,10 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional @Transactional
public boolean update(MetaField et) { public boolean update(MetaField et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("fieldid",et.getFieldId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("fieldid", et.getFieldId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getFieldId()),et); CachedBeanCopier.copy(get(et.getFieldId()), et);
return true; return true;
} }
...@@ -92,13 +92,13 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -92,13 +92,13 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional @Transactional
public void updateBatch(List<MetaField> list) { public void updateBatch(List<MetaField> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -112,11 +112,11 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -112,11 +112,11 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional @Transactional
public MetaField get(String key) { public MetaField get(String key) {
MetaField et = getById(key); MetaField et = getById(key);
if(et==null){ if(et == null){
et=new MetaField(); et = new MetaField();
et.setFieldId(key); et.setFieldId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -129,7 +129,7 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -129,7 +129,7 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Override @Override
public boolean checkKey(MetaField et) { public boolean checkKey(MetaField et) {
return (!ObjectUtils.isEmpty(et.getFieldId()))&&(!Objects.isNull(this.getById(et.getFieldId()))); return (!ObjectUtils.isEmpty(et.getFieldId())) && (!Objects.isNull(this.getById(et.getFieldId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -57,36 +57,36 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel ...@@ -57,36 +57,36 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void createBatch(List<MetaModel> list) { public void createBatch(List<MetaModel> list) {
this.saveBatch(list,batchSize); this.saveBatch(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean update(MetaModel et) { public boolean update(MetaModel et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("modelid",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("modelid", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
@Override @Override
@Transactional @Transactional
public void updateBatch(List<MetaModel> list) { public void updateBatch(List<MetaModel> list) {
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -100,11 +100,11 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel ...@@ -100,11 +100,11 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Transactional @Transactional
public MetaModel get(String key) { public MetaModel get(String key) {
MetaModel et = getById(key); MetaModel et = getById(key);
if(et==null){ if(et == null){
et=new MetaModel(); et = new MetaModel();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -123,7 +123,7 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel ...@@ -123,7 +123,7 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override @Override
public boolean checkKey(MetaModel et) { public boolean checkKey(MetaModel et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -33,44 +33,85 @@ import cn.ibizlab.util.helper.CachedBeanCopier; ...@@ -33,44 +33,85 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap; import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.lite.mapper.MetaModuleMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[模块] 无存储服务对象接口实现 * 实体[模块] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service @Service("MetaModuleServiceImpl")
public class MetaModuleServiceImpl implements IMetaModuleService { public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaModule> implements IMetaModuleService {
@Autowired
@Lazy
protected cn.ibizlab.core.lite.service.IMetaEntityService metaentityService;
@Autowired
@Lazy
protected cn.ibizlab.core.lite.service.IDstSystemService dstsystemService;
protected int batchSize = 500;
@Override @Override
@Transactional
public boolean create(MetaModule et) { public boolean create(MetaModule et) {
//代码实现 if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
public void createBatch(List<MetaModule> list){ @Override
@Transactional
public void createBatch(List<MetaModule> list) {
this.saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
@Transactional
public boolean update(MetaModule et) { public boolean update(MetaModule et) {
//代码实现 if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("moduleid", et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
public void updateBatch(List<MetaModule> list){ @Override
@Transactional
public void updateBatch(List<MetaModule> list) {
updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional
public boolean remove(String key) { public boolean remove(String key) {
return true; boolean result = removeById(key);
return result ;
} }
public void removeBatch(Collection<String> idList){ @Override
@Transactional
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
} }
@Override @Override
@Transactional
public MetaModule get(String key) { public MetaModule get(String key) {
MetaModule et = new MetaModule(); MetaModule et = getById(key);
et.setId(key); if(et == null){
et = new MetaModule();
et.setId(key);
}
else {
}
return et; return et;
} }
...@@ -81,47 +122,95 @@ public class MetaModuleServiceImpl implements IMetaModuleService { ...@@ -81,47 +122,95 @@ public class MetaModuleServiceImpl implements IMetaModuleService {
@Override @Override
public boolean checkKey(MetaModule et) { public boolean checkKey(MetaModule et) {
return false; return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
public boolean save(MetaModule et) { public boolean save(MetaModule et) {
//代码实现 if(!saveOrUpdate(et)) {
return false;
}
return true; return true;
} }
@Override @Override
public void saveBatch(List<MetaModule> list) { @Transactional
public boolean saveOrUpdate(MetaModule et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
} }
@Override
@Transactional
public boolean saveBatch(Collection<MetaModule> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<MetaModule> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override @Override
public List<MetaModule> selectBySystemid(String pssystemid) { public List<MetaModule> selectBySystemId(String pssystemid) {
return null; return baseMapper.selectBySystemId(pssystemid);
} }
@Override @Override
public void removeBySystemid(String pssystemid) { public void removeBySystemId(String pssystemid) {
Set<String> delIds=new HashSet<String>(); this.remove(new QueryWrapper<MetaModule>().eq("systemid",pssystemid));
for(MetaModule before:selectBySystemid(pssystemid)){
delIds.add(before.getId());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
/** /**
* 查询集合 数据集 * 查询集合 数据集
*/ */
@Override @Override
public Page<MetaModule> searchDefault(MetaModuleSearchContext context) { public Page<MetaModule> searchDefault(MetaModuleSearchContext context) {
return new PageImpl<MetaModule>(new ArrayList(),context.getPageable(),0); com.baomidou.mybatisplus.extension.plugins.pagination.Page<MetaModule> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<MetaModule>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
} }
...@@ -64,7 +64,7 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -64,7 +64,7 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
if(!this.retBool(this.baseMapper.insert(et))) { if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
...@@ -79,10 +79,10 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -79,10 +79,10 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional @Transactional
public boolean update(MetaRelationship et) { public boolean update(MetaRelationship et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("relationid",et.getId()))) { if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("relationid", et.getId()))) {
return false; return false;
} }
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()), et);
return true; return true;
} }
...@@ -90,13 +90,13 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -90,13 +90,13 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional @Transactional
public void updateBatch(List<MetaRelationship> list) { public void updateBatch(List<MetaRelationship> list) {
list.forEach(item->fillParentData(item)); list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list, batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); boolean result = removeById(key);
return result ; return result ;
} }
...@@ -110,11 +110,11 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -110,11 +110,11 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional @Transactional
public MetaRelationship get(String key) { public MetaRelationship get(String key) {
MetaRelationship et = getById(key); MetaRelationship et = getById(key);
if(et==null){ if(et == null){
et=new MetaRelationship(); et = new MetaRelationship();
et.setId(key); et.setId(key);
} }
else{ else {
} }
return et; return et;
} }
...@@ -127,7 +127,7 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -127,7 +127,7 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Override @Override
public boolean checkKey(MetaRelationship et) { public boolean checkKey(MetaRelationship et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 --> <!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual-47-1"> <changeSet author="root" id="tab-blade_visual-47-1">
<createTable tableName="blade_visual"> <createTable tableName="blade_visual">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 --> <!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_category-20-2"> <changeSet author="root" id="tab-blade_visual_category-20-2">
<createTable tableName="blade_visual_category"> <createTable tableName="blade_visual_category">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!--输出实体[BLADE_VISUAL_CONFIG]数据结构 --> <!--输出实体[BLADE_VISUAL_CONFIG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_config-18-3"> <changeSet author="root" id="tab-blade_visual_config-18-3">
<createTable tableName="blade_visual_config"> <createTable tableName="blade_visual_config">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<!--输出实体[BLADE_VISUAL_MAP]数据结构 --> <!--输出实体[BLADE_VISUAL_MAP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_map-18-4"> <changeSet author="root" id="tab-blade_visual_map-18-4">
<createTable tableName="blade_visual_map"> <createTable tableName="blade_visual_map">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<!--输出实体[DST_COMPONENT]数据结构 --> <!--输出实体[DST_COMPONENT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_component-56-5"> <changeSet author="root" id="tab-dst_component-56-5">
<createTable tableName="IBZCOMPONENT"> <createTable tableName="IBZCOMPONENT">
<column name="CID" remarks="" type="VARCHAR(100)"> <column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_COMPONENT_CID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_COMPONENT_CID"/>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<!--输出实体[DST_CONFIG]数据结构 --> <!--输出实体[DST_CONFIG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_config-32-6"> <changeSet author="root" id="tab-dst_config-32-6">
<createTable tableName="IBZCFG"> <createTable tableName="IBZCFG">
<column name="CFGID" remarks="" type="VARCHAR(100)"> <column name="CFGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/>
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 --> <!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_datasource-39-7"> <changeSet author="root" id="tab-dst_datasource-39-7">
<createTable tableName="IBZDATASOURCE"> <createTable tableName="IBZDATASOURCE">
<column name="DSID" remarks="" type="VARCHAR(100)"> <column name="DSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<!--输出实体[DST_ROUTER]数据结构 --> <!--输出实体[DST_ROUTER]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_router-33-8"> <changeSet author="root" id="tab-dst_router-33-8">
<createTable tableName="IBZROUTER"> <createTable tableName="IBZROUTER">
<column name="ROUTERID" remarks="" type="VARCHAR(100)"> <column name="ROUTERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_ROUTER_ROUTERID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_ROUTER_ROUTERID"/>
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
<!--输出实体[DST_SYSTEM]数据结构 --> <!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_system-37-9"> <changeSet author="root" id="tab-dst_system-37-9">
<createTable tableName="IBZPSSYSTEM"> <createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)"> <column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/>
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
<!--输出实体[DST_VIEW]数据结构 --> <!--输出实体[DST_VIEW]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_view-43-10"> <changeSet author="root" id="tab-dst_view-43-10">
<createTable tableName="IBZVIEW"> <createTable tableName="IBZVIEW">
<column name="VIEWID" remarks="" type="VARCHAR(100)"> <column name="VIEWID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/>
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
<!--输出实体[META_DATASET]数据结构 --> <!--输出实体[META_DATASET]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_dataset-32-11"> <changeSet author="root" id="tab-meta_dataset-32-11">
<createTable tableName="IBZDATASET"> <createTable tableName="IBZDATASET">
<column name="DATASETID" remarks="" type="VARCHAR(100)"> <column name="DATASETID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/> <constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<!--输出实体[META_ENTITY]数据结构 --> <!--输出实体[META_ENTITY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_entity-79-12"> <changeSet author="root" id="tab-meta_entity-87-12">
<createTable tableName="IBZENTITY"> <createTable tableName="IBZENTITY">
<column name="ENTITYID" remarks="" type="VARCHAR(100)"> <column name="ENTITYID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/> <constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/>
...@@ -255,12 +255,18 @@ ...@@ -255,12 +255,18 @@
</column> </column>
<column name="DSID" remarks="" type="VARCHAR(100)"> <column name="DSID" remarks="" type="VARCHAR(100)">
</column> </column>
<column name="MODULEID" remarks="" type="VARCHAR(100)">
</column>
<column name="EXTPARAMS" remarks="" type="TEXT(1048576)">
</column>
<column name="SHOWORDER" remarks="" type="INT">
</column>
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[META_FIELD]数据结构 --> <!--输出实体[META_FIELD]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_field-147-13"> <changeSet author="root" id="tab-meta_field-147-13">
<createTable tableName="IBZFIELD"> <createTable tableName="IBZFIELD">
<column name="FIELDID" remarks="" type="VARCHAR(100)"> <column name="FIELDID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/> <constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/>
...@@ -320,7 +326,7 @@ ...@@ -320,7 +326,7 @@
<!--输出实体[META_MODEL]数据结构 --> <!--输出实体[META_MODEL]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_model-26-14"> <changeSet author="root" id="tab-meta_model-26-14">
<createTable tableName="IBZMODEL"> <createTable tableName="IBZMODEL">
<column name="MODELID" remarks="" type="VARCHAR(100)"> <column name="MODELID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/> <constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/>
...@@ -335,10 +341,26 @@ ...@@ -335,10 +341,26 @@
</changeSet> </changeSet>
<!--输出实体[META_MODULE]数据结构 -->
<changeSet author="root" id="tab-meta_module-27-15">
<createTable tableName="IBZMODULE">
<column name="MODULEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODULE_MODULEID"/>
</column>
<column name="MODULENAME" remarks="" type="VARCHAR(100)">
</column>
<column name="CODENAME" remarks="" type="VARCHAR(100)">
</column>
<column name="SYSTEMID" remarks="" type="VARCHAR(100)">
</column>
<column name="SHOWORDER" remarks="" type="INT">
</column>
</createTable>
</changeSet>
<!--输出实体[META_RELATION]数据结构 --> <!--输出实体[META_RELATION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_relation-90-15"> <changeSet author="root" id="tab-meta_relation-90-16">
<createTable tableName="IBZRELATION"> <createTable tableName="IBZRELATION">
<column name="RELATIONID" remarks="" type="VARCHAR(100)"> <column name="RELATIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/> <constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/>
...@@ -376,8 +398,12 @@ ...@@ -376,8 +398,12 @@
<!--输出实体[DST_VIEW]外键关系 --> <!--输出实体[DST_VIEW]外键关系 -->
<!--输出实体[META_DATASET]外键关系 --> <!--输出实体[META_DATASET]外键关系 -->
<!--输出实体[META_ENTITY]外键关系 --> <!--输出实体[META_ENTITY]外键关系 -->
<changeSet author="root" id="fk-meta_entity-87-17">
<addForeignKeyConstraint baseColumnNames="MODULEID" baseTableName="IBZENTITY" constraintName="DER1N_META_ENTITY_META_MODULE_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="MODULEID" referencedTableName="IBZMODULE" validate="true"/>
</changeSet>
<!--输出实体[META_FIELD]外键关系 --> <!--输出实体[META_FIELD]外键关系 -->
<!--输出实体[META_MODEL]外键关系 --> <!--输出实体[META_MODEL]外键关系 -->
<!--输出实体[META_MODULE]外键关系 -->
<!--输出实体[META_RELATION]外键关系 --> <!--输出实体[META_RELATION]外键关系 -->
</databaseChangeLog> </databaseChangeLog>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<![CDATA[select t1.* from (SELECT t1.`CODENAME`, t1.`DSID`, t21.`DSNAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`LOGICNAME`, t1.`SYSTEMID`, t11.`PSSYSTEMNAME` AS `SYSTEMNAME`, t1.`TABLENAME` FROM `IBZENTITY` t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID ) t1 where entityid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`CODENAME`, t1.`DSID`, t21.`DSNAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`LOGICNAME`, t1.`SYSTEMID`, t11.`PSSYSTEMNAME` AS `SYSTEMNAME`, t1.`TABLENAME` FROM `IBZENTITY` t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID ) t1 where entityid=#{id}]]>
</select> </select>
<select id="selectById" resultMap="MetaEntityResultMap" databaseId="oracle"> <select id="selectById" resultMap="MetaEntityResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.LOGICNAME, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID ) t1 where entityid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.EXTPARAMS, t1.LOGICNAME, t1.MODULEID, t31.MODULENAME, t1.SHOWORDER, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID LEFT JOIN IBZMODULE t31 ON t1.MODULEID = t31.MODULEID ) t1 where entityid=#{id}]]>
</select> </select>
<select id="selectById" resultMap="MetaEntityResultMap" databaseId="postgresql"> <select id="selectById" resultMap="MetaEntityResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.LOGICNAME, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID ) t1 where entityid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.LOGICNAME, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID ) t1 where entityid=#{id}]]>
...@@ -19,12 +19,15 @@ ...@@ -19,12 +19,15 @@
<id property="entityId" column="entityid" /><!--主键字段映射--> <id property="entityId" column="entityid" /><!--主键字段映射-->
<result property="systemId" column="systemid" /> <result property="systemId" column="systemid" />
<result property="dsId" column="dsid" /> <result property="dsId" column="dsid" />
<result property="moduleId" column="moduleid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 --> <!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="dataSource" javaType="cn.ibizlab.core.lite.domain.DstDataSource" column="dsid" select="cn.ibizlab.core.lite.mapper.DstDataSourceMapper.selectById" fetchType="lazy"></association> <association property="dataSource" javaType="cn.ibizlab.core.lite.domain.DstDataSource" column="dsid" select="cn.ibizlab.core.lite.mapper.DstDataSourceMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 --> <!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="system" javaType="cn.ibizlab.core.lite.domain.DstSystem" column="systemid" select="cn.ibizlab.core.lite.mapper.DstSystemMapper.selectById" fetchType="lazy"></association> <association property="system" javaType="cn.ibizlab.core.lite.domain.DstSystem" column="systemid" select="cn.ibizlab.core.lite.mapper.DstSystemMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="module" javaType="cn.ibizlab.core.lite.domain.MetaModule" column="moduleid" select="cn.ibizlab.core.lite.mapper.MetaModuleMapper.selectById" fetchType="lazy"></association>
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_META_ENTITY_DST_DATASOURCE_DSID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_META_ENTITY_DST_DATASOURCE_DSID] -->
...@@ -40,6 +43,13 @@ ...@@ -40,6 +43,13 @@
<include refid="Default" /> <include refid="Default" />
) t1 ) t1
where systemid=#{pssystemid} where systemid=#{pssystemid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_META_ENTITY_META_MODULE_MODULEID] -->
<select id="selectByModuleId" resultMap="MetaEntityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where moduleid=#{id}
</select> </select>
<!--数据集合[Default]--> <!--数据集合[Default]-->
...@@ -58,7 +68,7 @@ ...@@ -58,7 +68,7 @@
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="oracle"> <sql id="Default" databaseId="oracle">
<![CDATA[ SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.LOGICNAME, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID <![CDATA[ SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.LOGICNAME, t1.MODULEID, t31.MODULENAME, t1.SHOWORDER, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID LEFT JOIN IBZMODULE t31 ON t1.MODULEID = t31.MODULEID
]]> ]]>
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
...@@ -73,7 +83,7 @@ ...@@ -73,7 +83,7 @@
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="oracle"> <sql id="View" databaseId="oracle">
<![CDATA[ SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.LOGICNAME, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID <![CDATA[ SELECT t1.CODENAME, t1.DSID, t21.DSNAME, t1.ENTITYID, t1.ENTITYNAME, t1.EXTPARAMS, t1.LOGICNAME, t1.MODULEID, t31.MODULENAME, t1.SHOWORDER, t1.SYSTEMID, t11.PSSYSTEMNAME AS SYSTEMNAME, t1.TABLENAME FROM IBZENTITY t1 LEFT JOIN IBZPSSYSTEM t11 ON t1.SYSTEMID = t11.PSSYSTEMID LEFT JOIN IBZDATASOURCE t21 ON t1.DSID = t21.DSID LEFT JOIN IBZMODULE t31 ON t1.MODULEID = t31.MODULEID
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
......
<?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="cn.ibizlab.core.lite.mapper.MetaModuleMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="MetaModuleResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CODENAME`, t1.`MODULEID`, t1.`MODULENAME`, t1.`SYSTEMID` FROM `IBZMODULE` t1 ) t1 where moduleid=#{id}]]>
</select>
<select id="selectById" resultMap="MetaModuleResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.CODENAME, t1.MODULEID, t1.MODULENAME, t1.SHOWORDER, t1.SYSTEMID FROM IBZMODULE t1 ) t1 where moduleid=#{id}]]>
</select>
<select id="selectById" resultMap="MetaModuleResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CODENAME, t1.MODULEID, t1.MODULENAME, t1.SYSTEMID FROM IBZMODULE t1 ) t1 where moduleid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="MetaModuleResultMap" type="cn.ibizlab.core.lite.domain.MetaModule" autoMapping="true">
<id property="id" column="moduleid" /><!--主键字段映射-->
<result property="name" column="modulename" />
<result property="systemId" column="systemid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="system" javaType="cn.ibizlab.core.lite.domain.DstSystem" column="systemid" select="cn.ibizlab.core.lite.mapper.DstSystemMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_META_MODULE_DST_SYSTEM_SYSTEMID] -->
<select id="selectBySystemId" resultMap="MetaModuleResultMap">
select t1.* from (
<include refid="Default" />
) t1
where systemid=#{pssystemid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.lite.filter.MetaModuleSearchContext" resultMap="MetaModuleResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CODENAME`, t1.`MODULEID`, t1.`MODULENAME`, t1.`SYSTEMID` FROM `IBZMODULE` t1
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="oracle">
<![CDATA[ SELECT t1.CODENAME, t1.MODULEID, t1.MODULENAME, t1.SHOWORDER, t1.SYSTEMID FROM IBZMODULE t1
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CODENAME, t1.MODULEID, t1.MODULENAME, t1.SYSTEMID FROM IBZMODULE t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CODENAME`, t1.`MODULEID`, t1.`MODULENAME`, t1.`SYSTEMID` FROM `IBZMODULE` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="oracle">
<![CDATA[ SELECT t1.CODENAME, t1.MODULEID, t1.MODULENAME, t1.SHOWORDER, t1.SYSTEMID FROM IBZMODULE t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CODENAME, t1.MODULEID, t1.MODULENAME, t1.SYSTEMID FROM IBZMODULE t1
]]>
</sql>
</mapper>
...@@ -1129,7 +1129,7 @@ ...@@ -1129,7 +1129,7 @@
}, },
{ {
"fieldname":"SYSTEMID" , "fieldname":"SYSTEMID" ,
"codename":"PSSystemId", "codename":"SystemId",
"field_logic_name":"系统标识", "field_logic_name":"系统标识",
"entity_name":"DstMicroservice", "entity_name":"DstMicroservice",
"ref_de":"DST_SYSTEM", "ref_de":"DST_SYSTEM",
...@@ -1940,6 +1940,69 @@ ...@@ -1940,6 +1940,69 @@
"key_field":0, "key_field":0,
"show_order":9, "show_order":9,
"major_field":0 "major_field":0
},
{
"fieldname":"MODULEID" ,
"codename":"Module_id",
"field_logic_name":"模块标识",
"entity_name":"MetaEntity",
"ref_de":"META_MODULE",
"ref_field_name":"MODULEID",
"relation_name":"DER1N_META_ENTITY_META_MODULE_MODULEID",
"relation_codename":"Module",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":11,
"major_field":0
},
{
"fieldname":"MODULENAME" ,
"codename":"Module_name",
"field_logic_name":"模块",
"entity_name":"MetaEntity",
"ref_de":"META_MODULE",
"ref_field_name":"MODULENAME",
"relation_name":"DER1N_META_ENTITY_META_MODULE_MODULEID",
"relation_codename":"Module",
"field_type":"PICKUPTEXT",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":12,
"major_field":0
},
{
"fieldname":"EXTPARAMS" ,
"codename":"Ext_params",
"field_logic_name":"扩展参数",
"entity_name":"MetaEntity",
"field_type":"LONGTEXT",
"nullable":1,
"physical_field":1,
"data_type":"TEXT",
"data_length":1048576,
"key_field":0,
"show_order":20,
"major_field":0
},
{
"fieldname":"SHOWORDER" ,
"codename":"Show_order",
"field_logic_name":"排序",
"entity_name":"MetaEntity",
"field_type":"INT",
"nullable":1,
"physical_field":1,
"data_type":"INT",
"key_field":0,
"show_order":49,
"major_field":0
} }
], ],
"subEntitys":[ "subEntitys":[
...@@ -1992,6 +2055,12 @@ ...@@ -1992,6 +2055,12 @@
"code_name":"System", "code_name":"System",
"entity_name":"META_ENTITY", "entity_name":"META_ENTITY",
"ref_entity_name":"DST_SYSTEM" "ref_entity_name":"DST_SYSTEM"
},
{"name":"DER1N_META_ENTITY_META_MODULE_MODULEID",
"relation_type":"DER1N",
"code_name":"Module",
"entity_name":"META_ENTITY",
"ref_entity_name":"META_MODULE"
} }
] ]
} }
...@@ -2700,7 +2769,7 @@ ...@@ -2700,7 +2769,7 @@
}, },
{ {
"fieldname":"CODENAME" , "fieldname":"CODENAME" ,
"codename":"CodeName", "codename":"Code_name",
"field_logic_name":"代码名称", "field_logic_name":"代码名称",
"entity_name":"MetaModule", "entity_name":"MetaModule",
"field_type":"TEXT", "field_type":"TEXT",
...@@ -2715,7 +2784,7 @@ ...@@ -2715,7 +2784,7 @@
}, },
{ {
"fieldname":"SYSTEMID" , "fieldname":"SYSTEMID" ,
"codename":"SystemId", "codename":"System_id",
"field_logic_name":"系统标识", "field_logic_name":"系统标识",
"entity_name":"MetaModule", "entity_name":"MetaModule",
"ref_de":"DST_SYSTEM", "ref_de":"DST_SYSTEM",
...@@ -2731,9 +2800,28 @@ ...@@ -2731,9 +2800,28 @@
"union_key":"KEY1", "union_key":"KEY1",
"show_order":4, "show_order":4,
"major_field":0 "major_field":0
},
{
"fieldname":"SHOWORDER" ,
"codename":"Show_order",
"field_logic_name":"排序",
"entity_name":"MetaModule",
"field_type":"INT",
"nullable":1,
"physical_field":1,
"data_type":"INT",
"key_field":0,
"show_order":49,
"major_field":0
} }
], ],
"subEntitys":[ "subEntitys":[
{"name":"DER1N_META_ENTITY_META_MODULE_MODULEID",
"relation_type":"DER1N",
"code_name":"Module",
"entity_name":"META_ENTITY",
"ref_entity_name":"META_MODULE"
}
], ],
"parentEntitys":[ "parentEntitys":[
{"name":"DER1N_META_MODULE_DST_SYSTEM_SYSTEMID", {"name":"DER1N_META_MODULE_DST_SYSTEM_SYSTEMID",
......
...@@ -60,10 +60,10 @@ public class DstMicroserviceDTO extends DTOBase implements Serializable { ...@@ -60,10 +60,10 @@ public class DstMicroserviceDTO extends DTOBase implements Serializable {
* 属性 [SYSTEMID] * 属性 [SYSTEMID]
* *
*/ */
@JSONField(name = "pssystemid") @JSONField(name = "systemid")
@JsonProperty("pssystemid") @JsonProperty("systemid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String pssystemid; private String systemid;
/** /**
* 属性 [ADDR] * 属性 [ADDR]
...@@ -94,9 +94,9 @@ public class DstMicroserviceDTO extends DTOBase implements Serializable { ...@@ -94,9 +94,9 @@ public class DstMicroserviceDTO extends DTOBase implements Serializable {
/** /**
* 设置 [SYSTEMID] * 设置 [SYSTEMID]
*/ */
public void setPssystemid(String pssystemid){ public void setSystemid(String systemid){
this.pssystemid = pssystemid ; this.systemid = systemid ;
this.modify("systemid",pssystemid); this.modify("systemid",systemid);
} }
/** /**
......
...@@ -110,6 +110,41 @@ public class MetaEntityDTO extends DTOBase implements Serializable { ...@@ -110,6 +110,41 @@ public class MetaEntityDTO extends DTOBase implements Serializable {
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String dsName; private String dsName;
/**
* 属性 [MODULEID]
*
*/
@JSONField(name = "module_id")
@JsonProperty("module_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String moduleId;
/**
* 属性 [MODULENAME]
*
*/
@JSONField(name = "module_name")
@JsonProperty("module_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String moduleName;
/**
* 属性 [EXTPARAMS]
*
*/
@JSONField(name = "ext_params")
@JsonProperty("ext_params")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
private String extParams;
/**
* 属性 [SHOWORDER]
*
*/
@JSONField(name = "show_order")
@JsonProperty("show_order")
private Integer showOrder;
/** /**
* 设置 [ENTITYNAME] * 设置 [ENTITYNAME]
...@@ -159,6 +194,30 @@ public class MetaEntityDTO extends DTOBase implements Serializable { ...@@ -159,6 +194,30 @@ public class MetaEntityDTO extends DTOBase implements Serializable {
this.modify("dsid",dsId); this.modify("dsid",dsId);
} }
/**
* 设置 [MODULEID]
*/
public void setModuleId(String moduleId){
this.moduleId = moduleId ;
this.modify("moduleid",moduleId);
}
/**
* 设置 [EXTPARAMS]
*/
public void setExtParams(String extParams){
this.extParams = extParams ;
this.modify("extparams",extParams);
}
/**
* 设置 [SHOWORDER]
*/
public void setShowOrder(Integer showOrder){
this.showOrder = showOrder ;
this.modify("showorder",showOrder);
}
} }
......
...@@ -51,19 +51,27 @@ public class MetaModuleDTO extends DTOBase implements Serializable { ...@@ -51,19 +51,27 @@ public class MetaModuleDTO extends DTOBase implements Serializable {
* 属性 [CODENAME] * 属性 [CODENAME]
* *
*/ */
@JSONField(name = "codename") @JSONField(name = "code_name")
@JsonProperty("codename") @JsonProperty("code_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String codename; private String codeName;
/** /**
* 属性 [SYSTEMID] * 属性 [SYSTEMID]
* *
*/ */
@JSONField(name = "systemid") @JSONField(name = "system_id")
@JsonProperty("systemid") @JsonProperty("system_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String systemid; private String systemId;
/**
* 属性 [SHOWORDER]
*
*/
@JSONField(name = "show_order")
@JsonProperty("show_order")
private Integer showOrder;
/** /**
...@@ -77,17 +85,25 @@ public class MetaModuleDTO extends DTOBase implements Serializable { ...@@ -77,17 +85,25 @@ public class MetaModuleDTO extends DTOBase implements Serializable {
/** /**
* 设置 [CODENAME] * 设置 [CODENAME]
*/ */
public void setCodename(String codename){ public void setCodeName(String codeName){
this.codename = codename ; this.codeName = codeName ;
this.modify("codename",codename); this.modify("codename",codeName);
} }
/** /**
* 设置 [SYSTEMID] * 设置 [SYSTEMID]
*/ */
public void setSystemid(String systemid){ public void setSystemId(String systemId){
this.systemid = systemid ; this.systemId = systemId ;
this.modify("systemid",systemid); this.modify("systemid",systemId);
}
/**
* 设置 [SHOWORDER]
*/
public void setShowOrder(Integer showOrder){
this.showOrder = showOrder ;
this.modify("showorder",showOrder);
} }
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.avuedata.domain.BladeVisualCategory; import cn.ibizlab.core.avuedata.domain.BladeVisualCategory;
import cn.ibizlab.api.dto.BladeVisualCategoryDTO; import cn.ibizlab.api.dto.BladeVisualCategoryDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiBladeVisualCategoryMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiBladeVisualCategoryMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface BladeVisualCategoryMapping extends MappingBase<BladeVisualCategoryDTO, BladeVisualCategory> { public interface BladeVisualCategoryMapping extends MappingBase<BladeVisualCategoryDTO, BladeVisualCategory> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.avuedata.domain.BladeVisualConfig; import cn.ibizlab.core.avuedata.domain.BladeVisualConfig;
import cn.ibizlab.api.dto.BladeVisualConfigDTO; import cn.ibizlab.api.dto.BladeVisualConfigDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiBladeVisualConfigMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiBladeVisualConfigMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface BladeVisualConfigMapping extends MappingBase<BladeVisualConfigDTO, BladeVisualConfig> { public interface BladeVisualConfigMapping extends MappingBase<BladeVisualConfigDTO, BladeVisualConfig> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.avuedata.domain.BladeVisualMap; import cn.ibizlab.core.avuedata.domain.BladeVisualMap;
import cn.ibizlab.api.dto.BladeVisualMapDTO; import cn.ibizlab.api.dto.BladeVisualMapDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiBladeVisualMapMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiBladeVisualMapMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface BladeVisualMapMapping extends MappingBase<BladeVisualMapDTO, BladeVisualMap> { public interface BladeVisualMapMapping extends MappingBase<BladeVisualMapDTO, BladeVisualMap> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.avuedata.domain.BladeVisual; import cn.ibizlab.core.avuedata.domain.BladeVisual;
import cn.ibizlab.api.dto.BladeVisualDTO; import cn.ibizlab.api.dto.BladeVisualDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiBladeVisualMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiBladeVisualMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface BladeVisualMapping extends MappingBase<BladeVisualDTO, BladeVisual> { public interface BladeVisualMapping extends MappingBase<BladeVisualDTO, BladeVisual> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstAPI; import cn.ibizlab.core.lite.domain.DstAPI;
import cn.ibizlab.api.dto.DstAPIDTO; import cn.ibizlab.api.dto.DstAPIDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstAPIMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstAPIMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstAPIMapping extends MappingBase<DstAPIDTO, DstAPI> { public interface DstAPIMapping extends MappingBase<DstAPIDTO, DstAPI> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstApp; import cn.ibizlab.core.lite.domain.DstApp;
import cn.ibizlab.api.dto.DstAppDTO; import cn.ibizlab.api.dto.DstAppDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstAppMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstAppMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstAppMapping extends MappingBase<DstAppDTO, DstApp> { public interface DstAppMapping extends MappingBase<DstAppDTO, DstApp> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstComponent; import cn.ibizlab.core.lite.domain.DstComponent;
import cn.ibizlab.api.dto.DstComponentDTO; import cn.ibizlab.api.dto.DstComponentDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstComponentMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstComponentMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstComponentMapping extends MappingBase<DstComponentDTO, DstComponent> { public interface DstComponentMapping extends MappingBase<DstComponentDTO, DstComponent> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstConfig; import cn.ibizlab.core.lite.domain.DstConfig;
import cn.ibizlab.api.dto.DstConfigDTO; import cn.ibizlab.api.dto.DstConfigDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstConfigMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstConfigMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstConfigMapping extends MappingBase<DstConfigDTO, DstConfig> { public interface DstConfigMapping extends MappingBase<DstConfigDTO, DstConfig> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstDataSource; import cn.ibizlab.core.lite.domain.DstDataSource;
import cn.ibizlab.api.dto.DstDataSourceDTO; import cn.ibizlab.api.dto.DstDataSourceDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstDataSourceMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstDataSourceMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstDataSourceMapping extends MappingBase<DstDataSourceDTO, DstDataSource> { public interface DstDataSourceMapping extends MappingBase<DstDataSourceDTO, DstDataSource> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstMicroservice; import cn.ibizlab.core.lite.domain.DstMicroservice;
import cn.ibizlab.api.dto.DstMicroserviceDTO; import cn.ibizlab.api.dto.DstMicroserviceDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstMicroserviceMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstMicroserviceMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstMicroserviceMapping extends MappingBase<DstMicroserviceDTO, DstMicroservice> { public interface DstMicroserviceMapping extends MappingBase<DstMicroserviceDTO, DstMicroservice> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstRouter; import cn.ibizlab.core.lite.domain.DstRouter;
import cn.ibizlab.api.dto.DstRouterDTO; import cn.ibizlab.api.dto.DstRouterDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstRouterMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstRouterMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstRouterMapping extends MappingBase<DstRouterDTO, DstRouter> { public interface DstRouterMapping extends MappingBase<DstRouterDTO, DstRouter> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstSystem; import cn.ibizlab.core.lite.domain.DstSystem;
import cn.ibizlab.api.dto.DstSystemDTO; import cn.ibizlab.api.dto.DstSystemDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstSystemMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstSystemMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstSystemMapping extends MappingBase<DstSystemDTO, DstSystem> { public interface DstSystemMapping extends MappingBase<DstSystemDTO, DstSystem> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.DstView; import cn.ibizlab.core.lite.domain.DstView;
import cn.ibizlab.api.dto.DstViewDTO; import cn.ibizlab.api.dto.DstViewDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiDstViewMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiDstViewMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DstViewMapping extends MappingBase<DstViewDTO, DstView> { public interface DstViewMapping extends MappingBase<DstViewDTO, DstView> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.MetaDataSet; import cn.ibizlab.core.lite.domain.MetaDataSet;
import cn.ibizlab.api.dto.MetaDataSetDTO; import cn.ibizlab.api.dto.MetaDataSetDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiMetaDataSetMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiMetaDataSetMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MetaDataSetMapping extends MappingBase<MetaDataSetDTO, MetaDataSet> { public interface MetaDataSetMapping extends MappingBase<MetaDataSetDTO, MetaDataSet> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.MetaEntity; import cn.ibizlab.core.lite.domain.MetaEntity;
import cn.ibizlab.api.dto.MetaEntityDTO; import cn.ibizlab.api.dto.MetaEntityDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiMetaEntityMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiMetaEntityMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MetaEntityMapping extends MappingBase<MetaEntityDTO, MetaEntity> { public interface MetaEntityMapping extends MappingBase<MetaEntityDTO, MetaEntity> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.MetaField; import cn.ibizlab.core.lite.domain.MetaField;
import cn.ibizlab.api.dto.MetaFieldDTO; import cn.ibizlab.api.dto.MetaFieldDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiMetaFieldMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiMetaFieldMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MetaFieldMapping extends MappingBase<MetaFieldDTO, MetaField> { public interface MetaFieldMapping extends MappingBase<MetaFieldDTO, MetaField> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.MetaLookup; import cn.ibizlab.core.lite.domain.MetaLookup;
import cn.ibizlab.api.dto.MetaLookupDTO; import cn.ibizlab.api.dto.MetaLookupDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiMetaLookupMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiMetaLookupMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MetaLookupMapping extends MappingBase<MetaLookupDTO, MetaLookup> { public interface MetaLookupMapping extends MappingBase<MetaLookupDTO, MetaLookup> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.MetaModel; import cn.ibizlab.core.lite.domain.MetaModel;
import cn.ibizlab.api.dto.MetaModelDTO; import cn.ibizlab.api.dto.MetaModelDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiMetaModelMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiMetaModelMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MetaModelMapping extends MappingBase<MetaModelDTO, MetaModel> { public interface MetaModelMapping extends MappingBase<MetaModelDTO, MetaModel> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.MetaModule; import cn.ibizlab.core.lite.domain.MetaModule;
import cn.ibizlab.api.dto.MetaModuleDTO; import cn.ibizlab.api.dto.MetaModuleDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiMetaModuleMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiMetaModuleMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MetaModuleMapping extends MappingBase<MetaModuleDTO, MetaModule> { public interface MetaModuleMapping extends MappingBase<MetaModuleDTO, MetaModule> {
......
...@@ -4,11 +4,10 @@ import org.mapstruct.*; ...@@ -4,11 +4,10 @@ import org.mapstruct.*;
import cn.ibizlab.core.lite.domain.MetaRelationship; import cn.ibizlab.core.lite.domain.MetaRelationship;
import cn.ibizlab.api.dto.MetaRelationshipDTO; import cn.ibizlab.api.dto.MetaRelationshipDTO;
import cn.ibizlab.util.domain.MappingBase; import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="apiMetaRelationshipMapping", @Mapper(componentModel = "spring", uses = {}, implementationName = "apiMetaRelationshipMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MetaRelationshipMapping extends MappingBase<MetaRelationshipDTO, MetaRelationship> { public interface MetaRelationshipMapping extends MappingBase<MetaRelationshipDTO, MetaRelationship> {
......
...@@ -151,7 +151,7 @@ public class DstMicroserviceResource { ...@@ -151,7 +151,7 @@ public class DstMicroserviceResource {
@RequestMapping(method = RequestMethod.POST, value = "/dstsystems/{dstsystem_id}/dstmicroservices") @RequestMapping(method = RequestMethod.POST, value = "/dstsystems/{dstsystem_id}/dstmicroservices")
public ResponseEntity<DstMicroserviceDTO> createByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody DstMicroserviceDTO dstmicroservicedto) { public ResponseEntity<DstMicroserviceDTO> createByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody DstMicroserviceDTO dstmicroservicedto) {
DstMicroservice domain = dstmicroserviceMapping.toDomain(dstmicroservicedto); DstMicroservice domain = dstmicroserviceMapping.toDomain(dstmicroservicedto);
domain.setPssystemid(dstsystem_id); domain.setSystemid(dstsystem_id);
dstmicroserviceService.create(domain); dstmicroserviceService.create(domain);
DstMicroserviceDTO dto = dstmicroserviceMapping.toDto(domain); DstMicroserviceDTO dto = dstmicroserviceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
...@@ -162,7 +162,7 @@ public class DstMicroserviceResource { ...@@ -162,7 +162,7 @@ public class DstMicroserviceResource {
public ResponseEntity<Boolean> createBatchByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody List<DstMicroserviceDTO> dstmicroservicedtos) { public ResponseEntity<Boolean> createBatchByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody List<DstMicroserviceDTO> dstmicroservicedtos) {
List<DstMicroservice> domainlist=dstmicroserviceMapping.toDomain(dstmicroservicedtos); List<DstMicroservice> domainlist=dstmicroserviceMapping.toDomain(dstmicroservicedtos);
for(DstMicroservice domain:domainlist){ for(DstMicroservice domain:domainlist){
domain.setPssystemid(dstsystem_id); domain.setSystemid(dstsystem_id);
} }
dstmicroserviceService.createBatch(domainlist); dstmicroserviceService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
...@@ -172,7 +172,7 @@ public class DstMicroserviceResource { ...@@ -172,7 +172,7 @@ public class DstMicroserviceResource {
@RequestMapping(method = RequestMethod.PUT, value = "/dstsystems/{dstsystem_id}/dstmicroservices/{dstmicroservice_id}") @RequestMapping(method = RequestMethod.PUT, value = "/dstsystems/{dstsystem_id}/dstmicroservices/{dstmicroservice_id}")
public ResponseEntity<DstMicroserviceDTO> updateByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @PathVariable("dstmicroservice_id") String dstmicroservice_id, @RequestBody DstMicroserviceDTO dstmicroservicedto) { public ResponseEntity<DstMicroserviceDTO> updateByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @PathVariable("dstmicroservice_id") String dstmicroservice_id, @RequestBody DstMicroserviceDTO dstmicroservicedto) {
DstMicroservice domain = dstmicroserviceMapping.toDomain(dstmicroservicedto); DstMicroservice domain = dstmicroserviceMapping.toDomain(dstmicroservicedto);
domain.setPssystemid(dstsystem_id); domain.setSystemid(dstsystem_id);
domain.setId(dstmicroservice_id); domain.setId(dstmicroservice_id);
dstmicroserviceService.update(domain); dstmicroserviceService.update(domain);
DstMicroserviceDTO dto = dstmicroserviceMapping.toDto(domain); DstMicroserviceDTO dto = dstmicroserviceMapping.toDto(domain);
...@@ -184,7 +184,7 @@ public class DstMicroserviceResource { ...@@ -184,7 +184,7 @@ public class DstMicroserviceResource {
public ResponseEntity<Boolean> updateBatchByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody List<DstMicroserviceDTO> dstmicroservicedtos) { public ResponseEntity<Boolean> updateBatchByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody List<DstMicroserviceDTO> dstmicroservicedtos) {
List<DstMicroservice> domainlist=dstmicroserviceMapping.toDomain(dstmicroservicedtos); List<DstMicroservice> domainlist=dstmicroserviceMapping.toDomain(dstmicroservicedtos);
for(DstMicroservice domain:domainlist){ for(DstMicroservice domain:domainlist){
domain.setPssystemid(dstsystem_id); domain.setSystemid(dstsystem_id);
} }
dstmicroserviceService.updateBatch(domainlist); dstmicroserviceService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
...@@ -215,7 +215,7 @@ public class DstMicroserviceResource { ...@@ -215,7 +215,7 @@ public class DstMicroserviceResource {
@RequestMapping(method = RequestMethod.GET, value = "/dstsystems/{dstsystem_id}/dstmicroservices/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/dstsystems/{dstsystem_id}/dstmicroservices/getdraft")
public ResponseEntity<DstMicroserviceDTO> getDraftByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id) { public ResponseEntity<DstMicroserviceDTO> getDraftByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id) {
DstMicroservice domain = new DstMicroservice(); DstMicroservice domain = new DstMicroservice();
domain.setPssystemid(dstsystem_id); domain.setSystemid(dstsystem_id);
return ResponseEntity.status(HttpStatus.OK).body(dstmicroserviceMapping.toDto(dstmicroserviceService.getDraft(domain))); return ResponseEntity.status(HttpStatus.OK).body(dstmicroserviceMapping.toDto(dstmicroserviceService.getDraft(domain)));
} }
...@@ -229,7 +229,7 @@ public class DstMicroserviceResource { ...@@ -229,7 +229,7 @@ public class DstMicroserviceResource {
@RequestMapping(method = RequestMethod.POST, value = "/dstsystems/{dstsystem_id}/dstmicroservices/save") @RequestMapping(method = RequestMethod.POST, value = "/dstsystems/{dstsystem_id}/dstmicroservices/save")
public ResponseEntity<Boolean> saveByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody DstMicroserviceDTO dstmicroservicedto) { public ResponseEntity<Boolean> saveByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody DstMicroserviceDTO dstmicroservicedto) {
DstMicroservice domain = dstmicroserviceMapping.toDomain(dstmicroservicedto); DstMicroservice domain = dstmicroserviceMapping.toDomain(dstmicroservicedto);
domain.setPssystemid(dstsystem_id); domain.setSystemid(dstsystem_id);
return ResponseEntity.status(HttpStatus.OK).body(dstmicroserviceService.save(domain)); return ResponseEntity.status(HttpStatus.OK).body(dstmicroserviceService.save(domain));
} }
...@@ -238,7 +238,7 @@ public class DstMicroserviceResource { ...@@ -238,7 +238,7 @@ public class DstMicroserviceResource {
public ResponseEntity<Boolean> saveBatchByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody List<DstMicroserviceDTO> dstmicroservicedtos) { public ResponseEntity<Boolean> saveBatchByDstSystem(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody List<DstMicroserviceDTO> dstmicroservicedtos) {
List<DstMicroservice> domainlist=dstmicroserviceMapping.toDomain(dstmicroservicedtos); List<DstMicroservice> domainlist=dstmicroserviceMapping.toDomain(dstmicroservicedtos);
for(DstMicroservice domain:domainlist){ for(DstMicroservice domain:domainlist){
domain.setPssystemid(dstsystem_id); domain.setSystemid(dstsystem_id);
} }
dstmicroserviceService.saveBatch(domainlist); dstmicroserviceService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
......
...@@ -47,6 +47,7 @@ public class MetaModuleResource { ...@@ -47,6 +47,7 @@ public class MetaModuleResource {
@Lazy @Lazy
public MetaModuleMapping metamoduleMapping; public MetaModuleMapping metamoduleMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Create-all')")
@ApiOperation(value = "新建模块", tags = {"模块" }, notes = "新建模块") @ApiOperation(value = "新建模块", tags = {"模块" }, notes = "新建模块")
@RequestMapping(method = RequestMethod.POST, value = "/metamodules") @RequestMapping(method = RequestMethod.POST, value = "/metamodules")
public ResponseEntity<MetaModuleDTO> create(@Validated @RequestBody MetaModuleDTO metamoduledto) { public ResponseEntity<MetaModuleDTO> create(@Validated @RequestBody MetaModuleDTO metamoduledto) {
...@@ -56,6 +57,7 @@ public class MetaModuleResource { ...@@ -56,6 +57,7 @@ public class MetaModuleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Create-all')")
@ApiOperation(value = "批量新建模块", tags = {"模块" }, notes = "批量新建模块") @ApiOperation(value = "批量新建模块", tags = {"模块" }, notes = "批量新建模块")
@RequestMapping(method = RequestMethod.POST, value = "/metamodules/batch") @RequestMapping(method = RequestMethod.POST, value = "/metamodules/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<MetaModuleDTO> metamoduledtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<MetaModuleDTO> metamoduledtos) {
...@@ -63,6 +65,7 @@ public class MetaModuleResource { ...@@ -63,6 +65,7 @@ public class MetaModuleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Update-all')")
@ApiOperation(value = "更新模块", tags = {"模块" }, notes = "更新模块") @ApiOperation(value = "更新模块", tags = {"模块" }, notes = "更新模块")
@RequestMapping(method = RequestMethod.PUT, value = "/metamodules/{metamodule_id}") @RequestMapping(method = RequestMethod.PUT, value = "/metamodules/{metamodule_id}")
public ResponseEntity<MetaModuleDTO> update(@PathVariable("metamodule_id") String metamodule_id, @RequestBody MetaModuleDTO metamoduledto) { public ResponseEntity<MetaModuleDTO> update(@PathVariable("metamodule_id") String metamodule_id, @RequestBody MetaModuleDTO metamoduledto) {
...@@ -73,6 +76,7 @@ public class MetaModuleResource { ...@@ -73,6 +76,7 @@ public class MetaModuleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Update-all')")
@ApiOperation(value = "批量更新模块", tags = {"模块" }, notes = "批量更新模块") @ApiOperation(value = "批量更新模块", tags = {"模块" }, notes = "批量更新模块")
@RequestMapping(method = RequestMethod.PUT, value = "/metamodules/batch") @RequestMapping(method = RequestMethod.PUT, value = "/metamodules/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<MetaModuleDTO> metamoduledtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<MetaModuleDTO> metamoduledtos) {
...@@ -80,12 +84,14 @@ public class MetaModuleResource { ...@@ -80,12 +84,14 @@ public class MetaModuleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Remove-all')")
@ApiOperation(value = "删除模块", tags = {"模块" }, notes = "删除模块") @ApiOperation(value = "删除模块", tags = {"模块" }, notes = "删除模块")
@RequestMapping(method = RequestMethod.DELETE, value = "/metamodules/{metamodule_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/metamodules/{metamodule_id}")
public ResponseEntity<Boolean> remove(@PathVariable("metamodule_id") String metamodule_id) { public ResponseEntity<Boolean> remove(@PathVariable("metamodule_id") String metamodule_id) {
return ResponseEntity.status(HttpStatus.OK).body(metamoduleService.remove(metamodule_id)); return ResponseEntity.status(HttpStatus.OK).body(metamoduleService.remove(metamodule_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Remove-all')")
@ApiOperation(value = "批量删除模块", tags = {"模块" }, notes = "批量删除模块") @ApiOperation(value = "批量删除模块", tags = {"模块" }, notes = "批量删除模块")
@RequestMapping(method = RequestMethod.DELETE, value = "/metamodules/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/metamodules/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -93,6 +99,7 @@ public class MetaModuleResource { ...@@ -93,6 +99,7 @@ public class MetaModuleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Get-all')")
@ApiOperation(value = "获取模块", tags = {"模块" }, notes = "获取模块") @ApiOperation(value = "获取模块", tags = {"模块" }, notes = "获取模块")
@RequestMapping(method = RequestMethod.GET, value = "/metamodules/{metamodule_id}") @RequestMapping(method = RequestMethod.GET, value = "/metamodules/{metamodule_id}")
public ResponseEntity<MetaModuleDTO> get(@PathVariable("metamodule_id") String metamodule_id) { public ResponseEntity<MetaModuleDTO> get(@PathVariable("metamodule_id") String metamodule_id) {
...@@ -113,12 +120,14 @@ public class MetaModuleResource { ...@@ -113,12 +120,14 @@ public class MetaModuleResource {
return ResponseEntity.status(HttpStatus.OK).body(metamoduleService.checkKey(metamoduleMapping.toDomain(metamoduledto))); return ResponseEntity.status(HttpStatus.OK).body(metamoduleService.checkKey(metamoduleMapping.toDomain(metamoduledto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Save-all')")
@ApiOperation(value = "保存模块", tags = {"模块" }, notes = "保存模块") @ApiOperation(value = "保存模块", tags = {"模块" }, notes = "保存模块")
@RequestMapping(method = RequestMethod.POST, value = "/metamodules/save") @RequestMapping(method = RequestMethod.POST, value = "/metamodules/save")
public ResponseEntity<Boolean> save(@RequestBody MetaModuleDTO metamoduledto) { public ResponseEntity<Boolean> save(@RequestBody MetaModuleDTO metamoduledto) {
return ResponseEntity.status(HttpStatus.OK).body(metamoduleService.save(metamoduleMapping.toDomain(metamoduledto))); return ResponseEntity.status(HttpStatus.OK).body(metamoduleService.save(metamoduleMapping.toDomain(metamoduledto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-Save-all')")
@ApiOperation(value = "批量保存模块", tags = {"模块" }, notes = "批量保存模块") @ApiOperation(value = "批量保存模块", tags = {"模块" }, notes = "批量保存模块")
@RequestMapping(method = RequestMethod.POST, value = "/metamodules/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/metamodules/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<MetaModuleDTO> metamoduledtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<MetaModuleDTO> metamoduledtos) {
...@@ -126,6 +135,7 @@ public class MetaModuleResource { ...@@ -126,6 +135,7 @@ public class MetaModuleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-searchDefault-all')")
@ApiOperation(value = "获取数据集", tags = {"模块" } ,notes = "获取数据集") @ApiOperation(value = "获取数据集", tags = {"模块" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/metamodules/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/metamodules/fetchdefault")
public ResponseEntity<List<MetaModuleDTO>> fetchDefault(MetaModuleSearchContext context) { public ResponseEntity<List<MetaModuleDTO>> fetchDefault(MetaModuleSearchContext context) {
...@@ -138,6 +148,7 @@ public class MetaModuleResource { ...@@ -138,6 +148,7 @@ public class MetaModuleResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaModule-searchDefault-all')")
@ApiOperation(value = "查询数据集", tags = {"模块" } ,notes = "查询数据集") @ApiOperation(value = "查询数据集", tags = {"模块" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/metamodules/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/metamodules/searchdefault")
public ResponseEntity<Page<MetaModuleDTO>> searchDefault(@RequestBody MetaModuleSearchContext context) { public ResponseEntity<Page<MetaModuleDTO>> searchDefault(@RequestBody MetaModuleSearchContext context) {
......
...@@ -43,32 +43,31 @@ public class AuditAspect ...@@ -43,32 +43,31 @@ public class AuditAspect
*/ */
@AfterReturning(value = "execution(* cn.ibizlab.core.*.service.*.create(..))") @AfterReturning(value = "execution(* cn.ibizlab.core.*.service.*.create(..))")
@SneakyThrows @SneakyThrows
public void create(JoinPoint point){ public void create(JoinPoint point) {
HttpServletRequest request=null; HttpServletRequest request = null;
RequestAttributes requestAttributes= RequestContextHolder.getRequestAttributes(); RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
if(requestAttributes!=null){ if(requestAttributes!=null) {
request=((ServletRequestAttributes)requestAttributes).getRequest(); request = ((ServletRequestAttributes)requestAttributes).getRequest();
} }
Object [] args = point.getArgs(); Object [] args = point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0) { if(ObjectUtils.isEmpty(args) || args.length==0) {
return; return;
} }
Object serviceParam =args[0]; Object serviceParam = args[0];
if(serviceParam instanceof EntityBase){ if(serviceParam instanceof EntityBase) {
EntityBase entity=(EntityBase)serviceParam; EntityBase entity = (EntityBase)serviceParam;
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass()); Map<String, Audit> auditFields = DEFieldCacheMap.getAuditFields(entity.getClass());
//是否有审计属性 //是否有审计属性
if(auditFields.size()==0) { if(auditFields.size()==0) {
return; return;
} }
String idField = DEFieldCacheMap.getDEKeyField(entity.getClass());
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass()); Object idValue = "";
Object idValue=""; if(!StringUtils.isEmpty(idField)) {
if(!StringUtils.isEmpty(idField)){
idValue=entity.get(idField); idValue=entity.get(idField);
} }
//记录审计日志 //记录审计日志
dataAuditService.createAudit(request,entity,idValue,auditFields); dataAuditService.createAudit(request, entity, idValue, auditFields);
} }
} }
...@@ -79,42 +78,38 @@ public class AuditAspect ...@@ -79,42 +78,38 @@ public class AuditAspect
*/ */
@Around("execution(* cn.ibizlab.core.*.service.*.update(..))") @Around("execution(* cn.ibizlab.core.*.service.*.update(..))")
public Object update(ProceedingJoinPoint point) throws Throwable { public Object update(ProceedingJoinPoint point) throws Throwable {
HttpServletRequest request=null; HttpServletRequest request = null;
RequestAttributes requestAttributes= RequestContextHolder.getRequestAttributes(); RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
if(requestAttributes!=null){ if(requestAttributes!=null) {
request=((ServletRequestAttributes)requestAttributes).getRequest(); request=((ServletRequestAttributes)requestAttributes).getRequest();
} }
Object serviceObj=point.getTarget(); Object serviceObj = point.getTarget();
Object args[]=point.getArgs(); Object args[] = point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0) { if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed(); return point.proceed();
} }
Object arg = args[0];
Object arg=args[0]; if(arg instanceof EntityBase) {
if(arg instanceof EntityBase){ EntityBase entity = (EntityBase) arg;
EntityBase entity= (EntityBase) arg; Map<String, Audit> auditFields = DEFieldCacheMap.getAuditFields(entity.getClass());
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass());
//是否有审计属性 //是否有审计属性
if(auditFields.size()==0) { if(auditFields.size()==0) {
return point.proceed(); return point.proceed();
} }
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass()); String idField = DEFieldCacheMap.getDEKeyField(entity.getClass());
Object idValue=""; Object idValue = "";
if(!StringUtils.isEmpty(idField)){ if(!StringUtils.isEmpty(idField)){
idValue=entity.get(idField); idValue = entity.get(idField);
} }
if(ObjectUtils.isEmpty(idValue)) { if(ObjectUtils.isEmpty(idValue)) {
return point.proceed(); return point.proceed();
} }
//获取更新前实体 //获取更新前实体
EntityBase beforeEntity=getEntity(serviceObj,idValue); EntityBase beforeEntity = getEntity(serviceObj, idValue);
//执行更新操作 //执行更新操作
point.proceed(); point.proceed();
//记录审计日志 //记录审计日志
dataAuditService.updateAudit(request,beforeEntity,serviceObj,idValue,auditFields); dataAuditService.updateAudit(request, beforeEntity, serviceObj, idValue, auditFields);
return true; return true;
} }
return point.proceed(); return point.proceed();
...@@ -129,29 +124,27 @@ public class AuditAspect ...@@ -129,29 +124,27 @@ public class AuditAspect
*/ */
@Around("execution(* cn.ibizlab.core.*.service.*.remove(..))") @Around("execution(* cn.ibizlab.core.*.service.*.remove(..))")
public Object remove(ProceedingJoinPoint point) throws Throwable { public Object remove(ProceedingJoinPoint point) throws Throwable {
HttpServletRequest request=null; HttpServletRequest request = null;
RequestAttributes requestAttributes= RequestContextHolder.getRequestAttributes(); RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
if(requestAttributes!=null){ if(requestAttributes!= null) {
request=((ServletRequestAttributes)requestAttributes).getRequest(); request = ((ServletRequestAttributes)requestAttributes).getRequest();
} }
Object serviceObj=point.getTarget(); Object serviceObj = point.getTarget();
Object args[]=point.getArgs(); Object args[] = point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0) { if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed(); return point.proceed();
} }
Object idValue = args[0];
Object idValue=args[0]; EntityBase entity = getEntity(serviceObj, idValue);
EntityBase entity=getEntity(serviceObj,idValue); Map<String, Audit> auditFields = DEFieldCacheMap.getAuditFields(entity.getClass());
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass()); if(auditFields.size()==0) {
if(auditFields.size()==0){
return point.proceed(); return point.proceed();
} }
else{ else{
//执行删除操作 //执行删除操作
point.proceed(); point.proceed();
//记录审计日志 //记录审计日志
dataAuditService.removeAudit(request,entity,idValue,auditFields); dataAuditService.removeAudit(request, entity, idValue, auditFields);
return true; return true;
} }
} }
...@@ -163,12 +156,12 @@ public class AuditAspect ...@@ -163,12 +156,12 @@ public class AuditAspect
* @return * @return
*/ */
@SneakyThrows @SneakyThrows
private EntityBase getEntity(Object service, Object id){ private EntityBase getEntity(Object service, Object id) {
EntityBase entity=null; EntityBase entity = null;
if(!ObjectUtils.isEmpty(service)){ if(!ObjectUtils.isEmpty(service)) {
EvaluationContext oldContext = new StandardEvaluationContext(); EvaluationContext oldContext = new StandardEvaluationContext();
oldContext.setVariable("service",service); oldContext.setVariable("service", service);
oldContext.setVariable("id",id); oldContext.setVariable("id", id);
Expression oldExp = parser.parseExpression("#service.get(#id)"); Expression oldExp = parser.parseExpression("#service.get(#id)");
return oldExp.getValue(oldContext, EntityBase.class); return oldExp.getValue(oldContext, EntityBase.class);
} }
......
...@@ -79,31 +79,31 @@ public class DEFieldDefaultValueAspect ...@@ -79,31 +79,31 @@ public class DEFieldDefaultValueAspect
Object[] args = joinPoint.getArgs(); Object[] args = joinPoint.getArgs();
if (args.length > 0) { if (args.length > 0) {
Object obj = args[0]; Object obj = args[0];
String actionName=joinPoint.getSignature().getName(); String actionName = joinPoint.getSignature().getName();
if(obj instanceof EntityBase) { if(obj instanceof EntityBase) {
Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(obj.getClass()); Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(obj.getClass());
AuthenticationUser curUser = AuthenticationUser.getAuthenticationUser(); AuthenticationUser curUser = AuthenticationUser.getAuthenticationUser();
String keyField=DEFieldCacheMap.getDEKeyField(obj.getClass()); String keyField = DEFieldCacheMap.getDEKeyField(obj.getClass());
if(StringUtils.isEmpty(keyField)) { if(StringUtils.isEmpty(keyField)) {
return true; return true;
} }
fillDEField((EntityBase)obj, deFields,actionName,curUser,keyField); fillDEField((EntityBase)obj, deFields, actionName, curUser, keyField);
} }
else if (obj instanceof List) { else if (obj instanceof List) {
Map<String, DEField> deFields = null; Map<String, DEField> deFields = null;
AuthenticationUser curUser = null; AuthenticationUser curUser = null;
String keyField = ""; String keyField = "";
for(Object item:(List)obj) { for(Object item : (List)obj) {
if(item instanceof EntityBase) { if(item instanceof EntityBase) {
if(deFields==null) { if(deFields == null) {
deFields = DEFieldCacheMap.getDEFields(item.getClass()); deFields = DEFieldCacheMap.getDEFields(item.getClass());
curUser = AuthenticationUser.getAuthenticationUser(); curUser = AuthenticationUser.getAuthenticationUser();
keyField=DEFieldCacheMap.getDEKeyField(item.getClass()); keyField = DEFieldCacheMap.getDEKeyField(item.getClass());
if(StringUtils.isEmpty(keyField)) { if(StringUtils.isEmpty(keyField)) {
return true; return true;
} }
} }
fillDEField((EntityBase)item, deFields,actionName,curUser,keyField); fillDEField((EntityBase)item, deFields, actionName, curUser, keyField);
} }
} }
} }
...@@ -117,7 +117,7 @@ public class DEFieldDefaultValueAspect ...@@ -117,7 +117,7 @@ public class DEFieldDefaultValueAspect
* 填充系统预置属性 * 填充系统预置属性
* @param et 当前实体对象 * @param et 当前实体对象
*/ */
private void fillDEField(EntityBase et, Map<String, DEField> deFields, String actionName,AuthenticationUser curUser,String keyField) throws Exception { private void fillDEField(EntityBase et, Map<String, DEField> deFields, String actionName, AuthenticationUser curUser, String keyField) throws Exception {
if(deFields.size()==0) { if(deFields.size()==0) {
return; return;
} }
...@@ -138,12 +138,12 @@ public class DEFieldDefaultValueAspect ...@@ -138,12 +138,12 @@ public class DEFieldDefaultValueAspect
DEPredefinedFieldType predefinedFieldType = fieldAnnotation.preType(); DEPredefinedFieldType predefinedFieldType = fieldAnnotation.preType();
//填充系统默认值 //填充系统默认值
if(actionName.toLowerCase().startsWith("create") && ( deFieldType!= DEFieldDefaultValueType.NONE || (!StringUtils.isEmpty(deFieldDefaultValue)) )){ if(actionName.toLowerCase().startsWith("create") && (deFieldType!= DEFieldDefaultValueType.NONE || (!StringUtils.isEmpty(deFieldDefaultValue)))) {
fillFieldDefaultValue(fieldname, deFieldType, deFieldDefaultValue, et , curUser) ; fillFieldDefaultValue(fieldname, deFieldType, deFieldDefaultValue, et , curUser) ;
} }
//填充系统预置属性 //填充系统预置属性
if(predefinedFieldType != DEPredefinedFieldType.NONE){ if(predefinedFieldType != DEPredefinedFieldType.NONE) {
fillPreFieldValue( fieldname, predefinedFieldType , et ,actionName ,fieldAnnotation.logicval(),curUser); fillPreFieldValue(fieldname, predefinedFieldType , et ,actionName ,fieldAnnotation.logicval(),curUser);
} }
} }
} }
...@@ -156,17 +156,17 @@ public class DEFieldDefaultValueAspect ...@@ -156,17 +156,17 @@ public class DEFieldDefaultValueAspect
* @param et 当前实体对象 * @param et 当前实体对象
* @throws Exception * @throws Exception
*/ */
private void fillFieldDefaultValue(String fieldname , DEFieldDefaultValueType deFieldType,String deFieldDefaultValue,EntityBase et ,AuthenticationUser curUser) throws Exception { private void fillFieldDefaultValue(String fieldname, DEFieldDefaultValueType deFieldType, String deFieldDefaultValue, EntityBase et , AuthenticationUser curUser) throws Exception {
Object fieldValue = et.get(fieldname); Object fieldValue = et.get(fieldname);
if(org.springframework.util.ObjectUtils.isEmpty(fieldValue)){ if(org.springframework.util.ObjectUtils.isEmpty(fieldValue)) {
//填充直接值及其余默认值类型 //填充直接值及其余默认值类型
if( (deFieldType== DEFieldDefaultValueType.NONE && !StringUtils.isEmpty(deFieldDefaultValue)) || (deFieldType != DEFieldDefaultValueType.NONE) ){ if( (deFieldType== DEFieldDefaultValueType.NONE && !StringUtils.isEmpty(deFieldDefaultValue)) || (deFieldType != DEFieldDefaultValueType.NONE)) {
switch(deFieldType){ switch(deFieldType) {
case SESSION: case SESSION:
if(!StringUtils.isEmpty(deFieldDefaultValue)){ if(!StringUtils.isEmpty(deFieldDefaultValue)) {
Object sessionFieldValue = curUser.getSessionParams().get(deFieldDefaultValue.toLowerCase()); Object sessionFieldValue = curUser.getSessionParams().get(deFieldDefaultValue.toLowerCase());
if(!ObjectUtils.isEmpty(sessionFieldValue)){ if(!ObjectUtils.isEmpty(sessionFieldValue)) {
et.set(fieldname,sessionFieldValue); et.set(fieldname, sessionFieldValue);
} }
} }
break; break;
...@@ -174,91 +174,95 @@ public class DEFieldDefaultValueAspect ...@@ -174,91 +174,95 @@ public class DEFieldDefaultValueAspect
//暂未实现 //暂未实现
break; break;
case UNIQUEID: case UNIQUEID:
et.set(fieldname,(new AlternativeJdkIdGenerator()).generateId().toString().replace("-", "")); et.set(fieldname, (new AlternativeJdkIdGenerator()).generateId().toString().replace("-", ""));
break; break;
case CONTEXT: case CONTEXT:
if(!StringUtils.isEmpty(deFieldDefaultValue)){ if(!StringUtils.isEmpty(deFieldDefaultValue)) {
Object paramFieldValue=et.get(deFieldDefaultValue); Object paramFieldValue=et.get(deFieldDefaultValue);
if(!ObjectUtils.isEmpty(paramFieldValue)){ if(!ObjectUtils.isEmpty(paramFieldValue)) {
et.set(fieldname,paramFieldValue); et.set(fieldname, paramFieldValue);
} }
} }
break; break;
case PARAM: case PARAM:
if(!StringUtils.isEmpty(deFieldDefaultValue)){ if(!StringUtils.isEmpty(deFieldDefaultValue)) {
Object paramFieldValue=et.get(deFieldDefaultValue); Object paramFieldValue=et.get(deFieldDefaultValue);
if(!ObjectUtils.isEmpty(paramFieldValue)){ if(!ObjectUtils.isEmpty(paramFieldValue)) {
et.set(fieldname,paramFieldValue); et.set(fieldname, paramFieldValue);
} }
} }
break; break;
case OPERATOR: case OPERATOR:
et.set(fieldname,curUser.getUserid()); et.set(fieldname, curUser.getUserid());
break; break;
case OPERATORNAME: case OPERATORNAME:
et.set(fieldname,curUser.getPersonname()); et.set(fieldname, curUser.getPersonname());
break; break;
case CURTIME: case CURTIME:
et.set(fieldname,new Timestamp(new Date().getTime())); et.set(fieldname, new Timestamp(new Date().getTime()));
break; break;
case APPDATA: case APPDATA:
//暂未实现 //暂未实现
break; break;
case NONE: case NONE:
et.set(fieldname,deFieldDefaultValue); et.set(fieldname, deFieldDefaultValue);
break; break;
} }
} }
} }
} }
private void fillPreFieldValue(String fieldname , DEPredefinedFieldType preFieldType ,EntityBase et , String actionName,String logicValue ,AuthenticationUser curUser) throws Exception { private void fillPreFieldValue(String fieldname, DEPredefinedFieldType preFieldType, EntityBase et, String actionName, String logicValue, AuthenticationUser curUser) throws Exception {
Object fieldValue = et.get(fieldname); Object fieldValue = et.get(fieldname);
//为预置属性进行赋值 //为预置属性进行赋值
if( actionName.toLowerCase().startsWith("create") || if(actionName.toLowerCase().startsWith("create") ||
preFieldType== DEPredefinedFieldType.UPDATEDATE|| preFieldType== DEPredefinedFieldType.UPDATEMAN|| preFieldType== DEPredefinedFieldType.UPDATEDATE|| preFieldType== DEPredefinedFieldType.UPDATEMAN||
preFieldType== DEPredefinedFieldType.UPDATEMANNAME){ preFieldType== DEPredefinedFieldType.UPDATEMANNAME) {
switch(preFieldType){//根据注解给预置属性填充值 switch(preFieldType) {
case CREATEMAN: case CREATEMAN:
et.set(fieldname,curUser.getUserid()); et.set(fieldname, curUser.getUserid());
break; break;
case CREATEMANNAME: case CREATEMANNAME:
et.set(fieldname,curUser.getPersonname()); et.set(fieldname, curUser.getPersonname());
break; break;
case UPDATEMAN: case UPDATEMAN:
et.set(fieldname,curUser.getUserid()); et.set(fieldname, curUser.getUserid());
break; break;
case UPDATEMANNAME: case UPDATEMANNAME:
et.set(fieldname,curUser.getPersonname()); et.set(fieldname, curUser.getPersonname());
break; break;
case CREATEDATE: case CREATEDATE:
et.set(fieldname,new Timestamp(new Date().getTime())); et.set(fieldname, new Timestamp(new Date().getTime()));
break; break;
case UPDATEDATE: case UPDATEDATE:
et.set(fieldname,new Timestamp(new Date().getTime())); et.set(fieldname, new Timestamp(new Date().getTime()));
break; break;
case ORGID: case ORGID:
if(org.springframework.util.StringUtils.isEmpty(fieldValue)) if(org.springframework.util.StringUtils.isEmpty(fieldValue)) {
et.set(fieldname,curUser.getOrgid()); et.set(fieldname, curUser.getOrgid());
}
break; break;
case ORGNAME: case ORGNAME:
if(org.springframework.util.StringUtils.isEmpty(fieldValue)) if(org.springframework.util.StringUtils.isEmpty(fieldValue)) {
et.set(fieldname,curUser.getOrgname()); et.set(fieldname, curUser.getOrgname());
}
break; break;
case ORGSECTORID: case ORGSECTORID:
if(org.springframework.util.StringUtils.isEmpty(fieldValue)) if(org.springframework.util.StringUtils.isEmpty(fieldValue)) {
et.set(fieldname,curUser.getMdeptid()); et.set(fieldname, curUser.getMdeptid());
}
break; break;
case ORGSECTORNAME: case ORGSECTORNAME:
if(org.springframework.util.StringUtils.isEmpty(fieldValue)) if(org.springframework.util.StringUtils.isEmpty(fieldValue)) {
et.set(fieldname,curUser.getMdeptname()); et.set(fieldname, curUser.getMdeptname());
}
break; break;
case LOGICVALID: case LOGICVALID:
if(StringUtils.isEmpty(logicValue)){ if(StringUtils.isEmpty(logicValue)) {
logicValue="1"; logicValue="1";
} }
et.set(fieldname,logicValue); et.set(fieldname, logicValue);
break; break;
} }
} }
......
...@@ -32,61 +32,61 @@ import java.util.Map; ...@@ -32,61 +32,61 @@ import java.util.Map;
public class VersionCheckAspect public class VersionCheckAspect
{ {
private final ExpressionParser parser = new SpelExpressionParser(); private final ExpressionParser parser = new SpelExpressionParser();
private final String IgnoreField="ignoreversioncheck"; private final String IgnoreField = "ignoreversioncheck";
@SneakyThrows @SneakyThrows
@Before("execution(* cn.ibizlab.*.rest.*.update(..)) && @annotation(versionCheck)") @Before("execution(* cn.ibizlab.*.rest.*.update(..)) && @annotation(versionCheck)")
public void BeforeUpdate(JoinPoint point, VersionCheck versionCheck){ public void BeforeUpdate(JoinPoint point, VersionCheck versionCheck) {
Object[] args = point.getArgs(); Object[] args = point.getArgs();
Object id=args[0]; Object id = args[0];
Object dto=args[1]; Object dto = args[1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) { if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return; return;
} }
String versionField=versionCheck.versionfield(); String versionField = versionCheck.versionfield();
if(StringUtils.isEmpty(versionField)) { if(StringUtils.isEmpty(versionField)) {
return; return;
} }
versionCheck(versionCheck,point.getTarget(),dto,id); versionCheck(versionCheck,point.getTarget(), dto, id);
} }
@SneakyThrows @SneakyThrows
@Before("execution(* cn.ibizlab.*.rest.*.updateBy*(..)) && @annotation(versionCheck)") @Before("execution(* cn.ibizlab.*.rest.*.updateBy*(..)) && @annotation(versionCheck)")
public void BeforeUpdateBy(JoinPoint point, VersionCheck versionCheck){ public void BeforeUpdateBy(JoinPoint point, VersionCheck versionCheck) {
Object[] args = point.getArgs(); Object[] args = point.getArgs();
if(args.length>=2){ if(args.length>=2) {
Object id=args[args.length-2]; Object id = args[args.length-2];
Object dto=args[args.length-1]; Object dto = args[args.length-1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) { if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return; return;
} }
String versionField=versionCheck.versionfield(); String versionField = versionCheck.versionfield();
if(StringUtils.isEmpty(versionField)) { if(StringUtils.isEmpty(versionField)) {
return; return;
} }
versionCheck(versionCheck,point.getTarget(),dto,id); versionCheck(versionCheck, point.getTarget(), dto, id);
} }
} }
private void versionCheck(VersionCheck versionCheck,Object resource,Object dto,Object id ){ private void versionCheck(VersionCheck versionCheck, Object resource, Object dto, Object id) {
EvaluationContext context = new StandardEvaluationContext(); EvaluationContext context = new StandardEvaluationContext();
context.setVariable("dto",dto); context.setVariable("dto", dto);
//忽略版本检查 //忽略版本检查
Expression dtoParamsExp = parser.parseExpression("#dto.extensionparams"); Expression dtoParamsExp = parser.parseExpression("#dto.extensionparams");
Map dtoParam=dtoParamsExp.getValue(context, Map.class); Map dtoParam = dtoParamsExp.getValue(context, Map.class);
if(!ObjectUtils.isEmpty(dtoParam) && !ObjectUtils.isEmpty(dtoParam.get(IgnoreField)) && dtoParam.get(IgnoreField).equals(1)) { if(!ObjectUtils.isEmpty(dtoParam) && !ObjectUtils.isEmpty(dtoParam.get(IgnoreField)) && dtoParam.get(IgnoreField).equals(1)) {
return; return;
} }
Expression newExp = parser.parseExpression(String.format("#dto.%s",versionCheck.versionfield())); Expression newExp = parser.parseExpression(String.format("#dto.%s", versionCheck.versionfield()));
Object newVersion=newExp.getValue(context); Object newVersion = newExp.getValue(context);
if(ObjectUtils.isEmpty(newVersion)) { if(ObjectUtils.isEmpty(newVersion)) {
return; return;
} }
//进行版本检查 //进行版本检查
Object oldVersion =getDBVersion(versionCheck,getService(resource,versionCheck.entity()),id); Object oldVersion = getDBVersion(versionCheck,getService(resource, versionCheck.entity()), id);
if(!ObjectUtils.isEmpty(oldVersion)){ if(!ObjectUtils.isEmpty(oldVersion)) {
if(RuleUtils.gt(newVersion,oldVersion)) { if(RuleUtils.gt(newVersion, oldVersion)) {
throw new BadRequestAlertException("数据已变更,可能后台数据已被修改,请重新加载数据","VersionCheckAspect","versionCheck"); throw new BadRequestAlertException("数据已变更,可能后台数据已被修改,请重新加载数据", "VersionCheckAspect", "versionCheck");
} }
} }
} }
...@@ -98,12 +98,12 @@ public class VersionCheckAspect ...@@ -98,12 +98,12 @@ public class VersionCheckAspect
* @return * @return
*/ */
@SneakyThrows @SneakyThrows
private Object getService(Object resource,String entity){ private Object getService(Object resource, String entity) {
Object service = null; Object service = null;
Field[] fields= resource.getClass().getDeclaredFields(); Field[] fields = resource.getClass().getDeclaredFields();
for(Field field : fields){ for(Field field : fields) {
if(field.getModifiers()==1 && field.getName().equalsIgnoreCase(String.format("%sService",entity))){ if(field.getModifiers()==1 && field.getName().equalsIgnoreCase(String.format("%sService",entity))) {
service=field.get(resource); service = field.get(resource);
break; break;
} }
} }
...@@ -118,21 +118,21 @@ public class VersionCheckAspect ...@@ -118,21 +118,21 @@ public class VersionCheckAspect
* @return * @return
*/ */
@SneakyThrows @SneakyThrows
private Object getDBVersion(VersionCheck versionCheck,Object service,Object id){ private Object getDBVersion(VersionCheck versionCheck, Object service, Object id) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Timestamp dbVersion=null; Timestamp dbVersion = null;
String versionField=versionCheck.versionfield(); String versionField = versionCheck.versionfield();
if(!ObjectUtils.isEmpty(service)){ if(!ObjectUtils.isEmpty(service)) {
EvaluationContext oldContext = new StandardEvaluationContext(); EvaluationContext oldContext = new StandardEvaluationContext();
oldContext.setVariable("service",service); oldContext.setVariable("service", service);
oldContext.setVariable("id",id); oldContext.setVariable("id", id);
Expression oldExp = parser.parseExpression("#service.get(#id)"); Expression oldExp = parser.parseExpression("#service.get(#id)");
EntityBase oldEntity =oldExp.getValue(oldContext, EntityBase.class); EntityBase oldEntity = oldExp.getValue(oldContext, EntityBase.class);
Object oldDate=oldEntity.get(versionField); Object oldDate = oldEntity.get(versionField);
if(oldDate!=null && oldDate instanceof Timestamp){ if(oldDate!=null && oldDate instanceof Timestamp) {
Timestamp db_time= (Timestamp) oldDate; Timestamp db_time = (Timestamp) oldDate;
Date db_date = sdf.parse(sdf.format(db_time)); Date db_date = sdf.parse(sdf.format(db_time));
dbVersion=new Timestamp(db_date.getTime()); dbVersion = new Timestamp(db_date.getTime());
} }
} }
return dbVersion; return dbVersion;
......
...@@ -46,14 +46,14 @@ public class PermissionSyncJob implements ApplicationRunner { ...@@ -46,14 +46,14 @@ public class PermissionSyncJob implements ApplicationRunner {
public void run(ApplicationArguments args) { public void run(ApplicationArguments args) {
try { try {
Thread.sleep(10000); Thread.sleep(10000);
InputStream permission= this.getClass().getResourceAsStream("/permission/systemResource.json"); //获取当前系统所有实体资源能力 InputStream permission = this.getClass().getResourceAsStream("/permission/systemResource.json"); //获取当前系统所有实体资源能力
String permissionResult = IOUtils.toString(permission,"UTF-8"); String permissionResult = IOUtils.toString(permission,"UTF-8");
JSONObject system= new JSONObject(); JSONObject system= new JSONObject();
system.put("pssystemid",systemId); system.put("pssystemid",systemId);
system.put("pssystemname",systemName); system.put("pssystemname",systemName);
system.put("sysstructure",JSONObject.parseObject(permissionResult)); system.put("sysstructure",JSONObject.parseObject(permissionResult));
system.put("md5check",DigestUtils.md5DigestAsHex(permissionResult.getBytes())); system.put("md5check",DigestUtils.md5DigestAsHex(permissionResult.getBytes()));
if(client.syncSysAuthority(system)){ if(client.syncSysAuthority(system)) {
log.info("向[UAA]同步系统资源成功"); log.info("向[UAA]同步系统资源成功");
}else{ }else{
log.error("向[UAA]同步系统资源失败"); log.error("向[UAA]同步系统资源失败");
...@@ -64,9 +64,9 @@ public class PermissionSyncJob implements ApplicationRunner { ...@@ -64,9 +64,9 @@ public class PermissionSyncJob implements ApplicationRunner {
} }
try { try {
InputStream sysModel= this.getClass().getResourceAsStream("/sysmodel/ibzlite.json"); //获取当前系统所有实体资源能力 InputStream sysModel = this.getClass().getResourceAsStream("/sysmodel/ibzlite.json"); //获取当前系统所有实体资源能力
String strSysModel = IOUtils.toString(sysModel,"UTF-8"); String strSysModel = IOUtils.toString(sysModel,"UTF-8");
if(liteFeignClient.syncSysModel(JSONObject.parseObject(strSysModel))){ if(liteFeignClient.syncSysModel(JSONObject.parseObject(strSysModel))) {
log.info("向[lite]同步系统模型成功"); log.info("向[lite]同步系统模型成功");
}else{ }else{
log.error("向[lite]同步系统模型失败"); log.error("向[lite]同步系统模型失败");
......
...@@ -42,13 +42,13 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -42,13 +42,13 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
*/ */
@Scheduled(fixedRate = 10000) @Scheduled(fixedRate = 10000)
public void saveAudit() { public void saveAudit() {
if(cacheMap.size()>0){ if(cacheMap.size()>0) {
log.info(String.format("正在保存审计数据,当前审计集合数量为[%s]",cacheMap.size())); log.info(String.format("正在保存审计数据,当前审计集合数量为[%s]",cacheMap.size()));
List temp=new ArrayList(); List temp=new ArrayList();
if(cacheMap.size()<500){ if(cacheMap.size()<500) {
temp.addAll(cacheMap); temp.addAll(cacheMap);
} }
else{ else {
temp.addAll(cacheMap.subList(0,500)); temp.addAll(cacheMap.subList(0,500));
} }
this.saveBatch(temp); this.saveBatch(temp);
...@@ -66,17 +66,17 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -66,17 +66,17 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
*/ */
@Override @Override
public void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields) { public void createAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields) {
IBZDataAudit dataAudit =new IBZDataAudit(); IBZDataAudit dataAudit = new IBZDataAudit();
dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid()); dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid());
dataAudit.setOppersonname(String.format("%s[%s]",AuthenticationUser.getAuthenticationUser().getPersonname(),AuthenticationUser.getAuthenticationUser().getOrgname())); dataAudit.setOppersonname(String.format("%s[%s]",AuthenticationUser.getAuthenticationUser().getPersonname(),AuthenticationUser.getAuthenticationUser().getOrgname()));
dataAudit.setAudittype("CREATE"); dataAudit.setAudittype("CREATE");
dataAudit.setAuditobject(entity.getClass().getSimpleName()); dataAudit.setAuditobject(entity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue); dataAudit.setAuditobjectdata(idValue);
dataAudit.setOptime(new Timestamp(new Date().getTime())); dataAudit.setOptime(new Timestamp(new Date().getTime()));
if(request!=null){ if(request != null) {
dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser())); dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser()));
} }
dataAudit.setAuditinfo(getAuditInfo(entity,auditFields)); dataAudit.setAuditinfo(getAuditInfo(entity, auditFields));
dataAudit.setIsdatachanged(1); dataAudit.setIsdatachanged(1);
cacheMap.add(dataAudit); cacheMap.add(dataAudit);
} }
...@@ -90,24 +90,24 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -90,24 +90,24 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @param auditFields * @param auditFields
*/ */
@SneakyThrows @SneakyThrows
public void updateAudit(HttpServletRequest request, EntityBase beforeEntity, Object serviceObj, Object idValue, Map<String, Audit> auditFields){ public void updateAudit(HttpServletRequest request, EntityBase beforeEntity, Object serviceObj, Object idValue, Map<String, Audit> auditFields) {
//获取更新后的实体 //获取更新后的实体
EntityBase afterEntity=getEntity(serviceObj,idValue); EntityBase afterEntity = getEntity(serviceObj, idValue);
//获取更新后的审计内容 //获取更新后的审计内容
String auditInfo=getUpdateAuditInfo(beforeEntity,afterEntity,auditFields);//比较更新前后差异内容 String auditInfo = getUpdateAuditInfo(beforeEntity, afterEntity, auditFields);//比较更新前后差异内容
int isDataChanged=1; int isDataChanged = 1;
//审计内容是否发生变化 //审计内容是否发生变化
if(StringUtils.isEmpty(auditInfo)){ if(StringUtils.isEmpty(auditInfo)) {
isDataChanged=0; isDataChanged = 0;
} }
IBZDataAudit dataAudit =new IBZDataAudit(); IBZDataAudit dataAudit = new IBZDataAudit();
dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid()); dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid());
dataAudit.setOppersonname(String.format("%s[%s]",AuthenticationUser.getAuthenticationUser().getPersonname(),AuthenticationUser.getAuthenticationUser().getOrgname())); dataAudit.setOppersonname(String.format("%s[%s]", AuthenticationUser.getAuthenticationUser().getPersonname(), AuthenticationUser.getAuthenticationUser().getOrgname()));
dataAudit.setAudittype("UPDATE"); dataAudit.setAudittype("UPDATE");
dataAudit.setAuditobject(afterEntity.getClass().getSimpleName()); dataAudit.setAuditobject(afterEntity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue); dataAudit.setAuditobjectdata(idValue);
dataAudit.setOptime(new Timestamp(new Date().getTime())); dataAudit.setOptime(new Timestamp(new Date().getTime()));
if(request!=null){ if(request!=null) {
dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser())); dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser()));
} }
dataAudit.setAuditinfo(auditInfo); dataAudit.setAuditinfo(auditInfo);
...@@ -122,55 +122,55 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -122,55 +122,55 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @param idValue * @param idValue
* @param auditFields * @param auditFields
*/ */
public void removeAudit(HttpServletRequest request,EntityBase entity,Object idValue,Map<String, Audit> auditFields){ public void removeAudit(HttpServletRequest request, EntityBase entity, Object idValue, Map<String, Audit> auditFields) {
IBZDataAudit dataAudit =new IBZDataAudit(); IBZDataAudit dataAudit = new IBZDataAudit();
dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid()); dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid());
dataAudit.setOppersonname(String.format("%s[%s]",AuthenticationUser.getAuthenticationUser().getPersonname(),AuthenticationUser.getAuthenticationUser().getOrgname())); dataAudit.setOppersonname(String.format("%s[%s]", AuthenticationUser.getAuthenticationUser().getPersonname(), AuthenticationUser.getAuthenticationUser().getOrgname()));
dataAudit.setAudittype("REMOVE"); dataAudit.setAudittype("REMOVE");
dataAudit.setAuditobject(entity.getClass().getSimpleName()); dataAudit.setAuditobject(entity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue); dataAudit.setAuditobjectdata(idValue);
dataAudit.setOptime(new Timestamp(new Date().getTime())); dataAudit.setOptime(new Timestamp(new Date().getTime()));
if(request!=null){ if(request!=null) {
dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser())); dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser()));
} }
dataAudit.setAuditinfo(getAuditInfo(entity,auditFields)); dataAudit.setAuditinfo(getAuditInfo(entity, auditFields));
dataAudit.setIsdatachanged(1); dataAudit.setIsdatachanged(1);
cacheMap.add(dataAudit); cacheMap.add(dataAudit);
} }
private String getAuditInfo(EntityBase entity, Map<String, Audit> auditFields){ private String getAuditInfo(EntityBase entity, Map<String, Audit> auditFields) {
String auditResult=""; String auditResult = "";
if(auditFields.size()==0){ if(auditFields.size() == 0) {
return auditResult; return auditResult;
} }
Map<String, DEField> deFields= DEFieldCacheMap.getDEFields(entity.getClass()); Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(entity.getClass());
if(deFields.size()==0){ if(deFields.size() == 0) {
return auditResult; return auditResult;
} }
JSONArray auditFieldArray=new JSONArray(); JSONArray auditFieldArray = new JSONArray();
for (Map.Entry<String, Audit> auditField : auditFields.entrySet()) { for (Map.Entry<String, Audit> auditField : auditFields.entrySet()) {
Object objFieldName=auditField.getKey(); Object objFieldName = auditField.getKey();
String fieldName=String.valueOf(objFieldName); String fieldName = String.valueOf(objFieldName);
DEField deField=null; DEField deField = null;
if(deFields.containsKey(fieldName)){ if(deFields.containsKey(fieldName)) {
deField= deFields.get(fieldName); deField = deFields.get(fieldName);
} }
if(ObjectUtils.isEmpty(deField)){ if(ObjectUtils.isEmpty(deField)) {
continue; continue;
} }
Object value=dataTransfer(entity.get(fieldName),deField.fieldType(),deField.format()); Object value = dataTransfer(entity.get(fieldName), deField.fieldType(), deField.format());
if(!StringUtils.isEmpty(value)){ if(!StringUtils.isEmpty(value)) {
JSONObject auditFieldObj=new JSONObject(); JSONObject auditFieldObj = new JSONObject();
auditFieldObj.put("field",deField.value()); auditFieldObj.put("field", deField.value());
auditFieldObj.put("value",value); auditFieldObj.put("value", value);
if(!StringUtils.isEmpty(deField.dict())){ if(!StringUtils.isEmpty(deField.dict())) {
auditFieldObj.put("dict",deField.dict()); auditFieldObj.put("dict", deField.dict());
} }
auditFieldArray.add(auditFieldObj); auditFieldArray.add(auditFieldObj);
} }
} }
if(auditFieldArray.size()>0){ if(auditFieldArray.size()>0) {
auditResult=auditFieldArray.toString(); auditResult = auditFieldArray.toString();
} }
return auditResult; return auditResult;
} }
...@@ -183,44 +183,44 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -183,44 +183,44 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @return * @return
*/ */
private String getUpdateAuditInfo(EntityBase oldData, EntityBase newData, Map<String, Audit> auditFields){ private String getUpdateAuditInfo(EntityBase oldData, EntityBase newData, Map<String, Audit> auditFields){
String auditResult=""; String auditResult = "";
JSONArray auditFieldArray=new JSONArray(); JSONArray auditFieldArray = new JSONArray();
if(auditFields.size()==0){ if(auditFields.size() == 0) {
return auditResult; return auditResult;
} }
Map<String, DEField> deFields= DEFieldCacheMap.getDEFields(oldData.getClass()); Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(oldData.getClass());
if(deFields.size()==0){ if(deFields.size() == 0){
return auditResult; return auditResult;
} }
for (Map.Entry<String, Audit> auditField : auditFields.entrySet()) { for (Map.Entry<String, Audit> auditField : auditFields.entrySet()) {
Object objFieldName=auditField.getKey();//获取注解字段 Object objFieldName = auditField.getKey();//获取注解字段
String fieldName=String.valueOf(objFieldName); //属性名称 String fieldName = String.valueOf(objFieldName); //属性名称
DEField deField=null; DEField deField = null;
if(deFields.containsKey(fieldName)){ if(deFields.containsKey(fieldName)) {
deField= deFields.get(fieldName); deField = deFields.get(fieldName);
} }
if(ObjectUtils.isEmpty(deField)){ if(ObjectUtils.isEmpty(deField)) {
continue; continue;
} }
Object oldValue=oldData.get(fieldName);//老属性值 Object oldValue = oldData.get(fieldName);//老属性值
Object newValue=newData.get(fieldName);//新属性值 Object newValue = newData.get(fieldName);//新属性值
if(!compare(oldValue,newValue)){ if(!compare(oldValue, newValue)) {
oldValue=dataTransfer(oldValue,deField.fieldType(),deField.format());//属性值转换 oldValue = dataTransfer(oldValue, deField.fieldType(), deField.format());//属性值转换
newValue=dataTransfer(newValue,deField.fieldType(),deField.format());//属性值转换 newValue = dataTransfer(newValue, deField.fieldType(), deField.format());//属性值转换
JSONObject auditFieldObj=new JSONObject(); JSONObject auditFieldObj = new JSONObject();
auditFieldObj.put("field",deField.value()); auditFieldObj.put("field", deField.value());
auditFieldObj.put("beforevalue",oldValue); auditFieldObj.put("beforevalue", oldValue);
auditFieldObj.put("value",newValue); auditFieldObj.put("value", newValue);
if(!StringUtils.isEmpty(deField.dict())){ if(!StringUtils.isEmpty(deField.dict())) {
auditFieldObj.put("dict",deField.dict()); auditFieldObj.put("dict", deField.dict());
} }
auditFieldArray.add(auditFieldObj); auditFieldArray.add(auditFieldObj);
} }
} }
if(auditFieldArray.size()>0){ if(auditFieldArray.size()>0) {
auditResult=auditFieldArray.toString(); auditResult = auditFieldArray.toString();
} }
return auditResult; return auditResult;
} }
...@@ -232,16 +232,16 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -232,16 +232,16 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @param strFormat 转换字段格式化文本 * @param strFormat 转换字段格式化文本
* @return * @return
*/ */
private String dataTransfer(Object value,String dataType, String strFormat){ private String dataTransfer(Object value, String dataType, String strFormat) {
if(value==null){ if(value==null) {
return ""; return "";
} }
String transResult=value.toString(); String transResult=value.toString();
if((dataType.equals("DATE") || dataType.equals("DATETIME") || dataType.equals("TIME")) && (!StringUtils.isEmpty(strFormat))){ //时间类型转换 if((dataType.equals("DATE") || dataType.equals("DATETIME") || dataType.equals("TIME")) && (!StringUtils.isEmpty(strFormat))) { //时间类型转换
Timestamp timestamp =(Timestamp)value; Timestamp timestamp = (Timestamp)value;
Date date =timestamp; Date date = timestamp;
SimpleDateFormat format =new SimpleDateFormat(strFormat); SimpleDateFormat format = new SimpleDateFormat(strFormat);
transResult=format.format(date); transResult = format.format(date);
} }
return transResult; return transResult;
} }
...@@ -252,11 +252,11 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -252,11 +252,11 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @param targetObj 比较目标对象 * @param targetObj 比较目标对象
* @return * @return
*/ */
private boolean compare(Object sourceObj,Object targetObj){ private boolean compare(Object sourceObj, Object targetObj) {
if(sourceObj==null && targetObj==null){ if(sourceObj == null && targetObj == null) {
return true; return true;
} }
if(sourceObj==null && targetObj!=null){ if(sourceObj == null && targetObj != null) {
return false; return false;
} }
return sourceObj.equals(targetObj); return sourceObj.equals(targetObj);
...@@ -269,9 +269,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -269,9 +269,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @return * @return
*/ */
@SneakyThrows @SneakyThrows
private EntityBase getEntity(Object service, Object id){ private EntityBase getEntity(Object service, Object id) {
EntityBase entity=null; EntityBase entity = null;
if(!ObjectUtils.isEmpty(service)){ if(!ObjectUtils.isEmpty(service)) {
EvaluationContext oldContext = new StandardEvaluationContext(); EvaluationContext oldContext = new StandardEvaluationContext();
oldContext.setVariable("service",service); oldContext.setVariable("service",service);
oldContext.setVariable("id",id); oldContext.setVariable("id",id);
...@@ -288,15 +288,15 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -288,15 +288,15 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
*/ */
public String getIpAddress(HttpServletRequest request, AuthenticationUser authenticationUser) { public String getIpAddress(HttpServletRequest request, AuthenticationUser authenticationUser) {
//客户端有提交ip,以提交的ip为准 //客户端有提交ip,以提交的ip为准
if(authenticationUser != null && !StringUtils.isEmpty(authenticationUser.getAddr())){ if(authenticationUser != null && !StringUtils.isEmpty(authenticationUser.getAddr())) {
return authenticationUser.getAddr(); return authenticationUser.getAddr();
} }
if(request == null){ if(request == null) {
return ""; return "";
} }
String Xip = request.getHeader("X-Real-IP"); String Xip = request.getHeader("X-Real-IP");
String XFor = request.getHeader("X-Forwarded-For"); String XFor = request.getHeader("X-Forwarded-For");
if(!StringUtils.isEmpty(XFor) && !"unKnown".equalsIgnoreCase(XFor)){ if(!StringUtils.isEmpty(XFor) && !"unKnown".equalsIgnoreCase(XFor)) {
//多次反向代理后会有多个ip值,第一个ip才是真实ip //多次反向代理后会有多个ip值,第一个ip才是真实ip
int index = XFor.indexOf(","); int index = XFor.indexOf(",");
if(index != -1){ if(index != -1){
...@@ -306,7 +306,7 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA ...@@ -306,7 +306,7 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
} }
} }
XFor = Xip; XFor = Xip;
if(!StringUtils.isEmpty(XFor) && !"unKnown".equalsIgnoreCase(XFor)){ if(!StringUtils.isEmpty(XFor) && !"unKnown".equalsIgnoreCase(XFor)) {
return XFor; return XFor;
} }
if (StringUtils.isEmpty(XFor) || "unknown".equalsIgnoreCase(XFor)) { if (StringUtils.isEmpty(XFor) || "unknown".equalsIgnoreCase(XFor)) {
......
...@@ -23,21 +23,21 @@ public class SimpleFileService implements FileService { ...@@ -23,21 +23,21 @@ public class SimpleFileService implements FileService {
@Override @Override
public FileItem saveFile(MultipartFile multipartFile) { public FileItem saveFile(MultipartFile multipartFile) {
FileItem item=null; FileItem item = null;
// 获取文件名 // 获取文件名
String fileName = multipartFile.getOriginalFilename(); String fileName = multipartFile.getOriginalFilename();
// 获取文件后缀 // 获取文件后缀
String extname="."+getExtensionName(fileName); String extname ="."+getExtensionName(fileName);
try { try {
String fileid= DigestUtils.md5DigestAsHex(multipartFile.getInputStream()); String fileid = DigestUtils.md5DigestAsHex(multipartFile.getInputStream());
String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName; String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName;
File file = new File(fileFullPath); File file = new File(fileFullPath);
File parent = new File(file.getParent()); File parent = new File(file.getParent());
if(!parent.exists()){ if(!parent.exists()) {
parent.mkdirs(); parent.mkdirs();
} }
FileCopyUtils.copy(multipartFile.getInputStream(),Files.newOutputStream(file.toPath())); FileCopyUtils.copy(multipartFile.getInputStream(), Files.newOutputStream(file.toPath()));
item=new FileItem(fileid,fileName,fileid,fileName,(int)multipartFile.getSize(),extname); item = new FileItem(fileid, fileName, fileid, fileName, (int)multipartFile.getSize(), extname);
} catch (IOException e) { } catch (IOException e) {
throw new InternalServerErrorException("文件上传失败,"+e); throw new InternalServerErrorException("文件上传失败,"+e);
} }
......
...@@ -19,19 +19,19 @@ import org.springframework.security.core.authority.AuthorityUtils; ...@@ -19,19 +19,19 @@ import org.springframework.security.core.authority.AuthorityUtils;
@Primary @Primary
@Service("SimpleUserService") @Service("SimpleUserService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('SimpleUserService')") @ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('SimpleUserService')")
public class SimpleUserService implements AuthenticationUserService{ public class SimpleUserService implements AuthenticationUserService {
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user = new AuthenticationUser(); AuthenticationUser user = new AuthenticationUser();
String[] data=username.split("[|]"); String[] data = username.split("[|]");
String loginname=username; String loginname = username;
String domains=""; String domains = "";
String password=""; String password = "";
if(data.length==2) { if(data.length==2) {
loginname=data[0].trim(); loginname = data[0].trim();
domains=data[1].trim(); domains = data[1].trim();
} }
user.setUserid(username); user.setUserid(username);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册