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

ibizdev提交

上级 7610e90f
...@@ -24,16 +24,16 @@ import com.baomidou.mybatisplus.annotation.*; ...@@ -24,16 +24,16 @@ import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP; import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[统一资源] * 实体[实体2]
*/ */
@Data @Data
@TableName(value = "T_SYS_PSSYSUNIRES",resultMap = "SYS_PSSYSUNIRESResultMap") @TableName(value = "IBZPSSYSUNIRES",resultMap = "SYS_PSSYSUNIRESResultMap")
public class SYS_PSSYSUNIRES extends EntityMP implements Serializable { public class SYS_PSSYSUNIRES extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 统一资源标识 * 实体2标识
*/ */
@DEField(name = "sys_pssysuniresid" , isKeyField=true) @DEField(name = "sys_pssysuniresid" , isKeyField=true)
@TableId(value= "sys_pssysuniresid",type=IdType.UUID) @TableId(value= "sys_pssysuniresid",type=IdType.UUID)
...@@ -41,13 +41,21 @@ public class SYS_PSSYSUNIRES extends EntityMP implements Serializable { ...@@ -41,13 +41,21 @@ public class SYS_PSSYSUNIRES extends EntityMP implements Serializable {
@JsonProperty("sys_pssysuniresid") @JsonProperty("sys_pssysuniresid")
private String sysPssysuniresid; private String sysPssysuniresid;
/** /**
* 统一资源名称 * 实体2名称
*/ */
@DEField(name = "sys_pssysuniresname") @DEField(name = "sys_pssysuniresname")
@TableField(value = "sys_pssysuniresname") @TableField(value = "sys_pssysuniresname")
@JSONField(name = "sys_pssysuniresname") @JSONField(name = "sys_pssysuniresname")
@JsonProperty("sys_pssysuniresname") @JsonProperty("sys_pssysuniresname")
private String sysPssysuniresname; private String sysPssysuniresname;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/** /**
* 建立时间 * 建立时间
*/ */
...@@ -74,14 +82,6 @@ public class SYS_PSSYSUNIRES extends EntityMP implements Serializable { ...@@ -74,14 +82,6 @@ public class SYS_PSSYSUNIRES extends EntityMP implements Serializable {
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/** /**
* 资源代码 * 资源代码
*/ */
...@@ -93,7 +93,7 @@ public class SYS_PSSYSUNIRES extends EntityMP implements Serializable { ...@@ -93,7 +93,7 @@ public class SYS_PSSYSUNIRES extends EntityMP implements Serializable {
/** /**
* 设置 [统一资源名称] * 设置 [实体2名称]
*/ */
public void setSysPssysuniresname(String sysPssysuniresname){ public void setSysPssysuniresname(String sysPssysuniresname){
this.sysPssysuniresname = sysPssysuniresname ; this.sysPssysuniresname = sysPssysuniresname ;
......
...@@ -27,7 +27,7 @@ import cn.ibizlab.core.uaa.domain.SYS_PSSYSUNIRES; ...@@ -27,7 +27,7 @@ import cn.ibizlab.core.uaa.domain.SYS_PSSYSUNIRES;
@Data @Data
public class SYS_PSSYSUNIRESSearchContext extends QueryWrapperContext<SYS_PSSYSUNIRES> { public class SYS_PSSYSUNIRESSearchContext extends QueryWrapperContext<SYS_PSSYSUNIRES> {
private String n_sys_pssysuniresname_like;//[统一资源名称] private String n_sys_pssysuniresname_like;//[实体2名称]
public void setN_sys_pssysuniresname_like(String n_sys_pssysuniresname_like) { public void setN_sys_pssysuniresname_like(String n_sys_pssysuniresname_like) {
this.n_sys_pssysuniresname_like = n_sys_pssysuniresname_like; this.n_sys_pssysuniresname_like = n_sys_pssysuniresname_like;
if(!ObjectUtils.isEmpty(this.n_sys_pssysuniresname_like)){ if(!ObjectUtils.isEmpty(this.n_sys_pssysuniresname_like)){
......
...@@ -24,17 +24,17 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -24,17 +24,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface ISYS_PSSYSUNIRESService extends IService<SYS_PSSYSUNIRES>{ public interface ISYS_PSSYSUNIRESService extends IService<SYS_PSSYSUNIRES>{
SYS_PSSYSUNIRES get(String key) ; boolean update(SYS_PSSYSUNIRES et) ;
void updateBatch(List<SYS_PSSYSUNIRES> list) ;
boolean save(SYS_PSSYSUNIRES et) ; boolean save(SYS_PSSYSUNIRES et) ;
void saveBatch(List<SYS_PSSYSUNIRES> list) ; void saveBatch(List<SYS_PSSYSUNIRES> list) ;
boolean create(SYS_PSSYSUNIRES et) ;
void createBatch(List<SYS_PSSYSUNIRES> list) ;
SYS_PSSYSUNIRES getDraft(SYS_PSSYSUNIRES et) ;
boolean checkKey(SYS_PSSYSUNIRES et) ; boolean checkKey(SYS_PSSYSUNIRES et) ;
boolean remove(String key) ; boolean remove(String key) ;
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList) ;
boolean update(SYS_PSSYSUNIRES et) ; SYS_PSSYSUNIRES getDraft(SYS_PSSYSUNIRES et) ;
void updateBatch(List<SYS_PSSYSUNIRES> list) ; SYS_PSSYSUNIRES get(String key) ;
boolean create(SYS_PSSYSUNIRES et) ;
void createBatch(List<SYS_PSSYSUNIRES> list) ;
Page<SYS_PSSYSUNIRES> searchDefault(SYS_PSSYSUNIRESSearchContext context) ; Page<SYS_PSSYSUNIRES> searchDefault(SYS_PSSYSUNIRESSearchContext context) ;
......
...@@ -38,7 +38,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -38,7 +38,7 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
* 实体[统一资源] 服务对象接口实现 * 实体[实体2] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SYS_PSSYSUNIRESServiceImpl") @Service("SYS_PSSYSUNIRESServiceImpl")
...@@ -48,15 +48,16 @@ public class SYS_PSSYSUNIRESServiceImpl extends ServiceImpl<SYS_PSSYSUNIRESMappe ...@@ -48,15 +48,16 @@ public class SYS_PSSYSUNIRESServiceImpl extends ServiceImpl<SYS_PSSYSUNIRESMappe
@Override @Override
@Transactional @Transactional
public SYS_PSSYSUNIRES get(String key) { public boolean update(SYS_PSSYSUNIRES et) {
SYS_PSSYSUNIRES et = getById(key); if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_pssysuniresid",et.getSysPssysuniresid())))
if(et==null){ return false;
et=new SYS_PSSYSUNIRES(); CachedBeanCopier.copy(get(et.getSysPssysuniresid()),et);
et.setSysPssysuniresid(key); return true;
}
else{
} }
return et;
@Override
public void updateBatch(List<SYS_PSSYSUNIRES> list) {
updateBatchById(list,batchSize);
} }
@Override @Override
...@@ -84,25 +85,6 @@ public class SYS_PSSYSUNIRESServiceImpl extends ServiceImpl<SYS_PSSYSUNIRESMappe ...@@ -84,25 +85,6 @@ public class SYS_PSSYSUNIRESServiceImpl extends ServiceImpl<SYS_PSSYSUNIRESMappe
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
} }
@Override
@Transactional
public boolean create(SYS_PSSYSUNIRES et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getSysPssysuniresid()),et);
return true;
}
@Override
public void createBatch(List<SYS_PSSYSUNIRES> list) {
saveBatch(list,batchSize);
}
@Override
public SYS_PSSYSUNIRES getDraft(SYS_PSSYSUNIRES et) {
return et;
}
@Override @Override
public boolean checkKey(SYS_PSSYSUNIRES et) { public boolean checkKey(SYS_PSSYSUNIRES et) {
return (!ObjectUtils.isEmpty(et.getSysPssysuniresid()))&&(!Objects.isNull(this.getById(et.getSysPssysuniresid()))); return (!ObjectUtils.isEmpty(et.getSysPssysuniresid()))&&(!Objects.isNull(this.getById(et.getSysPssysuniresid())));
...@@ -120,18 +102,36 @@ public class SYS_PSSYSUNIRESServiceImpl extends ServiceImpl<SYS_PSSYSUNIRESMappe ...@@ -120,18 +102,36 @@ public class SYS_PSSYSUNIRESServiceImpl extends ServiceImpl<SYS_PSSYSUNIRESMappe
removeByIds(idList); removeByIds(idList);
} }
@Override
public SYS_PSSYSUNIRES getDraft(SYS_PSSYSUNIRES et) {
return et;
}
@Override @Override
@Transactional @Transactional
public boolean update(SYS_PSSYSUNIRES et) { public SYS_PSSYSUNIRES get(String key) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_pssysuniresid",et.getSysPssysuniresid()))) SYS_PSSYSUNIRES et = getById(key);
if(et==null){
et=new SYS_PSSYSUNIRES();
et.setSysPssysuniresid(key);
}
else{
}
return et;
}
@Override
@Transactional
public boolean create(SYS_PSSYSUNIRES et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false; return false;
CachedBeanCopier.copy(get(et.getSysPssysuniresid()),et); CachedBeanCopier.copy(get(et.getSysPssysuniresid()),et);
return true; return true;
} }
@Override @Override
public void updateBatch(List<SYS_PSSYSUNIRES> list) { public void createBatch(List<SYS_PSSYSUNIRES> list) {
updateBatchById(list,batchSize); saveBatch(list,batchSize);
} }
......
...@@ -73,15 +73,15 @@ ...@@ -73,15 +73,15 @@
</column> </column>
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[IBZPSSYSUNIRES]数据结构 --> <!--输出实体[SYS_PSSYSUNIRES]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzpssysunires-59-4"> <changeSet author="a_A_5d9d78509" id="tab-sys_pssysunires-76-4">
<createTable tableName="IBZPSSYSUNIRES"> <createTable tableName="IBZPSSYSUNIRES">
<column name="IBZPSSYSUNIRESID" remarks="" type="VARCHAR(100)"> <column name="SYS_PSSYSUNIRESID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZPSSYSUNIRES_IBZPSSYSUNIR"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_PSSYSUNIRES_SYS_PSSYSUN"/>
</column> </column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)"> <column name="SYS_PSSYSUNIRESNAME" remarks="" type="VARCHAR(200)">
</column> </column>
<column name="IBZPSSYSUNIRESNAME" remarks="" type="VARCHAR(200)"> <column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column> </column>
<column name="CREATEDATE" remarks="" type="DATETIME"> <column name="CREATEDATE" remarks="" type="DATETIME">
</column> </column>
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<addForeignKeyConstraint baseColumnNames="SYS_PERMISSIONID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/> <addForeignKeyConstraint baseColumnNames="SYS_PERMISSIONID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_USER]外键关系 --> <!--输出实体[SYS_USER]外键关系 -->
<!--输出实体[IBZPSSYSUNIRES]外键关系 --> <!--输出实体[SYS_PSSYSUNIRES]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 --> <!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-33-12"> <changeSet author="a_A_5d9d78509" id="fk-sys_user_role-33-12">
<addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_ROLE_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/> <addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_ROLE_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
......
<?xml version="1.1" encoding="UTF-8" standalone="no"?> <?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<!--输出实体[SYS_PSSYSUNIRES]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet author="a_A_5d9d78509" id="view-sys_pssysunires-76-1" runOnChange="true">
<createView fullDefinition="false" replaceIfExists="true" viewName="V_SYS_PSSYSUNIRES">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`SYS_PSSYSUNIRESID`, t1.`SYS_PSSYSUNIRESNAME`, t1.`UNIRESCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZPSSYSUNIRES` t1 ]]>
</createView>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`SYS_PSSYSUNIRESID`, t1.`SYS_PSSYSUNIRESNAME`, t1.`UNIRESCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_SYS_PSSYSUNIRES` t1 <![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`SYS_PSSYSUNIRESID`, t1.`SYS_PSSYSUNIRESNAME`, t1.`UNIRESCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZPSSYSUNIRES` t1
]]> ]]>
</sql> </sql>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册