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

ibiz4j 发布系统代码

上级 afee9e56
...@@ -3,8 +3,8 @@ export default { ...@@ -3,8 +3,8 @@ export default {
fields: { fields: {
id: "模块标识", id: "模块标识",
name: "模块名称", name: "模块名称",
code_name: "代码名称", codename: "代码名称",
system_id: "系统标识", systemid: "系统标识",
}, },
views: { views: {
pickupgridview: { pickupgridview: {
......
...@@ -2,8 +2,8 @@ export default { ...@@ -2,8 +2,8 @@ export default {
fields: { fields: {
id: "模块标识", id: "模块标识",
name: "模块名称", name: "模块名称",
code_name: "代码名称", codename: "代码名称",
system_id: "系统标识", systemid: "系统标识",
}, },
views: { views: {
pickupgridview: { pickupgridview: {
......
...@@ -28,7 +28,7 @@ export default class MainModel { ...@@ -28,7 +28,7 @@ export default class MainModel {
return [ return [
{ {
name: 'systemid', name: 'systemid',
prop: 'system_id', prop: 'systemid',
dataType: 'PICKUP', dataType: 'PICKUP',
}, },
{ {
......
...@@ -22,10 +22,10 @@ export default class PickupViewpickupviewpanelModel { ...@@ -22,10 +22,10 @@ export default class PickupViewpickupviewpanelModel {
name: 'name', name: 'name',
}, },
{ {
name: 'code_name', name: 'codename',
}, },
{ {
name: 'system_id', name: 'systemid',
}, },
] ]
} }
......
...@@ -24,117 +24,56 @@ import org.springframework.data.annotation.Transient; ...@@ -24,117 +24,56 @@ 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
@JsonIgnoreProperties(value = "handler") @AllArgsConstructor
@TableName(value = "IBZMODULE",resultMap = "MetaModuleResultMap") public class MetaModule extends EntityBase implements Serializable {
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;
/** /**
* 代码名称 * 代码名称
*/ */
@TableField(value = "codename") @JSONField(name = "codeName")
@JSONField(name = "code_name") @JsonProperty("codeName")
@JsonProperty("code_name") private String codename;
private String codeName;
/** /**
* 系统标识 * 系统标识
*/ */
@TableField(value = "systemid") @JSONField(name = "systemId")
@JSONField(name = "system_id") @JsonProperty("systemId")
@JsonProperty("system_id") private String systemid;
private String systemId;
/** /**
* *
*/ */
@JsonIgnore @JSONField(name = "system")
@JSONField(serialize = false) @JsonProperty("system")
@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 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);
}
} }
...@@ -17,51 +17,20 @@ import org.springframework.util.ObjectUtils; ...@@ -17,51 +17,20 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.lite.domain.MetaModule;
/** /**
* 关系型数据实体[MetaModule] 查询条件对象 * ServiceApi数据实体[MetaModule] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class MetaModuleSearchContext extends QueryWrapperContext<MetaModule> { public class MetaModuleSearchContext extends SearchContextBase {
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);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("modulename", query)
);
}
}
} }
...@@ -19,12 +19,10 @@ import cn.ibizlab.core.lite.domain.MetaModule; ...@@ -19,12 +19,10 @@ 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 extends IService<MetaModule>{ public interface IMetaModuleService{
boolean create(MetaModule et) ; boolean create(MetaModule et) ;
void createBatch(List<MetaModule> list) ; void createBatch(List<MetaModule> list) ;
...@@ -38,23 +36,10 @@ public interface IMetaModuleService extends IService<MetaModule>{ ...@@ -38,23 +36,10 @@ public interface IMetaModuleService extends IService<MetaModule>{
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);
} }
...@@ -63,9 +63,6 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -63,9 +63,6 @@ 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;
......
...@@ -33,80 +33,44 @@ import cn.ibizlab.util.helper.CachedBeanCopier; ...@@ -33,80 +33,44 @@ 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("MetaModuleServiceImpl") @Service
public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaModule> implements IMetaModuleService { public class MetaModuleServiceImpl implements IMetaModuleService {
@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;
} }
@Override public void createBatch(List<MetaModule> list){
@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;
} }
@Override public void updateBatch(List<MetaModule> list){
@Transactional
public void updateBatch(List<MetaModule> list) {
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); return true;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
@Transactional
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
} }
@Override @Override
@Transactional
public MetaModule get(String key) { public MetaModule get(String key) {
MetaModule et = getById(key); MetaModule et = new MetaModule();
if(et==null){
et=new MetaModule();
et.setId(key); et.setId(key);
}
else{
}
return et; return et;
} }
...@@ -117,49 +81,36 @@ public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaMod ...@@ -117,49 +81,36 @@ public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaMod
@Override @Override
public boolean checkKey(MetaModule et) { public boolean checkKey(MetaModule et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(MetaModule et) {
if(!saveOrUpdate(et))
return false; return false;
return true;
} }
@Override @Override
@Transactional @Transactional
public boolean saveOrUpdate(MetaModule et) { public boolean save(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; return true;
} }
@Override @Override
@Transactional
public void saveBatch(List<MetaModule> list) { public void saveBatch(List<MetaModule> list) {
saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
public List<MetaModule> selectBySystemId(String pssystemid) { public List<MetaModule> selectBySystemid(String pssystemid) {
return baseMapper.selectBySystemId(pssystemid); return null;
} }
@Override @Override
public void removeBySystemId(String pssystemid) { public void removeBySystemid(String pssystemid) {
this.remove(new QueryWrapper<MetaModule>().eq("systemid",pssystemid)); Set<String> delIds=new HashSet<String>();
for(MetaModule before:selectBySystemid(pssystemid)){
delIds.add(before.getId());
} }
if(delIds.size()>0)
this.removeBatch(delIds);
}
/** /**
...@@ -167,43 +118,10 @@ public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaMod ...@@ -167,43 +118,10 @@ public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaMod
*/ */
@Override @Override
public Page<MetaModule> searchDefault(MetaModuleSearchContext context) { public Page<MetaModule> searchDefault(MetaModuleSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<MetaModule> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); return new PageImpl<MetaModule>(new ArrayList(),context.getPageable(),0);
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;
}
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!--输出实体[DST_COMPONENT]数据结构 --> <!--输出实体[DST_COMPONENT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_component-55-1"> <changeSet author="a_A_5d9d78509" id="tab-dst_component-56-1">
<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"/>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<!--输出实体[DST_SYSTEM]数据结构 --> <!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_system-36-5"> <changeSet author="a_A_5d9d78509" id="tab-dst_system-37-5">
<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"/>
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<!--输出实体[DST_VIEW]数据结构 --> <!--输出实体[DST_VIEW]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_view-41-6"> <changeSet author="a_A_5d9d78509" id="tab-dst_view-42-6">
<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"/>
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<!--输出实体[META_ENTITY]数据结构 --> <!--输出实体[META_ENTITY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_entity-77-8"> <changeSet author="a_A_5d9d78509" id="tab-meta_entity-79-8">
<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,24 +255,10 @@ ...@@ -255,24 +255,10 @@
</changeSet> </changeSet>
<!--输出实体[META_MODULE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_module-13-11">
<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>
</createTable>
</changeSet>
<!--输出实体[META_RELATION]数据结构 --> <!--输出实体[META_RELATION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_relation-86-12"> <changeSet author="a_A_5d9d78509" id="tab-meta_relation-86-11">
<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"/>
...@@ -299,25 +285,15 @@ ...@@ -299,25 +285,15 @@
</changeSet> </changeSet>
<!--输出实体[DST_COMPONENT]外键关系 --> <!--输出实体[DST_COMPONENT]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-dst_component-55-13">
<addForeignKeyConstraint baseColumnNames="ENTITYID" baseTableName="IBZCOMPONENT" constraintName="DER1N_DST_COMPONENT_META_ENTIT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ENTITYID" referencedTableName="IBZENTITY" validate="true"/>
</changeSet>
<!--输出实体[DST_CONFIG]外键关系 --> <!--输出实体[DST_CONFIG]外键关系 -->
<!--输出实体[DST_DATASOURCE]外键关系 --> <!--输出实体[DST_DATASOURCE]外键关系 -->
<!--输出实体[DST_ROUTER]外键关系 --> <!--输出实体[DST_ROUTER]外键关系 -->
<!--输出实体[DST_SYSTEM]外键关系 --> <!--输出实体[DST_SYSTEM]外键关系 -->
<!--输出实体[DST_VIEW]外键关系 --> <!--输出实体[DST_VIEW]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-dst_view-41-14">
<addForeignKeyConstraint baseColumnNames="ENTITYID" baseTableName="IBZVIEW" constraintName="DER1N_DST_VIEW_META_ENTITY_ENT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ENTITYID" referencedTableName="IBZENTITY" validate="true"/>
</changeSet>
<!--输出实体[META_DATASET]外键关系 --> <!--输出实体[META_DATASET]外键关系 -->
<!--输出实体[META_ENTITY]外键关系 --> <!--输出实体[META_ENTITY]外键关系 -->
<!--输出实体[META_FIELD]外键关系 --> <!--输出实体[META_FIELD]外键关系 -->
<!--输出实体[META_MODEL]外键关系 --> <!--输出实体[META_MODEL]外键关系 -->
<!--输出实体[META_MODULE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-meta_module-13-15">
<addForeignKeyConstraint baseColumnNames="SYSTEMID" baseTableName="IBZMODULE" constraintName="DER1N_META_MODULE_DST_SYSTEM_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PSSYSTEMID" referencedTableName="IBZPSSYSTEM" validate="true"/>
</changeSet>
<!--输出实体[META_RELATION]外键关系 --> <!--输出实体[META_RELATION]外键关系 -->
</databaseChangeLog> </databaseChangeLog>
...@@ -2185,7 +2185,7 @@ ...@@ -2185,7 +2185,7 @@
}, },
{ {
"fieldname":"CODENAME" , "fieldname":"CODENAME" ,
"codename":"Code_name", "codename":"CodeName",
"field_logic_name":"代码名称", "field_logic_name":"代码名称",
"entity_name":"MetaModule", "entity_name":"MetaModule",
"field_type":"TEXT", "field_type":"TEXT",
...@@ -2199,7 +2199,7 @@ ...@@ -2199,7 +2199,7 @@
}, },
{ {
"fieldname":"SYSTEMID" , "fieldname":"SYSTEMID" ,
"codename":"System_id", "codename":"SystemId",
"field_logic_name":"系统标识", "field_logic_name":"系统标识",
"entity_name":"MetaModule", "entity_name":"MetaModule",
"ref_de":"DST_SYSTEM", "ref_de":"DST_SYSTEM",
......
...@@ -51,19 +51,19 @@ public class MetaModuleDTO extends DTOBase implements Serializable { ...@@ -51,19 +51,19 @@ public class MetaModuleDTO extends DTOBase implements Serializable {
* 属性 [CODENAME] * 属性 [CODENAME]
* *
*/ */
@JSONField(name = "code_name") @JSONField(name = "codename")
@JsonProperty("code_name") @JsonProperty("codename")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String codeName; private String codename;
/** /**
* 属性 [SYSTEMID] * 属性 [SYSTEMID]
* *
*/ */
@JSONField(name = "system_id") @JSONField(name = "systemid")
@JsonProperty("system_id") @JsonProperty("systemid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String systemId; private String systemid;
/** /**
...@@ -77,17 +77,17 @@ public class MetaModuleDTO extends DTOBase implements Serializable { ...@@ -77,17 +77,17 @@ 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);
} }
......
...@@ -47,7 +47,6 @@ public class MetaModuleResource { ...@@ -47,7 +47,6 @@ 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) {
...@@ -57,7 +56,6 @@ public class MetaModuleResource { ...@@ -57,7 +56,6 @@ 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) {
...@@ -65,7 +63,6 @@ public class MetaModuleResource { ...@@ -65,7 +63,6 @@ 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) {
...@@ -76,7 +73,6 @@ public class MetaModuleResource { ...@@ -76,7 +73,6 @@ 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) {
...@@ -84,14 +80,12 @@ public class MetaModuleResource { ...@@ -84,14 +80,12 @@ 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) {
...@@ -99,7 +93,6 @@ public class MetaModuleResource { ...@@ -99,7 +93,6 @@ 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) {
...@@ -120,14 +113,12 @@ public class MetaModuleResource { ...@@ -120,14 +113,12 @@ 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) {
...@@ -135,7 +126,6 @@ public class MetaModuleResource { ...@@ -135,7 +126,6 @@ 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) {
...@@ -148,7 +138,6 @@ public class MetaModuleResource { ...@@ -148,7 +138,6 @@ 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) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册