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

ibizdev提交

上级 52b60c72
......@@ -27,6 +27,9 @@ export default class DefaultModel {
{
name: 'type',
},
{
name: 'parentpermissionid',
},
{
name: 'enable',
},
......
......@@ -46,6 +46,11 @@ export default class MainModel {
prop: 'permissionname',
dataType: 'TEXT',
},
{
name: 'p_permissionid',
prop: 'parentpermissionid',
dataType: 'PICKUP',
},
{
name: 'srfdataaccaction',
prop: 'permissionid',
......
......@@ -27,6 +27,9 @@ export default class MPickupViewpickupviewpanelModel {
{
name: 'type',
},
{
name: 'parentpermissionid',
},
{
name: 'enable',
},
......
......@@ -27,6 +27,9 @@ export default class PickupViewpickupviewpanelModel {
{
name: 'type',
},
{
name: 'parentpermissionid',
},
{
name: 'enable',
},
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ibzuaa-app</artifactId>
<groupId>cn.ibizlab</groupId>
<version>1.0.0.0</version>
</parent>
<artifactId>ibzuaa-app-web</artifactId>
<name>Ibzuaa Gateway web</name>
<description>Ibzuaa web</description>
<dependencies>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibzuaa-util</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>web</id>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<!--注意此次必须要放在此目录下才能被访问到 -->
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>exec-yarn-run-install</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<workingDirectory>../../app_web</workingDirectory>
</configuration>
</execution>
<execution>
<id>exec-yarn-run-build</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<arguments>
<argument>build</argument>
</arguments>
<workingDirectory>../../app_web</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>ibzuaa-app-web</finalName>
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
<mainClass>cn.ibizlab.web.webApplication</mainClass>
<outputDirectory>../../</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
!!!!模版产生代码错误:----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${project.basedir} [in template "CODETEMPL_zh_CN" at line 114, column 46]
----
\ No newline at end of file
FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBZ_SLEEP=0 \
JAVA_OPTS=""
CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa.jar
EXPOSE 8080
ADD ibzuaa.jar /ibzuaa.jar
......@@ -61,6 +61,13 @@ public class SYS_PERMISSION extends EntityMP implements Serializable {
@JSONField(name = "type")
@JsonProperty("type")
private String type;
/**
* 上级资源标识
*/
@TableField(value = "p_permissionid")
@JSONField(name = "parentpermissionid")
@JsonProperty("parentpermissionid")
private String parentpermissionid;
/**
* 逻辑有效
*/
......@@ -87,6 +94,14 @@ public class SYS_PERMISSION extends EntityMP implements Serializable {
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 上级
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.core.uaa.domain.SYS_PERMISSION parentpermission;
/**
* 角色权限关系
......@@ -118,6 +133,13 @@ public class SYS_PERMISSION extends EntityMP implements Serializable {
this.type = type ;
this.modify("type",type);
}
/**
* 设置 [上级资源标识]
*/
public void setParentpermissionid(String parentpermissionid){
this.parentpermissionid = parentpermissionid ;
this.modify("p_permissionid",parentpermissionid);
}
/**
* 设置 [逻辑有效]
*/
......
......@@ -46,6 +46,13 @@ public class SYS_PERMISSIONSearchContext extends QueryWrapperContext<SYS_PERMISS
if(!ObjectUtils.isEmpty(this.n_type_eq)){
this.getSelectCond().eq("type", n_type_eq);
}
}
private String n_p_permissionid_eq;//[上级资源标识]
public void setN_p_permissionid_eq(String n_p_permissionid_eq) {
this.n_p_permissionid_eq = n_p_permissionid_eq;
if(!ObjectUtils.isEmpty(this.n_p_permissionid_eq)){
this.getSelectCond().eq("p_permissionid", n_p_permissionid_eq);
}
}
private Integer n_enable_eq;//[逻辑有效]
public void setN_enable_eq(Integer n_enable_eq) {
......
......@@ -59,4 +59,6 @@ public interface SYS_PERMISSIONMapper extends BaseMapper<SYS_PERMISSION>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql);
List<SYS_PERMISSION> selectByParentpermissionid(@Param("permissionid") Serializable permissionid) ;
}
......@@ -37,6 +37,9 @@ public interface ISYS_PERMISSIONService extends IService<SYS_PERMISSION>{
SYS_PERMISSION get(String key) ;
Page<SYS_PERMISSION> searchDefault(SYS_PERMISSIONSearchContext context) ;
List<SYS_PERMISSION> selectByParentpermissionid(String permissionid) ;
void removeByParentpermissionid(String permissionid) ;
List<JSONObject> select(String sql);
......
......@@ -42,6 +42,9 @@ import com.alibaba.fastjson.JSONObject;
@Service
public class SYS_PERMISSIONServiceImpl extends ServiceImpl<SYS_PERMISSIONMapper, SYS_PERMISSION> implements ISYS_PERMISSIONService {
@Autowired
@Lazy
private cn.ibizlab.core.uaa.service.ISYS_PERMISSIONService sysPermissionService;
@Autowired
@Lazy
private cn.ibizlab.core.uaa.service.ISYS_ROLE_PERMISSIONService sysRolePermissionService;
......@@ -140,6 +143,16 @@ public class SYS_PERMISSIONServiceImpl extends ServiceImpl<SYS_PERMISSIONMapper,
}
@Override
public List<SYS_PERMISSION> selectByParentpermissionid(String permissionid) {
return baseMapper.selectByParentpermissionid(permissionid);
}
@Override
public void removeByParentpermissionid(String permissionid) {
this.remove(new QueryWrapper<SYS_PERMISSION>().eq("sys_permissionid",permissionid));
}
/**
* 查询集合 DEFAULT
......
......@@ -112,7 +112,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-26-6">
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-30-6">
<createTable tableName="IBZPERMISSION">
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/>
......@@ -123,6 +123,8 @@
</column>
<column name="TYPE" remarks="" type="VARCHAR(60)">
</column>
<column name="P_PERMISSIONID" remarks="" type="VARCHAR(200)">
</column>
<column name="ENABLE" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
......@@ -177,6 +179,9 @@
</changeSet>
<!--输出实体[SYS_ROLE]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_permission-30-12">
<addForeignKeyConstraint baseColumnNames="P_PERMISSIONID" baseTableName="IBZPERMISSION" constraintName="DER1N_SYS_PERMISSION_SYS_PERMI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/>
</changeSet>
<!--输出实体[SYS_PSAPPMENUITEM]外键关系 -->
</databaseChangeLog>
......@@ -10,10 +10,20 @@
<id property="permissionid" column="sys_permissionid" /><!--主键字段映射-->
<result property="permissionname" column="sys_permissionname" />
<result property="pssystemid" column="systemid" />
<result property="parentpermissionid" column="p_permissionid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="parentpermission" javaType="cn.ibizlab.core.uaa.domain.SYS_PERMISSION" column="p_permissionid" select="cn.ibizlab.core.uaa.mapper.SYS_PERMISSIONMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_SYS_PERMISSION_SYS_PERMISSION_P_PERMISSIONID] -->
<select id="selectByParentpermissionid" resultMap="SYS_PERMISSIONResultMap">
select t1.* from (
<include refid="Default" />
) t1
where p_permissionid=#{permissionid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.uaa.filter.SYS_PERMISSIONSearchContext" resultMap="SYS_PERMISSIONResultMap">
......@@ -26,7 +36,7 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`SYSTEMID`, t1.`SYS_PERMISSIONID`, t1.`SYS_PERMISSIONNAME`, t1.`TYPE`, t1.`UPDATEDATE` FROM `IBZPERMISSION` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`P_PERMISSIONID`, t1.`SYSTEMID`, t1.`SYS_PERMISSIONID`, t1.`SYS_PERMISSIONNAME`, t1.`TYPE`, t1.`UPDATEDATE` FROM `IBZPERMISSION` t1
]]>
</sql>
......
......@@ -55,6 +55,14 @@ public class SYS_PERMISSIONDTO extends DTOBase implements Serializable {
@JsonProperty("type")
private String type;
/**
* 属性 [P_PERMISSIONID]
*
*/
@JSONField(name = "parentpermissionid")
@JsonProperty("parentpermissionid")
private String parentpermissionid;
/**
* 属性 [ENABLE]
*
......@@ -106,6 +114,14 @@ public class SYS_PERMISSIONDTO extends DTOBase implements Serializable {
this.modify("type",type);
}
/**
* 设置 [P_PERMISSIONID]
*/
public void setParentpermissionid(String parentpermissionid){
this.parentpermissionid = parentpermissionid ;
this.modify("p_permissionid",parentpermissionid);
}
/**
* 设置 [ENABLE]
*/
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册