修改主数据生成类

This commit is contained in:
lvleigang 2024-05-31 09:12:40 +08:00
parent 8fa52f957b
commit 478211ad96
103 changed files with 1705 additions and 9189 deletions

View File

@ -0,0 +1,3 @@
ALTER TABLE mdm_module_distribute ADD COLUMN update_api VARCHAR(50) DEFAULT NULL COMMENT '修改接口';
ALTER TABLE mdm_module_distribute ADD COLUMN enabled_state CHAR(1) DEFAULT NULL COMMENT '启用停用 0、停用1、启用';
COMMIT;

View File

@ -1,83 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
public class DbFiledsDto {
/**
* 1\修改 2新增
*/
private String dataType;
/**
* 中文名
*/
private String chName;
/**
* 英文名
*/
private String enName;
/**
* 字段类型 1BIGINT 2DECIMAL 3VARCHAR 4DATETIME
*/
private String filedType;
/**
* 长度
*/
private String filedLength;
public DbFiledsDto() {
}
public DbFiledsDto(String dataType,String chName, String enName, String filedType, String filedLength) {
this.dataType = dataType;
this.chName = chName;
this.enName = enName;
this.filedType = filedType;
this.filedLength = filedLength;
}
public String getChName() {
return chName;
}
public void setChName(String chName) {
this.chName = chName;
}
public String getEnName() {
return enName;
}
public void setEnName(String enName) {
this.enName = enName;
}
public String getFiledType() {
return filedType;
}
public void setFiledType(String filedType) {
this.filedType = filedType;
}
public String getFiledLength() {
return filedLength;
}
public void setFiledLength(String filedLength) {
this.filedLength = filedLength;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
}

View File

@ -1,69 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import java.util.List;
public class MdmDataDto {
private String id;
private String tableName;
private String documentRule;
private Integer documentRuleNum;
/**
* 类型 1主表 2明细
*/
private String dbType;
private List<MdmDataFiledDto> mdmDataFiledDtos;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public List<MdmDataFiledDto> getMdmDataFiledDtos() {
return mdmDataFiledDtos;
}
public void setMdmDataFiledDtos(List<MdmDataFiledDto> mdmDataFiledDtos) {
this.mdmDataFiledDtos = mdmDataFiledDtos;
}
public String getDocumentRule() {
return documentRule;
}
public void setDocumentRule(String documentRule) {
this.documentRule = documentRule;
}
public Integer getDocumentRuleNum() {
return documentRuleNum;
}
public void setDocumentRuleNum(Integer documentRuleNum) {
this.documentRuleNum = documentRuleNum;
}
public String getDbType() {
return dbType;
}
public void setDbType(String dbType) {
this.dbType = dbType;
}
}

View File

@ -1,29 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import java.util.List;
public class MdmDataFiledDto {
private String filedsName;
private String filedsValue;
public String getFiledsName() {
return filedsName;
}
public void setFiledsName(String filedsName) {
this.filedsName = filedsName;
}
public String getFiledsValue() {
return filedsValue;
}
public void setFiledsValue(String filedsValue) {
this.filedsValue = filedsValue;
}
}

View File

@ -1,37 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
import java.util.List;
public class MdmDbFiledVo {
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public MdmDbFiledVo() {
}
public MdmDbFiledVo(String id, String name) {
this.id = id;
this.name = name;
}
}

View File

@ -1,57 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
public class MdmDbVo {
//主数据主表
private MdmModuleDbEntity mainMdmModuleDb;
//主数据子表
private List<MdmModuleDbEntity> sublistMdmModuleDb;
//控件字段规则属性
private List<MdmModuleDbFiledsRuleFilesEntity> moduleDbFiledsRuleFiles;
//单据编码规则
private List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList;
public List<MdmTableCodeRuleEntity> getMdmTableCodeRuleEntityList() {
return mdmTableCodeRuleEntityList;
}
public void setMdmTableCodeRuleEntityList(List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList) {
this.mdmTableCodeRuleEntityList = mdmTableCodeRuleEntityList;
}
public List<MdmModuleDbFiledsRuleFilesEntity> getModuleDbFiledsRuleFiles() {
return moduleDbFiledsRuleFiles;
}
public void setModuleDbFiledsRuleFiles(List<MdmModuleDbFiledsRuleFilesEntity> moduleDbFiledsRuleFiles) {
this.moduleDbFiledsRuleFiles = moduleDbFiledsRuleFiles;
}
public MdmModuleDbEntity getMainMdmModuleDb() {
return mainMdmModuleDb;
}
public void setMainMdmModuleDb(MdmModuleDbEntity mainMdmModuleDb) {
this.mainMdmModuleDb = mainMdmModuleDb;
}
public List<MdmModuleDbEntity> getSublistMdmModuleDb() {
return sublistMdmModuleDb;
}
public void setSublistMdmModuleDb(List<MdmModuleDbEntity> sublistMdmModuleDb) {
this.sublistMdmModuleDb = sublistMdmModuleDb;
}
}

View File

@ -1,41 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import java.util.List;
public class MdmDetailViewVo {
//模版信息
private MdmModuleEntity mdmModuleEntity;
//主数据主表
private MdmModuleDbEntity mainMdmModuleDb;
//主数据子表
private List<MdmModuleDbEntity> sublistMdmModuleDb;
public MdmModuleEntity getMdmModuleEntity() {
return mdmModuleEntity;
}
public void setMdmModuleEntity(MdmModuleEntity mdmModuleEntity) {
this.mdmModuleEntity = mdmModuleEntity;
}
public MdmModuleDbEntity getMainMdmModuleDb() {
return mainMdmModuleDb;
}
public void setMainMdmModuleDb(MdmModuleDbEntity mainMdmModuleDb) {
this.mainMdmModuleDb = mainMdmModuleDb;
}
public List<MdmModuleDbEntity> getSublistMdmModuleDb() {
return sublistMdmModuleDb;
}
public void setSublistMdmModuleDb(List<MdmModuleDbEntity> sublistMdmModuleDb) {
this.sublistMdmModuleDb = sublistMdmModuleDb;
}
}

View File

@ -1,34 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
import java.util.List;
public class MdmDistributeDto {
//id
private String id;
private List<MdmModuleDistributeEntity> mdmModuleDistributeEntities;
public List<MdmModuleDistributeEntity> getMdmModuleDistributeEntities() {
return mdmModuleDistributeEntities;
}
public void setMdmModuleDistributeEntities(List<MdmModuleDistributeEntity> mdmModuleDistributeEntities) {
this.mdmModuleDistributeEntities = mdmModuleDistributeEntities;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}

View File

@ -1,53 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.web.entity.BaseEntity;
public class MdmDistributeEntity extends BaseEntity {
private String tableName;
private String formmainId;
private String appId;
private String status;//1发送成功 2发送中 3发送失败 4未发送
private String msg;
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getFormmainId() {
return formmainId;
}
public void setFormmainId(String formmainId) {
this.formmainId = formmainId;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}

View File

@ -1,55 +0,0 @@
package com.hzya.frame.mdm.entity;
public class MdmDistributeVo {
/**
* 数据
*/
private String formmainId;
/**
* 应用id
*/
private String appId;
/**
* 状态 1发送成功 2发送中 3发送失败 4未发送
*/
private String status;
/**
*描述
*/
private String msg;
public String getFormmainId() {
return formmainId;
}
public void setFormmainId(String formmainId) {
this.formmainId = formmainId;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}

View File

@ -1,205 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
import java.util.List;
public class MdmDto {
//id
private String id;
//3新增4修改 5查看
private String showType;
//分页
private Integer pageNum;
private Integer pageSize;
/**
* 显示字段
*/
private String viewFiled;
/**
* 上级id字段
*/
private String upIdFiled;
//主数据名称
private String mdmName;
//主数据编码
private Integer mdmCode;
//主数据类型
private String mdmType;
//描述
private String remark;
//描述
private String[] ids;
//单据编码规则
private List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList;
//主数据主表
private MdmModuleDbEntity mainMdmModuleDb;
//主数据子表
private List<MdmModuleDbEntity> sublistMdmModuleDb;
private String tableName;
private String value;
private String label;
private String lableValue;
private String upId;
public String getLableValue() {
return lableValue;
}
public void setLableValue(String lableValue) {
this.lableValue = lableValue;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public MdmModuleDbEntity getMainMdmModuleDb() {
return mainMdmModuleDb;
}
public void setMainMdmModuleDb(MdmModuleDbEntity mainMdmModuleDb) {
this.mainMdmModuleDb = mainMdmModuleDb;
}
public List<MdmModuleDbEntity> getSublistMdmModuleDb() {
return sublistMdmModuleDb;
}
public void setSublistMdmModuleDb(List<MdmModuleDbEntity> sublistMdmModuleDb) {
this.sublistMdmModuleDb = sublistMdmModuleDb;
}
public String getMdmName() {
return mdmName;
}
public void setMdmName(String mdmName) {
this.mdmName = mdmName;
}
public Integer getMdmCode() {
return mdmCode;
}
public void setMdmCode(Integer mdmCode) {
this.mdmCode = mdmCode;
}
public String getMdmType() {
return mdmType;
}
public void setMdmType(String mdmType) {
this.mdmType = mdmType;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getShowType() {
return showType;
}
public void setShowType(String showType) {
this.showType = showType;
}
public List<MdmTableCodeRuleEntity> getMdmTableCodeRuleEntityList() {
return mdmTableCodeRuleEntityList;
}
public void setMdmTableCodeRuleEntityList(List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList) {
this.mdmTableCodeRuleEntityList = mdmTableCodeRuleEntityList;
}
public String getViewFiled() {
return viewFiled;
}
public void setViewFiled(String viewFiled) {
this.viewFiled = viewFiled;
}
public String getUpIdFiled() {
return upIdFiled;
}
public void setUpIdFiled(String upIdFiled) {
this.upIdFiled = upIdFiled;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getUpId() {
return upId;
}
public void setUpId(String upId) {
this.upId = upId;
}
public String[] getIds() {
return ids;
}
public void setIds(String[] ids) {
this.ids = ids;
}
}

View File

@ -1,81 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
import java.util.List;
public class MdmModuleViewDto {
//id
private String id;
//模版
private MdmModuleViewEntity mdmModuleViewEntity;
//新增
private List<MdmDbFiledVo> addFiled;
//修改
private List<MdmDbFiledVo> editFiled;
//查看
private List<MdmDbFiledVo> showFiled;
//查询
private List<MdmDbFiledVo> queryFiled;
//列表
private List<MdmDbFiledVo> listFiled;
public MdmModuleViewEntity getMdmModuleViewEntity() {
return mdmModuleViewEntity;
}
public void setMdmModuleViewEntity(MdmModuleViewEntity mdmModuleViewEntity) {
this.mdmModuleViewEntity = mdmModuleViewEntity;
}
public List<MdmDbFiledVo> getAddFiled() {
return addFiled;
}
public void setAddFiled(List<MdmDbFiledVo> addFiled) {
this.addFiled = addFiled;
}
public List<MdmDbFiledVo> getEditFiled() {
return editFiled;
}
public void setEditFiled(List<MdmDbFiledVo> editFiled) {
this.editFiled = editFiled;
}
public List<MdmDbFiledVo> getShowFiled() {
return showFiled;
}
public void setShowFiled(List<MdmDbFiledVo> showFiled) {
this.showFiled = showFiled;
}
public List<MdmDbFiledVo> getQueryFiled() {
return queryFiled;
}
public void setQueryFiled(List<MdmDbFiledVo> queryFiled) {
this.queryFiled = queryFiled;
}
public List<MdmDbFiledVo> getListFiled() {
return listFiled;
}
public void setListFiled(List<MdmDbFiledVo> listFiled) {
this.listFiled = listFiled;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}

View File

@ -1,123 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
import java.util.List;
public class MdmModuleViewVo {
//模版
private MdmModuleViewEntity mdmModuleViewEntity;
//新增
private List<MdmDbFiledVo> addFiled;
//修改
private List<MdmDbFiledVo> editFiled;
//查看
private List<MdmDbFiledVo> showFiled;
//查询
private List<MdmDbFiledVo> queryFiled;
//列表
private List<MdmDbFiledVo> listFiled;
//新增
private List<MdmModuleViewDetailEntity> dbAddFiled;
//修改
private List<MdmModuleViewDetailEntity> dbEditFiled;
//查看
private List<MdmModuleViewDetailEntity> dbShowFiled;
//查询
private List<MdmModuleViewDetailEntity> dbQueryFiled;
//列表
private List<MdmModuleViewDetailEntity> dbListFiled;
public List<MdmDbFiledVo> getAddFiled() {
return addFiled;
}
public void setAddFiled(List<MdmDbFiledVo> addFiled) {
this.addFiled = addFiled;
}
public List<MdmDbFiledVo> getEditFiled() {
return editFiled;
}
public void setEditFiled(List<MdmDbFiledVo> editFiled) {
this.editFiled = editFiled;
}
public List<MdmDbFiledVo> getShowFiled() {
return showFiled;
}
public void setShowFiled(List<MdmDbFiledVo> showFiled) {
this.showFiled = showFiled;
}
public List<MdmDbFiledVo> getQueryFiled() {
return queryFiled;
}
public void setQueryFiled(List<MdmDbFiledVo> queryFiled) {
this.queryFiled = queryFiled;
}
public List<MdmDbFiledVo> getListFiled() {
return listFiled;
}
public void setListFiled(List<MdmDbFiledVo> listFiled) {
this.listFiled = listFiled;
}
public MdmModuleViewEntity getMdmModuleViewEntity() {
return mdmModuleViewEntity;
}
public void setMdmModuleViewEntity(MdmModuleViewEntity mdmModuleViewEntity) {
this.mdmModuleViewEntity = mdmModuleViewEntity;
}
public List<MdmModuleViewDetailEntity> getDbAddFiled() {
return dbAddFiled;
}
public void setDbAddFiled(List<MdmModuleViewDetailEntity> dbAddFiled) {
this.dbAddFiled = dbAddFiled;
}
public List<MdmModuleViewDetailEntity> getDbEditFiled() {
return dbEditFiled;
}
public void setDbEditFiled(List<MdmModuleViewDetailEntity> dbEditFiled) {
this.dbEditFiled = dbEditFiled;
}
public List<MdmModuleViewDetailEntity> getDbShowFiled() {
return dbShowFiled;
}
public void setDbShowFiled(List<MdmModuleViewDetailEntity> dbShowFiled) {
this.dbShowFiled = dbShowFiled;
}
public List<MdmModuleViewDetailEntity> getDbQueryFiled() {
return dbQueryFiled;
}
public void setDbQueryFiled(List<MdmModuleViewDetailEntity> dbQueryFiled) {
this.dbQueryFiled = dbQueryFiled;
}
public List<MdmModuleViewDetailEntity> getDbListFiled() {
return dbListFiled;
}
public void setDbListFiled(List<MdmModuleViewDetailEntity> dbListFiled) {
this.dbListFiled = dbListFiled;
}
}

View File

@ -1,69 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.sys.entity.TemplateKeyValue;
import java.util.List;
public class MdmQuery {
//分页
private Integer pageNum;
private Integer pageSize;
//表名
private String tableName;
//查询条件
private List<TemplateKeyValue> queryCondition;
//返回字段
private List<String> returnField;
//明细表查询条件
private List<MdmQuery> detailQueryCondition;
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public List<TemplateKeyValue> getQueryCondition() {
return queryCondition;
}
public void setQueryCondition(List<TemplateKeyValue> queryCondition) {
this.queryCondition = queryCondition;
}
public List<String> getReturnField() {
return returnField;
}
public void setReturnField(List<String> returnField) {
this.returnField = returnField;
}
public List<MdmQuery> getDetailQueryCondition() {
return detailQueryCondition;
}
public void setDetailQueryCondition(List<MdmQuery> detailQueryCondition) {
this.detailQueryCondition = detailQueryCondition;
}
}

View File

@ -1,32 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
import java.util.List;
public class MdmRoleDto {
//id
private String id;
private List<MdmModuleRoleEntity> mdmModuleRoleEntities;
public List<MdmModuleRoleEntity> getMdmModuleRoleEntities() {
return mdmModuleRoleEntities;
}
public void setMdmModuleRoleEntities(List<MdmModuleRoleEntity> mdmModuleRoleEntities) {
this.mdmModuleRoleEntities = mdmModuleRoleEntities;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}

View File

@ -1,34 +0,0 @@
package com.hzya.frame.mdm.entity;
public class MdmViewButtonVo {
//按钮类型
private String buttonType;
//按钮名
private String buttonName;
public String getButtonType() {
return buttonType;
}
public void setButtonType(String buttonType) {
this.buttonType = buttonType;
}
public String getButtonName() {
return buttonName;
}
public void setButtonName(String buttonName) {
this.buttonName = buttonName;
}
public MdmViewButtonVo() {
}
public MdmViewButtonVo(String buttonType, String buttonName) {
this.buttonType = buttonType;
this.buttonName = buttonName;
}
}

View File

@ -1,114 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import java.util.List;
public class MdmViewFiledVo {
//字段id
private String id;
//表名
private String dbName;
//类型 1主表 2明细
private String dbType;
//主数据模版ID
private String mdmId;
//模版数据库id
private String dbId;
//中文名
private String chName;
//英文名
private String enName;
//排序
private Integer sorts;
/**
* 字段类型 1BIGINT 2DECIMAL 3VARCHAR 4DATETIME
*/
private String filedType;
//字段规则
private List<MdmModuleDbFiledsRuleEntity> ruleList;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDbName() {
return dbName;
}
public void setDbName(String dbName) {
this.dbName = dbName;
}
public String getDbType() {
return dbType;
}
public void setDbType(String dbType) {
this.dbType = dbType;
}
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getDbId() {
return dbId;
}
public void setDbId(String dbId) {
this.dbId = dbId;
}
public String getChName() {
return chName;
}
public void setChName(String chName) {
this.chName = chName;
}
public String getEnName() {
return enName;
}
public void setEnName(String enName) {
this.enName = enName;
}
public List<MdmModuleDbFiledsRuleEntity> getRuleList() {
return ruleList;
}
public void setRuleList(List<MdmModuleDbFiledsRuleEntity> ruleList) {
this.ruleList = ruleList;
}
public Integer getSorts() {
return sorts;
}
public void setSorts(Integer sorts) {
this.sorts = sorts;
}
public String getFiledType() {
return filedType;
}
public void setFiledType(String filedType) {
this.filedType = filedType;
}
}

View File

@ -1,73 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
public class MdmViewVo {
private String id;
//模版信息
private MdmModuleEntity mdmModuleEntity;
//模版展示信息
private MdmModuleViewEntity mdmModuleViewEntity;
//查询条件
private List<MdmViewFiledVo> queryList;
//列表
private List<MdmViewFiledVo> listList;
//按钮
private List<MdmViewButtonVo> buttonList;
public List<MdmViewFiledVo> getQueryList() {
return queryList;
}
public void setQueryList(List<MdmViewFiledVo> queryList) {
this.queryList = queryList;
}
public List<MdmViewFiledVo> getListList() {
return listList;
}
public void setListList(List<MdmViewFiledVo> listList) {
this.listList = listList;
}
public List<MdmViewButtonVo> getButtonList() {
return buttonList;
}
public void setButtonList(List<MdmViewButtonVo> buttonList) {
this.buttonList = buttonList;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public MdmModuleEntity getMdmModuleEntity() {
return mdmModuleEntity;
}
public void setMdmModuleEntity(MdmModuleEntity mdmModuleEntity) {
this.mdmModuleEntity = mdmModuleEntity;
}
public MdmModuleViewEntity getMdmModuleViewEntity() {
return mdmModuleViewEntity;
}
public void setMdmModuleViewEntity(MdmModuleViewEntity mdmModuleViewEntity) {
this.mdmModuleViewEntity = mdmModuleViewEntity;
}
}

View File

@ -1,122 +0,0 @@
package com.hzya.frame.mdm.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
public class MdmVo {
//id
private String id;
//主数据名称
private String mdmName;
//主数据编码
private String mdmCode;
//主数据类型 1档案 2单据
private String mdmType;
//主数据类型 1档案 2单据
private String mdmTypeName;
//描述
private String remark;
/** logo地址或者id */
private String mdmLogo;
private String createUserId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String modifyUserId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date modifyTime;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getMdmName() {
return mdmName;
}
public void setMdmName(String mdmName) {
this.mdmName = mdmName;
}
public String getMdmCode() {
return mdmCode;
}
public void setMdmCode(String mdmCode) {
this.mdmCode = mdmCode;
}
public String getMdmType() {
return mdmType;
}
public void setMdmType(String mdmType) {
this.mdmType = mdmType;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getMdmTypeName() {
return mdmTypeName;
}
public void setMdmTypeName(String mdmTypeName) {
this.mdmTypeName = mdmTypeName;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getModifyUserId() {
return modifyUserId;
}
public void setModifyUserId(String modifyUserId) {
this.modifyUserId = modifyUserId;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getMdmLogo() {
return mdmLogo;
}
public void setMdmLogo(String mdmLogo) {
this.mdmLogo = mdmLogo;
}
}

View File

@ -1,58 +1,15 @@
package com.hzya.frame.mdm.mdmModule.dao;
import com.hzya.frame.mdm.entity.MdmDataDto;
import com.hzya.frame.mdm.entity.MdmDistributeEntity;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.entity.MdmQuery;
import com.hzya.frame.mdm.entity.MdmVo;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.sys.entity.FormmainDeleteDto;
import com.hzya.frame.sys.entity.ModuleDto;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据模版(mdm_module: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:25:41
* @since 2024-05-30 16:56:53
*/
public interface IMdmModuleDao extends IBaseDao<MdmModuleEntity, String> {
List<MdmVo> queryMdm(MdmDto entity);
Integer checkTable(Map<String, String> maps);
Integer createTable(Map<String, Object> maps);
Integer createTableDistribute(Map<String, Object> maps);
Integer alterTable(Map<String, Object> maps);
Integer alterTableName(Map<String, String> maps);
List<HashMap<String, Object>> queryMdmShowData(MdmQuery entity);
Integer checkData(Map<String, String> map);
Integer updateForm(MdmDataDto mdmDataDto);
Integer saveForm(MdmDataDto mdmDataDto);
Integer deleteTemplateById(FormmainDeleteDto formmainDeleteDto);
List<HashMap<String, Object>> queryDataAll(MdmDto entity);
List<HashMap<String, Object>> queryTemplateData(ModuleDto entity);
HashMap<String, Object> queryTemplateDataOne(MdmDto entity);
List<HashMap<String, Object>> queryTemplateDataMore(MdmDto entity);
List<HashMap<String, Object>> querySelectData(MdmDto entity);
Integer deleteChilder(FormmainDeleteDto formmainDeleteDto);
Integer saveDistribute(MdmDistributeEntity mdmDistributeEntity);
Integer updateDistribute(MdmDistributeEntity mdmDistributeEntity);
}

View File

@ -1,36 +1,27 @@
package com.hzya.frame.mdm.mdmModule.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据模版(MdmModule)实体类
*
* @author makejava
* @since 2023-10-17 15:25:42
* @since 2024-05-30 16:56:53
*/
public class MdmModuleEntity extends BaseEntity {
/** logo地址或者id */
private String mdmLogo;
/**
* 主数据名称
*/
private String mdmName;
/**
* 主数据编码
*/
private Integer mdmCode;
/**
* 主数据类型 1档案 2单据
*/
private String mdmType;
/**
* 描述
*/
private String remark;
/** 主数据名称 */
private String mdmName;
/** logo */
private String mdmLogo;
/** 主数据编码 */
private Long mdmCode;
/** 主数据类型 1、档案 2、单据 */
private String mdmType;
/** 描述 */
private String remark;
/** 公司id */
private String companyId;
public String getMdmName() {
@ -41,11 +32,19 @@ public class MdmModuleEntity extends BaseEntity {
this.mdmName = mdmName;
}
public Integer getMdmCode() {
public String getMdmLogo() {
return mdmLogo;
}
public void setMdmLogo(String mdmLogo) {
this.mdmLogo = mdmLogo;
}
public Long getMdmCode() {
return mdmCode;
}
public void setMdmCode(Integer mdmCode) {
public void setMdmCode(Long mdmCode) {
this.mdmCode = mdmCode;
}
@ -65,12 +64,13 @@ public class MdmModuleEntity extends BaseEntity {
this.remark = remark;
}
public String getMdmLogo() {
return mdmLogo;
public String getCompanyId() {
return companyId;
}
public void setMdmLogo(String mdmLogo) {
this.mdmLogo = mdmLogo;
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -2,27 +2,28 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.mdm.mdmModule.dao.impl.MdmModuleDaoImpl">
<resultMap id="get-MdmModuleEntity-result" type="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
<result property="mdmLogo" column="mdm_logo" jdbcType="VARCHAR"/>
<result property="mdmCode" column="mdm_code" jdbcType="INTEGER"/>
<result property="mdmType" column="mdm_type" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="get-MdmModuleEntity-result" type="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
<result property="mdmLogo" column="mdm_logo" jdbcType="VARCHAR"/>
<result property="mdmCode" column="mdm_code" jdbcType="INTEGER"/>
<result property="mdmType" column="mdm_type" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleEntity_Base_Column_List">
<sql id = "MdmModuleEntity_Base_Column_List">
id
,mdm_name
,mdm_logo
,mdm_code
,mdm_logo
,mdm_code
,mdm_type
,remark
,sorts
@ -32,722 +33,224 @@
,modify_time
,sts
,org_id
,company_id
</sql>
<!--通过ID获取数据 -->
<select id="entity_get" resultMap="get-MdmModuleEntity-result">
select
<include refid="MdmModuleEntity_Base_Column_List" />
from mdm_module where sts = 'Y' and id = #{id}
</select>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleEntity-result"
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select
<include refid="MdmModuleEntity_Base_Column_List"/>
from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo = #{mdmLogo}</if>
<if test="mdmCode != null ">and mdm_code = #{mdmCode}</if>
<if test="mdmType != null and mdmType != ''">and mdm_type = #{mdmType}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select
<include refid="MdmModuleEntity_Base_Column_List" />
from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo = #{mdmLogo} </if>
<if test="mdmCode != null"> and mdm_code = #{mdmCode} </if>
<if test="mdmType != null and mdmType != ''"> and mdm_type = #{mdmType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select count(1) from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo = #{mdmLogo}</if>
<if test="mdmCode != null ">and mdm_code = #{mdmCode}</if>
<if test="mdmType != null and mdmType != ''">and mdm_type = #{mdmType}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select count(1) from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo = #{mdmLogo} </if>
<if test="mdmCode != null"> and mdm_code = #{mdmCode} </if>
<if test="mdmType != null and mdmType != ''"> and mdm_type = #{mdmType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleEntity-result"
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select
<include refid="MdmModuleEntity_Base_Column_List"/>
from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmName != null and mdmName != ''">and mdm_name like concat('%',#{mdmName},'%')</if>
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo like concat('%',#{mdmLogo},'%')</if>
<if test="mdmCode != null ">and mdm_code like concat('%',#{mdmCode},'%')</if>
<if test="mdmType != null and mdmType != ''">and mdm_type like concat('%',#{mdmType},'%')</if>
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
<select id="entity_list_like" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select
<include refid="MdmModuleEntity_Base_Column_List" />
from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmName != null and mdmName != ''"> and mdm_name like concat('%',#{mdmName},'%') </if>
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo like concat('%',#{mdmLogo},'%') </if>
<if test="mdmCode != null"> and mdm_code like concat('%',#{mdmCode},'%') </if>
<if test="mdmType != null and mdmType != ''"> and mdm_type like concat('%',#{mdmType},'%') </if>
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleentity_list_or" resultMap="get-MdmModuleEntity-result"
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select
<include refid="MdmModuleEntity_Base_Column_List"/>
from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmName != null and mdmName != ''">or mdm_name = #{mdmName}</if>
<if test="mdmLogo != null and mdmLogo != ''">or mdm_logo = #{mdmLogo}</if>
<if test="mdmCode != null ">or mdm_code = #{mdmCode}</if>
<if test="mdmType != null and mdmType != ''">or mdm_type = #{mdmType}</if>
<if test="remark != null and remark != ''">or remark = #{remark}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleentity_list_or" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
select
<include refid="MdmModuleEntity_Base_Column_List" />
from mdm_module
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmName != null and mdmName != ''"> or mdm_name = #{mdmName} </if>
<if test="mdmLogo != null and mdmLogo != ''"> or mdm_logo = #{mdmLogo} </if>
<if test="mdmCode != null"> or mdm_code = #{mdmCode} </if>
<if test="mdmType != null and mdmType != ''"> or mdm_type = #{mdmType} </if>
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
insert into mdm_module(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmName != null and mdmName != ''">mdm_name ,</if>
<if test="mdmLogo != null and mdmLogo != ''">mdm_logo ,</if>
<if test="mdmCode != null ">mdm_code ,</if>
<if test="mdmCode == null ">mdm_code ,</if>
<if test="mdmType != null and mdmType != ''">mdm_type ,</if>
<if test="remark != null and remark != ''">remark ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmName != null and mdmName != ''">#{mdmName} ,</if>
<if test="mdmLogo != null and mdmLogo != ''">#{mdmLogo} ,</if>
<if test="mdmCode != null ">#{mdmCode} ,</if>
<if test="mdmCode == null ">(SELECT IFNULL(MAX(b.mdm_code)+1,10001) AS mdmCode FROM mdm_module b ),</if>
<if test="mdmType != null and mdmType != ''">#{mdmType} ,</if>
<if test="remark != null and remark != ''">#{remark} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module(mdm_name,mdm_logo, mdm_code, mdm_type, remark, sorts, create_user_id, create_time, modify_user_id,
modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, sorts, create_user_id, create_time, modify_user_id,
modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_name = values(mdm_name),
mdm_logo = values(mdm_logo),
mdm_code = values(mdm_code),
mdm_type = values(mdm_type),
remark = values(remark),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
update mdm_module set
<trim suffix="" suffixOverrides=",">
<if test="mdmName != null and mdmName != ''">mdm_name = #{mdmName},</if>
<if test="mdmLogo != null and mdmLogo != ''">mdm_logo = #{mdmLogo},</if>
<if test="mdmCode != null ">mdm_code = #{mdmCode},</if>
<if test="mdmType != null and mdmType != ''">mdm_type = #{mdmType},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmName != null and mdmName != ''"> mdm_name , </if>
<if test="mdmLogo != null and mdmLogo != ''"> mdm_logo , </if>
<if test="mdmCode != null"> mdm_code , </if>
<if test="mdmType != null and mdmType != ''"> mdm_type , </if>
<if test="remark != null and remark != ''"> remark , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmName != null and mdmName != ''"> #{mdmName} ,</if>
<if test="mdmLogo != null and mdmLogo != ''"> #{mdmLogo} ,</if>
<if test="mdmCode != null"> #{mdmCode} ,</if>
<if test="mdmType != null and mdmType != ''"> #{mdmType} ,</if>
<if test="remark != null and remark != ''"> #{remark} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_name = values(mdm_name),
mdm_logo = values(mdm_logo),
mdm_code = values(mdm_code),
mdm_type = values(mdm_type),
remark = values(remark),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
update mdm_module set
<trim suffix="" suffixOverrides=",">
<if test="mdmName != null and mdmName != ''"> mdm_name = #{mdmName},</if>
<if test="mdmLogo != null and mdmLogo != ''"> mdm_logo = #{mdmLogo},</if>
<if test="mdmCode != null"> mdm_code = #{mdmCode},</if>
<if test="mdmType != null and mdmType != ''"> mdm_type = #{mdmType},</if>
<if test="remark != null and remark != ''"> remark = #{remark},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
update mdm_module set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
update mdm_module set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo = #{mdmLogo}</if>
<if test="mdmCode != null ">and mdm_code = #{mdmCode}</if>
<if test="mdmType != null and mdmType != ''">and mdm_type = #{mdmType}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
update mdm_module set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo = #{mdmLogo} </if>
<if test="mdmCode != null"> and mdm_code = #{mdmCode} </if>
<if test="mdmType != null and mdmType != ''"> and mdm_type = #{mdmType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module where id = #{id}
</delete>
<!-- 分页查询列表 采用like格式 -->
<select id="queryMdm" resultType="com.hzya.frame.mdm.entity.MdmVo" parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
a.id as id,
a.mdm_name as mdmName,
a.mdm_logo as mdmLogo,
a.mdm_code as mdmCode,
a.mdm_type as mdmType,
sd.column_content as mdmTypeName,
a.remark as remark,
a.create_time as createTime,
a.modify_time as modifyTime,
d.person_name as createUserId,
n.person_name as modifyUserId
from
mdm_module a
LEFT JOIN sys_dictionaryshop_new sd on sd.column_value = a.mdm_type and sd.tab_name = 'mdm' and sd.column_name = 'mdm_type' and sd.used_sts = '1'
LEFT JOIN sys_user c on c.id = a.create_user_id and c.sts = 'Y'
LEFT JOIN sys_person d on d.id = c.person_id and d.sts = 'Y'
LEFT JOIN sys_user m on m.id = a.modify_user_id and m.sts = 'Y'
LEFT JOIN sys_person n on n.id = m.person_id and n.sts = 'Y'
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and a.id like concat('%',#{id},'%')</if>
<if test="mdmName != null and mdmName != ''">and a.mdm_name like concat('%',#{mdmName},'%')</if>
<if test="mdmCode != null ">and a.mdm_code like concat('%',#{mdmCode},'%')</if>
<if test="mdmType != null and mdmType != ''">and a.mdm_type = #{mdmType}</if>
<if test="remark != null and remark != ''">and a.remark like concat('%',#{remark},'%')</if>
and a.sts='Y'
</trim>
order by a.sorts asc
</select>
<!--通过ID获取数据 -->
<select id="checkTable" resultType="java.lang.Integer">
SELECT
COUNT(*)
FROM
information_schema.TABLES
WHERE
TABLE_SCHEMA = 'businesscenter'
and TABLE_NAME = #{tableName}
</select>
<select id="createTable" resultType="java.lang.Integer">
CREATE TABLE ${tableName} (
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
<if test="dbType == '1'.toString()">
`document_rule` varchar(50) DEFAULT NULL COMMENT '单据规则',
`document_rule_num` bigint(50) DEFAULT NULL COMMENT '单据规则流水号',
</if>
<foreach collection="databaseFields" item="item" index="index">
<choose>
<when test="item.filedType == '1'.toString()">
${item.enName} bigint(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
</when>
<when test="item.filedType == '2'.toString()">
${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
</when>
<when test="item.filedType == '3'.toString()">
${item.enName} varchar(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
</when>
<when test="item.filedType == '4'.toString()">
${item.enName} datetime DEFAULT NULL COMMENT #{item.chName},
</when>
</choose>
</foreach>
`sorts` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '排序',
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
`sts` varchar(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
`company_id` varchar(50) DEFAULT NULL COMMENT '公司id',
PRIMARY KEY (`sorts`,`id`) USING BTREE
) ENGINE = INNODB DEFAULT CHARSET = utf8 COMMENT = #{tableRemark}
</select>
<select id="createTableDistribute" resultType="java.lang.Integer">
CREATE TABLE ${tableName} (
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
`formmain_id` varchar(50) DEFAULT NULL COMMENT '数据id',
`app_id` varchar(50) DEFAULT NULL COMMENT '应用id',
`status` varchar(50) DEFAULT NULL COMMENT '状态',
`msg` varchar(50) DEFAULT NULL COMMENT '描述',
`sorts` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '排序',
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
`sts` varchar(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
`company_id` varchar(50) DEFAULT NULL COMMENT '公司id',
PRIMARY KEY (`sorts`,`id`) USING BTREE
) ENGINE = INNODB DEFAULT CHARSET = utf8 COMMENT = #{tableRemark}
</select>
<!--通过ID获取数据 -->
<select id="alterTable" resultType="java.lang.Integer">
ALTER TABLE ${tableName}
<trim suffix="" suffixOverrides=",">
<foreach collection="databaseFields" item="item" index="index">
<choose>
<when test="item.filedType == '3'.toString()">
<choose>
<when test="item.dataType == '1'.toString()">
MODIFY COLUMN ${item.enName} varchar(${item.filedLength}) DEFAULT NULL
COMMENT #{item.chName},
</when>
<otherwise>
add COLUMN ${item.enName} varchar(${item.filedLength}) DEFAULT NULL COMMENT
#{item.chName},
</otherwise>
</choose>
</when>
<when test="item.filedType == '1'.toString()">
<choose>
<when test="item.dataType == '1'.toString()">
MODIFY COLUMN ${item.enName} bigint(${item.filedLength}) DEFAULT NULL COMMENT
#{item.chName},
</when>
<otherwise>
add COLUMN ${item.enName} bigint(${item.filedLength}) DEFAULT NULL COMMENT
#{item.chName},
</otherwise>
</choose>
</when>
<when test="item.filedType == '2'.toString()">
<choose>
<when test="item.dataType == '1'.toString()">
MODIFY COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
#{item.chName},
</when>
<otherwise>
add COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
#{item.chName},
</otherwise>
</choose>
</when>
<when test="item.filedType == '4'.toString()">
<choose>
<when test="item.dataType == '1'.toString()">
MODIFY COLUMN ${item.enName} datetime DEFAULT NULL COMMENT #{item.chName},
</when>
<otherwise>
add COLUMN ${item.enName} datetime DEFAULT NULL COMMENT #{item.chName},
</otherwise>
</choose>
</when>
</choose>
</foreach>
</trim>
</select>
<!--通过ID获取数据 -->
<select id="alterTableName" resultType="java.lang.Integer">
ALTER TABLE ${tableName} COMMENT = #{tableRemark}
</select>
<!-- 查询符合条件的数量 -->
<select id="checkData" resultType="Integer" >
SELECT
count(*)
from
${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="filedName != null and filedName !='' and filedValue != null and filedValue !='' ">
and ${filedName} = #{filedValue}
</if>
<if test="id != null and id !='' ">and id != #{id}</if>
and sts = 'Y'
</trim>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryMdmShowData" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmQuery">
select
<if test="returnField != null and returnField.size>0">
(SELECT count(*) from ${tableName}_distribute WHERE sts = 'Y' and status = '1' and formmain_id = a.id) as qwqwasdasdzxasda,
<trim suffixOverrides=",">
<foreach collection="returnField" item="returnField">
a.${returnField} as ${returnField} ,
</foreach>
</trim>
</if>
<if test="returnField == null or returnField.size == 0">
(SELECT count(*) from ${tableName}_distribute WHERE sts = 'Y' and status = '1' and formmain_id = a.id) as qwqwasdasdzxasda,
a.*
</if>
from ${tableName} a
<trim prefix="where" prefixOverrides="and">
<if test="queryCondition != null and queryCondition.size>0">
<foreach collection="queryCondition" item="item" index="index">
${item.getValueByType('a.')}
</foreach>
</if>
and a.sts='Y'
<if test="detailQueryCondition != null and detailQueryCondition.size>0">
<foreach collection="detailQueryCondition" item="item" index="index">
AND a.id IN (
SELECT
formmain_id
FROM
${item.tableName}
<trim prefix="where" prefixOverrides="and">
sts = 'Y'
<if test="item.queryCondition != null and item.queryCondition.size>0">
<foreach collection="item.queryCondition" item="itema" index="index">
${itema.getValueByType('')}
</foreach>
</if>
</trim>
)
</foreach>
</if>
</trim>
order by a.sorts asc
</select>
<insert id="saveForm" parameterType="com.hzya.frame.mdm.entity.MdmDataDto">
insert into ${tableName}(
<trim suffix="" suffixOverrides=",">
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
<foreach collection="mdmDataFiledDtos" item="item" index="index">
<if test="item.filedsName != 'logid'.toString() ">
${item.filedsName},
</if>
<if test="item.filedsName == 'logid'.toString() ">
create_user_id,
modify_user_id,
</if>
</foreach>
</if>
sorts,
create_time,
modify_time,
sts,
<if test="dbType == '1'.toString()">
document_rule,
document_rule_num,
</if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
<foreach collection="mdmDataFiledDtos" item="item" index="index">
<if test="item.filedsName != 'logid'.toString() ">
#{item.filedsValue},
</if>
<if test="item.filedsName == 'logid'.toString() ">
#{item.filedsValue},
#{item.filedsValue},
</if>
</foreach>
</if>
(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ${tableName} a WHERE
a.sts = 'Y' ),
now(),
now(),
'Y',
<if test="dbType == '1'.toString()">
( concat(#{documentRule},
(SELECT
IF
(
LENGTH( (SELECT
IFNULL(MAX(b.document_rule_num),0)+1
FROM
${tableName} b
WHERE
DATE_FORMAT( b.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )) ) &lt;= ${documentRuleNum},
LPAD( (SELECT
IFNULL(MAX(c.document_rule_num),0)+1
FROM
${tableName} c
WHERE
DATE_FORMAT( c.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )), ${documentRuleNum}, '0' ),
(SELECT
IFNULL(MAX(d.document_rule_num),0)+1
FROM
${tableName} d
WHERE
DATE_FORMAT( d.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' ))
)
)
)),
(SELECT
IF
(
LENGTH( (SELECT
IFNULL(MAX(e.document_rule_num),0)+1
FROM
${tableName} e
WHERE
DATE_FORMAT( e.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )) ) &lt;= ${documentRuleNum},
LPAD( (SELECT
IFNULL(MAX(f.document_rule_num),0)+1
FROM
${tableName} f
WHERE
DATE_FORMAT( f.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )), ${documentRuleNum}, '0' ),
(SELECT
IFNULL(MAX(g.document_rule_num),0)+1
FROM
${tableName} g
WHERE
DATE_FORMAT( g.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' ))
)
)
</if>
</trim>
)
</insert>
<update id="updateForm" parameterType="com.hzya.frame.mdm.entity.MdmDataDto">
update ${tableName} set
<trim suffix="" suffixOverrides=",">
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
<foreach collection="mdmDataFiledDtos" item="item" index="index">
<if test="item.filedsName != 'logid'.toString() ">
${item.filedsName} = #{item.filedsValue},
</if>
<if test="item.filedsName == 'logid'.toString() ">
modify_user_id = #{item.filedsValue},
</if>
</foreach>
</if>
modify_time = now(),
</trim>
where id = #{id}
</update>
<update id="deleteTemplateById" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
update ${tableName} set
sts='N',modify_time = now(),modify_user_id = #{loginId}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and id = #{id}</if>
<if test="formmain_id != null and formmain_id !='' ">and formmain_id = #{formmain_id}</if>
and sts='Y'
</trim>
</update>
<update id="deleteChilder" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
update ${tableName} set
sts='N',modify_time = now(),modify_user_id = #{loginId}
<trim prefix="where" prefixOverrides="and">
<if test="upIdFiled != null and upIdFiled !='' and upIdFiledValue != null and upIdFiledValue !=''">
and ${upIdFiled} like concat(#{upIdFiledValue},'%')
</if>
and sts='Y'
</trim>
</update>
<!-- 分页查询列表 采用like格式 -->
<select id="queryDataAll" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
id as qsdfg,
${label},
${upId}
from ${tableName}
where sts = 'Y'
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryTemplateData" resultType="java.util.HashMap" parameterType="com.hzya.frame.sys.entity.ModuleDto">
select
${value},
${label}
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and ${value} = #{id}</if>
<if test="lableValue != null and lableValue !='' ">and ${label} like concat('%',#{lableValue},'%')</if>
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryTemplateDataOne" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
${value} as id,
${label} as label,
${upId} as upID
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and id = #{id}</if>
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="queryTemplateDataMore" resultType="java.util.HashMap"
parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
${value} as id,
${label} as label,
${upId} as upID
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="ids != null and ids.length >0">
and id in (
<trim suffix="" suffixOverrides=",">
<foreach collection="ids" item="item" index="index">
#{item},
</foreach>
</trim>
)
</if>
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="querySelectData" resultType="java.util.HashMap" parameterType="com.hzya.frame.mdm.entity.MdmDto">
select
${value},
${label}
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and ${value} = #{id}</if>
<if test="lableValue != null and lableValue !='' ">and ${label} like concat('%',#{lableValue},'%')</if>
and sts = 'Y'
and ${label} is not null
</trim>
order by sorts asc
</select>
<insert id="saveDistribute" parameterType="com.hzya.frame.mdm.entity.MdmDistributeEntity" >
insert into ${tableName}(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="formmainId != null and formmainId != ''">formmain_id ,</if>
<if test="appId != null and appId != ''">app_id ,</if>
<if test="status != null and status != ''">status ,</if>
<if test="msg != null and msg != ''">msg ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="companyId != null and companyId != ''">company_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="formmainId != null and formmainId != ''">#{formmainId} ,</if>
<if test="appId != null and appId != ''">#{appId} ,</if>
<if test="status != null and status != ''">#{status} ,</if>
<if test="msg != null and msg != ''">#{msg} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="companyId != null and companyId != ''">#{companyId} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<update id="updateDistribute" parameterType="com.hzya.frame.mdm.entity.MdmDistributeEntity">
update ${tableName} set
<trim suffix="" suffixOverrides=",">
<if test="formmainId != null and formmainId != ''">formmain_id = #{formmainId},</if>
<if test="appId != null and appId != ''">app_id = #{appId},</if>
<if test="status != null ">status = #{status},</if>
<if test="msg != null and msg != ''">msg = #{msg},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
</mapper>

View File

@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModule.service;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据模版(MdmModule)表服务接口
*
* @author makejava
* @since 2023-10-17 15:25:44
* @since 2024-05-30 16:56:54
*/
public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String> {
public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String>{
}

View File

@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModule.service.impl;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据模版(MdmModule)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:25:44
* @since 2024-05-30 16:56:54
*/
@Service(value = "mdmModuleService")
public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> implements IMdmModuleService {
private IMdmModuleDao mdmModuleDao;
@Autowired
public void setMdmModuleDao(IMdmModuleDao dao) {
this.mdmModuleDao = dao;
this.dao = dao;
}
public void setMdmModuleDao(IMdmModuleDao dao) {
this.mdmModuleDao = dao;
this.dao = dao;
}
}

View File

@ -1,29 +1,15 @@
package com.hzya.frame.mdm.mdmModuleDb.dao;
import com.hzya.frame.mdm.entity.MdmDistributeVo;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.sys.entity.ModuleDto;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 模版数据库表(mdm_module_db: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:26:49
* @since 2024-05-30 16:58:05
*/
public interface IMdmModuleDbDao extends IBaseDao<MdmModuleDbEntity, String> {
HashMap<String, Object> getServiceDataById(Map<String, Object> queryData);
List<HashMap<String, Object>> getServiceByFormmainId(Map<String, Object> queryData);
List<HashMap<String, Object>> getServiceByDistributeId(Map<String, Object> queryData);
List<MdmDistributeVo> getServiceByDistributeIdNoCase(Map<String, Object> queryData);
}

View File

@ -1,51 +1,17 @@
package com.hzya.frame.mdm.mdmModuleDb.dao.impl;
import com.hzya.frame.mdm.entity.MdmDistributeVo;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
import com.hzya.frame.sys.entity.ModuleDto;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 模版数据库表(MdmModuleDb)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:26:49
* @since 2024-05-30 16:58:05
*/
@Repository(value = "MdmModuleDbDaoImpl")
public class MdmModuleDbDaoImpl extends MybatisGenericDao<MdmModuleDbEntity, String> implements IMdmModuleDbDao {
@Override
public HashMap<String, Object> getServiceDataById(Map<String, Object> maps) {
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "getServiceDataById", maps);
return o;
}
@Override
public List<HashMap<String, Object>> getServiceByFormmainId(Map<String, Object> maps) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "getServiceByFormmainId", maps);
return o;
}
@Override
public List<HashMap<String, Object>> getServiceByDistributeId(Map<String, Object> maps) {
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "getServiceByDistributeId", maps);
return o;
}
@Override
public List<MdmDistributeVo> getServiceByDistributeIdNoCase(Map<String, Object> maps) {
List<MdmDistributeVo> o = (List<MdmDistributeVo>) super.selectList(getSqlIdPrifx() + "getServiceByDistributeIdNoCase", maps);
return o;
}
public class MdmModuleDbDaoImpl extends MybatisGenericDao<MdmModuleDbEntity, String> implements IMdmModuleDbDao{
}

View File

@ -1,38 +1,26 @@
package com.hzya.frame.mdm.mdmModuleDb.entity;
import java.util.Date;
import java.util.List;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 模版数据库表(MdmModuleDb)实体类
*
* @author makejava
* @since 2023-10-17 15:26:49
* @since 2024-05-30 16:58:05
*/
public class MdmModuleDbEntity extends BaseEntity {
/** 主数据模版ID */
private String mdmId;
/** 表名 */
private String dbName;
/** 类型 1、主表 2、明细 3、操作日志 4、下发日志 */
private String dbType;
/** 备注 */
private String remark;
/** 公司id */
private String companyId;
/**
* 主数据模版ID
*/
private String mdmId;
/**
* 表名
*/
private String dbName;
/**
* 类型 1主表 2明细
*/
private String dbType;
/**
* 备注
*/
private String remark;
//主数据子表字段
private List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds;
public String getMdmId() {
return mdmId;
@ -66,12 +54,13 @@ public class MdmModuleDbEntity extends BaseEntity {
this.remark = remark;
}
public List<MdmModuleDbFiledsEntity> getSublistMdmModuleDbFileds() {
return sublistMdmModuleDbFileds;
public String getCompanyId() {
return companyId;
}
public void setSublistMdmModuleDbFileds(List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds) {
this.sublistMdmModuleDbFileds = sublistMdmModuleDbFileds;
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -2,22 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.mdm.mdmModuleDb.dao.impl.MdmModuleDbDaoImpl">
<resultMap id="get-MdmModuleDbEntity-result" type="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="get-MdmModuleDbEntity-result" type="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleDbEntity_Base_Column_List">
<sql id = "MdmModuleDbEntity_Base_Column_List">
id
,mdm_id
,db_name
@ -30,293 +31,215 @@
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDbEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select
<include refid="MdmModuleDbEntity_Base_Column_List"/>
from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="dbName != null and dbName != ''">and db_name = #{dbName}</if>
<if test="dbType != null and dbType != ''">and db_type = #{dbType}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select
<include refid="MdmModuleDbEntity_Base_Column_List" />
from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select count(1) from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="dbName != null and dbName != ''">and db_name = #{dbName}</if>
<if test="dbType != null and dbType != ''">and db_type = #{dbType}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select count(1) from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleDbEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select
<include refid="MdmModuleDbEntity_Base_Column_List"/>
from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="dbName != null and dbName != ''">and db_name like concat('%',#{dbName},'%')</if>
<if test="dbType != null and dbType != ''">and db_type like concat('%',#{dbType},'%')</if>
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
<select id="entity_list_like" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select
<include refid="MdmModuleDbEntity_Base_Column_List" />
from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="dbName != null and dbName != ''"> and db_name like concat('%',#{dbName},'%') </if>
<if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if>
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDbentity_list_or" resultMap="get-MdmModuleDbEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select
<include refid="MdmModuleDbEntity_Base_Column_List"/>
from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="dbName != null and dbName != ''">or db_name = #{dbName}</if>
<if test="dbType != null and dbType != ''">or db_type = #{dbType}</if>
<if test="remark != null and remark != ''">or remark = #{remark}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDbentity_list_or" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
select
<include refid="MdmModuleDbEntity_Base_Column_List" />
from mdm_module_db
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="dbName != null and dbName != ''"> or db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
insert into mdm_module_db(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="dbName != null and dbName != ''">db_name ,</if>
<if test="dbType != null and dbType != ''">db_type ,</if>
<if test="remark != null and remark != ''">remark ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="dbName != null and dbName != ''">#{dbName} ,</if>
<if test="dbType != null and dbType != ''">#{dbType} ,</if>
<if test="remark != null and remark != ''">#{remark} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_db(mdm_id, db_name, db_type, remark, sorts, create_user_id, create_time, modify_user_id,
modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_db(mdm_id, db_name, db_type, remark, sorts, create_user_id, create_time, modify_user_id,
modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
db_name = values(db_name),
db_type = values(db_type),
remark = values(remark),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
update mdm_module_db set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="dbName != null and dbName != ''">db_name = #{dbName},</if>
<if test="dbType != null and dbType != ''">db_type = #{dbType},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="dbName != null and dbName != ''"> db_name , </if>
<if test="dbType != null and dbType != ''"> db_type , </if>
<if test="remark != null and remark != ''"> remark , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="dbName != null and dbName != ''"> #{dbName} ,</if>
<if test="dbType != null and dbType != ''"> #{dbType} ,</if>
<if test="remark != null and remark != ''"> #{remark} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_db a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db(mdm_id, db_name, db_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db(mdm_id, db_name, db_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
db_name = values(db_name),
db_type = values(db_type),
remark = values(remark),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
update mdm_module_db set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="dbName != null and dbName != ''"> db_name = #{dbName},</if>
<if test="dbType != null and dbType != ''"> db_type = #{dbType},</if>
<if test="remark != null and remark != ''"> remark = #{remark},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
update mdm_module_db set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
update mdm_module_db set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="dbName != null and dbName != ''">and db_name = #{dbName}</if>
<if test="dbType != null and dbType != ''">and db_type = #{dbType}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
update mdm_module_db set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_db where id = #{id}
</delete>
<select id="getServiceDataById" resultType="java.util.HashMap" parameterType="java.util.HashMap">
select
*
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="detailFlag">
and formmain_id = #{id}
</if>
<if test="!detailFlag">
and id = #{id}
</if>
and sts = 'Y'
</trim>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="getServiceByFormmainId" resultType="java.util.HashMap" parameterType="java.util.HashMap">
select
*
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="detailFlag">
and formmain_id = #{id}
</if>
<if test="!detailFlag">
and id = #{id}
</if>
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="getServiceByDistributeId" resultType="java.util.HashMap" parameterType="java.util.HashMap">
select
id,
formmain_id,
app_id,
CASE
status
WHEN '1' THEN '发送成功'
WHEN '2' THEN '发送中'
WHEN '3' THEN '发送失败'
ELSE ''
END status,
msg,
sorts,
create_user_id,
create_time,
modify_user_id,
modify_time,
sts,
org_id
from ${tableName}
<trim prefix="where" prefixOverrides="and">
and formmain_id = #{id}
and sts = 'Y'
</trim>
order by sorts asc
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="getServiceByDistributeIdNoCase" resultType="com.hzya.frame.mdm.entity.MdmDistributeVo" parameterType="java.util.HashMap">
select
formmain_id as formmainId,
app_id as appId,
status,
msg
from ${tableName}
<trim prefix="where" prefixOverrides="and">
and formmain_id = #{id}
and sts = 'Y'
</trim>
order by sorts asc
</select>
</mapper>

View File

@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModuleDb.service;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 模版数据库表(MdmModuleDb)表服务接口
*
* @author makejava
* @since 2023-10-17 15:26:51
* @since 2024-05-30 16:58:05
*/
public interface IMdmModuleDbService extends IBaseService<MdmModuleDbEntity, String> {
public interface IMdmModuleDbService extends IBaseService<MdmModuleDbEntity, String>{
}

View File

@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModuleDb.service.impl;
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
import com.hzya.frame.mdm.mdmModuleDb.service.IMdmModuleDbService;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 模版数据库表(MdmModuleDb)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:26:51
* @since 2024-05-30 16:58:05
*/
@Service(value = "mdmModuleDbService")
public class MdmModuleDbServiceImpl extends BaseService<MdmModuleDbEntity, String> implements IMdmModuleDbService {
private IMdmModuleDbDao mdmModuleDbDao;
@Autowired
public void setMdmModuleDbDao(IMdmModuleDbDao dao) {
this.mdmModuleDbDao = dao;
this.dao = dao;
}
public void setMdmModuleDbDao(IMdmModuleDbDao dao) {
this.mdmModuleDbDao = dao;
this.dao = dao;
}
}

View File

@ -1,13 +1,13 @@
package com.hzya.frame.mdm.mdmModuleDbFileds.dao;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 模版数据库字段表(mdm_module_db_fileds: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:28:06
* @since 2024-05-30 16:59:05
*/
public interface IMdmModuleDbFiledsDao extends IBaseDao<MdmModuleDbFiledsEntity, String> {

View File

@ -4,15 +4,14 @@ import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.mdm.mdmModuleDbFileds.dao.IMdmModuleDbFiledsDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 模版数据库字段表(MdmModuleDbFileds)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:28:07
* @since 2024-05-30 16:59:05
*/
@Repository(value = "MdmModuleDbFiledsDaoImpl")
public class MdmModuleDbFiledsDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsEntity, String> implements IMdmModuleDbFiledsDao {
public class MdmModuleDbFiledsDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsEntity, String> implements IMdmModuleDbFiledsDao{
}

View File

@ -1,61 +1,42 @@
package com.hzya.frame.mdm.mdmModuleDbFileds.entity;
import java.util.Date;
import java.util.List;
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 模版数据库字段表(MdmModuleDbFileds)实体类
*
* @author makejava
* @since 2023-10-17 15:28:07
* @since 2024-05-30 16:59:05
*/
public class MdmModuleDbFiledsEntity extends BaseEntity {
/** 主数据模版ID */
private String mdmId;
/** 模版数据库id */
private String dbId;
/** 中文名 */
private String chName;
/** 英文名 */
private String enName;
/** 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME */
private String filedType;
/** 显示类型:新增 */
private String addType;
/** 显示类型:修改 */
private String updateType;
/** 显示类型:查看 */
private String showType;
/** 显示类型:查询 */
private String queryType;
/** 显示类型:列表 */
private String listType;
/** 显示类型:显示 */
private String viewType;
/** 长度 */
private String filedLength;
/** 公司id */
private String companyId;
/**
* 主数据模版ID
*/
private String mdmId;
/**
* 模版数据库id
*/
private String dbId;
/**
* 中文名
*/
private String chName;
/**
* 英文名
*/
private String enName;
/**
* 字段类型 1BIGINT 2DECIMAL 3VARCHAR 4DATETIME
*/
private String filedType;
/**
* 长度
*/
private String filedLength;
/**
* roletype
*/
private String roletype;
/**
* roletype
*/
private String roleValue;
//字段规则
private List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules;
public List<MdmModuleDbFiledsRuleEntity> getMdmModuleDbFiledsRules() {
return mdmModuleDbFiledsRules;
}
public void setMdmModuleDbFiledsRules(List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules) {
this.mdmModuleDbFiledsRules = mdmModuleDbFiledsRules;
}
public String getMdmId() {
return mdmId;
@ -97,6 +78,54 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
this.filedType = filedType;
}
public String getAddType() {
return addType;
}
public void setAddType(String addType) {
this.addType = addType;
}
public String getUpdateType() {
return updateType;
}
public void setUpdateType(String updateType) {
this.updateType = updateType;
}
public String getShowType() {
return showType;
}
public void setShowType(String showType) {
this.showType = showType;
}
public String getQueryType() {
return queryType;
}
public void setQueryType(String queryType) {
this.queryType = queryType;
}
public String getListType() {
return listType;
}
public void setListType(String listType) {
this.listType = listType;
}
public String getViewType() {
return viewType;
}
public void setViewType(String viewType) {
this.viewType = viewType;
}
public String getFiledLength() {
return filedLength;
}
@ -105,20 +134,13 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
this.filedLength = filedLength;
}
public String getRoletype() {
return roletype;
public String getCompanyId() {
return companyId;
}
public void setRoletype(String roletype) {
this.roletype = roletype;
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getRoleValue() {
return roleValue;
}
public void setRoleValue(String roleValue) {
this.roleValue = roleValue;
}
}

View File

@ -2,31 +2,43 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.mdm.mdmModuleDbFileds.dao.impl.MdmModuleDbFiledsDaoImpl">
<resultMap id="get-MdmModuleDbFiledsEntity-result"
type="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="dbId" column="db_id" jdbcType="VARCHAR"/>
<result property="chName" column="ch_name" jdbcType="VARCHAR"/>
<result property="enName" column="en_name" jdbcType="VARCHAR"/>
<result property="filedType" column="filed_type" jdbcType="VARCHAR"/>
<result property="filedLength" column="filed_length" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="get-MdmModuleDbFiledsEntity-result" type="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="dbId" column="db_id" jdbcType="VARCHAR"/>
<result property="chName" column="ch_name" jdbcType="VARCHAR"/>
<result property="enName" column="en_name" jdbcType="VARCHAR"/>
<result property="filedType" column="filed_type" jdbcType="VARCHAR"/>
<result property="addType" column="add_type" jdbcType="VARCHAR"/>
<result property="updateType" column="update_type" jdbcType="VARCHAR"/>
<result property="showType" column="show_type" jdbcType="VARCHAR"/>
<result property="queryType" column="query_type" jdbcType="VARCHAR"/>
<result property="listType" column="list_type" jdbcType="VARCHAR"/>
<result property="viewType" column="view_type" jdbcType="VARCHAR"/>
<result property="filedLength" column="filed_length" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleDbFiledsEntity_Base_Column_List">
<sql id = "MdmModuleDbFiledsEntity_Base_Column_List">
id
,mdm_id
,db_id
,ch_name
,en_name
,filed_type
,add_type
,update_type
,show_type
,query_type
,list_type
,view_type
,filed_length
,sorts
,create_user_id
@ -35,245 +47,285 @@
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="dbId != null and dbId != ''">and db_id = #{dbId}</if>
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<if test="roletype != null and roletype != ''">
and id in (
select
filed_id
from mdm_module_db_fileds_rule
where sts='Y' and rule_code = #{roletype} and rule_value = #{roleValue}
)
</if>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select count(1) from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="dbId != null and dbId != ''">and db_id = #{dbId}</if>
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select count(1) from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleDbFiledsEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="dbId != null and dbId != ''">and db_id like concat('%',#{dbId},'%')</if>
<if test="chName != null and chName != ''">and ch_name like concat('%',#{chName},'%')</if>
<if test="enName != null and enName != ''">and en_name like concat('%',#{enName},'%')</if>
<if test="filedType != null and filedType != ''">and filed_type like concat('%',#{filedType},'%')</if>
<if test="filedLength != null and filedLength != ''">and filed_length like concat('%',#{filedLength},'%')
</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
<select id="entity_list_like" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="dbId != null and dbId != ''"> and db_id like concat('%',#{dbId},'%') </if>
<if test="chName != null and chName != ''"> and ch_name like concat('%',#{chName},'%') </if>
<if test="enName != null and enName != ''"> and en_name like concat('%',#{enName},'%') </if>
<if test="filedType != null and filedType != ''"> and filed_type like concat('%',#{filedType},'%') </if>
<if test="addType != null and addType != ''"> and add_type like concat('%',#{addType},'%') </if>
<if test="updateType != null and updateType != ''"> and update_type like concat('%',#{updateType},'%') </if>
<if test="showType != null and showType != ''"> and show_type like concat('%',#{showType},'%') </if>
<if test="queryType != null and queryType != ''"> and query_type like concat('%',#{queryType},'%') </if>
<if test="listType != null and listType != ''"> and list_type like concat('%',#{listType},'%') </if>
<if test="viewType != null and viewType != ''"> and view_type like concat('%',#{viewType},'%') </if>
<if test="filedLength != null and filedLength != ''"> and filed_length like concat('%',#{filedLength},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDbFiledsentity_list_or" resultMap="get-MdmModuleDbFiledsEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="dbId != null and dbId != ''">or db_id = #{dbId}</if>
<if test="chName != null and chName != ''">or ch_name = #{chName}</if>
<if test="enName != null and enName != ''">or en_name = #{enName}</if>
<if test="filedType != null and filedType != ''">or filed_type = #{filedType}</if>
<if test="filedLength != null and filedLength != ''">or filed_length = #{filedLength}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDbFiledsentity_list_or" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
select
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
from mdm_module_db_fileds
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> or db_id = #{dbId} </if>
<if test="chName != null and chName != ''"> or ch_name = #{chName} </if>
<if test="enName != null and enName != ''"> or en_name = #{enName} </if>
<if test="filedType != null and filedType != ''"> or filed_type = #{filedType} </if>
<if test="addType != null and addType != ''"> or add_type = #{addType} </if>
<if test="updateType != null and updateType != ''"> or update_type = #{updateType} </if>
<if test="showType != null and showType != ''"> or show_type = #{showType} </if>
<if test="queryType != null and queryType != ''"> or query_type = #{queryType} </if>
<if test="listType != null and listType != ''"> or list_type = #{listType} </if>
<if test="viewType != null and viewType != ''"> or view_type = #{viewType} </if>
<if test="filedLength != null and filedLength != ''"> or filed_length = #{filedLength} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity"
>
insert into mdm_module_db_fileds(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="dbId != null and dbId != ''">db_id ,</if>
<if test="chName != null and chName != ''">ch_name ,</if>
<if test="enName != null and enName != ''">en_name ,</if>
<if test="filedType != null and filedType != ''">filed_type ,</if>
<if test="filedLength != null and filedLength != ''">filed_length ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="dbId != null and dbId != ''">#{dbId} ,</if>
<if test="chName != null and chName != ''">#{chName} ,</if>
<if test="enName != null and enName != ''">#{enName} ,</if>
<if test="filedType != null and filedType != ''">#{filedType} ,</if>
<if test="filedLength != null and filedLength != ''">#{filedLength} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, filed_length, sorts,
create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.filedLength},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, filed_length, sorts,
create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.filedLength},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
db_id = values(db_id),
ch_name = values(ch_name),
en_name = values(en_name),
filed_type = values(filed_type),
filed_length = values(filed_length),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
update mdm_module_db_fileds set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="dbId != null and dbId != ''">db_id = #{dbId},</if>
<if test="chName != null and chName != ''">ch_name = #{chName},</if>
<if test="enName != null and enName != ''">en_name = #{enName},</if>
<if test="filedType != null and filedType != ''">filed_type = #{filedType},</if>
<if test="filedLength != null and filedLength != ''">filed_length = #{filedLength},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db_fileds(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="dbId != null and dbId != ''"> db_id , </if>
<if test="chName != null and chName != ''"> ch_name , </if>
<if test="enName != null and enName != ''"> en_name , </if>
<if test="filedType != null and filedType != ''"> filed_type , </if>
<if test="addType != null and addType != ''"> add_type , </if>
<if test="updateType != null and updateType != ''"> update_type , </if>
<if test="showType != null and showType != ''"> show_type , </if>
<if test="queryType != null and queryType != ''"> query_type , </if>
<if test="listType != null and listType != ''"> list_type , </if>
<if test="viewType != null and viewType != ''"> view_type , </if>
<if test="filedLength != null and filedLength != ''"> filed_length , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="dbId != null and dbId != ''"> #{dbId} ,</if>
<if test="chName != null and chName != ''"> #{chName} ,</if>
<if test="enName != null and enName != ''"> #{enName} ,</if>
<if test="filedType != null and filedType != ''"> #{filedType} ,</if>
<if test="addType != null and addType != ''"> #{addType} ,</if>
<if test="updateType != null and updateType != ''"> #{updateType} ,</if>
<if test="showType != null and showType != ''"> #{showType} ,</if>
<if test="queryType != null and queryType != ''"> #{queryType} ,</if>
<if test="listType != null and listType != ''"> #{listType} ,</if>
<if test="viewType != null and viewType != ''"> #{viewType} ,</if>
<if test="filedLength != null and filedLength != ''"> #{filedLength} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_db_fileds a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type, query_type, list_type, view_type, filed_length, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.addType},#{entity.updateType},#{entity.showType},#{entity.queryType},#{entity.listType},#{entity.viewType},#{entity.filedLength},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type, query_type, list_type, view_type, filed_length, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.addType},#{entity.updateType},#{entity.showType},#{entity.queryType},#{entity.listType},#{entity.viewType},#{entity.filedLength},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
db_id = values(db_id),
ch_name = values(ch_name),
en_name = values(en_name),
filed_type = values(filed_type),
add_type = values(add_type),
update_type = values(update_type),
show_type = values(show_type),
query_type = values(query_type),
list_type = values(list_type),
view_type = values(view_type),
filed_length = values(filed_length),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
update mdm_module_db_fileds set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="dbId != null and dbId != ''"> db_id = #{dbId},</if>
<if test="chName != null and chName != ''"> ch_name = #{chName},</if>
<if test="enName != null and enName != ''"> en_name = #{enName},</if>
<if test="filedType != null and filedType != ''"> filed_type = #{filedType},</if>
<if test="addType != null and addType != ''"> add_type = #{addType},</if>
<if test="updateType != null and updateType != ''"> update_type = #{updateType},</if>
<if test="showType != null and showType != ''"> show_type = #{showType},</if>
<if test="queryType != null and queryType != ''"> query_type = #{queryType},</if>
<if test="listType != null and listType != ''"> list_type = #{listType},</if>
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
<if test="filedLength != null and filedLength != ''"> filed_length = #{filedLength},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
update mdm_module_db_fileds set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
update mdm_module_db_fileds set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="dbId != null and dbId != ''">and db_id = #{dbId}</if>
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
update mdm_module_db_fileds set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_db_fileds where id = #{id}
</delete>

View File

@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModuleDbFileds.service;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 模版数据库字段表(MdmModuleDbFileds)表服务接口
*
* @author makejava
* @since 2023-10-17 15:28:09
* @since 2024-05-30 16:59:05
*/
public interface IMdmModuleDbFiledsService extends IBaseService<MdmModuleDbFiledsEntity, String> {
public interface IMdmModuleDbFiledsService extends IBaseService<MdmModuleDbFiledsEntity, String>{
}

View File

@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModuleDbFileds.service.impl;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.mdm.mdmModuleDbFileds.dao.IMdmModuleDbFiledsDao;
import com.hzya.frame.mdm.mdmModuleDbFileds.service.IMdmModuleDbFiledsService;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 模版数据库字段表(MdmModuleDbFileds)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:28:09
* @since 2024-05-30 16:59:05
*/
@Service(value = "mdmModuleDbFiledsService")
public class MdmModuleDbFiledsServiceImpl extends BaseService<MdmModuleDbFiledsEntity, String> implements IMdmModuleDbFiledsService {
private IMdmModuleDbFiledsDao mdmModuleDbFiledsDao;
@Autowired
public void setMdmModuleDbFiledsDao(IMdmModuleDbFiledsDao dao) {
this.mdmModuleDbFiledsDao = dao;
this.dao = dao;
}
public void setMdmModuleDbFiledsDao(IMdmModuleDbFiledsDao dao) {
this.mdmModuleDbFiledsDao = dao;
this.dao = dao;
}
}

View File

@ -7,7 +7,7 @@ import com.hzya.frame.basedao.dao.IBaseDao;
* 模版数据库字段规则表(mdm_module_db_fileds_rule: table)表数据库访问层
*
* @author makejava
* @since 2023-11-04 11:16:44
* @since 2024-05-30 16:59:59
*/
public interface IMdmModuleDbFiledsRuleDao extends IBaseDao<MdmModuleDbFiledsRuleEntity, String> {

View File

@ -8,7 +8,7 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
* 模版数据库字段规则表(MdmModuleDbFiledsRule)表数据库访问层
*
* @author makejava
* @since 2023-11-04 11:16:44
* @since 2024-05-30 16:59:59
*/
@Repository(value = "MdmModuleDbFiledsRuleDaoImpl")
public class MdmModuleDbFiledsRuleDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsRuleEntity, String> implements IMdmModuleDbFiledsRuleDao{

View File

@ -6,7 +6,7 @@ import com.hzya.frame.web.entity.BaseEntity;
* 模版数据库字段规则表(MdmModuleDbFiledsRule)实体类
*
* @author makejava
* @since 2023-11-04 11:16:44
* @since 2024-05-30 16:59:59
*/
public class MdmModuleDbFiledsRuleEntity extends BaseEntity {
@ -26,6 +26,8 @@ public class MdmModuleDbFiledsRuleEntity extends BaseEntity {
private String ruleValue;
/** 规则类型1、表单属性 2、控件属性 */
private String ruleType;
/** 公司id */
private String companyId;
public String getMdmId() {
@ -92,5 +94,13 @@ public class MdmModuleDbFiledsRuleEntity extends BaseEntity {
this.ruleType = ruleType;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -19,6 +19,7 @@
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "MdmModuleDbFiledsRuleEntity_Base_Column_List">
@ -38,6 +39,7 @@
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsRuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity">
@ -61,6 +63,7 @@
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -87,6 +90,7 @@
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -115,6 +119,7 @@
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -143,14 +148,15 @@
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
and sts='Y'
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity" >
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db_fileds_rule(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -169,6 +175,8 @@
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
@ -189,24 +197,26 @@
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_db_fileds_rule a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id}, 'Y')
(#{entity.mdmId},#{entity.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
(#{entity.mdmId},#{entity.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
@ -217,13 +227,13 @@
rule_code = values(rule_code),
rule_value = values(rule_value),
rule_type = values(rule_type),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)</insert>
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity" >
update mdm_module_db_fileds_rule set
@ -236,14 +246,14 @@ update mdm_module_db_fileds_rule set
<if test="ruleCode != null and ruleCode != ''"> rule_code = #{ruleCode},</if>
<if test="ruleValue != null and ruleValue != ''"> rule_value = #{ruleValue},</if>
<if test="ruleType != null and ruleType != ''"> rule_type = #{ruleType},</if>
<if test="sorts != null"> sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
</trim>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
@ -266,7 +276,8 @@ update mdm_module_db_fileds_rule set sts= 'N' ,modify_time = #{modify_time},mod
<if test="ruleType != null and ruleType != ''"> and rule_type = #{ruleType} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
and sts='Y'
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->

View File

@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
* 模版数据库字段规则表(MdmModuleDbFiledsRule)表服务接口
*
* @author makejava
* @since 2023-11-04 11:16:44
* @since 2024-05-30 16:59:59
*/
public interface IMdmModuleDbFiledsRuleService extends IBaseService<MdmModuleDbFiledsRuleEntity, String>{
}

View File

@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
* 模版数据库字段规则表(MdmModuleDbFiledsRule)表服务实现类
*
* @author makejava
* @since 2023-11-04 11:16:44
* @since 2024-05-30 16:59:59
*/
@Service(value = "mdmModuleDbFiledsRuleService")
public class MdmModuleDbFiledsRuleServiceImpl extends BaseService<MdmModuleDbFiledsRuleEntity, String> implements IMdmModuleDbFiledsRuleService {

View File

@ -1,15 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 模版数据库字段规则档案表(mdm_module_db_fileds_rule_files: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:30:12
*/
public interface IMdmModuleDbFiledsRuleFilesDao extends IBaseDao<MdmModuleDbFiledsRuleFilesEntity, String> {
}

View File

@ -1,18 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.impl;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.IMdmModuleDbFiledsRuleFilesDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:30:12
*/
@Repository(value = "MdmModuleDbFiledsRuleFilesDaoImpl")
public class MdmModuleDbFiledsRuleFilesDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsRuleFilesEntity, String> implements IMdmModuleDbFiledsRuleFilesDao {
}

View File

@ -1,66 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)实体类
*
* @author makejava
* @since 2023-10-17 15:30:13
*/
public class MdmModuleDbFiledsRuleFilesEntity extends BaseEntity {
/**
* 规则名称
*/
private String ruleName;
/**
* 规则编码
*/
private String ruleCode;
/**
* 规则类型 1表单属性 2控件属性
*/
private String ruleType;
/**
* 规则值
*/
private String ruleValue;
public String getRuleName() {
return ruleName;
}
public void setRuleName(String ruleName) {
this.ruleName = ruleName;
}
public String getRuleCode() {
return ruleCode;
}
public void setRuleCode(String ruleCode) {
this.ruleCode = ruleCode;
}
public String getRuleType() {
return ruleType;
}
public void setRuleType(String ruleType) {
this.ruleType = ruleType;
}
public String getRuleValue() {
return ruleValue;
}
public void setRuleValue(String ruleValue) {
this.ruleValue = ruleValue;
}
}

View File

@ -1,254 +0,0 @@
<?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="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.impl.MdmModuleDbFiledsRuleFilesDaoImpl">
<resultMap id="get-MdmModuleDbFiledsRuleFilesEntity-result"
type="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="ruleName" column="rule_name" jdbcType="VARCHAR"/>
<result property="ruleCode" column="rule_code" jdbcType="VARCHAR"/>
<result property="ruleType" column="rule_type" jdbcType="VARCHAR"/>
<result property="ruleValue" column="rule_value" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List">
id
,rule_name
,rule_code
,rule_type
,rule_value
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsRuleFilesEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
select
<include refid="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List"/>
from mdm_module_db_fileds_rule_files
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="ruleName != null and ruleName != ''">and rule_name = #{ruleName}</if>
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
<if test="ruleType != null and ruleType != ''">and rule_type = #{ruleType}</if>
<if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
select count(1) from mdm_module_db_fileds_rule_files
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="ruleName != null and ruleName != ''">and rule_name = #{ruleName}</if>
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
<if test="ruleType != null and ruleType != ''">and rule_type = #{ruleType}</if>
<if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleDbFiledsRuleFilesEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
select
<include refid="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List"/>
from mdm_module_db_fileds_rule_files
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="ruleName != null and ruleName != ''">and rule_name like concat('%',#{ruleName},'%')</if>
<if test="ruleCode != null and ruleCode != ''">and rule_code like concat('%',#{ruleCode},'%')</if>
<if test="ruleType != null and ruleType != ''">and rule_type like concat('%',#{ruleType},'%')</if>
<if test="ruleValue != null and ruleValue != ''">and rule_value like concat('%',#{ruleValue},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDbFiledsRuleFilesentity_list_or" resultMap="get-MdmModuleDbFiledsRuleFilesEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
select
<include refid="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List"/>
from mdm_module_db_fileds_rule_files
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="ruleName != null and ruleName != ''">or rule_name = #{ruleName}</if>
<if test="ruleCode != null and ruleCode != ''">or rule_code = #{ruleCode}</if>
<if test="ruleType != null and ruleType != ''">or rule_type = #{ruleType}</if>
<if test="ruleValue != null and ruleValue != ''">or rule_value = #{ruleValue}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity"
>
insert into mdm_module_db_fileds_rule_files(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="ruleName != null and ruleName != ''">rule_name ,</if>
<if test="ruleCode != null and ruleCode != ''">rule_code ,</if>
<if test="ruleType != null and ruleType != ''">rule_type ,</if>
<if test="ruleValue != null and ruleValue != ''">rule_value ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="ruleName != null and ruleName != ''">#{ruleName} ,</if>
<if test="ruleCode != null and ruleCode != ''">#{ruleCode} ,</if>
<if test="ruleType != null and ruleType != ''">#{ruleType} ,</if>
<if test="ruleValue != null and ruleValue != ''">#{ruleValue} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_db_fileds_rule_files(rule_name, rule_code, rule_type, rule_value, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.ruleName},#{entity.ruleCode},#{entity.ruleType},#{entity.ruleValue},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_db_fileds_rule_files(rule_name, rule_code, rule_type, rule_value, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.ruleName},#{entity.ruleCode},#{entity.ruleType},#{entity.ruleValue},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
rule_name = values(rule_name),
rule_code = values(rule_code),
rule_type = values(rule_type),
rule_value = values(rule_value),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
update mdm_module_db_fileds_rule_files set
<trim suffix="" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">rule_name = #{ruleName},</if>
<if test="ruleCode != null and ruleCode != ''">rule_code = #{ruleCode},</if>
<if test="ruleType != null and ruleType != ''">rule_type = #{ruleType},</if>
<if test="ruleValue != null and ruleValue != ''">rule_value = #{ruleValue},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
update mdm_module_db_fileds_rule_files set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
update mdm_module_db_fileds_rule_files set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
#{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="ruleName != null and ruleName != ''">and rule_name = #{ruleName}</if>
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
<if test="ruleType != null and ruleType != ''">and rule_type = #{ruleType}</if>
<if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_db_fileds_rule_files where id = #{id}
</delete>
</mapper>

View File

@ -1,13 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.service;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)表服务接口
*
* @author makejava
* @since 2023-10-17 15:30:14
*/
public interface IMdmModuleDbFiledsRuleFilesService extends IBaseService<MdmModuleDbFiledsRuleFilesEntity, String> {
}

View File

@ -1,29 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.service.impl;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.IMdmModuleDbFiledsRuleFilesDao;
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.service.IMdmModuleDbFiledsRuleFilesService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:30:15
*/
@Service(value = "mdmModuleDbFiledsRuleFilesService")
public class MdmModuleDbFiledsRuleFilesServiceImpl extends BaseService<MdmModuleDbFiledsRuleFilesEntity, String> implements IMdmModuleDbFiledsRuleFilesService {
private IMdmModuleDbFiledsRuleFilesDao mdmModuleDbFiledsRuleFilesDao;
@Autowired
public void setMdmModuleDbFiledsRuleFilesDao(IMdmModuleDbFiledsRuleFilesDao dao) {
this.mdmModuleDbFiledsRuleFilesDao = dao;
this.dao = dao;
}
}

View File

@ -7,7 +7,7 @@ import com.hzya.frame.basedao.dao.IBaseDao;
* 主数据功能应用分发表(mdm_module_distribute: table)表数据库访问层
*
* @author makejava
* @since 2023-11-06 15:27:41
* @since 2024-05-30 17:02:43
*/
public interface IMdmModuleDistributeDao extends IBaseDao<MdmModuleDistributeEntity, String> {

View File

@ -8,7 +8,7 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
* 主数据功能应用分发表(MdmModuleDistribute)表数据库访问层
*
* @author makejava
* @since 2023-11-06 15:27:42
* @since 2024-05-30 17:02:43
*/
@Repository(value = "MdmModuleDistributeDaoImpl")
public class MdmModuleDistributeDaoImpl extends MybatisGenericDao<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeDao{

View File

@ -1,15 +1,12 @@
package com.hzya.frame.mdm.mdmModuleDistribute.entity;
import java.util.Date;
import java.util.List;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据功能应用分发表(MdmModuleDistribute)实体类
*
* @author makejava
* @since 2023-11-06 15:27:42
* @since 2024-05-30 17:02:43
*/
public class MdmModuleDistributeEntity extends BaseEntity {
@ -17,36 +14,17 @@ public class MdmModuleDistributeEntity extends BaseEntity {
private String mdmId;
/** 应用id */
private String appId;
/** 修改接口 */
private String updateApi;
/** 新增接口 */
private String addApi;
/** 删除接口 */
private String deleteApi;
/** 新增使用类型 */
private String addType;
/** 删除使用类型 */
private String deleteType;
/** 新增插件 */
private String addPlug;
/** 删除插件 */
private String deletePlug;
private List<MdmModuleDistributeDetailEntity> addList;
private List<MdmModuleDistributeDetailEntity> deleteList;
/** 启用停用 0、停用1、启用 */
private String enabledState;
/** 公司id */
private String companyId;
public List<MdmModuleDistributeDetailEntity> getAddList() {
return addList;
}
public void setAddList(List<MdmModuleDistributeDetailEntity> addList) {
this.addList = addList;
}
public List<MdmModuleDistributeDetailEntity> getDeleteList() {
return deleteList;
}
public void setDeleteList(List<MdmModuleDistributeDetailEntity> deleteList) {
this.deleteList = deleteList;
}
public String getMdmId() {
return mdmId;
@ -64,6 +42,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
this.appId = appId;
}
public String getUpdateApi() {
return updateApi;
}
public void setUpdateApi(String updateApi) {
this.updateApi = updateApi;
}
public String getAddApi() {
return addApi;
}
@ -80,36 +66,20 @@ public class MdmModuleDistributeEntity extends BaseEntity {
this.deleteApi = deleteApi;
}
public String getAddType() {
return addType;
public String getEnabledState() {
return enabledState;
}
public void setAddType(String addType) {
this.addType = addType;
public void setEnabledState(String enabledState) {
this.enabledState = enabledState;
}
public String getDeleteType() {
return deleteType;
public String getCompanyId() {
return companyId;
}
public void setDeleteType(String deleteType) {
this.deleteType = deleteType;
}
public String getAddPlug() {
return addPlug;
}
public void setAddPlug(String addPlug) {
this.addPlug = addPlug;
}
public String getDeletePlug() {
return deletePlug;
}
public void setDeletePlug(String deletePlug) {
this.deletePlug = deletePlug;
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -6,10 +6,10 @@
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
<result property="updateApi" column="update_api" jdbcType="VARCHAR"/>
<result property="addApi" column="add_api" jdbcType="VARCHAR"/>
<result property="deleteApi" column="delete_api" jdbcType="VARCHAR"/>
<result property="addType" column="add_type" jdbcType="VARCHAR"/>
<result property="deleteType" column="delete_type" jdbcType="VARCHAR"/>
<result property="enabledState" column="enabled_state" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
@ -17,18 +17,17 @@
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="addPlug" column="add_plug" jdbcType="VARCHAR"/>
<result property="deletePlug" column="delete_plug" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "MdmModuleDistributeEntity_Base_Column_List">
id
,mdm_id
,app_id
,update_api
,add_api
,delete_api
,add_type
,delete_type
,enabled_state
,sorts
,create_user_id
,create_time
@ -36,8 +35,7 @@
,modify_time
,sts
,org_id
,add_plug
,delete_plug
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDistributeEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity">
@ -48,10 +46,10 @@
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
<if test="deleteType != null and deleteType != ''"> and delete_type = #{deleteType} </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -59,8 +57,7 @@
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="addPlug != null and addPlug != ''"> and add_plug = #{addPlug} </if>
<if test="deletePlug != null and deletePlug != ''"> and delete_plug = #{deletePlug} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -74,10 +71,10 @@
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
<if test="deleteType != null and deleteType != ''"> and delete_type = #{deleteType} </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -85,8 +82,7 @@
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="addPlug != null and addPlug != ''"> and add_plug = #{addPlug} </if>
<if test="deletePlug != null and deletePlug != ''"> and delete_plug = #{deletePlug} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -102,10 +98,10 @@
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
<if test="updateApi != null and updateApi != ''"> and update_api like concat('%',#{updateApi},'%') </if>
<if test="addApi != null and addApi != ''"> and add_api like concat('%',#{addApi},'%') </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api like concat('%',#{deleteApi},'%') </if>
<if test="addType != null and addType != ''"> and add_type like concat('%',#{addType},'%') </if>
<if test="deleteType != null and deleteType != ''"> and delete_type like concat('%',#{deleteType},'%') </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state like concat('%',#{enabledState},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
@ -113,8 +109,7 @@
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="addPlug != null and addPlug != ''"> and add_plug like concat('%',#{addPlug},'%') </if>
<if test="deletePlug != null and deletePlug != ''"> and delete_plug like concat('%',#{deletePlug},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -130,10 +125,10 @@
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
<if test="updateApi != null and updateApi != ''"> or update_api = #{updateApi} </if>
<if test="addApi != null and addApi != ''"> or add_api = #{addApi} </if>
<if test="deleteApi != null and deleteApi != ''"> or delete_api = #{deleteApi} </if>
<if test="addType != null and addType != ''"> or add_type = #{addType} </if>
<if test="deleteType != null and deleteType != ''"> or delete_type = #{deleteType} </if>
<if test="enabledState != null and enabledState != ''"> or enabled_state = #{enabledState} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
@ -141,8 +136,7 @@
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="addPlug != null and addPlug != ''"> or add_plug = #{addPlug} </if>
<if test="deletePlug != null and deletePlug != ''"> or delete_plug = #{deletePlug} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -150,16 +144,16 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity" >
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_distribute(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="appId != null and appId != ''"> app_id , </if>
<if test="updateApi != null and updateApi != ''"> update_api , </if>
<if test="addApi != null and addApi != ''"> add_api , </if>
<if test="deleteApi != null and deleteApi != ''"> delete_api , </if>
<if test="addType != null and addType != ''"> add_type , </if>
<if test="deleteType != null and deleteType != ''"> delete_type , </if>
<if test="enabledState != null and enabledState != ''"> enabled_state , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
@ -167,8 +161,8 @@
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="addPlug != null and addPlug != ''"> add_plug , </if>
<if test="deletePlug != null and deletePlug != ''"> delete_plug , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
@ -176,10 +170,10 @@
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="appId != null and appId != ''"> #{appId} ,</if>
<if test="updateApi != null and updateApi != ''"> #{updateApi} ,</if>
<if test="addApi != null and addApi != ''"> #{addApi} ,</if>
<if test="deleteApi != null and deleteApi != ''"> #{deleteApi} ,</if>
<if test="addType != null and addType != ''"> #{addType} ,</if>
<if test="deleteType != null and deleteType != ''"> #{deleteType} ,</if>
<if test="enabledState != null and enabledState != ''"> #{enabledState} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
@ -187,62 +181,58 @@
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="addPlug != null and addPlug != ''"> #{addPlug} ,</if>
<if test="deletePlug != null and deletePlug != ''"> #{deletePlug} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_distribute a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_distribute(mdm_id, app_id, add_api, delete_api, add_type, delete_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, add_plug, delete_plug, sts)
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_distribute(mdm_id, app_id, update_api, add_api, delete_api, enabled_state, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.appId},#{entity.addApi},#{entity.deleteApi},#{entity.addType},#{entity.deleteType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.addPlug},#{entity.deletePlug}, 'Y')
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.addApi},#{entity.deleteApi},#{entity.enabledState},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_distribute(mdm_id, app_id, add_api, delete_api, add_type, delete_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, add_plug, delete_plug)
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_distribute(mdm_id, app_id, update_api, add_api, delete_api, enabled_state, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.appId},#{entity.addApi},#{entity.deleteApi},#{entity.addType},#{entity.deleteType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.addPlug},#{entity.deletePlug})
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.addApi},#{entity.deleteApi},#{entity.enabledState},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
app_id = values(app_id),
update_api = values(update_api),
add_api = values(add_api),
delete_api = values(delete_api),
add_type = values(add_type),
delete_type = values(delete_type),
sorts = values(sorts),
enabled_state = values(enabled_state),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
add_plug = values(add_plug),
delete_plug = values(delete_plug)</insert>
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity" >
update mdm_module_distribute set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
<if test="updateApi != null and updateApi != ''"> update_api = #{updateApi},</if>
<if test="addApi != null and addApi != ''"> add_api = #{addApi},</if>
<if test="deleteApi != null and deleteApi != ''"> delete_api = #{deleteApi},</if>
<if test="addType != null and addType != ''"> add_type = #{addType},</if>
<if test="deleteType != null and deleteType != ''"> delete_type = #{deleteType},</if>
<if test="sorts != null"> sorts = #{sorts},</if>
<if test="enabledState != null and enabledState != ''"> enabled_state = #{enabledState},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="addPlug != null and addPlug != ''"> add_plug = #{addPlug},</if>
<if test="deletePlug != null and deletePlug != ''"> delete_plug = #{deletePlug},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
@ -258,14 +248,13 @@ update mdm_module_distribute set sts= 'N' ,modify_time = #{modify_time},modify_
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
<if test="deleteType != null and deleteType != ''"> and delete_type = #{deleteType} </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="addPlug != null and addPlug != ''"> and add_plug = #{addPlug} </if>
<if test="deletePlug != null and deletePlug != ''"> and delete_plug = #{deletePlug} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>

View File

@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
* 主数据功能应用分发表(MdmModuleDistribute)表服务接口
*
* @author makejava
* @since 2023-11-06 15:27:42
* @since 2024-05-30 17:02:44
*/
public interface IMdmModuleDistributeService extends IBaseService<MdmModuleDistributeEntity, String>{
}

View File

@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
* 主数据功能应用分发表(MdmModuleDistribute)表服务实现类
*
* @author makejava
* @since 2023-11-06 15:27:42
* @since 2024-05-30 17:02:44
*/
@Service(value = "mdmModuleDistributeService")
public class MdmModuleDistributeServiceImpl extends BaseService<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeService {

View File

@ -1,15 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDistributeDetail.dao;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据功能应用分发明细表(mdm_module_distribute_detail: table)表数据库访问层
*
* @author makejava
* @since 2023-11-07 09:11:31
*/
public interface IMdmModuleDistributeDetailDao extends IBaseDao<MdmModuleDistributeDetailEntity, String> {
}

View File

@ -1,17 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.impl;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表数据库访问层
*
* @author makejava
* @since 2023-11-07 09:11:31
*/
@Repository(value = "MdmModuleDistributeDetailDaoImpl")
public class MdmModuleDistributeDetailDaoImpl extends MybatisGenericDao<MdmModuleDistributeDetailEntity, String> implements IMdmModuleDistributeDetailDao{
}

View File

@ -1,144 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDistributeDetail.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)实体类
*
* @author makejava
* @since 2023-11-07 09:11:31
*/
public class MdmModuleDistributeDetailEntity extends BaseEntity {
/** 主数据模版ID */
private String mdmId;
/** 应用分发id */
private String distributeId;
/** 接口id */
private String apiId;
/** 源API字段 */
private String sourceField;
/** 源API字段名 */
private String sourceName;
/** 目标API字段 */
private String targetField;
/** 目标API字段名 */
private String targetName;
/** 目标API字段默认值 */
private String defaultVaule;
/** 源字段层级 */
private String sourceFieldPath;
/** 目标字段层级 */
private String targetFieldPath;
private String targetPath;
private String sourcePath;
/** 连线信息 */
private String coordinate;
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getDistributeId() {
return distributeId;
}
public void setDistributeId(String distributeId) {
this.distributeId = distributeId;
}
public String getApiId() {
return apiId;
}
public void setApiId(String apiId) {
this.apiId = apiId;
}
public String getSourceField() {
return sourceField;
}
public void setSourceField(String sourceField) {
this.sourceField = sourceField;
}
public String getSourceName() {
return sourceName;
}
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
public String getTargetField() {
return targetField;
}
public void setTargetField(String targetField) {
this.targetField = targetField;
}
public String getTargetName() {
return targetName;
}
public void setTargetName(String targetName) {
this.targetName = targetName;
}
public String getDefaultVaule() {
return defaultVaule;
}
public void setDefaultVaule(String defaultVaule) {
this.defaultVaule = defaultVaule;
}
public String getSourceFieldPath() {
return sourceFieldPath;
}
public void setSourceFieldPath(String sourceFieldPath) {
this.sourceFieldPath = sourceFieldPath;
}
public String getTargetFieldPath() {
return targetFieldPath;
}
public void setTargetFieldPath(String targetFieldPath) {
this.targetFieldPath = targetFieldPath;
}
public String getTargetPath() {
return targetPath;
}
public void setTargetPath(String targetPath) {
this.targetPath = targetPath;
}
public String getSourcePath() {
return sourcePath;
}
public void setSourcePath(String sourcePath) {
this.sourcePath = sourcePath;
}
public String getCoordinate() {
return coordinate;
}
public void setCoordinate(String coordinate) {
this.coordinate = coordinate;
}
}

View File

@ -1,333 +0,0 @@
<?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="com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.impl.MdmModuleDistributeDetailDaoImpl">
<resultMap id="get-MdmModuleDistributeDetailEntity-result" type="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="distributeId" column="distribute_id" jdbcType="VARCHAR"/>
<result property="apiId" column="api_id" jdbcType="VARCHAR"/>
<result property="sourceField" column="source_field" jdbcType="VARCHAR"/>
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
<result property="targetField" column="target_field" jdbcType="VARCHAR"/>
<result property="targetName" column="target_name" jdbcType="VARCHAR"/>
<result property="defaultVaule" column="default_vaule" jdbcType="VARCHAR"/>
<result property="sourceFieldPath" column="source_field_path" jdbcType="VARCHAR"/>
<result property="targetFieldPath" column="target_field_path" jdbcType="VARCHAR"/>
<result property="targetPath" column="target_path" jdbcType="VARCHAR"/>
<result property="sourcePath" column="source_path" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="coordinate" column="coordinate" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "MdmModuleDistributeDetailEntity_Base_Column_List">
id
,mdm_id
,distribute_id
,api_id
,source_field
,source_name
,target_field
,target_name
,default_vaule
,source_field_path
,target_field_path
,target_path
,source_path
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
,coordinate
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDistributeDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List" />
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if>
<if test="sourceField != null and sourceField != ''"> and source_field = #{sourceField} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="targetField != null and targetField != ''"> and target_field = #{targetField} </if>
<if test="targetName != null and targetName != ''"> and target_name = #{targetName} </if>
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule = #{defaultVaule} </if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path = #{sourceFieldPath} </if>
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path = #{targetFieldPath} </if>
<if test="targetPath != null and targetPath != ''"> and target_path = #{targetPath} </if>
<if test="sourcePath != null and sourcePath != ''"> and source_path = #{sourcePath} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="coordinate != null and coordinate != ''"> and coordinate = #{coordinate} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select count(1) from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if>
<if test="sourceField != null and sourceField != ''"> and source_field = #{sourceField} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="targetField != null and targetField != ''"> and target_field = #{targetField} </if>
<if test="targetName != null and targetName != ''"> and target_name = #{targetName} </if>
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule = #{defaultVaule} </if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path = #{sourceFieldPath} </if>
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path = #{targetFieldPath} </if>
<if test="targetPath != null and targetPath != ''"> and target_path = #{targetPath} </if>
<if test="sourcePath != null and sourcePath != ''"> and source_path = #{sourcePath} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="coordinate != null and coordinate != ''"> and coordinate = #{coordinate} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleDistributeDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List" />
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id like concat('%',#{distributeId},'%') </if>
<if test="apiId != null and apiId != ''"> and api_id like concat('%',#{apiId},'%') </if>
<if test="sourceField != null and sourceField != ''"> and source_field like concat('%',#{sourceField},'%') </if>
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%',#{sourceName},'%') </if>
<if test="targetField != null and targetField != ''"> and target_field like concat('%',#{targetField},'%') </if>
<if test="targetName != null and targetName != ''"> and target_name like concat('%',#{targetName},'%') </if>
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule like concat('%',#{defaultVaule},'%') </if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path like concat('%',#{sourceFieldPath},'%') </if>
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path like concat('%',#{targetFieldPath},'%') </if>
<if test="targetPath != null and targetPath != ''"> and target_path like concat('%',#{targetPath},'%') </if>
<if test="sourcePath != null and sourcePath != ''"> and source_path like concat('%',#{sourcePath},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="coordinate != null and coordinate != ''"> and coordinate like concat('%',#{coordinate},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDistributeDetailentity_list_or" resultMap="get-MdmModuleDistributeDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List" />
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> or distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> or api_id = #{apiId} </if>
<if test="sourceField != null and sourceField != ''"> or source_field = #{sourceField} </if>
<if test="sourceName != null and sourceName != ''"> or source_name = #{sourceName} </if>
<if test="targetField != null and targetField != ''"> or target_field = #{targetField} </if>
<if test="targetName != null and targetName != ''"> or target_name = #{targetName} </if>
<if test="defaultVaule != null and defaultVaule != ''"> or default_vaule = #{defaultVaule} </if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> or source_field_path = #{sourceFieldPath} </if>
<if test="targetFieldPath != null and targetFieldPath != ''"> or target_field_path = #{targetFieldPath} </if>
<if test="targetPath != null and targetPath != ''"> or target_path = #{targetPath} </if>
<if test="sourcePath != null and sourcePath != ''"> or source_path = #{sourcePath} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="coordinate != null and coordinate != ''"> or coordinate = #{coordinate} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
insert into mdm_module_distribute_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="distributeId != null and distributeId != ''"> distribute_id , </if>
<if test="apiId != null and apiId != ''"> api_id , </if>
<if test="sourceField != null and sourceField != ''"> source_field , </if>
<if test="sourceName != null and sourceName != ''"> source_name , </if>
<if test="targetField != null and targetField != ''"> target_field , </if>
<if test="targetName != null and targetName != ''"> target_name , </if>
<if test="defaultVaule != null and defaultVaule != ''"> default_vaule , </if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> source_field_path , </if>
<if test="targetFieldPath != null and targetFieldPath != ''"> target_field_path , </if>
<if test="targetPath != null and targetPath != ''"> target_path , </if>
<if test="sourcePath != null and sourcePath != ''"> source_path , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="coordinate != null and coordinate != ''"> coordinate , </if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="distributeId != null and distributeId != ''"> #{distributeId} ,</if>
<if test="apiId != null and apiId != ''"> #{apiId} ,</if>
<if test="sourceField != null and sourceField != ''"> #{sourceField} ,</if>
<if test="sourceName != null and sourceName != ''"> #{sourceName} ,</if>
<if test="targetField != null and targetField != ''"> #{targetField} ,</if>
<if test="targetName != null and targetName != ''"> #{targetName} ,</if>
<if test="defaultVaule != null and defaultVaule != ''"> #{defaultVaule} ,</if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> #{sourceFieldPath} ,</if>
<if test="targetFieldPath != null and targetFieldPath != ''"> #{targetFieldPath} ,</if>
<if test="targetPath != null and targetPath != ''"> #{targetPath} ,</if>
<if test="sourcePath != null and sourcePath != ''"> #{sourcePath} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="coordinate != null and coordinate != ''"> #{coordinate} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, source_field, source_name, target_field, target_name, default_vaule, source_field_path, target_field_path, target_path, source_path, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, coordinate, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.sourceField},#{entity.sourceName},#{entity.targetField},#{entity.targetName},#{entity.defaultVaule},#{entity.sourceFieldPath},#{entity.targetFieldPath},#{entity.targetPath},#{entity.sourcePath},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.coordinate}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, source_field, source_name, target_field, target_name, default_vaule, source_field_path, target_field_path, target_path, source_path, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, coordinate)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.sourceField},#{entity.sourceName},#{entity.targetField},#{entity.targetName},#{entity.defaultVaule},#{entity.sourceFieldPath},#{entity.targetFieldPath},#{entity.targetPath},#{entity.sourcePath},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.coordinate})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
distribute_id = values(distribute_id),
api_id = values(api_id),
source_field = values(source_field),
source_name = values(source_name),
target_field = values(target_field),
target_name = values(target_name),
default_vaule = values(default_vaule),
source_field_path = values(source_field_path),
target_field_path = values(target_field_path),
target_path = values(target_path),
source_path = values(source_path),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
coordinate = values(coordinate)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
update mdm_module_distribute_detail set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="distributeId != null and distributeId != ''"> distribute_id = #{distributeId},</if>
<if test="apiId != null and apiId != ''"> api_id = #{apiId},</if>
<if test="sourceField != null and sourceField != ''"> source_field = #{sourceField},</if>
<if test="sourceName != null and sourceName != ''"> source_name = #{sourceName},</if>
<if test="targetField != null and targetField != ''"> target_field = #{targetField},</if>
<if test="targetName != null and targetName != ''"> target_name = #{targetName},</if>
<if test="defaultVaule != null and defaultVaule != ''"> default_vaule = #{defaultVaule},</if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> source_field_path = #{sourceFieldPath},</if>
<if test="targetFieldPath != null and targetFieldPath != ''"> target_field_path = #{targetFieldPath},</if>
<if test="targetPath != null and targetPath != ''"> target_path = #{targetPath},</if>
<if test="sourcePath != null and sourcePath != ''"> source_path = #{sourcePath},</if>
<if test="sorts != null"> sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="coordinate != null and coordinate != ''"> coordinate = #{coordinate},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
update mdm_module_distribute_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
update mdm_module_distribute_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if>
<if test="sourceField != null and sourceField != ''"> and source_field = #{sourceField} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="targetField != null and targetField != ''"> and target_field = #{targetField} </if>
<if test="targetName != null and targetName != ''"> and target_name = #{targetName} </if>
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule = #{defaultVaule} </if>
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path = #{sourceFieldPath} </if>
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path = #{targetFieldPath} </if>
<if test="targetPath != null and targetPath != ''"> and target_path = #{targetPath} </if>
<if test="sourcePath != null and sourcePath != ''"> and source_path = #{sourcePath} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="coordinate != null and coordinate != ''"> and coordinate = #{coordinate} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_distribute_detail where id = #{id}
</delete>
</mapper>

View File

@ -1,12 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDistributeDetail.service;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表服务接口
*
* @author makejava
* @since 2023-11-07 09:11:31
*/
public interface IMdmModuleDistributeDetailService extends IBaseService<MdmModuleDistributeDetailEntity, String>{
}

View File

@ -1,26 +0,0 @@
package com.hzya.frame.mdm.mdmModuleDistributeDetail.service.impl;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.service.IMdmModuleDistributeDetailService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表服务实现类
*
* @author makejava
* @since 2023-11-07 09:11:31
*/
@Service(value = "mdmModuleDistributeDetailService")
public class MdmModuleDistributeDetailServiceImpl extends BaseService<MdmModuleDistributeDetailEntity, String> implements IMdmModuleDistributeDetailService {
private IMdmModuleDistributeDetailDao mdmModuleDistributeDetailDao;
@Autowired
public void setMdmModuleDistributeDetailDao(IMdmModuleDistributeDetailDao dao) {
this.mdmModuleDistributeDetailDao = dao;
this.dao = dao;
}
}

View File

@ -1,15 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRole.dao;
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据功能角色表(mdm_module_role: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:32:25
*/
public interface IMdmModuleRoleDao extends IBaseDao<MdmModuleRoleEntity, String> {
}

View File

@ -1,18 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRole.dao.impl;
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
import com.hzya.frame.mdm.mdmModuleRole.dao.IMdmModuleRoleDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 主数据功能角色表(MdmModuleRole)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:32:25
*/
@Repository(value = "MdmModuleRoleDaoImpl")
public class MdmModuleRoleDaoImpl extends MybatisGenericDao<MdmModuleRoleEntity, String> implements IMdmModuleRoleDao {
}

View File

@ -1,52 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRole.entity;
import java.util.Date;
import java.util.List;
import com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据功能角色表(MdmModuleRole)实体类
*
* @author makejava
* @since 2023-10-17 15:32:25
*/
public class MdmModuleRoleEntity extends BaseEntity {
/**
* 主数据模版ID
*/
private String mdmId;
/**
* 角色id
*/
private String roleId;
//角色按钮
private List<MdmModuleRoleButtonEntity> mdmModuleRoleButtonEntities;
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public List<MdmModuleRoleButtonEntity> getMdmModuleRoleButtonEntities() {
return mdmModuleRoleButtonEntities;
}
public void setMdmModuleRoleButtonEntities(List<MdmModuleRoleButtonEntity> mdmModuleRoleButtonEntities) {
this.mdmModuleRoleButtonEntities = mdmModuleRoleButtonEntities;
}
}

View File

@ -1,227 +0,0 @@
<?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="com.hzya.frame.mdm.mdmModuleRole.dao.impl.MdmModuleRoleDaoImpl">
<resultMap id="get-MdmModuleRoleEntity-result" type="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="roleId" column="role_id" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleRoleEntity_Base_Column_List">
id
,mdm_id
,role_id
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleRoleEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
select
<include refid="MdmModuleRoleEntity_Base_Column_List"/>
from mdm_module_role
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
select count(1) from mdm_module_role
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleRoleEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
select
<include refid="MdmModuleRoleEntity_Base_Column_List"/>
from mdm_module_role
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="roleId != null and roleId != ''">and role_id like concat('%',#{roleId},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleRoleentity_list_or" resultMap="get-MdmModuleRoleEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
select
<include refid="MdmModuleRoleEntity_Base_Column_List"/>
from mdm_module_role
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="roleId != null and roleId != ''">or role_id = #{roleId}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity"
>
insert into mdm_module_role(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="roleId != null and roleId != ''">role_id ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="roleId != null and roleId != ''">#{roleId} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_role(mdm_id, role_id, sorts, create_user_id, create_time, modify_user_id, modify_time,
sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.roleId},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_role(mdm_id, role_id, sorts, create_user_id, create_time, modify_user_id, modify_time,
sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.roleId},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
role_id = values(role_id),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
update mdm_module_role set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="roleId != null and roleId != ''">role_id = #{roleId},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
update mdm_module_role set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
update mdm_module_role set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_role where id = #{id}
</delete>
</mapper>

View File

@ -1,13 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRole.service;
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据功能角色表(MdmModuleRole)表服务接口
*
* @author makejava
* @since 2023-10-17 15:32:26
*/
public interface IMdmModuleRoleService extends IBaseService<MdmModuleRoleEntity, String> {
}

View File

@ -1,29 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRole.service.impl;
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
import com.hzya.frame.mdm.mdmModuleRole.dao.IMdmModuleRoleDao;
import com.hzya.frame.mdm.mdmModuleRole.service.IMdmModuleRoleService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据功能角色表(MdmModuleRole)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:32:27
*/
@Service(value = "mdmModuleRoleService")
public class MdmModuleRoleServiceImpl extends BaseService<MdmModuleRoleEntity, String> implements IMdmModuleRoleService {
private IMdmModuleRoleDao mdmModuleRoleDao;
@Autowired
public void setMdmModuleRoleDao(IMdmModuleRoleDao dao) {
this.mdmModuleRoleDao = dao;
this.dao = dao;
}
}

View File

@ -1,15 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRoleButton.dao;
import com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据功能角色按钮表(mdm_module_role_button: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:33:09
*/
public interface IMdmModuleRoleButtonDao extends IBaseDao<MdmModuleRoleButtonEntity, String> {
}

View File

@ -1,18 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRoleButton.dao.impl;
import com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity;
import com.hzya.frame.mdm.mdmModuleRoleButton.dao.IMdmModuleRoleButtonDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 主数据功能角色按钮表(MdmModuleRoleButton)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:33:10
*/
@Repository(value = "MdmModuleRoleButtonDaoImpl")
public class MdmModuleRoleButtonDaoImpl extends MybatisGenericDao<MdmModuleRoleButtonEntity, String> implements IMdmModuleRoleButtonDao {
}

View File

@ -1,92 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRoleButton.entity;
import java.util.Date;
import java.util.List;
import com.hzya.frame.sys.userRole.entity.UserRole;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据功能角色按钮表(MdmModuleRoleButton)实体类
*
* @author makejava
* @since 2023-10-17 15:33:10
*/
public class MdmModuleRoleButtonEntity extends BaseEntity {
/**
* 主数据模版ID
*/
private String mdmId;
/**
* 模块角色id
*/
private String moduleRoleId;
/**
* 角色id
*/
private String roleId;
/**
* 按钮类型
*/
private String buttonType;
/**
* 按钮名
*/
private String buttonName;
/**
* 角色ids
*/
private List<UserRole> roleIds;
public List<UserRole> getRoleIds() {
return roleIds;
}
public void setRoleIds(List<UserRole> roleIds) {
this.roleIds = roleIds;
}
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getModuleRoleId() {
return moduleRoleId;
}
public void setModuleRoleId(String moduleRoleId) {
this.moduleRoleId = moduleRoleId;
}
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public String getButtonType() {
return buttonType;
}
public void setButtonType(String buttonType) {
this.buttonType = buttonType;
}
public String getButtonName() {
return buttonName;
}
public void setButtonName(String buttonName) {
this.buttonName = buttonName;
}
}

View File

@ -1,271 +0,0 @@
<?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="com.hzya.frame.mdm.mdmModuleRoleButton.dao.impl.MdmModuleRoleButtonDaoImpl">
<resultMap id="get-MdmModuleRoleButtonEntity-result"
type="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="moduleRoleId" column="module_role_id" jdbcType="VARCHAR"/>
<result property="roleId" column="role_id" jdbcType="VARCHAR"/>
<result property="buttonType" column="button_type" jdbcType="VARCHAR"/>
<result property="buttonName" column="button_name" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleRoleButtonEntity_Base_Column_List">
id
,mdm_id
,module_role_id
,role_id
,button_type
,button_name
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleRoleButtonEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
select
<include refid="MdmModuleRoleButtonEntity_Base_Column_List"/>
from mdm_module_role_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="moduleRoleId != null and moduleRoleId != ''">and module_role_id = #{moduleRoleId}</if>
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
<if test="buttonType != null and buttonType != ''">and button_type = #{buttonType}</if>
<if test="buttonName != null and buttonName != ''">and button_name = #{buttonName}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<if test="roleIds != null and roleIds.size > 0">
and (
<foreach collection="roleIds" index="index" item="item" separator="or">
role_id = #{item.roleId}
</foreach>
)
</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
select count(1) from mdm_module_role_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="moduleRoleId != null and moduleRoleId != ''">and module_role_id = #{moduleRoleId}</if>
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
<if test="buttonType != null and buttonType != ''">and button_type = #{buttonType}</if>
<if test="buttonName != null and buttonName != ''">and button_name = #{buttonName}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleRoleButtonEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
select
<include refid="MdmModuleRoleButtonEntity_Base_Column_List"/>
from mdm_module_role_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="moduleRoleId != null and moduleRoleId != ''">and module_role_id like
concat('%',#{moduleRoleId},'%')
</if>
<if test="roleId != null and roleId != ''">and role_id like concat('%',#{roleId},'%')</if>
<if test="buttonType != null and buttonType != ''">and button_type like concat('%',#{buttonType},'%')</if>
<if test="buttonName != null and buttonName != ''">and button_name like concat('%',#{buttonName},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleRoleButtonentity_list_or" resultMap="get-MdmModuleRoleButtonEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
select
<include refid="MdmModuleRoleButtonEntity_Base_Column_List"/>
from mdm_module_role_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="moduleRoleId != null and moduleRoleId != ''">or module_role_id = #{moduleRoleId}</if>
<if test="roleId != null and roleId != ''">or role_id = #{roleId}</if>
<if test="buttonType != null and buttonType != ''">or button_type = #{buttonType}</if>
<if test="buttonName != null and buttonName != ''">or button_name = #{buttonName}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity"
>
insert into mdm_module_role_button(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="moduleRoleId != null and moduleRoleId != ''">module_role_id ,</if>
<if test="roleId != null and roleId != ''">role_id ,</if>
<if test="buttonType != null and buttonType != ''">button_type ,</if>
<if test="buttonName != null and buttonName != ''">button_name ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="moduleRoleId != null and moduleRoleId != ''">#{moduleRoleId} ,</if>
<if test="roleId != null and roleId != ''">#{roleId} ,</if>
<if test="buttonType != null and buttonType != ''">#{buttonType} ,</if>
<if test="buttonName != null and buttonName != ''">#{buttonName} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_role_button(mdm_id, module_role_id, role_id, button_type, button_name, sorts,
create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.moduleRoleId},#{entity.roleId},#{entity.buttonType},#{entity.buttonName},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_role_button(mdm_id, module_role_id, role_id, button_type, button_name, sorts,
create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.moduleRoleId},#{entity.roleId},#{entity.buttonType},#{entity.buttonName},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
module_role_id = values(module_role_id),
role_id = values(role_id),
button_type = values(button_type),
button_name = values(button_name),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
update mdm_module_role_button set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="moduleRoleId != null and moduleRoleId != ''">module_role_id = #{moduleRoleId},</if>
<if test="roleId != null and roleId != ''">role_id = #{roleId},</if>
<if test="buttonType != null and buttonType != ''">button_type = #{buttonType},</if>
<if test="buttonName != null and buttonName != ''">button_name = #{buttonName},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete"
parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
update mdm_module_role_button set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity">
update mdm_module_role_button set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="moduleRoleId != null and moduleRoleId != ''">and module_role_id = #{moduleRoleId}</if>
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
<if test="buttonType != null and buttonType != ''">and button_type = #{buttonType}</if>
<if test="buttonName != null and buttonName != ''">and button_name = #{buttonName}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_role_button where id = #{id}
</delete>
</mapper>

View File

@ -1,13 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRoleButton.service;
import com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据功能角色按钮表(MdmModuleRoleButton)表服务接口
*
* @author makejava
* @since 2023-10-17 15:33:11
*/
public interface IMdmModuleRoleButtonService extends IBaseService<MdmModuleRoleButtonEntity, String> {
}

View File

@ -1,29 +0,0 @@
package com.hzya.frame.mdm.mdmModuleRoleButton.service.impl;
import com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity;
import com.hzya.frame.mdm.mdmModuleRoleButton.dao.IMdmModuleRoleButtonDao;
import com.hzya.frame.mdm.mdmModuleRoleButton.service.IMdmModuleRoleButtonService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据功能角色按钮表(MdmModuleRoleButton)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:33:12
*/
@Service(value = "mdmModuleRoleButtonService")
public class MdmModuleRoleButtonServiceImpl extends BaseService<MdmModuleRoleButtonEntity, String> implements IMdmModuleRoleButtonService {
private IMdmModuleRoleButtonDao mdmModuleRoleButtonDao;
@Autowired
public void setMdmModuleRoleButtonDao(IMdmModuleRoleButtonDao dao) {
this.mdmModuleRoleButtonDao = dao;
this.dao = dao;
}
}

View File

@ -1,15 +0,0 @@
package com.hzya.frame.mdm.mdmModuleUserView.dao;
import com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据用户视图表(mdm_module_user_view: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:33:47
*/
public interface IMdmModuleUserViewDao extends IBaseDao<MdmModuleUserViewEntity, String> {
}

View File

@ -1,18 +0,0 @@
package com.hzya.frame.mdm.mdmModuleUserView.dao.impl;
import com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity;
import com.hzya.frame.mdm.mdmModuleUserView.dao.IMdmModuleUserViewDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 主数据用户视图表(MdmModuleUserView)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:33:47
*/
@Repository(value = "MdmModuleUserViewDaoImpl")
public class MdmModuleUserViewDaoImpl extends MybatisGenericDao<MdmModuleUserViewEntity, String> implements IMdmModuleUserViewDao {
}

View File

@ -1,54 +0,0 @@
package com.hzya.frame.mdm.mdmModuleUserView.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据用户视图表(MdmModuleUserView)实体类
*
* @author makejava
* @since 2023-10-17 15:33:48
*/
public class MdmModuleUserViewEntity extends BaseEntity {
/**
* 主数据模版ID
*/
private String mdmId;
/**
* 用户id
*/
private String userId;
/**
* 视图明细id
*/
private String viewDetailId;
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getViewDetailId() {
return viewDetailId;
}
public void setViewDetailId(String viewDetailId) {
this.viewDetailId = viewDetailId;
}
}

View File

@ -1,241 +0,0 @@
<?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="com.hzya.frame.mdm.mdmModuleUserView.dao.impl.MdmModuleUserViewDaoImpl">
<resultMap id="get-MdmModuleUserViewEntity-result"
type="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
<result property="viewDetailId" column="view_detail_id" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleUserViewEntity_Base_Column_List">
id
,mdm_id
,user_id
,view_detail_id
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleUserViewEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
select
<include refid="MdmModuleUserViewEntity_Base_Column_List"/>
from mdm_module_user_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
<if test="viewDetailId != null and viewDetailId != ''">and view_detail_id = #{viewDetailId}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
select count(1) from mdm_module_user_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
<if test="viewDetailId != null and viewDetailId != ''">and view_detail_id = #{viewDetailId}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleUserViewEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
select
<include refid="MdmModuleUserViewEntity_Base_Column_List"/>
from mdm_module_user_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="userId != null and userId != ''">and user_id like concat('%',#{userId},'%')</if>
<if test="viewDetailId != null and viewDetailId != ''">and view_detail_id like
concat('%',#{viewDetailId},'%')
</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleUserViewentity_list_or" resultMap="get-MdmModuleUserViewEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
select
<include refid="MdmModuleUserViewEntity_Base_Column_List"/>
from mdm_module_user_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="userId != null and userId != ''">or user_id = #{userId}</if>
<if test="viewDetailId != null and viewDetailId != ''">or view_detail_id = #{viewDetailId}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity"
>
insert into mdm_module_user_view(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="userId != null and userId != ''">user_id ,</if>
<if test="viewDetailId != null and viewDetailId != ''">view_detail_id ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="userId != null and userId != ''">#{userId} ,</if>
<if test="viewDetailId != null and viewDetailId != ''">#{viewDetailId} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_user_view(mdm_id, user_id, view_detail_id, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.userId},#{entity.viewDetailId},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_user_view(mdm_id, user_id, view_detail_id, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.userId},#{entity.viewDetailId},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
user_id = values(user_id),
view_detail_id = values(view_detail_id),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
update mdm_module_user_view set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="userId != null and userId != ''">user_id = #{userId},</if>
<if test="viewDetailId != null and viewDetailId != ''">view_detail_id = #{viewDetailId},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
update mdm_module_user_view set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity">
update mdm_module_user_view set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
<if test="viewDetailId != null and viewDetailId != ''">and view_detail_id = #{viewDetailId}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_user_view where id = #{id}
</delete>
</mapper>

View File

@ -1,13 +0,0 @@
package com.hzya.frame.mdm.mdmModuleUserView.service;
import com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据用户视图表(MdmModuleUserView)表服务接口
*
* @author makejava
* @since 2023-10-17 15:33:48
*/
public interface IMdmModuleUserViewService extends IBaseService<MdmModuleUserViewEntity, String> {
}

View File

@ -1,29 +0,0 @@
package com.hzya.frame.mdm.mdmModuleUserView.service.impl;
import com.hzya.frame.mdm.mdmModuleUserView.entity.MdmModuleUserViewEntity;
import com.hzya.frame.mdm.mdmModuleUserView.dao.IMdmModuleUserViewDao;
import com.hzya.frame.mdm.mdmModuleUserView.service.IMdmModuleUserViewService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据用户视图表(MdmModuleUserView)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:33:49
*/
@Service(value = "mdmModuleUserViewService")
public class MdmModuleUserViewServiceImpl extends BaseService<MdmModuleUserViewEntity, String> implements IMdmModuleUserViewService {
private IMdmModuleUserViewDao mdmModuleUserViewDao;
@Autowired
public void setMdmModuleUserViewDao(IMdmModuleUserViewDao dao) {
this.mdmModuleUserViewDao = dao;
this.dao = dao;
}
}

View File

@ -1,13 +1,13 @@
package com.hzya.frame.mdm.mdmModuleView.dao;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据视图表(mdm_module_view: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:34:17
* @since 2024-05-30 17:03:24
*/
public interface IMdmModuleViewDao extends IBaseDao<MdmModuleViewEntity, String> {

View File

@ -4,15 +4,14 @@ import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import com.hzya.frame.mdm.mdmModuleView.dao.IMdmModuleViewDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 主数据视图表(MdmModuleView)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:34:17
* @since 2024-05-30 17:03:24
*/
@Repository(value = "MdmModuleViewDaoImpl")
public class MdmModuleViewDaoImpl extends MybatisGenericDao<MdmModuleViewEntity, String> implements IMdmModuleViewDao {
public class MdmModuleViewDaoImpl extends MybatisGenericDao<MdmModuleViewEntity, String> implements IMdmModuleViewDao{
}

View File

@ -1,33 +1,25 @@
package com.hzya.frame.mdm.mdmModuleView.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据视图表(MdmModuleView)实体类
*
* @author makejava
* @since 2023-10-17 15:34:17
* @since 2024-05-30 17:03:24
*/
public class MdmModuleViewEntity extends BaseEntity {
/**
* 主数据模版ID
*/
private String mdmId;
/**
* 显示类型 1 2列表
*/
private String viewName;
/**
* 显示字段
*/
private String viewFiled;
/**
* 上级id字段
*/
private String upIdFiled;
/** 主数据模版ID */
private String mdmId;
/** 显示类型 */
private String viewName;
/** 显示字段 */
private String viewFiled;
/** 上级id字段 */
private String upIdFiled;
/** 公司id */
private String companyId;
public String getMdmId() {
@ -62,5 +54,13 @@ public class MdmModuleViewEntity extends BaseEntity {
this.upIdFiled = upIdFiled;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -2,22 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.mdm.mdmModuleView.dao.impl.MdmModuleViewDaoImpl">
<resultMap id="get-MdmModuleViewEntity-result" type="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="viewName" column="view_name" jdbcType="VARCHAR"/>
<result property="viewFiled" column="view_filed" jdbcType="VARCHAR"/>
<result property="upIdFiled" column="up_id_filed" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="get-MdmModuleViewEntity-result" type="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="viewName" column="view_name" jdbcType="VARCHAR"/>
<result property="viewFiled" column="view_filed" jdbcType="VARCHAR"/>
<result property="upIdFiled" column="up_id_filed" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleViewEntity_Base_Column_List">
<sql id = "MdmModuleViewEntity_Base_Column_List">
id
,mdm_id
,view_name
@ -30,218 +31,213 @@
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleViewEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select
<include refid="MdmModuleViewEntity_Base_Column_List"/>
from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="viewName != null and viewName != ''">and view_name = #{viewName}</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed = #{viewFiled}</if>
<if test="upIdFiled != null and upIdFiled != ''">and up_id_filed = #{upIdFiled}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleViewEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select
<include refid="MdmModuleViewEntity_Base_Column_List" />
from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="viewName != null and viewName != ''"> and view_name = #{viewName} </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed = #{viewFiled} </if>
<if test="upIdFiled != null and upIdFiled != ''"> and up_id_filed = #{upIdFiled} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select count(1) from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="viewName != null and viewName != ''">and view_name = #{viewName}</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed = #{viewFiled}</if>
<if test="upIdFiled != null and upIdFiled != ''">and up_id_filed = #{upIdFiled}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select count(1) from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="viewName != null and viewName != ''"> and view_name = #{viewName} </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed = #{viewFiled} </if>
<if test="upIdFiled != null and upIdFiled != ''"> and up_id_filed = #{upIdFiled} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleViewEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select
<include refid="MdmModuleViewEntity_Base_Column_List"/>
from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="viewName != null and viewName != ''">and view_name like concat('%',#{viewName},'%')</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed like concat('%',#{viewFiled},'%')</if>
<if test="upIdFiled != null and upIdFiled != ''">and up_id_filed like concat('%',#{upIdFiled},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
<select id="entity_list_like" resultMap="get-MdmModuleViewEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select
<include refid="MdmModuleViewEntity_Base_Column_List" />
from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="viewName != null and viewName != ''"> and view_name like concat('%',#{viewName},'%') </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed like concat('%',#{viewFiled},'%') </if>
<if test="upIdFiled != null and upIdFiled != ''"> and up_id_filed like concat('%',#{upIdFiled},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleViewentity_list_or" resultMap="get-MdmModuleViewEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select
<include refid="MdmModuleViewEntity_Base_Column_List"/>
from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="viewName != null and viewName != ''">or view_name = #{viewName}</if>
<if test="viewFiled != null and viewFiled != ''">or view_filed = #{viewFiled}</if>
<if test="upIdFiled != null and upIdFiled != ''">or up_id_filed = #{upIdFiled}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleViewentity_list_or" resultMap="get-MdmModuleViewEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
select
<include refid="MdmModuleViewEntity_Base_Column_List" />
from mdm_module_view
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="viewName != null and viewName != ''"> or view_name = #{viewName} </if>
<if test="viewFiled != null and viewFiled != ''"> or view_filed = #{viewFiled} </if>
<if test="upIdFiled != null and upIdFiled != ''"> or up_id_filed = #{upIdFiled} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity"
>
insert into mdm_module_view(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="viewName != null and viewName != ''">view_name ,</if>
<if test="viewFiled != null and viewFiled != ''">view_filed ,</if>
<if test="upIdFiled != null and upIdFiled != ''">up_id_filed ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="viewName != null and viewName != ''">#{viewName} ,</if>
<if test="viewFiled != null and viewFiled != ''">#{viewFiled} ,</if>
<if test="upIdFiled != null and upIdFiled != ''">#{upIdFiled} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_view(mdm_id, view_name, view_filed, up_id_filed, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewName},#{entity.viewFiled},#{entity.upIdFiled},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_view(mdm_id, view_name, view_filed, up_id_filed, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewName},#{entity.viewFiled},#{entity.upIdFiled},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
view_name = values(view_name),
view_filed = values(view_filed),
up_id_filed = values(up_id_filed),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
update mdm_module_view set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="viewName != null and viewName != ''">view_name = #{viewName},</if>
<if test="viewFiled != null and viewFiled != ''">view_filed = #{viewFiled},</if>
<if test="upIdFiled != null and upIdFiled != ''">up_id_filed = #{upIdFiled},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="viewName != null and viewName != ''"> view_name , </if>
<if test="viewFiled != null and viewFiled != ''"> view_filed , </if>
<if test="upIdFiled != null and upIdFiled != ''"> up_id_filed , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="viewName != null and viewName != ''"> #{viewName} ,</if>
<if test="viewFiled != null and viewFiled != ''"> #{viewFiled} ,</if>
<if test="upIdFiled != null and upIdFiled != ''"> #{upIdFiled} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_view a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view(mdm_id, view_name, view_filed, up_id_filed, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewName},#{entity.viewFiled},#{entity.upIdFiled},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view(mdm_id, view_name, view_filed, up_id_filed, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewName},#{entity.viewFiled},#{entity.upIdFiled},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
view_name = values(view_name),
view_filed = values(view_filed),
up_id_filed = values(up_id_filed),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity" >
update mdm_module_view set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="viewName != null and viewName != ''"> view_name = #{viewName},</if>
<if test="viewFiled != null and viewFiled != ''"> view_filed = #{viewFiled},</if>
<if test="upIdFiled != null and upIdFiled != ''"> up_id_filed = #{upIdFiled},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity" >
update mdm_module_view set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity">
update mdm_module_view set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="viewName != null and viewName != ''">and view_name = #{viewName}</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed = #{viewFiled}</if>
<if test="upIdFiled != null and upIdFiled != ''">and up_id_filed = #{upIdFiled}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity" >
update mdm_module_view set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="viewName != null and viewName != ''"> and view_name = #{viewName} </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed = #{viewFiled} </if>
<if test="upIdFiled != null and upIdFiled != ''"> and up_id_filed = #{upIdFiled} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_view where id = #{id}
</delete>

View File

@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModuleView.service;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据视图表(MdmModuleView)表服务接口
*
* @author makejava
* @since 2023-10-17 15:34:18
* @since 2024-05-30 17:03:24
*/
public interface IMdmModuleViewService extends IBaseService<MdmModuleViewEntity, String> {
public interface IMdmModuleViewService extends IBaseService<MdmModuleViewEntity, String>{
}

View File

@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModuleView.service.impl;
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
import com.hzya.frame.mdm.mdmModuleView.dao.IMdmModuleViewDao;
import com.hzya.frame.mdm.mdmModuleView.service.IMdmModuleViewService;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据视图表(MdmModuleView)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:34:19
* @since 2024-05-30 17:03:24
*/
@Service(value = "mdmModuleViewService")
public class MdmModuleViewServiceImpl extends BaseService<MdmModuleViewEntity, String> implements IMdmModuleViewService {
private IMdmModuleViewDao mdmModuleViewDao;
@Autowired
public void setMdmModuleViewDao(IMdmModuleViewDao dao) {
this.mdmModuleViewDao = dao;
this.dao = dao;
}
public void setMdmModuleViewDao(IMdmModuleViewDao dao) {
this.mdmModuleViewDao = dao;
this.dao = dao;
}
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.mdm.mdmModuleViewButton.dao;
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据视图按钮表(mdm_module_view_button: table)表数据库访问层
*
* @author makejava
* @since 2024-05-30 17:05:15
*/
public interface IMdmModuleViewButtonDao extends IBaseDao<MdmModuleViewButtonEntity, String> {
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.mdm.mdmModuleViewButton.dao.impl;
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
import com.hzya.frame.mdm.mdmModuleViewButton.dao.IMdmModuleViewButtonDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 主数据视图按钮表(MdmModuleViewButton)表数据库访问层
*
* @author makejava
* @since 2024-05-30 17:05:15
*/
@Repository(value = "MdmModuleViewButtonDaoImpl")
public class MdmModuleViewButtonDaoImpl extends MybatisGenericDao<MdmModuleViewButtonEntity, String> implements IMdmModuleViewButtonDao{
}

View File

@ -0,0 +1,66 @@
package com.hzya.frame.mdm.mdmModuleViewButton.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据视图按钮表(MdmModuleViewButton)实体类
*
* @author makejava
* @since 2024-05-30 17:05:15
*/
public class MdmModuleViewButtonEntity extends BaseEntity {
/** 主数据模版ID */
private String mdmId;
/** 视图id */
private String viewId;
/** 类型1、新建2、重置3、查询4、修改 5、删除 6、查看 */
private String buttonType;
/** 按钮值 */
private String buttonValue;
/** 公司id */
private String companyId;
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getViewId() {
return viewId;
}
public void setViewId(String viewId) {
this.viewId = viewId;
}
public String getButtonType() {
return buttonType;
}
public void setButtonType(String buttonType) {
this.buttonType = buttonType;
}
public String getButtonValue() {
return buttonValue;
}
public void setButtonValue(String buttonValue) {
this.buttonValue = buttonValue;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -1,14 +1,13 @@
<?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="com.hzya.frame.mdm.mdmTableCodeRule.dao.impl.MdmTableCodeRuleDaoImpl">
<mapper namespace="com.hzya.frame.mdm.mdmModuleViewButton.dao.impl.MdmModuleViewButtonDaoImpl">
<resultMap id="get-MdmTableCodeRuleEntity-result" type="com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity" >
<resultMap id="get-MdmModuleViewButtonEntity-result" type="com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="dbId" column="db_id" jdbcType="VARCHAR"/>
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="viewId" column="view_id" jdbcType="VARCHAR"/>
<result property="buttonType" column="button_type" jdbcType="VARCHAR"/>
<result property="buttonValue" column="button_value" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
@ -16,16 +15,15 @@
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="dbValue" column="db_value" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "MdmTableCodeRuleEntity_Base_Column_List">
<sql id = "MdmModuleViewButtonEntity_Base_Column_List">
id
,mdm_id
,db_id
,db_name
,db_type
,remark
,view_id
,button_type
,button_value
,sorts
,create_user_id
,create_time
@ -33,20 +31,19 @@
,modify_time
,sts
,org_id
,db_value
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmTableCodeRuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity">
<select id="entity_list_base" resultMap="get-MdmModuleViewButtonEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity">
select
<include refid="MdmTableCodeRuleEntity_Base_Column_List" />
from mdm_table_code_rule
<include refid="MdmModuleViewButtonEntity_Base_Column_List" />
from mdm_module_view_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="viewId != null and viewId != ''"> and view_id = #{viewId} </if>
<if test="buttonType != null and buttonType != ''"> and button_type = #{buttonType} </if>
<if test="buttonValue != null and buttonValue != ''"> and button_value = #{buttonValue} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -54,7 +51,7 @@
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="dbValue != null and dbValue != ''"> and db_value = #{dbValue} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -62,15 +59,14 @@
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity">
select count(1) from mdm_table_code_rule
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity">
select count(1) from mdm_module_view_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="viewId != null and viewId != ''"> and view_id = #{viewId} </if>
<if test="buttonType != null and buttonType != ''"> and button_type = #{buttonType} </if>
<if test="buttonValue != null and buttonValue != ''"> and button_value = #{buttonValue} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -78,7 +74,7 @@
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="dbValue != null and dbValue != ''"> and db_value = #{dbValue} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -86,17 +82,16 @@
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmTableCodeRuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity">
<select id="entity_list_like" resultMap="get-MdmModuleViewButtonEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity">
select
<include refid="MdmTableCodeRuleEntity_Base_Column_List" />
from mdm_table_code_rule
<include refid="MdmModuleViewButtonEntity_Base_Column_List" />
from mdm_module_view_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="dbId != null and dbId != ''"> and db_id like concat('%',#{dbId},'%') </if>
<if test="dbName != null and dbName != ''"> and db_name like concat('%',#{dbName},'%') </if>
<if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if>
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
<if test="viewId != null and viewId != ''"> and view_id like concat('%',#{viewId},'%') </if>
<if test="buttonType != null and buttonType != ''"> and button_type like concat('%',#{buttonType},'%') </if>
<if test="buttonValue != null and buttonValue != ''"> and button_value like concat('%',#{buttonValue},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
@ -104,7 +99,7 @@
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="dbValue != null and dbValue != ''"> and db_value like concat('%',#{dbValue},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -112,17 +107,16 @@
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmTableCodeRuleentity_list_or" resultMap="get-MdmTableCodeRuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity">
<select id="MdmModuleViewButtonentity_list_or" resultMap="get-MdmModuleViewButtonEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity">
select
<include refid="MdmTableCodeRuleEntity_Base_Column_List" />
from mdm_table_code_rule
<include refid="MdmModuleViewButtonEntity_Base_Column_List" />
from mdm_module_view_button
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> or db_id = #{dbId} </if>
<if test="dbName != null and dbName != ''"> or db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
<if test="viewId != null and viewId != ''"> or view_id = #{viewId} </if>
<if test="buttonType != null and buttonType != ''"> or button_type = #{buttonType} </if>
<if test="buttonValue != null and buttonValue != ''"> or button_value = #{buttonValue} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
@ -130,7 +124,7 @@
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="dbValue != null and dbValue != ''"> or db_value = #{dbValue} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
@ -138,15 +132,14 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity" >
insert into mdm_table_code_rule(
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view_button(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="dbId != null and dbId != ''"> db_id , </if>
<if test="dbName != null and dbName != ''"> db_name , </if>
<if test="dbType != null and dbType != ''"> db_type , </if>
<if test="remark != null and remark != ''"> remark , </if>
<if test="viewId != null and viewId != ''"> view_id , </if>
<if test="buttonType != null and buttonType != ''"> button_type , </if>
<if test="buttonValue != null and buttonValue != ''"> button_value , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
@ -154,17 +147,17 @@
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="dbValue != null and dbValue != ''"> db_value , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="dbId != null and dbId != ''"> #{dbId} ,</if>
<if test="dbName != null and dbName != ''"> #{dbName} ,</if>
<if test="dbType != null and dbType != ''"> #{dbType} ,</if>
<if test="remark != null and remark != ''"> #{remark} ,</if>
<if test="viewId != null and viewId != ''"> #{viewId} ,</if>
<if test="buttonType != null and buttonType != ''"> #{buttonType} ,</if>
<if test="buttonValue != null and buttonValue != ''"> #{buttonValue} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
@ -172,84 +165,80 @@
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="dbValue != null and dbValue != ''"> #{dbValue} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_view_button a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_table_code_rule(mdm_id, db_id, db_name, db_type, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, db_value, sts)
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view_button(mdm_id, view_id, button_type, button_value, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.dbValue}, 'Y')
(#{entity.mdmId},#{entity.viewId},#{entity.buttonType},#{entity.buttonValue},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_table_code_rule(mdm_id, db_id, db_name, db_type, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, db_value)
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view_button(mdm_id, view_id, button_type, button_value, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.dbId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.dbValue})
(#{entity.mdmId},#{entity.viewId},#{entity.buttonType},#{entity.buttonValue},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
db_id = values(db_id),
db_name = values(db_name),
db_type = values(db_type),
remark = values(remark),
sorts = values(sorts),
view_id = values(view_id),
button_type = values(button_type),
button_value = values(button_value),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
db_value = values(db_value)</insert>
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity" >
update mdm_table_code_rule set
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity" >
update mdm_module_view_button set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="dbId != null and dbId != ''"> db_id = #{dbId},</if>
<if test="dbName != null and dbName != ''"> db_name = #{dbName},</if>
<if test="dbType != null and dbType != ''"> db_type = #{dbType},</if>
<if test="remark != null and remark != ''"> remark = #{remark},</if>
<if test="sorts != null"> sorts = #{sorts},</if>
<if test="viewId != null and viewId != ''"> view_id = #{viewId},</if>
<if test="buttonType != null and buttonType != ''"> button_type = #{buttonType},</if>
<if test="buttonValue != null and buttonValue != ''"> button_value = #{buttonValue},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="dbValue != null and dbValue != ''"> db_value = #{dbValue},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity" >
update mdm_table_code_rule set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity" >
update mdm_module_view_button set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity" >
update mdm_table_code_rule set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity" >
update mdm_module_view_button set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="viewId != null and viewId != ''"> and view_id = #{viewId} </if>
<if test="buttonType != null and buttonType != ''"> and button_type = #{buttonType} </if>
<if test="buttonValue != null and buttonValue != ''"> and button_value = #{buttonValue} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="dbValue != null and dbValue != ''"> and db_value = #{dbValue} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_table_code_rule where id = #{id}
delete from mdm_module_view_button where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,12 @@
package com.hzya.frame.mdm.mdmModuleViewButton.service;
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据视图按钮表(MdmModuleViewButton)表服务接口
*
* @author makejava
* @since 2024-05-30 17:05:15
*/
public interface IMdmModuleViewButtonService extends IBaseService<MdmModuleViewButtonEntity, String>{
}

View File

@ -0,0 +1,26 @@
package com.hzya.frame.mdm.mdmModuleViewButton.service.impl;
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
import com.hzya.frame.mdm.mdmModuleViewButton.dao.IMdmModuleViewButtonDao;
import com.hzya.frame.mdm.mdmModuleViewButton.service.IMdmModuleViewButtonService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据视图按钮表(MdmModuleViewButton)表服务实现类
*
* @author makejava
* @since 2024-05-30 17:05:15
*/
@Service(value = "mdmModuleViewButtonService")
public class MdmModuleViewButtonServiceImpl extends BaseService<MdmModuleViewButtonEntity, String> implements IMdmModuleViewButtonService {
private IMdmModuleViewButtonDao mdmModuleViewButtonDao;
@Autowired
public void setMdmModuleViewButtonDao(IMdmModuleViewButtonDao dao) {
this.mdmModuleViewButtonDao = dao;
this.dao = dao;
}
}

View File

@ -1,13 +1,13 @@
package com.hzya.frame.mdm.mdmModuleViewDetail.dao;
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 主数据视图明细表(mdm_module_view_detail: table)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:34:58
* @since 2024-05-30 17:04:17
*/
public interface IMdmModuleViewDetailDao extends IBaseDao<MdmModuleViewDetailEntity, String> {

View File

@ -4,15 +4,14 @@ import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
import com.hzya.frame.mdm.mdmModuleViewDetail.dao.IMdmModuleViewDetailDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 主数据视图明细表(MdmModuleViewDetail)表数据库访问层
*
* @author makejava
* @since 2023-10-17 15:34:58
* @since 2024-05-30 17:04:17
*/
@Repository(value = "MdmModuleViewDetailDaoImpl")
public class MdmModuleViewDetailDaoImpl extends MybatisGenericDao<MdmModuleViewDetailEntity, String> implements IMdmModuleViewDetailDao {
public class MdmModuleViewDetailDaoImpl extends MybatisGenericDao<MdmModuleViewDetailEntity, String> implements IMdmModuleViewDetailDao{
}

View File

@ -1,33 +1,25 @@
package com.hzya.frame.mdm.mdmModuleViewDetail.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 主数据视图明细表(MdmModuleViewDetail)实体类
*
* @author makejava
* @since 2023-10-17 15:34:59
* @since 2024-05-30 17:04:17
*/
public class MdmModuleViewDetailEntity extends BaseEntity {
/**
* 主数据模版ID
*/
private String mdmId;
/**
* 视图id
*/
private String viewId;
/**
* 字段 id
*/
private String viewFiled;
/**
* 类型1查询2列表3新增4修改 5查看
*/
private String viewType;
/** 主数据模版ID */
private String mdmId;
/** 视图id */
private String viewId;
/** 字段 */
private String viewFiled;
/** 类型1、查询2、列表3、新增4、修改 5、查看 */
private String viewType;
/** 公司id */
private String companyId;
public String getMdmId() {
@ -62,5 +54,13 @@ public class MdmModuleViewDetailEntity extends BaseEntity {
this.viewType = viewType;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -2,23 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.mdm.mdmModuleViewDetail.dao.impl.MdmModuleViewDetailDaoImpl">
<resultMap id="get-MdmModuleViewDetailEntity-result"
type="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="viewId" column="view_id" jdbcType="VARCHAR"/>
<result property="viewFiled" column="view_filed" jdbcType="VARCHAR"/>
<result property="viewType" column="view_type" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="get-MdmModuleViewDetailEntity-result" type="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="viewId" column="view_id" jdbcType="VARCHAR"/>
<result property="viewFiled" column="view_filed" jdbcType="VARCHAR"/>
<result property="viewType" column="view_type" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="MdmModuleViewDetailEntity_Base_Column_List">
<sql id = "MdmModuleViewDetailEntity_Base_Column_List">
id
,mdm_id
,view_id
@ -31,219 +31,213 @@
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleViewDetailEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select
<include refid="MdmModuleViewDetailEntity_Base_Column_List"/>
from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="viewId != null and viewId != ''">and view_id = #{viewId}</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed = #{viewFiled}</if>
<if test="viewType != null and viewType != ''">and view_type = #{viewType}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleViewDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select
<include refid="MdmModuleViewDetailEntity_Base_Column_List" />
from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="viewId != null and viewId != ''"> and view_id = #{viewId} </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed = #{viewFiled} </if>
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select count(1) from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="viewId != null and viewId != ''">and view_id = #{viewId}</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed = #{viewFiled}</if>
<if test="viewType != null and viewType != ''">and view_type = #{viewType}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select count(1) from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="viewId != null and viewId != ''"> and view_id = #{viewId} </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed = #{viewFiled} </if>
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleViewDetailEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select
<include refid="MdmModuleViewDetailEntity_Base_Column_List"/>
from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="viewId != null and viewId != ''">and view_id like concat('%',#{viewId},'%')</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed like concat('%',#{viewFiled},'%')</if>
<if test="viewType != null and viewType != ''">and view_type like concat('%',#{viewType},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
<select id="entity_list_like" resultMap="get-MdmModuleViewDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select
<include refid="MdmModuleViewDetailEntity_Base_Column_List" />
from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="viewId != null and viewId != ''"> and view_id like concat('%',#{viewId},'%') </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed like concat('%',#{viewFiled},'%') </if>
<if test="viewType != null and viewType != ''"> and view_type like concat('%',#{viewType},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleViewDetailentity_list_or" resultMap="get-MdmModuleViewDetailEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select
<include refid="MdmModuleViewDetailEntity_Base_Column_List"/>
from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="viewId != null and viewId != ''">or view_id = #{viewId}</if>
<if test="viewFiled != null and viewFiled != ''">or view_filed = #{viewFiled}</if>
<if test="viewType != null and viewType != ''">or view_type = #{viewType}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleViewDetailentity_list_or" resultMap="get-MdmModuleViewDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
select
<include refid="MdmModuleViewDetailEntity_Base_Column_List" />
from mdm_module_view_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="viewId != null and viewId != ''"> or view_id = #{viewId} </if>
<if test="viewFiled != null and viewFiled != ''"> or view_filed = #{viewFiled} </if>
<if test="viewType != null and viewType != ''"> or view_type = #{viewType} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity"
>
insert into mdm_module_view_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="viewId != null and viewId != ''">view_id ,</if>
<if test="viewFiled != null and viewFiled != ''">view_filed ,</if>
<if test="viewType != null and viewType != ''">view_type ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="viewId != null and viewId != ''">#{viewId} ,</if>
<if test="viewFiled != null and viewFiled != ''">#{viewFiled} ,</if>
<if test="viewType != null and viewType != ''">#{viewType} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_view_detail(mdm_id, view_id, view_filed, view_type, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewId},#{entity.viewFiled},#{entity.viewType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_view_detail(mdm_id, view_id, view_filed, view_type, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewId},#{entity.viewFiled},#{entity.viewType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
view_id = values(view_id),
view_filed = values(view_filed),
view_type = values(view_type),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
update mdm_module_view_detail set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="viewId != null and viewId != ''">view_id = #{viewId},</if>
<if test="viewFiled != null and viewFiled != ''">view_filed = #{viewFiled},</if>
<if test="viewType != null and viewType != ''">view_type = #{viewType},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete"
parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="viewId != null and viewId != ''"> view_id , </if>
<if test="viewFiled != null and viewFiled != ''"> view_filed , </if>
<if test="viewType != null and viewType != ''"> view_type , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="viewId != null and viewId != ''"> #{viewId} ,</if>
<if test="viewFiled != null and viewFiled != ''"> #{viewFiled} ,</if>
<if test="viewType != null and viewType != ''"> #{viewType} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_view_detail a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view_detail(mdm_id, view_id, view_filed, view_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewId},#{entity.viewFiled},#{entity.viewType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_module_view_detail(mdm_id, view_id, view_filed, view_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.viewId},#{entity.viewFiled},#{entity.viewType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
view_id = values(view_id),
view_filed = values(view_filed),
view_type = values(view_type),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity" >
update mdm_module_view_detail set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="viewId != null and viewId != ''"> view_id = #{viewId},</if>
<if test="viewFiled != null and viewFiled != ''"> view_filed = #{viewFiled},</if>
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity" >
update mdm_module_view_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity">
update mdm_module_view_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="viewId != null and viewId != ''">and view_id = #{viewId}</if>
<if test="viewFiled != null and viewFiled != ''">and view_filed = #{viewFiled}</if>
<if test="viewType != null and viewType != ''">and view_type = #{viewType}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity" >
update mdm_module_view_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="viewId != null and viewId != ''"> and view_id = #{viewId} </if>
<if test="viewFiled != null and viewFiled != ''"> and view_filed = #{viewFiled} </if>
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_view_detail where id = #{id}
</delete>

View File

@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModuleViewDetail.service;
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 主数据视图明细表(MdmModuleViewDetail)表服务接口
*
* @author makejava
* @since 2023-10-17 15:35:00
* @since 2024-05-30 17:04:17
*/
public interface IMdmModuleViewDetailService extends IBaseService<MdmModuleViewDetailEntity, String> {
public interface IMdmModuleViewDetailService extends IBaseService<MdmModuleViewDetailEntity, String>{
}

View File

@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModuleViewDetail.service.impl;
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
import com.hzya.frame.mdm.mdmModuleViewDetail.dao.IMdmModuleViewDetailDao;
import com.hzya.frame.mdm.mdmModuleViewDetail.service.IMdmModuleViewDetailService;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 主数据视图明细表(MdmModuleViewDetail)表服务实现类
*
* @author makejava
* @since 2023-10-17 15:35:00
* @since 2024-05-30 17:04:17
*/
@Service(value = "mdmModuleViewDetailService")
public class MdmModuleViewDetailServiceImpl extends BaseService<MdmModuleViewDetailEntity, String> implements IMdmModuleViewDetailService {
private IMdmModuleViewDetailDao mdmModuleViewDetailDao;
@Autowired
public void setMdmModuleViewDetailDao(IMdmModuleViewDetailDao dao) {
this.mdmModuleViewDetailDao = dao;
this.dao = dao;
}
public void setMdmModuleViewDetailDao(IMdmModuleViewDetailDao dao) {
this.mdmModuleViewDetailDao = dao;
this.dao = dao;
}
}

View File

@ -1,15 +0,0 @@
package com.hzya.frame.mdm.mdmTableCodeRule.dao;
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 模版数据表编码规则表(mdm_table_code_rule: table)表数据库访问层
*
* @author makejava
* @since 2023-11-06 16:12:34
*/
public interface IMdmTableCodeRuleDao extends IBaseDao<MdmTableCodeRuleEntity, String> {
}

View File

@ -1,17 +0,0 @@
package com.hzya.frame.mdm.mdmTableCodeRule.dao.impl;
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
import com.hzya.frame.mdm.mdmTableCodeRule.dao.IMdmTableCodeRuleDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 模版数据表编码规则表(MdmTableCodeRule)表数据库访问层
*
* @author makejava
* @since 2023-11-06 16:12:35
*/
@Repository(value = "MdmTableCodeRuleDaoImpl")
public class MdmTableCodeRuleDaoImpl extends MybatisGenericDao<MdmTableCodeRuleEntity, String> implements IMdmTableCodeRuleDao{
}

View File

@ -1,76 +0,0 @@
package com.hzya.frame.mdm.mdmTableCodeRule.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 模版数据表编码规则表(MdmTableCodeRule)实体类
*
* @author makejava
* @since 2023-11-06 16:12:35
*/
public class MdmTableCodeRuleEntity extends BaseEntity {
/** 主数据模版ID */
private String mdmId;
/** db_id */
private String dbId;
/** 规则 */
private String dbName;
/** 类型 1、连接符号 2、字符串 3、日期 4、流水号 */
private String dbType;
/** 备注 */
private String remark;
/** 规则值 */
private String dbValue;
public String getMdmId() {
return mdmId;
}
public void setMdmId(String mdmId) {
this.mdmId = mdmId;
}
public String getDbId() {
return dbId;
}
public void setDbId(String dbId) {
this.dbId = dbId;
}
public String getDbName() {
return dbName;
}
public void setDbName(String dbName) {
this.dbName = dbName;
}
public String getDbType() {
return dbType;
}
public void setDbType(String dbType) {
this.dbType = dbType;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getDbValue() {
return dbValue;
}
public void setDbValue(String dbValue) {
this.dbValue = dbValue;
}
}

View File

@ -1,12 +0,0 @@
package com.hzya.frame.mdm.mdmTableCodeRule.service;
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 模版数据表编码规则表(MdmTableCodeRule)表服务接口
*
* @author makejava
* @since 2023-11-06 16:12:35
*/
public interface IMdmTableCodeRuleService extends IBaseService<MdmTableCodeRuleEntity, String>{
}

Some files were not shown because too many files have changed in this diff Show More