系统权限模块代码生成
This commit is contained in:
parent
9738eb7a54
commit
71c5317711
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.buttonConfig.dao;
|
||||
|
||||
import com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 按钮配置表(sys_button_config: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:01
|
||||
*/
|
||||
public interface ISysButtonConfigDao extends IBaseDao<SysButtonConfigEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.sys.buttonConfig.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity;
|
||||
import com.hzya.frame.sys.buttonConfig.dao.ISysButtonConfigDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 按钮配置表(SysButtonConfig)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:01
|
||||
*/
|
||||
@Repository(value = "SysButtonConfigDaoImpl")
|
||||
public class SysButtonConfigDaoImpl extends MybatisGenericDao<SysButtonConfigEntity, String> implements ISysButtonConfigDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package com.hzya.frame.sys.buttonConfig.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 按钮配置表(SysButtonConfig)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:01
|
||||
*/
|
||||
public class SysButtonConfigEntity extends BaseEntity {
|
||||
|
||||
/** 按钮编码 */
|
||||
private String code;
|
||||
/** 中文名称 */
|
||||
private String nameCh;
|
||||
/** 英文名称 */
|
||||
private String nameEn;
|
||||
/** 所属菜单ID */
|
||||
private String menuId;
|
||||
/** 图标 */
|
||||
private String icoName;
|
||||
/** 样式 */
|
||||
private String styles;
|
||||
/** 按钮事件 */
|
||||
private String btnFunction;
|
||||
/** 按钮备注 */
|
||||
private String remark;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getNameCh() {
|
||||
return nameCh;
|
||||
}
|
||||
|
||||
public void setNameCh(String nameCh) {
|
||||
this.nameCh = nameCh;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public String getIcoName() {
|
||||
return icoName;
|
||||
}
|
||||
|
||||
public void setIcoName(String icoName) {
|
||||
this.icoName = icoName;
|
||||
}
|
||||
|
||||
public String getStyles() {
|
||||
return styles;
|
||||
}
|
||||
|
||||
public void setStyles(String styles) {
|
||||
this.styles = styles;
|
||||
}
|
||||
|
||||
public String getBtnFunction() {
|
||||
return btnFunction;
|
||||
}
|
||||
|
||||
public void setBtnFunction(String btnFunction) {
|
||||
this.btnFunction = btnFunction;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,291 @@
|
|||
<?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.sys.buttonConfig.dao.impl.SysButtonConfigDaoImpl">
|
||||
|
||||
<resultMap id="get-SysButtonConfigEntity-result" type="com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="nameCh" column="name_ch" jdbcType="VARCHAR"/>
|
||||
<result property="nameEn" column="name_en" jdbcType="VARCHAR"/>
|
||||
<result property="menuId" column="menu_id" jdbcType="VARCHAR"/>
|
||||
<result property="icoName" column="ico_name" jdbcType="VARCHAR"/>
|
||||
<result property="styles" column="styles" jdbcType="VARCHAR"/>
|
||||
<result property="btnFunction" column="btn_function" 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 = "SysButtonConfigEntity_Base_Column_List">
|
||||
id
|
||||
,code
|
||||
,name_ch
|
||||
,name_en
|
||||
,menu_id
|
||||
,ico_name
|
||||
,styles
|
||||
,btn_function
|
||||
,remark
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysButtonConfigEntity-result" parameterType = "com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity">
|
||||
select
|
||||
<include refid="SysButtonConfigEntity_Base_Column_List" />
|
||||
from sys_button_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="nameCh != null and nameCh != ''"> and name_ch = #{nameCh} </if>
|
||||
<if test="nameEn != null and nameEn != ''"> and name_en = #{nameEn} </if>
|
||||
<if test="menuId != null and menuId != ''"> and menu_id = #{menuId} </if>
|
||||
<if test="icoName != null and icoName != ''"> and ico_name = #{icoName} </if>
|
||||
<if test="styles != null and styles != ''"> and styles = #{styles} </if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> and btn_function = #{btnFunction} </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.sys.buttonConfig.entity.SysButtonConfigEntity">
|
||||
select count(1) from sys_button_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="nameCh != null and nameCh != ''"> and name_ch = #{nameCh} </if>
|
||||
<if test="nameEn != null and nameEn != ''"> and name_en = #{nameEn} </if>
|
||||
<if test="menuId != null and menuId != ''"> and menu_id = #{menuId} </if>
|
||||
<if test="icoName != null and icoName != ''"> and ico_name = #{icoName} </if>
|
||||
<if test="styles != null and styles != ''"> and styles = #{styles} </if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> and btn_function = #{btnFunction} </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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysButtonConfigEntity-result" parameterType = "com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity">
|
||||
select
|
||||
<include refid="SysButtonConfigEntity_Base_Column_List" />
|
||||
from sys_button_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="nameCh != null and nameCh != ''"> and name_ch like concat('%',#{nameCh},'%') </if>
|
||||
<if test="nameEn != null and nameEn != ''"> and name_en like concat('%',#{nameEn},'%') </if>
|
||||
<if test="menuId != null and menuId != ''"> and menu_id like concat('%',#{menuId},'%') </if>
|
||||
<if test="icoName != null and icoName != ''"> and ico_name like concat('%',#{icoName},'%') </if>
|
||||
<if test="styles != null and styles != ''"> and styles like concat('%',#{styles},'%') </if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> and btn_function like concat('%',#{btnFunction},'%') </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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysButtonConfigentity_list_or" resultMap="get-SysButtonConfigEntity-result" parameterType = "com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity">
|
||||
select
|
||||
<include refid="SysButtonConfigEntity_Base_Column_List" />
|
||||
from sys_button_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||
<if test="nameCh != null and nameCh != ''"> or name_ch = #{nameCh} </if>
|
||||
<if test="nameEn != null and nameEn != ''"> or name_en = #{nameEn} </if>
|
||||
<if test="menuId != null and menuId != ''"> or menu_id = #{menuId} </if>
|
||||
<if test="icoName != null and icoName != ''"> or ico_name = #{icoName} </if>
|
||||
<if test="styles != null and styles != ''"> or styles = #{styles} </if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> or btn_function = #{btnFunction} </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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_button_config(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="code != null and code != ''"> code , </if>
|
||||
<if test="nameCh != null and nameCh != ''"> name_ch , </if>
|
||||
<if test="nameEn != null and nameEn != ''"> name_en , </if>
|
||||
<if test="menuId != null and menuId != ''"> menu_id , </if>
|
||||
<if test="icoName != null and icoName != ''"> ico_name , </if>
|
||||
<if test="styles != null and styles != ''"> styles , </if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> btn_function , </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="code != null and code != ''"> #{code} ,</if>
|
||||
<if test="nameCh != null and nameCh != ''"> #{nameCh} ,</if>
|
||||
<if test="nameEn != null and nameEn != ''"> #{nameEn} ,</if>
|
||||
<if test="menuId != null and menuId != ''"> #{menuId} ,</if>
|
||||
<if test="icoName != null and icoName != ''"> #{icoName} ,</if>
|
||||
<if test="styles != null and styles != ''"> #{styles} ,</if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> #{btnFunction} ,</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 sys_button_config a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_button_config(code, name_ch, name_en, menu_id, ico_name, styles, btn_function, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.code},#{entity.nameCh},#{entity.nameEn},#{entity.menuId},#{entity.icoName},#{entity.styles},#{entity.btnFunction},#{entity.remark},#{entity.sorts},#{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 sys_button_config(code, name_ch, name_en, menu_id, ico_name, styles, btn_function, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.code},#{entity.nameCh},#{entity.nameEn},#{entity.menuId},#{entity.icoName},#{entity.styles},#{entity.btnFunction},#{entity.remark},#{entity.sorts},#{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
|
||||
code = values(code),
|
||||
name_ch = values(name_ch),
|
||||
name_en = values(name_en),
|
||||
menu_id = values(menu_id),
|
||||
ico_name = values(ico_name),
|
||||
styles = values(styles),
|
||||
btn_function = values(btn_function),
|
||||
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),
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity" >
|
||||
update sys_button_config set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="code != null and code != ''"> code = #{code},</if>
|
||||
<if test="nameCh != null and nameCh != ''"> name_ch = #{nameCh},</if>
|
||||
<if test="nameEn != null and nameEn != ''"> name_en = #{nameEn},</if>
|
||||
<if test="menuId != null and menuId != ''"> menu_id = #{menuId},</if>
|
||||
<if test="icoName != null and icoName != ''"> ico_name = #{icoName},</if>
|
||||
<if test="styles != null and styles != ''"> styles = #{styles},</if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> btn_function = #{btnFunction},</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>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity" >
|
||||
update sys_button_config 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.sys.buttonConfig.entity.SysButtonConfigEntity" >
|
||||
update sys_button_config 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="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="nameCh != null and nameCh != ''"> and name_ch = #{nameCh} </if>
|
||||
<if test="nameEn != null and nameEn != ''"> and name_en = #{nameEn} </if>
|
||||
<if test="menuId != null and menuId != ''"> and menu_id = #{menuId} </if>
|
||||
<if test="icoName != null and icoName != ''"> and ico_name = #{icoName} </if>
|
||||
<if test="styles != null and styles != ''"> and styles = #{styles} </if>
|
||||
<if test="btnFunction != null and btnFunction != ''"> and btn_function = #{btnFunction} </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">
|
||||
delete from sys_button_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.sys.buttonConfig.service;
|
||||
|
||||
import com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 按钮配置表(SysButtonConfig)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:01
|
||||
*/
|
||||
public interface ISysButtonConfigService extends IBaseService<SysButtonConfigEntity, String>{
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.sys.buttonConfig.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.buttonConfig.entity.SysButtonConfigEntity;
|
||||
import com.hzya.frame.sys.buttonConfig.dao.ISysButtonConfigDao;
|
||||
import com.hzya.frame.sys.buttonConfig.service.ISysButtonConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 按钮配置表(SysButtonConfig)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:01
|
||||
*/
|
||||
@Service(value = "sysButtonConfigService")
|
||||
public class SysButtonConfigServiceImpl extends BaseService<SysButtonConfigEntity, String> implements ISysButtonConfigService {
|
||||
|
||||
private ISysButtonConfigDao sysButtonConfigDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysButtonConfigDao(ISysButtonConfigDao dao) {
|
||||
this.sysButtonConfigDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -137,15 +137,12 @@ public class SysDataSourceEntity extends BaseEntity {
|
|||
if (sourceType != null) {
|
||||
switch (sourceType) {
|
||||
case "1": //oracle
|
||||
//jdbc:oracle:thin:@60.204.132.91:1521:ORCL
|
||||
sourceUrl.append("jdbc:oracle:thin:@").append(sourceIp).append(":").append(sourcePort).append(":").append(serviceName);
|
||||
break;
|
||||
case "2": //sqlsever
|
||||
//jdbc:sqlserver://221.12.175.82:1433;DatabaseName=U8CLOUD;encrypt=false;trustServerCertificate=true
|
||||
sourceUrl.append("jdbc:sqlserver://").append(sourceIp).append(":").append(sourcePort).append(";DatabaseName=").append(dbName).append(";encrypt=false;trustServerCertificate=true");
|
||||
break;
|
||||
case "3": //mysql
|
||||
//jdbc:mysql://hzya.ufyct.com:9096/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
sourceUrl.append("jdbc:mysql://").append(sourceIp).append(":").append(sourcePort).append("/").append(dbName).append("?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false");
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -140,19 +140,15 @@ public class SysDataSourceVo {
|
|||
StringBuffer sourceUrl = new StringBuffer();
|
||||
switch (sourceType) {
|
||||
case "1": //oracle
|
||||
//jdbc:oracle:thin:@60.204.132.91:1521:ORCL
|
||||
sourceUrl.append("jdbc:oracle:thin:@").append(sourceIp).append(":").append(sourcePort).append(":").append(serviceName);
|
||||
break;
|
||||
case "2": //sqlsever
|
||||
//jdbc:sqlserver://221.12.175.82:1433;DatabaseName=U8CLOUD;encrypt=false;trustServerCertificate=true
|
||||
sourceUrl.append("jdbc:jtds:sqlserver://").append(sourceIp).append(":").append(sourcePort).append("/").append(dbName).append(";encrypt=false;trustServerCertificate=true");
|
||||
break;
|
||||
case "3": //mysql
|
||||
//jdbc:mysql://hzya.ufyct.com:9096/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
sourceUrl.append("jdbc:mysql://").append(sourceIp).append(":").append(sourcePort).append("/").append(dbName).append("?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false");
|
||||
break;
|
||||
case "4": //dm
|
||||
//jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&characterEncoding=UTF-8
|
||||
sourceUrl.append("jdbc:dm://").append(sourceIp).append(":").append(sourcePort).append("?schema=").append(dbName).append("&characterEncoding=UTF-8");
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.menuConfig.dao;
|
||||
|
||||
import com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 系统菜单表(sys_menu_config: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:51
|
||||
*/
|
||||
public interface ISysMenuConfigDao extends IBaseDao<SysMenuConfigEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.menuConfig.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity;
|
||||
import com.hzya.frame.sys.menuConfig.dao.ISysMenuConfigDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 系统菜单表(SysMenuConfig)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:51
|
||||
*/
|
||||
@Repository(value = "SysMenuConfigDaoImpl")
|
||||
public class SysMenuConfigDaoImpl extends MybatisGenericDao<SysMenuConfigEntity, String> implements ISysMenuConfigDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
package com.hzya.frame.sys.menuConfig.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 系统菜单表(SysMenuConfig)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:52
|
||||
*/
|
||||
public class SysMenuConfigEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 上级菜单ID(0表示无上级)
|
||||
*/
|
||||
private String parentMenuId;
|
||||
/**
|
||||
* 所属菜单层级
|
||||
*/
|
||||
private String menuEntity;
|
||||
/**
|
||||
* 菜单深度
|
||||
*/
|
||||
private Long depth;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
private String menuName;
|
||||
/**
|
||||
* 菜单英文名称
|
||||
*/
|
||||
private String menuEnglishName;
|
||||
/**
|
||||
* 图标样式
|
||||
*/
|
||||
private String menuIcon;
|
||||
/**
|
||||
* 页面路由
|
||||
*/
|
||||
private String route;
|
||||
/**
|
||||
* 页面
|
||||
*/
|
||||
private String menuPage;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否可见(1、可见2、不可见)
|
||||
*/
|
||||
private String visibles;
|
||||
/**
|
||||
* 显示类型(1、菜单2、弹窗)
|
||||
*/
|
||||
private String showType;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getParentMenuId() {
|
||||
return parentMenuId;
|
||||
}
|
||||
|
||||
public void setParentMenuId(String parentMenuId) {
|
||||
this.parentMenuId = parentMenuId;
|
||||
}
|
||||
|
||||
public String getMenuEntity() {
|
||||
return menuEntity;
|
||||
}
|
||||
|
||||
public void setMenuEntity(String menuEntity) {
|
||||
this.menuEntity = menuEntity;
|
||||
}
|
||||
|
||||
public Long getDepth() {
|
||||
return depth;
|
||||
}
|
||||
|
||||
public void setDepth(Long depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
public String getMenuName() {
|
||||
return menuName;
|
||||
}
|
||||
|
||||
public void setMenuName(String menuName) {
|
||||
this.menuName = menuName;
|
||||
}
|
||||
|
||||
public String getMenuEnglishName() {
|
||||
return menuEnglishName;
|
||||
}
|
||||
|
||||
public void setMenuEnglishName(String menuEnglishName) {
|
||||
this.menuEnglishName = menuEnglishName;
|
||||
}
|
||||
|
||||
public String getMenuIcon() {
|
||||
return menuIcon;
|
||||
}
|
||||
|
||||
public void setMenuIcon(String menuIcon) {
|
||||
this.menuIcon = menuIcon;
|
||||
}
|
||||
|
||||
public String getRoute() {
|
||||
return route;
|
||||
}
|
||||
|
||||
public void setRoute(String route) {
|
||||
this.route = route;
|
||||
}
|
||||
|
||||
public String getMenuPage() {
|
||||
return menuPage;
|
||||
}
|
||||
|
||||
public void setMenuPage(String menuPage) {
|
||||
this.menuPage = menuPage;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getVisibles() {
|
||||
return visibles;
|
||||
}
|
||||
|
||||
public void setVisibles(String visibles) {
|
||||
this.visibles = visibles;
|
||||
}
|
||||
|
||||
public String getShowType() {
|
||||
return showType;
|
||||
}
|
||||
|
||||
public void setShowType(String showType) {
|
||||
this.showType = showType;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,346 @@
|
|||
<?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.sys.menuConfig.dao.impl.SysMenuConfigDaoImpl">
|
||||
|
||||
<resultMap id="get-SysMenuConfigEntity-result" type="com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="parentMenuId" column="parent_menu_id" jdbcType="VARCHAR"/>
|
||||
<result property="menuEntity" column="menu_entity" jdbcType="VARCHAR"/>
|
||||
<result property="depth" column="depth" jdbcType="INTEGER"/>
|
||||
<result property="menuName" column="menu_name" jdbcType="VARCHAR"/>
|
||||
<result property="menuEnglishName" column="menu_english_name" jdbcType="VARCHAR"/>
|
||||
<result property="menuIcon" column="menu_icon" jdbcType="VARCHAR"/>
|
||||
<result property="route" column="route" jdbcType="VARCHAR"/>
|
||||
<result property="menuPage" column="menu_page" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="visibles" column="visibles" jdbcType="VARCHAR"/>
|
||||
<result property="showType" column="show_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="SysMenuConfigEntity_Base_Column_List">
|
||||
id
|
||||
,parent_menu_id
|
||||
,menu_entity
|
||||
,depth
|
||||
,menu_name
|
||||
,menu_english_name
|
||||
,menu_icon
|
||||
,route
|
||||
,menu_page
|
||||
,remark
|
||||
,visibles
|
||||
,show_type
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysMenuConfigEntity-result"
|
||||
parameterType="com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
select
|
||||
<include refid="SysMenuConfigEntity_Base_Column_List"/>
|
||||
from sys_menu_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="parentMenuId != null and parentMenuId != ''">and parent_menu_id = #{parentMenuId}</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">and menu_entity = #{menuEntity}</if>
|
||||
<if test="depth != null">and depth = #{depth}</if>
|
||||
<if test="menuName != null and menuName != ''">and menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon = #{menuIcon}</if>
|
||||
<if test="route != null and route != ''">and route = #{route}</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles = #{visibles}</if>
|
||||
<if test="showType != null and showType != ''">and show_type = #{showType}</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.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
select count(1) from sys_menu_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="parentMenuId != null and parentMenuId != ''">and parent_menu_id = #{parentMenuId}</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">and menu_entity = #{menuEntity}</if>
|
||||
<if test="depth != null">and depth = #{depth}</if>
|
||||
<if test="menuName != null and menuName != ''">and menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon = #{menuIcon}</if>
|
||||
<if test="route != null and route != ''">and route = #{route}</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles = #{visibles}</if>
|
||||
<if test="showType != null and showType != ''">and show_type = #{showType}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysMenuConfigEntity-result"
|
||||
parameterType="com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
select
|
||||
<include refid="SysMenuConfigEntity_Base_Column_List"/>
|
||||
from sys_menu_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="parentMenuId != null and parentMenuId != ''">and parent_menu_id like
|
||||
concat('%',#{parentMenuId},'%')
|
||||
</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">and menu_entity like concat('%',#{menuEntity},'%')</if>
|
||||
<if test="depth != null">and depth like concat('%',#{depth},'%')</if>
|
||||
<if test="menuName != null and menuName != ''">and menu_name like concat('%',#{menuName},'%')</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name like
|
||||
concat('%',#{menuEnglishName},'%')
|
||||
</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon like concat('%',#{menuIcon},'%')</if>
|
||||
<if test="route != null and route != ''">and route like concat('%',#{route},'%')</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page like concat('%',#{menuPage},'%')</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles like concat('%',#{visibles},'%')</if>
|
||||
<if test="showType != null and showType != ''">and show_type like concat('%',#{showType},'%')</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysMenuConfigentity_list_or" resultMap="get-SysMenuConfigEntity-result"
|
||||
parameterType="com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
select
|
||||
<include refid="SysMenuConfigEntity_Base_Column_List"/>
|
||||
from sys_menu_config
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="parentMenuId != null and parentMenuId != ''">or parent_menu_id = #{parentMenuId}</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">or menu_entity = #{menuEntity}</if>
|
||||
<if test="depth != null">or depth = #{depth}</if>
|
||||
<if test="menuName != null and menuName != ''">or menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">or menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">or menu_icon = #{menuIcon}</if>
|
||||
<if test="route != null and route != ''">or route = #{route}</if>
|
||||
<if test="menuPage != null and menuPage != ''">or menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">or remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">or visibles = #{visibles}</if>
|
||||
<if test="showType != null and showType != ''">or show_type = #{showType}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into sys_menu_config(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="parentMenuId != null and parentMenuId != ''">parent_menu_id ,</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">menu_entity ,</if>
|
||||
<if test="depth != null">depth ,</if>
|
||||
<if test="menuName != null and menuName != ''">menu_name ,</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">menu_english_name ,</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">menu_icon ,</if>
|
||||
<if test="route != null and route != ''">route ,</if>
|
||||
<if test="menuPage != null and menuPage != ''">menu_page ,</if>
|
||||
<if test="remark != null and remark != ''">remark ,</if>
|
||||
<if test="visibles != null and visibles != ''">visibles ,</if>
|
||||
<if test="showType != null and showType != ''">show_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="parentMenuId != null and parentMenuId != ''">#{parentMenuId} ,</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">#{menuEntity} ,</if>
|
||||
<if test="depth != null">#{depth} ,</if>
|
||||
<if test="menuName != null and menuName != ''">#{menuName} ,</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">#{menuEnglishName} ,</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">#{menuIcon} ,</if>
|
||||
<if test="route != null and route != ''">#{route} ,</if>
|
||||
<if test="menuPage != null and menuPage != ''">#{menuPage} ,</if>
|
||||
<if test="remark != null and remark != ''">#{remark} ,</if>
|
||||
<if test="visibles != null and visibles != ''">#{visibles} ,</if>
|
||||
<if test="showType != null and showType != ''">#{showType} ,</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 sys_menu_config a WHERE a.sts
|
||||
= 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_menu_config(parent_menu_id, menu_entity, depth, menu_name, menu_english_name, menu_icon, route,
|
||||
menu_page, remark, visibles, show_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts,
|
||||
org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.parentMenuId},#{entity.menuEntity},#{entity.depth},#{entity.menuName},#{entity.menuEnglishName},#{entity.menuIcon},#{entity.route},#{entity.menuPage},#{entity.remark},#{entity.visibles},#{entity.showType},#{entity.sorts},#{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 sys_menu_config(parent_menu_id, menu_entity, depth, menu_name, menu_english_name, menu_icon, route,
|
||||
menu_page, remark, visibles, show_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts,
|
||||
org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.parentMenuId},#{entity.menuEntity},#{entity.depth},#{entity.menuName},#{entity.menuEnglishName},#{entity.menuIcon},#{entity.route},#{entity.menuPage},#{entity.remark},#{entity.visibles},#{entity.showType},#{entity.sorts},#{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
|
||||
parent_menu_id = values(parent_menu_id),
|
||||
menu_entity = values(menu_entity),
|
||||
depth = values(depth),
|
||||
menu_name = values(menu_name),
|
||||
menu_english_name = values(menu_english_name),
|
||||
menu_icon = values(menu_icon),
|
||||
route = values(route),
|
||||
menu_page = values(menu_page),
|
||||
remark = values(remark),
|
||||
visibles = values(visibles),
|
||||
show_type = values(show_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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
update sys_menu_config set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="parentMenuId != null and parentMenuId != ''">parent_menu_id = #{parentMenuId},</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">menu_entity = #{menuEntity},</if>
|
||||
<if test="depth != null">depth = #{depth},</if>
|
||||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">menu_english_name = #{menuEnglishName},</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">menu_icon = #{menuIcon},</if>
|
||||
<if test="route != null and route != ''">route = #{route},</if>
|
||||
<if test="menuPage != null and menuPage != ''">menu_page = #{menuPage},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="visibles != null and visibles != ''">visibles = #{visibles},</if>
|
||||
<if test="showType != null and showType != ''">show_type = #{showType},</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="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
update sys_menu_config 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.sys.menuConfig.entity.SysMenuConfigEntity">
|
||||
update sys_menu_config 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="parentMenuId != null and parentMenuId != ''">and parent_menu_id = #{parentMenuId}</if>
|
||||
<if test="menuEntity != null and menuEntity != ''">and menu_entity = #{menuEntity}</if>
|
||||
<if test="depth != null">and depth = #{depth}</if>
|
||||
<if test="menuName != null and menuName != ''">and menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon = #{menuIcon}</if>
|
||||
<if test="route != null and route != ''">and route = #{route}</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles = #{visibles}</if>
|
||||
<if test="showType != null and showType != ''">and show_type = #{showType}</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">
|
||||
delete from sys_menu_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.menuConfig.service;
|
||||
|
||||
import com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 系统菜单表(SysMenuConfig)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:53
|
||||
*/
|
||||
public interface ISysMenuConfigService extends IBaseService<SysMenuConfigEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.menuConfig.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.menuConfig.entity.SysMenuConfigEntity;
|
||||
import com.hzya.frame.sys.menuConfig.dao.ISysMenuConfigDao;
|
||||
import com.hzya.frame.sys.menuConfig.service.ISysMenuConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 系统菜单表(SysMenuConfig)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:23:53
|
||||
*/
|
||||
@Service(value = "sysMenuConfigService")
|
||||
public class SysMenuConfigServiceImpl extends BaseService<SysMenuConfigEntity, String> implements ISysMenuConfigService {
|
||||
|
||||
private ISysMenuConfigDao sysMenuConfigDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysMenuConfigDao(ISysMenuConfigDao dao) {
|
||||
this.sysMenuConfigDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.organ.dao;
|
||||
|
||||
import com.hzya.frame.sys.organ.entity.SysOrganEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 组织机构表(Sys_Organ)(sys_organ: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:24:26
|
||||
*/
|
||||
public interface ISysOrganDao extends IBaseDao<SysOrganEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.organ.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.organ.entity.SysOrganEntity;
|
||||
import com.hzya.frame.sys.organ.dao.ISysOrganDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 组织机构表(Sys_Organ)(SysOrgan)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:24:27
|
||||
*/
|
||||
@Repository(value = "SysOrganDaoImpl")
|
||||
public class SysOrganDaoImpl extends MybatisGenericDao<SysOrganEntity, String> implements ISysOrganDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
package com.hzya.frame.sys.organ.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 组织机构表(Sys_Organ)(SysOrgan)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:24:27
|
||||
*/
|
||||
public class SysOrganEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String organName;
|
||||
/**
|
||||
* 机构代码
|
||||
*/
|
||||
private String organCode;
|
||||
/**
|
||||
* 组织机构父级ID
|
||||
*/
|
||||
private String parentOrganId;
|
||||
/**
|
||||
* 组织机构深度
|
||||
*/
|
||||
private Long depth;
|
||||
/**
|
||||
* 组织机构层级
|
||||
*/
|
||||
private String hierarchy;
|
||||
/**
|
||||
* 状态: 0启用 1 停用
|
||||
*/
|
||||
private String state;
|
||||
/**
|
||||
* 是否公司: 0 是 1 否
|
||||
*/
|
||||
private String company;
|
||||
/**
|
||||
* 机构负责人
|
||||
*/
|
||||
private String managerId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getOrganName() {
|
||||
return organName;
|
||||
}
|
||||
|
||||
public void setOrganName(String organName) {
|
||||
this.organName = organName;
|
||||
}
|
||||
|
||||
public String getOrganCode() {
|
||||
return organCode;
|
||||
}
|
||||
|
||||
public void setOrganCode(String organCode) {
|
||||
this.organCode = organCode;
|
||||
}
|
||||
|
||||
public String getParentOrganId() {
|
||||
return parentOrganId;
|
||||
}
|
||||
|
||||
public void setParentOrganId(String parentOrganId) {
|
||||
this.parentOrganId = parentOrganId;
|
||||
}
|
||||
|
||||
public Long getDepth() {
|
||||
return depth;
|
||||
}
|
||||
|
||||
public void setDepth(Long depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
public String getHierarchy() {
|
||||
return hierarchy;
|
||||
}
|
||||
|
||||
public void setHierarchy(String hierarchy) {
|
||||
this.hierarchy = hierarchy;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getCompany() {
|
||||
return company;
|
||||
}
|
||||
|
||||
public void setCompany(String company) {
|
||||
this.company = company;
|
||||
}
|
||||
|
||||
public String getManagerId() {
|
||||
return managerId;
|
||||
}
|
||||
|
||||
public void setManagerId(String managerId) {
|
||||
this.managerId = managerId;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,318 @@
|
|||
<?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.sys.organ.dao.impl.SysOrganDaoImpl">
|
||||
|
||||
<resultMap id="get-SysOrganEntity-result" type="com.hzya.frame.sys.organ.entity.SysOrganEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="organName" column="organ_name" jdbcType="VARCHAR"/>
|
||||
<result property="organCode" column="organ_code" jdbcType="VARCHAR"/>
|
||||
<result property="parentOrganId" column="parent_organ_id" jdbcType="VARCHAR"/>
|
||||
<result property="depth" column="depth" jdbcType="INTEGER"/>
|
||||
<result property="hierarchy" column="hierarchy" jdbcType="VARCHAR"/>
|
||||
<result property="state" column="state" jdbcType="VARCHAR"/>
|
||||
<result property="company" column="company" jdbcType="VARCHAR"/>
|
||||
<result property="managerId" column="manager_id" 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="SysOrganEntity_Base_Column_List">
|
||||
id
|
||||
,organ_name
|
||||
,organ_code
|
||||
,parent_organ_id
|
||||
,depth
|
||||
,hierarchy
|
||||
,state
|
||||
,company
|
||||
,manager_id
|
||||
,remark
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysOrganEntity-result"
|
||||
parameterType="com.hzya.frame.sys.organ.entity.SysOrganEntity">
|
||||
select
|
||||
<include refid="SysOrganEntity_Base_Column_List"/>
|
||||
from sys_organ
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="organName != null and organName != ''">and organ_name = #{organName}</if>
|
||||
<if test="organCode != null and organCode != ''">and organ_code = #{organCode}</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">and parent_organ_id = #{parentOrganId}</if>
|
||||
<if test="depth != null">and depth = #{depth}</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">and hierarchy = #{hierarchy}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</if>
|
||||
<if test="company != null and company != ''">and company = #{company}</if>
|
||||
<if test="managerId != null and managerId != ''">and manager_id = #{managerId}</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.sys.organ.entity.SysOrganEntity">
|
||||
select count(1) from sys_organ
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="organName != null and organName != ''">and organ_name = #{organName}</if>
|
||||
<if test="organCode != null and organCode != ''">and organ_code = #{organCode}</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">and parent_organ_id = #{parentOrganId}</if>
|
||||
<if test="depth != null">and depth = #{depth}</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">and hierarchy = #{hierarchy}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</if>
|
||||
<if test="company != null and company != ''">and company = #{company}</if>
|
||||
<if test="managerId != null and managerId != ''">and manager_id = #{managerId}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysOrganEntity-result"
|
||||
parameterType="com.hzya.frame.sys.organ.entity.SysOrganEntity">
|
||||
select
|
||||
<include refid="SysOrganEntity_Base_Column_List"/>
|
||||
from sys_organ
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="organName != null and organName != ''">and organ_name like concat('%',#{organName},'%')</if>
|
||||
<if test="organCode != null and organCode != ''">and organ_code like concat('%',#{organCode},'%')</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">and parent_organ_id like
|
||||
concat('%',#{parentOrganId},'%')
|
||||
</if>
|
||||
<if test="depth != null">and depth like concat('%',#{depth},'%')</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">and hierarchy like concat('%',#{hierarchy},'%')</if>
|
||||
<if test="state != null and state != ''">and state like concat('%',#{state},'%')</if>
|
||||
<if test="company != null and company != ''">and company like concat('%',#{company},'%')</if>
|
||||
<if test="managerId != null and managerId != ''">and manager_id like concat('%',#{managerId},'%')</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysOrganentity_list_or" resultMap="get-SysOrganEntity-result"
|
||||
parameterType="com.hzya.frame.sys.organ.entity.SysOrganEntity">
|
||||
select
|
||||
<include refid="SysOrganEntity_Base_Column_List"/>
|
||||
from sys_organ
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="organName != null and organName != ''">or organ_name = #{organName}</if>
|
||||
<if test="organCode != null and organCode != ''">or organ_code = #{organCode}</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">or parent_organ_id = #{parentOrganId}</if>
|
||||
<if test="depth != null">or depth = #{depth}</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">or hierarchy = #{hierarchy}</if>
|
||||
<if test="state != null and state != ''">or state = #{state}</if>
|
||||
<if test="company != null and company != ''">or company = #{company}</if>
|
||||
<if test="managerId != null and managerId != ''">or manager_id = #{managerId}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.organ.entity.SysOrganEntity" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into sys_organ(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="organName != null and organName != ''">organ_name ,</if>
|
||||
<if test="organCode != null and organCode != ''">organ_code ,</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">parent_organ_id ,</if>
|
||||
<if test="depth != null">depth ,</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">hierarchy ,</if>
|
||||
<if test="state != null and state != ''">state ,</if>
|
||||
<if test="company != null and company != ''">company ,</if>
|
||||
<if test="managerId != null and managerId != ''">manager_id ,</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="organName != null and organName != ''">#{organName} ,</if>
|
||||
<if test="organCode != null and organCode != ''">#{organCode} ,</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">#{parentOrganId} ,</if>
|
||||
<if test="depth != null">#{depth} ,</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">#{hierarchy} ,</if>
|
||||
<if test="state != null and state != ''">#{state} ,</if>
|
||||
<if test="company != null and company != ''">#{company} ,</if>
|
||||
<if test="managerId != null and managerId != ''">#{managerId} ,</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 sys_organ a WHERE a.sts = 'Y'
|
||||
),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_organ(organ_name, organ_code, parent_organ_id, depth, hierarchy, state, company, manager_id,
|
||||
remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.organName},#{entity.organCode},#{entity.parentOrganId},#{entity.depth},#{entity.hierarchy},#{entity.state},#{entity.company},#{entity.managerId},#{entity.remark},#{entity.sorts},#{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 sys_organ(organ_name, organ_code, parent_organ_id, depth, hierarchy, state, company, manager_id,
|
||||
remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.organName},#{entity.organCode},#{entity.parentOrganId},#{entity.depth},#{entity.hierarchy},#{entity.state},#{entity.company},#{entity.managerId},#{entity.remark},#{entity.sorts},#{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
|
||||
organ_name = values(organ_name),
|
||||
organ_code = values(organ_code),
|
||||
parent_organ_id = values(parent_organ_id),
|
||||
depth = values(depth),
|
||||
hierarchy = values(hierarchy),
|
||||
state = values(state),
|
||||
company = values(company),
|
||||
manager_id = values(manager_id),
|
||||
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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.organ.entity.SysOrganEntity">
|
||||
update sys_organ set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="organName != null and organName != ''">organ_name = #{organName},</if>
|
||||
<if test="organCode != null and organCode != ''">organ_code = #{organCode},</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">parent_organ_id = #{parentOrganId},</if>
|
||||
<if test="depth != null">depth = #{depth},</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">hierarchy = #{hierarchy},</if>
|
||||
<if test="state != null and state != ''">state = #{state},</if>
|
||||
<if test="company != null and company != ''">company = #{company},</if>
|
||||
<if test="managerId != null and managerId != ''">manager_id = #{managerId},</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>
|
||||
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.organ.entity.SysOrganEntity">
|
||||
update sys_organ 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.sys.organ.entity.SysOrganEntity">
|
||||
update sys_organ 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="organName != null and organName != ''">and organ_name = #{organName}</if>
|
||||
<if test="organCode != null and organCode != ''">and organ_code = #{organCode}</if>
|
||||
<if test="parentOrganId != null and parentOrganId != ''">and parent_organ_id = #{parentOrganId}</if>
|
||||
<if test="depth != null">and depth = #{depth}</if>
|
||||
<if test="hierarchy != null and hierarchy != ''">and hierarchy = #{hierarchy}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</if>
|
||||
<if test="company != null and company != ''">and company = #{company}</if>
|
||||
<if test="managerId != null and managerId != ''">and manager_id = #{managerId}</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">
|
||||
delete from sys_organ where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.organ.service;
|
||||
|
||||
import com.hzya.frame.sys.organ.entity.SysOrganEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 组织机构表(Sys_Organ)(SysOrgan)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:24:28
|
||||
*/
|
||||
public interface ISysOrganService extends IBaseService<SysOrganEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.organ.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.organ.entity.SysOrganEntity;
|
||||
import com.hzya.frame.sys.organ.dao.ISysOrganDao;
|
||||
import com.hzya.frame.sys.organ.service.ISysOrganService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 组织机构表(Sys_Organ)(SysOrgan)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:24:28
|
||||
*/
|
||||
@Service(value = "sysOrganService")
|
||||
public class SysOrganServiceImpl extends BaseService<SysOrganEntity, String> implements ISysOrganService {
|
||||
|
||||
private ISysOrganDao sysOrganDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysOrganDao(ISysOrganDao dao) {
|
||||
this.sysOrganDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.person.dao;
|
||||
|
||||
import com.hzya.frame.sys.person.entity.SysPersonEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 人员表(sys_person: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:10
|
||||
*/
|
||||
public interface ISysPersonDao extends IBaseDao<SysPersonEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.person.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.person.entity.SysPersonEntity;
|
||||
import com.hzya.frame.sys.person.dao.ISysPersonDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 人员表(SysPerson)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:10
|
||||
*/
|
||||
@Repository(value = "SysPersonDaoImpl")
|
||||
public class SysPersonDaoImpl extends MybatisGenericDao<SysPersonEntity, String> implements ISysPersonDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,276 @@
|
|||
package com.hzya.frame.sys.person.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 人员表(SysPerson)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:10
|
||||
*/
|
||||
public class SysPersonEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 关联组织机构ID
|
||||
*/
|
||||
private String organId;
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
private String personCode;
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String personName;
|
||||
/**
|
||||
* 性别: 0女1男
|
||||
*/
|
||||
private String sex;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String moiblePhone;
|
||||
/**
|
||||
* 入职时间
|
||||
*/
|
||||
private Date entryTime;
|
||||
/**
|
||||
* 电子邮箱
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private String degreeId;
|
||||
/**
|
||||
* 职务
|
||||
*/
|
||||
private String postId;
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
private String levelId;
|
||||
/**
|
||||
* 出生年月
|
||||
*/
|
||||
private Date birthDay;
|
||||
/**
|
||||
* 固定电话
|
||||
*/
|
||||
private String telPhone;
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
private String hometown;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 离职时间
|
||||
*/
|
||||
private Date leaveTime;
|
||||
/**
|
||||
* 人员状态1停用 0\空 启用
|
||||
*/
|
||||
private String state;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
private String ddUserId;
|
||||
private String wxUserId;
|
||||
/**
|
||||
* 头像id
|
||||
*/
|
||||
private String headImageId;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getOrganId() {
|
||||
return organId;
|
||||
}
|
||||
|
||||
public void setOrganId(String organId) {
|
||||
this.organId = organId;
|
||||
}
|
||||
|
||||
public String getPersonCode() {
|
||||
return personCode;
|
||||
}
|
||||
|
||||
public void setPersonCode(String personCode) {
|
||||
this.personCode = personCode;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getMoiblePhone() {
|
||||
return moiblePhone;
|
||||
}
|
||||
|
||||
public void setMoiblePhone(String moiblePhone) {
|
||||
this.moiblePhone = moiblePhone;
|
||||
}
|
||||
|
||||
public Date getEntryTime() {
|
||||
return entryTime;
|
||||
}
|
||||
|
||||
public void setEntryTime(Date entryTime) {
|
||||
this.entryTime = entryTime;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getDegreeId() {
|
||||
return degreeId;
|
||||
}
|
||||
|
||||
public void setDegreeId(String degreeId) {
|
||||
this.degreeId = degreeId;
|
||||
}
|
||||
|
||||
public String getPostId() {
|
||||
return postId;
|
||||
}
|
||||
|
||||
public void setPostId(String postId) {
|
||||
this.postId = postId;
|
||||
}
|
||||
|
||||
public String getLevelId() {
|
||||
return levelId;
|
||||
}
|
||||
|
||||
public void setLevelId(String levelId) {
|
||||
this.levelId = levelId;
|
||||
}
|
||||
|
||||
public Date getBirthDay() {
|
||||
return birthDay;
|
||||
}
|
||||
|
||||
public void setBirthDay(Date birthDay) {
|
||||
this.birthDay = birthDay;
|
||||
}
|
||||
|
||||
public String getTelPhone() {
|
||||
return telPhone;
|
||||
}
|
||||
|
||||
public void setTelPhone(String telPhone) {
|
||||
this.telPhone = telPhone;
|
||||
}
|
||||
|
||||
public String getHometown() {
|
||||
return hometown;
|
||||
}
|
||||
|
||||
public void setHometown(String hometown) {
|
||||
this.hometown = hometown;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public Date getLeaveTime() {
|
||||
return leaveTime;
|
||||
}
|
||||
|
||||
public void setLeaveTime(Date leaveTime) {
|
||||
this.leaveTime = leaveTime;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDdUserId() {
|
||||
return ddUserId;
|
||||
}
|
||||
|
||||
public void setDdUserId(String ddUserId) {
|
||||
this.ddUserId = ddUserId;
|
||||
}
|
||||
|
||||
public String getWxUserId() {
|
||||
return wxUserId;
|
||||
}
|
||||
|
||||
public void setWxUserId(String wxUserId) {
|
||||
this.wxUserId = wxUserId;
|
||||
}
|
||||
|
||||
public String getHeadImageId() {
|
||||
return headImageId;
|
||||
}
|
||||
|
||||
public void setHeadImageId(String headImageId) {
|
||||
this.headImageId = headImageId;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,454 @@
|
|||
<?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.sys.person.dao.impl.SysPersonDaoImpl">
|
||||
|
||||
<resultMap id="get-SysPersonEntity-result" type="com.hzya.frame.sys.person.entity.SysPersonEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="organId" column="organ_id" jdbcType="VARCHAR"/>
|
||||
<result property="personCode" column="person_code" jdbcType="VARCHAR"/>
|
||||
<result property="personName" column="person_name" jdbcType="VARCHAR"/>
|
||||
<result property="sex" column="sex" jdbcType="VARCHAR"/>
|
||||
<result property="moiblePhone" column="moible_phone" jdbcType="VARCHAR"/>
|
||||
<result property="entryTime" column="entry_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="email" column="email" jdbcType="VARCHAR"/>
|
||||
<result property="degreeId" column="degree_id" jdbcType="VARCHAR"/>
|
||||
<result property="postId" column="post_id" jdbcType="VARCHAR"/>
|
||||
<result property="levelId" column="level_id" jdbcType="VARCHAR"/>
|
||||
<result property="birthDay" column="birth_day" jdbcType="TIMESTAMP"/>
|
||||
<result property="telPhone" column="tel_phone" jdbcType="VARCHAR"/>
|
||||
<result property="hometown" column="hometown" jdbcType="VARCHAR"/>
|
||||
<result property="idCard" column="id_card" jdbcType="VARCHAR"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="leaveTime" column="leave_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="state" column="state" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="ddUserId" column="dd_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="wxUserId" column="wx_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="headImageId" column="head_image_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"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="SysPersonEntity_Base_Column_List">
|
||||
id
|
||||
,organ_id
|
||||
,person_code
|
||||
,person_name
|
||||
,sex
|
||||
,moible_phone
|
||||
,entry_time
|
||||
,email
|
||||
,degree_id
|
||||
,post_id
|
||||
,level_id
|
||||
,birth_day
|
||||
,tel_phone
|
||||
,hometown
|
||||
,id_card
|
||||
,address
|
||||
,leave_time
|
||||
,state
|
||||
,remark
|
||||
,dd_user_id
|
||||
,wx_user_id
|
||||
,head_image_id
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysPersonEntity-result"
|
||||
parameterType="com.hzya.frame.sys.person.entity.SysPersonEntity">
|
||||
select
|
||||
<include refid="SysPersonEntity_Base_Column_List"/>
|
||||
from sys_person
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="organId != null and organId != ''">and organ_id = #{organId}</if>
|
||||
<if test="personCode != null and personCode != ''">and person_code = #{personCode}</if>
|
||||
<if test="personName != null and personName != ''">and person_name = #{personName}</if>
|
||||
<if test="sex != null and sex != ''">and sex = #{sex}</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">and moible_phone = #{moiblePhone}</if>
|
||||
<if test="entryTime != null">and entry_time = #{entryTime}</if>
|
||||
<if test="email != null and email != ''">and email = #{email}</if>
|
||||
<if test="degreeId != null and degreeId != ''">and degree_id = #{degreeId}</if>
|
||||
<if test="postId != null and postId != ''">and post_id = #{postId}</if>
|
||||
<if test="levelId != null and levelId != ''">and level_id = #{levelId}</if>
|
||||
<if test="birthDay != null">and birth_day = #{birthDay}</if>
|
||||
<if test="telPhone != null and telPhone != ''">and tel_phone = #{telPhone}</if>
|
||||
<if test="hometown != null and hometown != ''">and hometown = #{hometown}</if>
|
||||
<if test="idCard != null and idCard != ''">and id_card = #{idCard}</if>
|
||||
<if test="address != null and address != ''">and address = #{address}</if>
|
||||
<if test="leaveTime != null">and leave_time = #{leaveTime}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">and dd_user_id = #{ddUserId}</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">and wx_user_id = #{wxUserId}</if>
|
||||
<if test="headImageId != null and headImageId != ''">and head_image_id = #{headImageId}</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.sys.person.entity.SysPersonEntity">
|
||||
select count(1) from sys_person
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="organId != null and organId != ''">and organ_id = #{organId}</if>
|
||||
<if test="personCode != null and personCode != ''">and person_code = #{personCode}</if>
|
||||
<if test="personName != null and personName != ''">and person_name = #{personName}</if>
|
||||
<if test="sex != null and sex != ''">and sex = #{sex}</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">and moible_phone = #{moiblePhone}</if>
|
||||
<if test="entryTime != null">and entry_time = #{entryTime}</if>
|
||||
<if test="email != null and email != ''">and email = #{email}</if>
|
||||
<if test="degreeId != null and degreeId != ''">and degree_id = #{degreeId}</if>
|
||||
<if test="postId != null and postId != ''">and post_id = #{postId}</if>
|
||||
<if test="levelId != null and levelId != ''">and level_id = #{levelId}</if>
|
||||
<if test="birthDay != null">and birth_day = #{birthDay}</if>
|
||||
<if test="telPhone != null and telPhone != ''">and tel_phone = #{telPhone}</if>
|
||||
<if test="hometown != null and hometown != ''">and hometown = #{hometown}</if>
|
||||
<if test="idCard != null and idCard != ''">and id_card = #{idCard}</if>
|
||||
<if test="address != null and address != ''">and address = #{address}</if>
|
||||
<if test="leaveTime != null">and leave_time = #{leaveTime}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">and dd_user_id = #{ddUserId}</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">and wx_user_id = #{wxUserId}</if>
|
||||
<if test="headImageId != null and headImageId != ''">and head_image_id = #{headImageId}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysPersonEntity-result"
|
||||
parameterType="com.hzya.frame.sys.person.entity.SysPersonEntity">
|
||||
select
|
||||
<include refid="SysPersonEntity_Base_Column_List"/>
|
||||
from sys_person
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="organId != null and organId != ''">and organ_id like concat('%',#{organId},'%')</if>
|
||||
<if test="personCode != null and personCode != ''">and person_code like concat('%',#{personCode},'%')</if>
|
||||
<if test="personName != null and personName != ''">and person_name like concat('%',#{personName},'%')</if>
|
||||
<if test="sex != null and sex != ''">and sex like concat('%',#{sex},'%')</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">and moible_phone like concat('%',#{moiblePhone},'%')
|
||||
</if>
|
||||
<if test="entryTime != null">and entry_time like concat('%',#{entryTime},'%')</if>
|
||||
<if test="email != null and email != ''">and email like concat('%',#{email},'%')</if>
|
||||
<if test="degreeId != null and degreeId != ''">and degree_id like concat('%',#{degreeId},'%')</if>
|
||||
<if test="postId != null and postId != ''">and post_id like concat('%',#{postId},'%')</if>
|
||||
<if test="levelId != null and levelId != ''">and level_id like concat('%',#{levelId},'%')</if>
|
||||
<if test="birthDay != null">and birth_day like concat('%',#{birthDay},'%')</if>
|
||||
<if test="telPhone != null and telPhone != ''">and tel_phone like concat('%',#{telPhone},'%')</if>
|
||||
<if test="hometown != null and hometown != ''">and hometown like concat('%',#{hometown},'%')</if>
|
||||
<if test="idCard != null and idCard != ''">and id_card like concat('%',#{idCard},'%')</if>
|
||||
<if test="address != null and address != ''">and address like concat('%',#{address},'%')</if>
|
||||
<if test="leaveTime != null">and leave_time like concat('%',#{leaveTime},'%')</if>
|
||||
<if test="state != null and state != ''">and state like concat('%',#{state},'%')</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">and dd_user_id like concat('%',#{ddUserId},'%')</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">and wx_user_id like concat('%',#{wxUserId},'%')</if>
|
||||
<if test="headImageId != null and headImageId != ''">and head_image_id like concat('%',#{headImageId},'%')
|
||||
</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysPersonentity_list_or" resultMap="get-SysPersonEntity-result"
|
||||
parameterType="com.hzya.frame.sys.person.entity.SysPersonEntity">
|
||||
select
|
||||
<include refid="SysPersonEntity_Base_Column_List"/>
|
||||
from sys_person
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="organId != null and organId != ''">or organ_id = #{organId}</if>
|
||||
<if test="personCode != null and personCode != ''">or person_code = #{personCode}</if>
|
||||
<if test="personName != null and personName != ''">or person_name = #{personName}</if>
|
||||
<if test="sex != null and sex != ''">or sex = #{sex}</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">or moible_phone = #{moiblePhone}</if>
|
||||
<if test="entryTime != null">or entry_time = #{entryTime}</if>
|
||||
<if test="email != null and email != ''">or email = #{email}</if>
|
||||
<if test="degreeId != null and degreeId != ''">or degree_id = #{degreeId}</if>
|
||||
<if test="postId != null and postId != ''">or post_id = #{postId}</if>
|
||||
<if test="levelId != null and levelId != ''">or level_id = #{levelId}</if>
|
||||
<if test="birthDay != null">or birth_day = #{birthDay}</if>
|
||||
<if test="telPhone != null and telPhone != ''">or tel_phone = #{telPhone}</if>
|
||||
<if test="hometown != null and hometown != ''">or hometown = #{hometown}</if>
|
||||
<if test="idCard != null and idCard != ''">or id_card = #{idCard}</if>
|
||||
<if test="address != null and address != ''">or address = #{address}</if>
|
||||
<if test="leaveTime != null">or leave_time = #{leaveTime}</if>
|
||||
<if test="state != null and state != ''">or state = #{state}</if>
|
||||
<if test="remark != null and remark != ''">or remark = #{remark}</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">or dd_user_id = #{ddUserId}</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">or wx_user_id = #{wxUserId}</if>
|
||||
<if test="headImageId != null and headImageId != ''">or head_image_id = #{headImageId}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.person.entity.SysPersonEntity" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into sys_person(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="organId != null and organId != ''">organ_id ,</if>
|
||||
<if test="personCode != null and personCode != ''">person_code ,</if>
|
||||
<if test="personName != null and personName != ''">person_name ,</if>
|
||||
<if test="sex != null and sex != ''">sex ,</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">moible_phone ,</if>
|
||||
<if test="entryTime != null">entry_time ,</if>
|
||||
<if test="email != null and email != ''">email ,</if>
|
||||
<if test="degreeId != null and degreeId != ''">degree_id ,</if>
|
||||
<if test="postId != null and postId != ''">post_id ,</if>
|
||||
<if test="levelId != null and levelId != ''">level_id ,</if>
|
||||
<if test="birthDay != null">birth_day ,</if>
|
||||
<if test="telPhone != null and telPhone != ''">tel_phone ,</if>
|
||||
<if test="hometown != null and hometown != ''">hometown ,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card ,</if>
|
||||
<if test="address != null and address != ''">address ,</if>
|
||||
<if test="leaveTime != null">leave_time ,</if>
|
||||
<if test="state != null and state != ''">state ,</if>
|
||||
<if test="remark != null and remark != ''">remark ,</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">dd_user_id ,</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">wx_user_id ,</if>
|
||||
<if test="headImageId != null and headImageId != ''">head_image_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="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="organId != null and organId != ''">#{organId} ,</if>
|
||||
<if test="personCode != null and personCode != ''">#{personCode} ,</if>
|
||||
<if test="personName != null and personName != ''">#{personName} ,</if>
|
||||
<if test="sex != null and sex != ''">#{sex} ,</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">#{moiblePhone} ,</if>
|
||||
<if test="entryTime != null">#{entryTime} ,</if>
|
||||
<if test="email != null and email != ''">#{email} ,</if>
|
||||
<if test="degreeId != null and degreeId != ''">#{degreeId} ,</if>
|
||||
<if test="postId != null and postId != ''">#{postId} ,</if>
|
||||
<if test="levelId != null and levelId != ''">#{levelId} ,</if>
|
||||
<if test="birthDay != null">#{birthDay} ,</if>
|
||||
<if test="telPhone != null and telPhone != ''">#{telPhone} ,</if>
|
||||
<if test="hometown != null and hometown != ''">#{hometown} ,</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard} ,</if>
|
||||
<if test="address != null and address != ''">#{address} ,</if>
|
||||
<if test="leaveTime != null">#{leaveTime} ,</if>
|
||||
<if test="state != null and state != ''">#{state} ,</if>
|
||||
<if test="remark != null and remark != ''">#{remark} ,</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">#{ddUserId} ,</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">#{wxUserId} ,</if>
|
||||
<if test="headImageId != null and headImageId != ''">#{headImageId} ,</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 sys_person a WHERE a.sts =
|
||||
'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_person(organ_id, person_code, person_name, sex, moible_phone, entry_time, email, degree_id,
|
||||
post_id, level_id, birth_day, tel_phone, hometown, id_card, address, leave_time, state, remark, dd_user_id,
|
||||
wx_user_id, head_image_id, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id,
|
||||
company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.organId},#{entity.personCode},#{entity.personName},#{entity.sex},#{entity.moiblePhone},#{entity.entryTime},#{entity.email},#{entity.degreeId},#{entity.postId},#{entity.levelId},#{entity.birthDay},#{entity.telPhone},#{entity.hometown},#{entity.idCard},#{entity.address},#{entity.leaveTime},#{entity.state},#{entity.remark},#{entity.ddUserId},#{entity.wxUserId},#{entity.headImageId},#{entity.sorts},#{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 sys_person(organ_id, person_code, person_name, sex, moible_phone, entry_time, email, degree_id,
|
||||
post_id, level_id, birth_day, tel_phone, hometown, id_card, address, leave_time, state, remark, dd_user_id,
|
||||
wx_user_id, head_image_id, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id,
|
||||
company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.organId},#{entity.personCode},#{entity.personName},#{entity.sex},#{entity.moiblePhone},#{entity.entryTime},#{entity.email},#{entity.degreeId},#{entity.postId},#{entity.levelId},#{entity.birthDay},#{entity.telPhone},#{entity.hometown},#{entity.idCard},#{entity.address},#{entity.leaveTime},#{entity.state},#{entity.remark},#{entity.ddUserId},#{entity.wxUserId},#{entity.headImageId},#{entity.sorts},#{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
|
||||
organ_id = values(organ_id),
|
||||
person_code = values(person_code),
|
||||
person_name = values(person_name),
|
||||
sex = values(sex),
|
||||
moible_phone = values(moible_phone),
|
||||
entry_time = values(entry_time),
|
||||
email = values(email),
|
||||
degree_id = values(degree_id),
|
||||
post_id = values(post_id),
|
||||
level_id = values(level_id),
|
||||
birth_day = values(birth_day),
|
||||
tel_phone = values(tel_phone),
|
||||
hometown = values(hometown),
|
||||
id_card = values(id_card),
|
||||
address = values(address),
|
||||
leave_time = values(leave_time),
|
||||
state = values(state),
|
||||
remark = values(remark),
|
||||
dd_user_id = values(dd_user_id),
|
||||
wx_user_id = values(wx_user_id),
|
||||
head_image_id = values(head_image_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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.person.entity.SysPersonEntity">
|
||||
update sys_person set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="organId != null and organId != ''">organ_id = #{organId},</if>
|
||||
<if test="personCode != null and personCode != ''">person_code = #{personCode},</if>
|
||||
<if test="personName != null and personName != ''">person_name = #{personName},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">moible_phone = #{moiblePhone},</if>
|
||||
<if test="entryTime != null">entry_time = #{entryTime},</if>
|
||||
<if test="email != null and email != ''">email = #{email},</if>
|
||||
<if test="degreeId != null and degreeId != ''">degree_id = #{degreeId},</if>
|
||||
<if test="postId != null and postId != ''">post_id = #{postId},</if>
|
||||
<if test="levelId != null and levelId != ''">level_id = #{levelId},</if>
|
||||
<if test="birthDay != null">birth_day = #{birthDay},</if>
|
||||
<if test="telPhone != null and telPhone != ''">tel_phone = #{telPhone},</if>
|
||||
<if test="hometown != null and hometown != ''">hometown = #{hometown},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
<if test="leaveTime != null">leave_time = #{leaveTime},</if>
|
||||
<if test="state != null and state != ''">state = #{state},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">dd_user_id = #{ddUserId},</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">wx_user_id = #{wxUserId},</if>
|
||||
<if test="headImageId != null and headImageId != ''">head_image_id = #{headImageId},</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="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.person.entity.SysPersonEntity">
|
||||
update sys_person 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.sys.person.entity.SysPersonEntity">
|
||||
update sys_person 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="organId != null and organId != ''">and organ_id = #{organId}</if>
|
||||
<if test="personCode != null and personCode != ''">and person_code = #{personCode}</if>
|
||||
<if test="personName != null and personName != ''">and person_name = #{personName}</if>
|
||||
<if test="sex != null and sex != ''">and sex = #{sex}</if>
|
||||
<if test="moiblePhone != null and moiblePhone != ''">and moible_phone = #{moiblePhone}</if>
|
||||
<if test="entryTime != null">and entry_time = #{entryTime}</if>
|
||||
<if test="email != null and email != ''">and email = #{email}</if>
|
||||
<if test="degreeId != null and degreeId != ''">and degree_id = #{degreeId}</if>
|
||||
<if test="postId != null and postId != ''">and post_id = #{postId}</if>
|
||||
<if test="levelId != null and levelId != ''">and level_id = #{levelId}</if>
|
||||
<if test="birthDay != null">and birth_day = #{birthDay}</if>
|
||||
<if test="telPhone != null and telPhone != ''">and tel_phone = #{telPhone}</if>
|
||||
<if test="hometown != null and hometown != ''">and hometown = #{hometown}</if>
|
||||
<if test="idCard != null and idCard != ''">and id_card = #{idCard}</if>
|
||||
<if test="address != null and address != ''">and address = #{address}</if>
|
||||
<if test="leaveTime != null">and leave_time = #{leaveTime}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="ddUserId != null and ddUserId != ''">and dd_user_id = #{ddUserId}</if>
|
||||
<if test="wxUserId != null and wxUserId != ''">and wx_user_id = #{wxUserId}</if>
|
||||
<if test="headImageId != null and headImageId != ''">and head_image_id = #{headImageId}</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">
|
||||
delete from sys_person where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.person.service;
|
||||
|
||||
import com.hzya.frame.sys.person.entity.SysPersonEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 人员表(SysPerson)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:12
|
||||
*/
|
||||
public interface ISysPersonService extends IBaseService<SysPersonEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.person.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.person.entity.SysPersonEntity;
|
||||
import com.hzya.frame.sys.person.dao.ISysPersonDao;
|
||||
import com.hzya.frame.sys.person.service.ISysPersonService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 人员表(SysPerson)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:12
|
||||
*/
|
||||
@Service(value = "sysPersonService")
|
||||
public class SysPersonServiceImpl extends BaseService<SysPersonEntity, String> implements ISysPersonService {
|
||||
|
||||
private ISysPersonDao sysPersonDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysPersonDao(ISysPersonDao dao) {
|
||||
this.sysPersonDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.popedomData.dao;
|
||||
|
||||
import com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 数据权限(sys_popedom_data: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:51
|
||||
*/
|
||||
public interface ISysPopedomDataDao extends IBaseDao<SysPopedomDataEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.popedomData.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity;
|
||||
import com.hzya.frame.sys.popedomData.dao.ISysPopedomDataDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 数据权限(SysPopedomData)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:52
|
||||
*/
|
||||
@Repository(value = "SysPopedomDataDaoImpl")
|
||||
public class SysPopedomDataDaoImpl extends MybatisGenericDao<SysPopedomDataEntity, String> implements ISysPopedomDataDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package com.hzya.frame.sys.popedomData.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 数据权限(SysPopedomData)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:52
|
||||
*/
|
||||
public class SysPopedomDataEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 权限赋予对象id
|
||||
*/
|
||||
private String objectId;
|
||||
private String billKindId;
|
||||
/**
|
||||
* 数据权限设置id
|
||||
*/
|
||||
private String dataSetId;
|
||||
/**
|
||||
* 数据权限id值集合
|
||||
*/
|
||||
private String popeList;
|
||||
/**
|
||||
* 权限分类(1、人员、2、部门、3、角色)
|
||||
*/
|
||||
private String kindId;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getObjectId() {
|
||||
return objectId;
|
||||
}
|
||||
|
||||
public void setObjectId(String objectId) {
|
||||
this.objectId = objectId;
|
||||
}
|
||||
|
||||
public String getBillKindId() {
|
||||
return billKindId;
|
||||
}
|
||||
|
||||
public void setBillKindId(String billKindId) {
|
||||
this.billKindId = billKindId;
|
||||
}
|
||||
|
||||
public String getDataSetId() {
|
||||
return dataSetId;
|
||||
}
|
||||
|
||||
public void setDataSetId(String dataSetId) {
|
||||
this.dataSetId = dataSetId;
|
||||
}
|
||||
|
||||
public String getPopeList() {
|
||||
return popeList;
|
||||
}
|
||||
|
||||
public void setPopeList(String popeList) {
|
||||
this.popeList = popeList;
|
||||
}
|
||||
|
||||
public String getKindId() {
|
||||
return kindId;
|
||||
}
|
||||
|
||||
public void setKindId(String kindId) {
|
||||
this.kindId = kindId;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,274 @@
|
|||
<?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.sys.popedomData.dao.impl.SysPopedomDataDaoImpl">
|
||||
|
||||
<resultMap id="get-SysPopedomDataEntity-result" type="com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="objectId" column="object_id" jdbcType="VARCHAR"/>
|
||||
<result property="billKindId" column="bill_kind_id" jdbcType="VARCHAR"/>
|
||||
<result property="dataSetId" column="data_set_id" jdbcType="VARCHAR"/>
|
||||
<result property="popeList" column="pope_list" jdbcType="VARCHAR"/>
|
||||
<result property="kindId" column="kind_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"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="SysPopedomDataEntity_Base_Column_List">
|
||||
id
|
||||
,object_id
|
||||
,bill_kind_id
|
||||
,data_set_id
|
||||
,pope_list
|
||||
,kind_id
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysPopedomDataEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
select
|
||||
<include refid="SysPopedomDataEntity_Base_Column_List"/>
|
||||
from sys_popedom_data
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="billKindId != null and billKindId != ''">and bill_kind_id = #{billKindId}</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">and data_set_id = #{dataSetId}</if>
|
||||
<if test="popeList != null and popeList != ''">and pope_list = #{popeList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
select count(1) from sys_popedom_data
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="billKindId != null and billKindId != ''">and bill_kind_id = #{billKindId}</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">and data_set_id = #{dataSetId}</if>
|
||||
<if test="popeList != null and popeList != ''">and pope_list = #{popeList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysPopedomDataEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
select
|
||||
<include refid="SysPopedomDataEntity_Base_Column_List"/>
|
||||
from sys_popedom_data
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id like concat('%',#{objectId},'%')</if>
|
||||
<if test="billKindId != null and billKindId != ''">and bill_kind_id like concat('%',#{billKindId},'%')</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">and data_set_id like concat('%',#{dataSetId},'%')</if>
|
||||
<if test="popeList != null and popeList != ''">and pope_list like concat('%',#{popeList},'%')</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id like concat('%',#{kindId},'%')</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysPopedomDataentity_list_or" resultMap="get-SysPopedomDataEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
select
|
||||
<include refid="SysPopedomDataEntity_Base_Column_List"/>
|
||||
from sys_popedom_data
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">or object_id = #{objectId}</if>
|
||||
<if test="billKindId != null and billKindId != ''">or bill_kind_id = #{billKindId}</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">or data_set_id = #{dataSetId}</if>
|
||||
<if test="popeList != null and popeList != ''">or pope_list = #{popeList}</if>
|
||||
<if test="kindId != null and kindId != ''">or kind_id = #{kindId}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_popedom_data(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="objectId != null and objectId != ''">object_id ,</if>
|
||||
<if test="billKindId != null and billKindId != ''">bill_kind_id ,</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">data_set_id ,</if>
|
||||
<if test="popeList != null and popeList != ''">pope_list ,</if>
|
||||
<if test="kindId != null and kindId != ''">kind_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="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="objectId != null and objectId != ''">#{objectId} ,</if>
|
||||
<if test="billKindId != null and billKindId != ''">#{billKindId} ,</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">#{dataSetId} ,</if>
|
||||
<if test="popeList != null and popeList != ''">#{popeList} ,</if>
|
||||
<if test="kindId != null and kindId != ''">#{kindId} ,</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 sys_popedom_data a WHERE
|
||||
a.sts = 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_popedom_data(object_id, bill_kind_id, data_set_id, pope_list, kind_id, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.objectId},#{entity.billKindId},#{entity.dataSetId},#{entity.popeList},#{entity.kindId},#{entity.sorts},#{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 sys_popedom_data(object_id, bill_kind_id, data_set_id, pope_list, kind_id, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.objectId},#{entity.billKindId},#{entity.dataSetId},#{entity.popeList},#{entity.kindId},#{entity.sorts},#{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
|
||||
object_id = values(object_id),
|
||||
bill_kind_id = values(bill_kind_id),
|
||||
data_set_id = values(data_set_id),
|
||||
pope_list = values(pope_list),
|
||||
kind_id = values(kind_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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
update sys_popedom_data set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="objectId != null and objectId != ''">object_id = #{objectId},</if>
|
||||
<if test="billKindId != null and billKindId != ''">bill_kind_id = #{billKindId},</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">data_set_id = #{dataSetId},</if>
|
||||
<if test="popeList != null and popeList != ''">pope_list = #{popeList},</if>
|
||||
<if test="kindId != null and kindId != ''">kind_id = #{kindId},</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="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
update sys_popedom_data 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.sys.popedomData.entity.SysPopedomDataEntity">
|
||||
update sys_popedom_data 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="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="billKindId != null and billKindId != ''">and bill_kind_id = #{billKindId}</if>
|
||||
<if test="dataSetId != null and dataSetId != ''">and data_set_id = #{dataSetId}</if>
|
||||
<if test="popeList != null and popeList != ''">and pope_list = #{popeList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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">
|
||||
delete from sys_popedom_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.popedomData.service;
|
||||
|
||||
import com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 数据权限(SysPopedomData)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:52
|
||||
*/
|
||||
public interface ISysPopedomDataService extends IBaseService<SysPopedomDataEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.popedomData.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.popedomData.entity.SysPopedomDataEntity;
|
||||
import com.hzya.frame.sys.popedomData.dao.ISysPopedomDataDao;
|
||||
import com.hzya.frame.sys.popedomData.service.ISysPopedomDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 数据权限(SysPopedomData)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:25:52
|
||||
*/
|
||||
@Service(value = "sysPopedomDataService")
|
||||
public class SysPopedomDataServiceImpl extends BaseService<SysPopedomDataEntity, String> implements ISysPopedomDataService {
|
||||
|
||||
private ISysPopedomDataDao sysPopedomDataDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysPopedomDataDao(ISysPopedomDataDao dao) {
|
||||
this.sysPopedomDataDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.popedomMenu.dao;
|
||||
|
||||
import com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 系统模块权限(sys_popedom_menu: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:26:30
|
||||
*/
|
||||
public interface ISysPopedomMenuDao extends IBaseDao<SysPopedomMenuEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.popedomMenu.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity;
|
||||
import com.hzya.frame.sys.popedomMenu.dao.ISysPopedomMenuDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 系统模块权限(SysPopedomMenu)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:26:30
|
||||
*/
|
||||
@Repository(value = "SysPopedomMenuDaoImpl")
|
||||
public class SysPopedomMenuDaoImpl extends MybatisGenericDao<SysPopedomMenuEntity, String> implements ISysPopedomMenuDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.hzya.frame.sys.popedomMenu.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 系统模块权限(SysPopedomMenu)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:26:30
|
||||
*/
|
||||
public class SysPopedomMenuEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 权限赋予对象id
|
||||
*/
|
||||
private String objectId;
|
||||
/**
|
||||
* 菜单id集
|
||||
*/
|
||||
private String menuIdList;
|
||||
/**
|
||||
* 权限类型(1、人员、2、部门、3、角色)
|
||||
*/
|
||||
private String kindId;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getObjectId() {
|
||||
return objectId;
|
||||
}
|
||||
|
||||
public void setObjectId(String objectId) {
|
||||
this.objectId = objectId;
|
||||
}
|
||||
|
||||
public String getMenuIdList() {
|
||||
return menuIdList;
|
||||
}
|
||||
|
||||
public void setMenuIdList(String menuIdList) {
|
||||
this.menuIdList = menuIdList;
|
||||
}
|
||||
|
||||
public String getKindId() {
|
||||
return kindId;
|
||||
}
|
||||
|
||||
public void setKindId(String kindId) {
|
||||
this.kindId = kindId;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,252 @@
|
|||
<?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.sys.popedomMenu.dao.impl.SysPopedomMenuDaoImpl">
|
||||
|
||||
<resultMap id="get-SysPopedomMenuEntity-result" type="com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="objectId" column="object_id" jdbcType="VARCHAR"/>
|
||||
<result property="menuIdList" column="menu_id_list" jdbcType="VARCHAR"/>
|
||||
<result property="kindId" column="kind_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"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="SysPopedomMenuEntity_Base_Column_List">
|
||||
id
|
||||
,object_id
|
||||
,menu_id_list
|
||||
,kind_id
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysPopedomMenuEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
select
|
||||
<include refid="SysPopedomMenuEntity_Base_Column_List"/>
|
||||
from sys_popedom_menu
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">and menu_id_list = #{menuIdList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
select count(1) from sys_popedom_menu
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">and menu_id_list = #{menuIdList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysPopedomMenuEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
select
|
||||
<include refid="SysPopedomMenuEntity_Base_Column_List"/>
|
||||
from sys_popedom_menu
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id like concat('%',#{objectId},'%')</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">and menu_id_list like concat('%',#{menuIdList},'%')</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id like concat('%',#{kindId},'%')</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysPopedomMenuentity_list_or" resultMap="get-SysPopedomMenuEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
select
|
||||
<include refid="SysPopedomMenuEntity_Base_Column_List"/>
|
||||
from sys_popedom_menu
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">or object_id = #{objectId}</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">or menu_id_list = #{menuIdList}</if>
|
||||
<if test="kindId != null and kindId != ''">or kind_id = #{kindId}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_popedom_menu(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="objectId != null and objectId != ''">object_id ,</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">menu_id_list ,</if>
|
||||
<if test="kindId != null and kindId != ''">kind_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="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="objectId != null and objectId != ''">#{objectId} ,</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">#{menuIdList} ,</if>
|
||||
<if test="kindId != null and kindId != ''">#{kindId} ,</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 sys_popedom_menu a WHERE
|
||||
a.sts = 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_popedom_menu(object_id, menu_id_list, kind_id, sorts, create_user_id, create_time,
|
||||
modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.objectId},#{entity.menuIdList},#{entity.kindId},#{entity.sorts},#{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 sys_popedom_menu(object_id, menu_id_list, kind_id, sorts, create_user_id, create_time,
|
||||
modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.objectId},#{entity.menuIdList},#{entity.kindId},#{entity.sorts},#{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
|
||||
object_id = values(object_id),
|
||||
menu_id_list = values(menu_id_list),
|
||||
kind_id = values(kind_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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
update sys_popedom_menu set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="objectId != null and objectId != ''">object_id = #{objectId},</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">menu_id_list = #{menuIdList},</if>
|
||||
<if test="kindId != null and kindId != ''">kind_id = #{kindId},</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="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
update sys_popedom_menu 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.sys.popedomMenu.entity.SysPopedomMenuEntity">
|
||||
update sys_popedom_menu 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="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="menuIdList != null and menuIdList != ''">and menu_id_list = #{menuIdList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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">
|
||||
delete from sys_popedom_menu where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.popedomMenu.service;
|
||||
|
||||
import com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 系统模块权限(SysPopedomMenu)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:26:30
|
||||
*/
|
||||
public interface ISysPopedomMenuService extends IBaseService<SysPopedomMenuEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.popedomMenu.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.popedomMenu.entity.SysPopedomMenuEntity;
|
||||
import com.hzya.frame.sys.popedomMenu.dao.ISysPopedomMenuDao;
|
||||
import com.hzya.frame.sys.popedomMenu.service.ISysPopedomMenuService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 系统模块权限(SysPopedomMenu)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:26:31
|
||||
*/
|
||||
@Service(value = "sysPopedomMenuService")
|
||||
public class SysPopedomMenuServiceImpl extends BaseService<SysPopedomMenuEntity, String> implements ISysPopedomMenuService {
|
||||
|
||||
private ISysPopedomMenuDao sysPopedomMenuDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysPopedomMenuDao(ISysPopedomMenuDao dao) {
|
||||
this.sysPopedomMenuDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.popedomOperate.dao;
|
||||
|
||||
import com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 操作权限(sys_popedom_operate: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:11
|
||||
*/
|
||||
public interface ISysPopedomOperateDao extends IBaseDao<SysPopedomOperateEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.popedomOperate.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity;
|
||||
import com.hzya.frame.sys.popedomOperate.dao.ISysPopedomOperateDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 操作权限(SysPopedomOperate)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:11
|
||||
*/
|
||||
@Repository(value = "SysPopedomOperateDaoImpl")
|
||||
public class SysPopedomOperateDaoImpl extends MybatisGenericDao<SysPopedomOperateEntity, String> implements ISysPopedomOperateDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.hzya.frame.sys.popedomOperate.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 操作权限(SysPopedomOperate)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:11
|
||||
*/
|
||||
public class SysPopedomOperateEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 权限赋予对象id
|
||||
*/
|
||||
private String objectId;
|
||||
/**
|
||||
* 菜单id
|
||||
*/
|
||||
private String menuId;
|
||||
/**
|
||||
* 操作权限分类id集
|
||||
*/
|
||||
private String operateKindList;
|
||||
/**
|
||||
* 权限分类(1、人员、2、部门、3、角色)
|
||||
*/
|
||||
private String kindId;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getObjectId() {
|
||||
return objectId;
|
||||
}
|
||||
|
||||
public void setObjectId(String objectId) {
|
||||
this.objectId = objectId;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public String getOperateKindList() {
|
||||
return operateKindList;
|
||||
}
|
||||
|
||||
public void setOperateKindList(String operateKindList) {
|
||||
this.operateKindList = operateKindList;
|
||||
}
|
||||
|
||||
public String getKindId() {
|
||||
return kindId;
|
||||
}
|
||||
|
||||
public void setKindId(String kindId) {
|
||||
this.kindId = kindId;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
<?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.sys.popedomOperate.dao.impl.SysPopedomOperateDaoImpl">
|
||||
|
||||
<resultMap id="get-SysPopedomOperateEntity-result"
|
||||
type="com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="objectId" column="object_id" jdbcType="VARCHAR"/>
|
||||
<result property="menuId" column="menu_id" jdbcType="VARCHAR"/>
|
||||
<result property="operateKindList" column="operate_kind_list" jdbcType="VARCHAR"/>
|
||||
<result property="kindId" column="kind_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"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="SysPopedomOperateEntity_Base_Column_List">
|
||||
id
|
||||
,object_id
|
||||
,menu_id
|
||||
,operate_kind_list
|
||||
,kind_id
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysPopedomOperateEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
select
|
||||
<include refid="SysPopedomOperateEntity_Base_Column_List"/>
|
||||
from sys_popedom_operate
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="menuId != null and menuId != ''">and menu_id = #{menuId}</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">and operate_kind_list = #{operateKindList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
select count(1) from sys_popedom_operate
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="menuId != null and menuId != ''">and menu_id = #{menuId}</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">and operate_kind_list = #{operateKindList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysPopedomOperateEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
select
|
||||
<include refid="SysPopedomOperateEntity_Base_Column_List"/>
|
||||
from sys_popedom_operate
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="objectId != null and objectId != ''">and object_id like concat('%',#{objectId},'%')</if>
|
||||
<if test="menuId != null and menuId != ''">and menu_id like concat('%',#{menuId},'%')</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">and operate_kind_list like
|
||||
concat('%',#{operateKindList},'%')
|
||||
</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id like concat('%',#{kindId},'%')</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysPopedomOperateentity_list_or" resultMap="get-SysPopedomOperateEntity-result"
|
||||
parameterType="com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
select
|
||||
<include refid="SysPopedomOperateEntity_Base_Column_List"/>
|
||||
from sys_popedom_operate
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="objectId != null and objectId != ''">or object_id = #{objectId}</if>
|
||||
<if test="menuId != null and menuId != ''">or menu_id = #{menuId}</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">or operate_kind_list = #{operateKindList}</if>
|
||||
<if test="kindId != null and kindId != ''">or kind_id = #{kindId}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_popedom_operate(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="objectId != null and objectId != ''">object_id ,</if>
|
||||
<if test="menuId != null and menuId != ''">menu_id ,</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">operate_kind_list ,</if>
|
||||
<if test="kindId != null and kindId != ''">kind_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="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="objectId != null and objectId != ''">#{objectId} ,</if>
|
||||
<if test="menuId != null and menuId != ''">#{menuId} ,</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">#{operateKindList} ,</if>
|
||||
<if test="kindId != null and kindId != ''">#{kindId} ,</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 sys_popedom_operate a WHERE
|
||||
a.sts = 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_popedom_operate(object_id, menu_id, operate_kind_list, kind_id, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.objectId},#{entity.menuId},#{entity.operateKindList},#{entity.kindId},#{entity.sorts},#{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 sys_popedom_operate(object_id, menu_id, operate_kind_list, kind_id, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.objectId},#{entity.menuId},#{entity.operateKindList},#{entity.kindId},#{entity.sorts},#{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
|
||||
object_id = values(object_id),
|
||||
menu_id = values(menu_id),
|
||||
operate_kind_list = values(operate_kind_list),
|
||||
kind_id = values(kind_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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
update sys_popedom_operate set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="objectId != null and objectId != ''">object_id = #{objectId},</if>
|
||||
<if test="menuId != null and menuId != ''">menu_id = #{menuId},</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">operate_kind_list = #{operateKindList},</if>
|
||||
<if test="kindId != null and kindId != ''">kind_id = #{kindId},</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="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
update sys_popedom_operate 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.sys.popedomOperate.entity.SysPopedomOperateEntity">
|
||||
update sys_popedom_operate 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="objectId != null and objectId != ''">and object_id = #{objectId}</if>
|
||||
<if test="menuId != null and menuId != ''">and menu_id = #{menuId}</if>
|
||||
<if test="operateKindList != null and operateKindList != ''">and operate_kind_list = #{operateKindList}</if>
|
||||
<if test="kindId != null and kindId != ''">and kind_id = #{kindId}</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">
|
||||
delete from sys_popedom_operate where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.popedomOperate.service;
|
||||
|
||||
import com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 操作权限(SysPopedomOperate)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:12
|
||||
*/
|
||||
public interface ISysPopedomOperateService extends IBaseService<SysPopedomOperateEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.popedomOperate.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.popedomOperate.entity.SysPopedomOperateEntity;
|
||||
import com.hzya.frame.sys.popedomOperate.dao.ISysPopedomOperateDao;
|
||||
import com.hzya.frame.sys.popedomOperate.service.ISysPopedomOperateService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 操作权限(SysPopedomOperate)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:12
|
||||
*/
|
||||
@Service(value = "sysPopedomOperateService")
|
||||
public class SysPopedomOperateServiceImpl extends BaseService<SysPopedomOperateEntity, String> implements ISysPopedomOperateService {
|
||||
|
||||
private ISysPopedomOperateDao sysPopedomOperateDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysPopedomOperateDao(ISysPopedomOperateDao dao) {
|
||||
this.sysPopedomOperateDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.role.dao;
|
||||
|
||||
import com.hzya.frame.sys.role.entity.SysRoleEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 角色表(sys_role: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:21:56
|
||||
*/
|
||||
public interface ISysRoleDao extends IBaseDao<SysRoleEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.sys.role.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.role.entity.SysRoleEntity;
|
||||
import com.hzya.frame.sys.role.dao.ISysRoleDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 角色表(SysRole)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:21:57
|
||||
*/
|
||||
@Repository(value = "SysRoleDaoImpl")
|
||||
public class SysRoleDaoImpl extends MybatisGenericDao<SysRoleEntity, String> implements ISysRoleDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.hzya.frame.sys.role.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 角色表(SysRole)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:22:01
|
||||
*/
|
||||
public class SysRoleEntity extends BaseEntity {
|
||||
|
||||
/** 角色编码 */
|
||||
private String roleCode;
|
||||
/** 角色名称 */
|
||||
private String roleName;
|
||||
/** 角色说明 */
|
||||
private String description;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getRoleCode() {
|
||||
return roleCode;
|
||||
}
|
||||
|
||||
public void setRoleCode(String roleCode) {
|
||||
this.roleCode = roleCode;
|
||||
}
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,238 @@
|
|||
<?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.sys.role.dao.impl.SysRoleDaoImpl">
|
||||
|
||||
<resultMap id="get-SysRoleEntity-result" type="com.hzya.frame.sys.role.entity.SysRoleEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="roleCode" column="role_code" jdbcType="VARCHAR"/>
|
||||
<result property="roleName" column="role_name" jdbcType="VARCHAR"/>
|
||||
<result property="description" column="description" 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 = "SysRoleEntity_Base_Column_List">
|
||||
id
|
||||
,role_code
|
||||
,role_name
|
||||
,description
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysRoleEntity-result" parameterType = "com.hzya.frame.sys.role.entity.SysRoleEntity">
|
||||
select
|
||||
<include refid="SysRoleEntity_Base_Column_List" />
|
||||
from sys_role
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="roleCode != null and roleCode != ''"> and role_code = #{roleCode} </if>
|
||||
<if test="roleName != null and roleName != ''"> and role_name = #{roleName} </if>
|
||||
<if test="description != null and description != ''"> and description = #{description} </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.sys.role.entity.SysRoleEntity">
|
||||
select count(1) from sys_role
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="roleCode != null and roleCode != ''"> and role_code = #{roleCode} </if>
|
||||
<if test="roleName != null and roleName != ''"> and role_name = #{roleName} </if>
|
||||
<if test="description != null and description != ''"> and description = #{description} </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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysRoleEntity-result" parameterType = "com.hzya.frame.sys.role.entity.SysRoleEntity">
|
||||
select
|
||||
<include refid="SysRoleEntity_Base_Column_List" />
|
||||
from sys_role
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="roleCode != null and roleCode != ''"> and role_code like concat('%',#{roleCode},'%') </if>
|
||||
<if test="roleName != null and roleName != ''"> and role_name like concat('%',#{roleName},'%') </if>
|
||||
<if test="description != null and description != ''"> and description like concat('%',#{description},'%') </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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysRoleentity_list_or" resultMap="get-SysRoleEntity-result" parameterType = "com.hzya.frame.sys.role.entity.SysRoleEntity">
|
||||
select
|
||||
<include refid="SysRoleEntity_Base_Column_List" />
|
||||
from sys_role
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="roleCode != null and roleCode != ''"> or role_code = #{roleCode} </if>
|
||||
<if test="roleName != null and roleName != ''"> or role_name = #{roleName} </if>
|
||||
<if test="description != null and description != ''"> or description = #{description} </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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.role.entity.SysRoleEntity" keyProperty="" useGeneratedKeys="true">
|
||||
insert into sys_role(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="roleCode != null and roleCode != ''"> role_code , </if>
|
||||
<if test="roleName != null and roleName != ''"> role_name , </if>
|
||||
<if test="description != null and description != ''"> description , </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="roleCode != null and roleCode != ''"> #{roleCode} ,</if>
|
||||
<if test="roleName != null and roleName != ''"> #{roleName} ,</if>
|
||||
<if test="description != null and description != ''"> #{description} ,</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 sys_role a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="" useGeneratedKeys="true">
|
||||
insert into sys_role(id, role_code, role_name, description, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.id},#{entity.roleCode},#{entity.roleName},#{entity.description},#{entity.sorts},#{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="" useGeneratedKeys="true">
|
||||
insert into sys_role(id, role_code, role_name, description, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.id},#{entity.roleCode},#{entity.roleName},#{entity.description},#{entity.sorts},#{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
|
||||
id = values(id),
|
||||
role_code = values(role_code),
|
||||
role_name = values(role_name),
|
||||
description = values(description),
|
||||
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),
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.sys.role.entity.SysRoleEntity" >
|
||||
update sys_role set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id = #{id},</if>
|
||||
<if test="roleCode != null and roleCode != ''"> role_code = #{roleCode},</if>
|
||||
<if test="roleName != null and roleName != ''"> role_name = #{roleName},</if>
|
||||
<if test="description != null and description != ''"> description = #{description},</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="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where = #{}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.role.entity.SysRoleEntity" >
|
||||
update sys_role set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where = #{}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.role.entity.SysRoleEntity" >
|
||||
update sys_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="roleCode != null and roleCode != ''"> and role_code = #{roleCode} </if>
|
||||
<if test="roleName != null and roleName != ''"> and role_name = #{roleName} </if>
|
||||
<if test="description != null and description != ''"> and description = #{description} </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">
|
||||
delete from sys_role where = #{}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.sys.role.service;
|
||||
|
||||
import com.hzya.frame.sys.role.entity.SysRoleEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 角色表(SysRole)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:22:05
|
||||
*/
|
||||
public interface ISysRoleService extends IBaseService<SysRoleEntity, String>{
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.sys.role.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.role.entity.SysRoleEntity;
|
||||
import com.hzya.frame.sys.role.dao.ISysRoleDao;
|
||||
import com.hzya.frame.sys.role.service.ISysRoleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 角色表(SysRole)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:22:08
|
||||
*/
|
||||
@Service(value = "sysRoleService")
|
||||
public class SysRoleServiceImpl extends BaseService<SysRoleEntity, String> implements ISysRoleService {
|
||||
|
||||
private ISysRoleDao sysRoleDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysRoleDao(ISysRoleDao dao) {
|
||||
this.sysRoleDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.user.dao;
|
||||
|
||||
import com.hzya.frame.sys.user.entity.SysUserEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 用户表(sys_user: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:45
|
||||
*/
|
||||
public interface ISysUserDao extends IBaseDao<SysUserEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.user.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.user.entity.SysUserEntity;
|
||||
import com.hzya.frame.sys.user.dao.ISysUserDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 用户表(SysUser)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:45
|
||||
*/
|
||||
@Repository(value = "SysUserDaoImpl")
|
||||
public class SysUserDaoImpl extends MybatisGenericDao<SysUserEntity, String> implements ISysUserDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
package com.hzya.frame.sys.user.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户表(SysUser)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:45
|
||||
*/
|
||||
public class SysUserEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 外键人员ID
|
||||
*/
|
||||
private String personId;
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
private String loginCode;
|
||||
/**
|
||||
* 登录密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 盐
|
||||
*/
|
||||
private String salt;
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
private Date lastLoginTime;
|
||||
/**
|
||||
* 最后链接时间
|
||||
*/
|
||||
private Date lastConnectionTime;
|
||||
/**
|
||||
* 登录IP地址
|
||||
*/
|
||||
private String lastLoginIp;
|
||||
/**
|
||||
* 状态:0 启用 1 停用
|
||||
*/
|
||||
private String state;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getPersonId() {
|
||||
return personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getLoginCode() {
|
||||
return loginCode;
|
||||
}
|
||||
|
||||
public void setLoginCode(String loginCode) {
|
||||
this.loginCode = loginCode;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getSalt() {
|
||||
return salt;
|
||||
}
|
||||
|
||||
public void setSalt(String salt) {
|
||||
this.salt = salt;
|
||||
}
|
||||
|
||||
public Date getLastLoginTime() {
|
||||
return lastLoginTime;
|
||||
}
|
||||
|
||||
public void setLastLoginTime(Date lastLoginTime) {
|
||||
this.lastLoginTime = lastLoginTime;
|
||||
}
|
||||
|
||||
public Date getLastConnectionTime() {
|
||||
return lastConnectionTime;
|
||||
}
|
||||
|
||||
public void setLastConnectionTime(Date lastConnectionTime) {
|
||||
this.lastConnectionTime = lastConnectionTime;
|
||||
}
|
||||
|
||||
public String getLastLoginIp() {
|
||||
return lastLoginIp;
|
||||
}
|
||||
|
||||
public void setLastLoginIp(String lastLoginIp) {
|
||||
this.lastLoginIp = lastLoginIp;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,320 @@
|
|||
<?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.sys.user.dao.impl.SysUserDaoImpl">
|
||||
|
||||
<resultMap id="get-SysUserEntity-result" type="com.hzya.frame.sys.user.entity.SysUserEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="personId" column="person_id" jdbcType="VARCHAR"/>
|
||||
<result property="loginCode" column="login_code" jdbcType="VARCHAR"/>
|
||||
<result property="password" column="password" jdbcType="VARCHAR"/>
|
||||
<result property="salt" column="salt" jdbcType="VARCHAR"/>
|
||||
<result property="lastLoginTime" column="last_login_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="lastConnectionTime" column="last_connection_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="lastLoginIp" column="last_login_ip" jdbcType="VARCHAR"/>
|
||||
<result property="state" column="state" 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="SysUserEntity_Base_Column_List">
|
||||
id
|
||||
,person_id
|
||||
,login_code
|
||||
,password
|
||||
,salt
|
||||
,last_login_time
|
||||
,last_connection_time
|
||||
,last_login_ip
|
||||
,state
|
||||
,remark
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysUserEntity-result"
|
||||
parameterType="com.hzya.frame.sys.user.entity.SysUserEntity">
|
||||
select
|
||||
<include refid="SysUserEntity_Base_Column_List"/>
|
||||
from sys_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="personId != null and personId != ''">and person_id = #{personId}</if>
|
||||
<if test="loginCode != null and loginCode != ''">and login_code = #{loginCode}</if>
|
||||
<if test="password != null and password != ''">and password = #{password}</if>
|
||||
<if test="salt != null and salt != ''">and salt = #{salt}</if>
|
||||
<if test="lastLoginTime != null">and last_login_time = #{lastLoginTime}</if>
|
||||
<if test="lastConnectionTime != null">and last_connection_time = #{lastConnectionTime}</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">and last_login_ip = #{lastLoginIp}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</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.sys.user.entity.SysUserEntity">
|
||||
select count(1) from sys_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="personId != null and personId != ''">and person_id = #{personId}</if>
|
||||
<if test="loginCode != null and loginCode != ''">and login_code = #{loginCode}</if>
|
||||
<if test="password != null and password != ''">and password = #{password}</if>
|
||||
<if test="salt != null and salt != ''">and salt = #{salt}</if>
|
||||
<if test="lastLoginTime != null">and last_login_time = #{lastLoginTime}</if>
|
||||
<if test="lastConnectionTime != null">and last_connection_time = #{lastConnectionTime}</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">and last_login_ip = #{lastLoginIp}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysUserEntity-result"
|
||||
parameterType="com.hzya.frame.sys.user.entity.SysUserEntity">
|
||||
select
|
||||
<include refid="SysUserEntity_Base_Column_List"/>
|
||||
from sys_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="personId != null and personId != ''">and person_id like concat('%',#{personId},'%')</if>
|
||||
<if test="loginCode != null and loginCode != ''">and login_code like concat('%',#{loginCode},'%')</if>
|
||||
<if test="password != null and password != ''">and password like concat('%',#{password},'%')</if>
|
||||
<if test="salt != null and salt != ''">and salt like concat('%',#{salt},'%')</if>
|
||||
<if test="lastLoginTime != null">and last_login_time like concat('%',#{lastLoginTime},'%')</if>
|
||||
<if test="lastConnectionTime != null">and last_connection_time like concat('%',#{lastConnectionTime},'%')
|
||||
</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">and last_login_ip like concat('%',#{lastLoginIp},'%')
|
||||
</if>
|
||||
<if test="state != null and state != ''">and state like concat('%',#{state},'%')</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysUserentity_list_or" resultMap="get-SysUserEntity-result"
|
||||
parameterType="com.hzya.frame.sys.user.entity.SysUserEntity">
|
||||
select
|
||||
<include refid="SysUserEntity_Base_Column_List"/>
|
||||
from sys_user
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="personId != null and personId != ''">or person_id = #{personId}</if>
|
||||
<if test="loginCode != null and loginCode != ''">or login_code = #{loginCode}</if>
|
||||
<if test="password != null and password != ''">or password = #{password}</if>
|
||||
<if test="salt != null and salt != ''">or salt = #{salt}</if>
|
||||
<if test="lastLoginTime != null">or last_login_time = #{lastLoginTime}</if>
|
||||
<if test="lastConnectionTime != null">or last_connection_time = #{lastConnectionTime}</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">or last_login_ip = #{lastLoginIp}</if>
|
||||
<if test="state != null and state != ''">or state = #{state}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.user.entity.SysUserEntity" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into sys_user(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="personId != null and personId != ''">person_id ,</if>
|
||||
<if test="loginCode != null and loginCode != ''">login_code ,</if>
|
||||
<if test="password != null and password != ''">password ,</if>
|
||||
<if test="salt != null and salt != ''">salt ,</if>
|
||||
<if test="lastLoginTime != null">last_login_time ,</if>
|
||||
<if test="lastConnectionTime != null">last_connection_time ,</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">last_login_ip ,</if>
|
||||
<if test="state != null and state != ''">state ,</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="personId != null and personId != ''">#{personId} ,</if>
|
||||
<if test="loginCode != null and loginCode != ''">#{loginCode} ,</if>
|
||||
<if test="password != null and password != ''">#{password} ,</if>
|
||||
<if test="salt != null and salt != ''">#{salt} ,</if>
|
||||
<if test="lastLoginTime != null">#{lastLoginTime} ,</if>
|
||||
<if test="lastConnectionTime != null">#{lastConnectionTime} ,</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">#{lastLoginIp} ,</if>
|
||||
<if test="state != null and state != ''">#{state} ,</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 sys_user a WHERE a.sts = 'Y'
|
||||
),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_user(person_id, login_code, password, salt, last_login_time, last_connection_time,
|
||||
last_login_ip, state, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id,
|
||||
company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.personId},#{entity.loginCode},#{entity.password},#{entity.salt},#{entity.lastLoginTime},#{entity.lastConnectionTime},#{entity.lastLoginIp},#{entity.state},#{entity.remark},#{entity.sorts},#{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 sys_user(person_id, login_code, password, salt, last_login_time, last_connection_time,
|
||||
last_login_ip, state, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id,
|
||||
company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.personId},#{entity.loginCode},#{entity.password},#{entity.salt},#{entity.lastLoginTime},#{entity.lastConnectionTime},#{entity.lastLoginIp},#{entity.state},#{entity.remark},#{entity.sorts},#{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
|
||||
person_id = values(person_id),
|
||||
login_code = values(login_code),
|
||||
password = values(password),
|
||||
salt = values(salt),
|
||||
last_login_time = values(last_login_time),
|
||||
last_connection_time = values(last_connection_time),
|
||||
last_login_ip = values(last_login_ip),
|
||||
state = values(state),
|
||||
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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.user.entity.SysUserEntity">
|
||||
update sys_user set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="personId != null and personId != ''">person_id = #{personId},</if>
|
||||
<if test="loginCode != null and loginCode != ''">login_code = #{loginCode},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="salt != null and salt != ''">salt = #{salt},</if>
|
||||
<if test="lastLoginTime != null">last_login_time = #{lastLoginTime},</if>
|
||||
<if test="lastConnectionTime != null">last_connection_time = #{lastConnectionTime},</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">last_login_ip = #{lastLoginIp},</if>
|
||||
<if test="state != null and state != ''">state = #{state},</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>
|
||||
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.user.entity.SysUserEntity">
|
||||
update sys_user 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.sys.user.entity.SysUserEntity">
|
||||
update sys_user 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="personId != null and personId != ''">and person_id = #{personId}</if>
|
||||
<if test="loginCode != null and loginCode != ''">and login_code = #{loginCode}</if>
|
||||
<if test="password != null and password != ''">and password = #{password}</if>
|
||||
<if test="salt != null and salt != ''">and salt = #{salt}</if>
|
||||
<if test="lastLoginTime != null">and last_login_time = #{lastLoginTime}</if>
|
||||
<if test="lastConnectionTime != null">and last_connection_time = #{lastConnectionTime}</if>
|
||||
<if test="lastLoginIp != null and lastLoginIp != ''">and last_login_ip = #{lastLoginIp}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</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">
|
||||
delete from sys_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.user.service;
|
||||
|
||||
import com.hzya.frame.sys.user.entity.SysUserEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 用户表(SysUser)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:46
|
||||
*/
|
||||
public interface ISysUserService extends IBaseService<SysUserEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.user.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.user.entity.SysUserEntity;
|
||||
import com.hzya.frame.sys.user.dao.ISysUserDao;
|
||||
import com.hzya.frame.sys.user.service.ISysUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 用户表(SysUser)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:27:46
|
||||
*/
|
||||
@Service(value = "sysUserService")
|
||||
public class SysUserServiceImpl extends BaseService<SysUserEntity, String> implements ISysUserService {
|
||||
|
||||
private ISysUserDao sysUserDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysUserDao(ISysUserDao dao) {
|
||||
this.sysUserDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.userCompany.dao;
|
||||
|
||||
import com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 用户所属公司表(sys_user_company: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:24
|
||||
*/
|
||||
public interface ISysUserCompanyDao extends IBaseDao<SysUserCompanyEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.userCompany.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity;
|
||||
import com.hzya.frame.sys.userCompany.dao.ISysUserCompanyDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 用户所属公司表(SysUserCompany)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:24
|
||||
*/
|
||||
@Repository(value = "SysUserCompanyDaoImpl")
|
||||
public class SysUserCompanyDaoImpl extends MybatisGenericDao<SysUserCompanyEntity, String> implements ISysUserCompanyDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.hzya.frame.sys.userCompany.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户所属公司表(SysUserCompany)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:24
|
||||
*/
|
||||
public class SysUserCompanyEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String userCompanyId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserCompanyId() {
|
||||
return userCompanyId;
|
||||
}
|
||||
|
||||
public void setUserCompanyId(String userCompanyId) {
|
||||
this.userCompanyId = userCompanyId;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
<?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.sys.userCompany.dao.impl.SysUserCompanyDaoImpl">
|
||||
|
||||
<resultMap id="get-SysUserCompanyEntity-result" type="com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
||||
<result property="userCompanyId" column="user_company_id" 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="SysUserCompanyEntity_Base_Column_List">
|
||||
id
|
||||
,user_id
|
||||
,user_company_id
|
||||
,remark
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysUserCompanyEntity-result"
|
||||
parameterType="com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
select
|
||||
<include refid="SysUserCompanyEntity_Base_Column_List"/>
|
||||
from sys_user_company
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">and user_company_id = #{userCompanyId}</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.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
select count(1) from sys_user_company
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">and user_company_id = #{userCompanyId}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysUserCompanyEntity-result"
|
||||
parameterType="com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
select
|
||||
<include refid="SysUserCompanyEntity_Base_Column_List"/>
|
||||
from sys_user_company
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="userId != null and userId != ''">and user_id like concat('%',#{userId},'%')</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">and user_company_id like
|
||||
concat('%',#{userCompanyId},'%')
|
||||
</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysUserCompanyentity_list_or" resultMap="get-SysUserCompanyEntity-result"
|
||||
parameterType="com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
select
|
||||
<include refid="SysUserCompanyEntity_Base_Column_List"/>
|
||||
from sys_user_company
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="userId != null and userId != ''">or user_id = #{userId}</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">or user_company_id = #{userCompanyId}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_user_company(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="userId != null and userId != ''">user_id ,</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">user_company_id ,</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="userId != null and userId != ''">#{userId} ,</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">#{userCompanyId} ,</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 sys_user_company a WHERE
|
||||
a.sts = 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_user_company(user_id, user_company_id, remark, sorts, create_user_id, create_time,
|
||||
modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.userId},#{entity.userCompanyId},#{entity.remark},#{entity.sorts},#{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 sys_user_company(user_id, user_company_id, remark, sorts, create_user_id, create_time,
|
||||
modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.userId},#{entity.userCompanyId},#{entity.remark},#{entity.sorts},#{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
|
||||
user_id = values(user_id),
|
||||
user_company_id = values(user_company_id),
|
||||
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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
update sys_user_company set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="userId != null and userId != ''">user_id = #{userId},</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">user_company_id = #{userCompanyId},</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>
|
||||
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
update sys_user_company 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.sys.userCompany.entity.SysUserCompanyEntity">
|
||||
update sys_user_company 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="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="userCompanyId != null and userCompanyId != ''">and user_company_id = #{userCompanyId}</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">
|
||||
delete from sys_user_company where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.userCompany.service;
|
||||
|
||||
import com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 用户所属公司表(SysUserCompany)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:25
|
||||
*/
|
||||
public interface ISysUserCompanyService extends IBaseService<SysUserCompanyEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.userCompany.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.userCompany.entity.SysUserCompanyEntity;
|
||||
import com.hzya.frame.sys.userCompany.dao.ISysUserCompanyDao;
|
||||
import com.hzya.frame.sys.userCompany.service.ISysUserCompanyService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 用户所属公司表(SysUserCompany)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:25
|
||||
*/
|
||||
@Service(value = "sysUserCompanyService")
|
||||
public class SysUserCompanyServiceImpl extends BaseService<SysUserCompanyEntity, String> implements ISysUserCompanyService {
|
||||
|
||||
private ISysUserCompanyDao sysUserCompanyDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysUserCompanyDao(ISysUserCompanyDao dao) {
|
||||
this.sysUserCompanyDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sys.userRoles.dao;
|
||||
|
||||
import com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 用户角色表(sys_user_roles: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:58
|
||||
*/
|
||||
public interface ISysUserRolesDao extends IBaseDao<SysUserRolesEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hzya.frame.sys.userRoles.dao.impl;
|
||||
|
||||
import com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity;
|
||||
import com.hzya.frame.sys.userRoles.dao.ISysUserRolesDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 用户角色表(SysUserRoles)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:58
|
||||
*/
|
||||
@Repository(value = "SysUserRolesDaoImpl")
|
||||
public class SysUserRolesDaoImpl extends MybatisGenericDao<SysUserRolesEntity, String> implements ISysUserRolesDao {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.hzya.frame.sys.userRoles.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户角色表(SysUserRoles)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:58
|
||||
*/
|
||||
public class SysUserRolesEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private String roleId;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String userRoleNote;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(String roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public String getUserRoleNote() {
|
||||
return userRoleNote;
|
||||
}
|
||||
|
||||
public void setUserRoleNote(String userRoleNote) {
|
||||
this.userRoleNote = userRoleNote;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
<?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.sys.userRoles.dao.impl.SysUserRolesDaoImpl">
|
||||
|
||||
<resultMap id="get-SysUserRolesEntity-result" type="com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
||||
<result property="roleId" column="role_id" jdbcType="VARCHAR"/>
|
||||
<result property="userRoleNote" column="user_role_note" 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="SysUserRolesEntity_Base_Column_List">
|
||||
id
|
||||
,user_id
|
||||
,role_id
|
||||
,user_role_note
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysUserRolesEntity-result"
|
||||
parameterType="com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity">
|
||||
select
|
||||
<include refid="SysUserRolesEntity_Base_Column_List"/>
|
||||
from sys_user_roles
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">and user_role_note = #{userRoleNote}</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.sys.userRoles.entity.SysUserRolesEntity">
|
||||
select count(1) from sys_user_roles
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">and user_role_note = #{userRoleNote}</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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysUserRolesEntity-result"
|
||||
parameterType="com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity">
|
||||
select
|
||||
<include refid="SysUserRolesEntity_Base_Column_List"/>
|
||||
from sys_user_roles
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="userId != null and userId != ''">and user_id like concat('%',#{userId},'%')</if>
|
||||
<if test="roleId != null and roleId != ''">and role_id like concat('%',#{roleId},'%')</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">and user_role_note like
|
||||
concat('%',#{userRoleNote},'%')
|
||||
</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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysUserRolesentity_list_or" resultMap="get-SysUserRolesEntity-result"
|
||||
parameterType="com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity">
|
||||
select
|
||||
<include refid="SysUserRolesEntity_Base_Column_List"/>
|
||||
from sys_user_roles
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="userId != null and userId != ''">or user_id = #{userId}</if>
|
||||
<if test="roleId != null and roleId != ''">or role_id = #{roleId}</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">or user_role_note = #{userRoleNote}</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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into sys_user_roles(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="userId != null and userId != ''">user_id ,</if>
|
||||
<if test="roleId != null and roleId != ''">role_id ,</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">user_role_note ,</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="userId != null and userId != ''">#{userId} ,</if>
|
||||
<if test="roleId != null and roleId != ''">#{roleId} ,</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">#{userRoleNote} ,</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 sys_user_roles a WHERE a.sts
|
||||
= 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_user_roles(user_id, role_id, user_role_note, sorts, create_user_id, create_time, modify_user_id,
|
||||
modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.userId},#{entity.roleId},#{entity.userRoleNote},#{entity.sorts},#{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 sys_user_roles(user_id, role_id, user_role_note, sorts, create_user_id, create_time, modify_user_id,
|
||||
modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.userId},#{entity.roleId},#{entity.userRoleNote},#{entity.sorts},#{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
|
||||
user_id = values(user_id),
|
||||
role_id = values(role_id),
|
||||
user_role_note = values(user_role_note),
|
||||
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),
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity">
|
||||
update sys_user_roles set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="userId != null and userId != ''">user_id = #{userId},</if>
|
||||
<if test="roleId != null and roleId != ''">role_id = #{roleId},</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">user_role_note = #{userRoleNote},</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="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity">
|
||||
update sys_user_roles 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.sys.userRoles.entity.SysUserRolesEntity">
|
||||
update sys_user_roles 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="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="roleId != null and roleId != ''">and role_id = #{roleId}</if>
|
||||
<if test="userRoleNote != null and userRoleNote != ''">and user_role_note = #{userRoleNote}</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">
|
||||
delete from sys_user_roles where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.sys.userRoles.service;
|
||||
|
||||
import com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 用户角色表(SysUserRoles)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:59
|
||||
*/
|
||||
public interface ISysUserRolesService extends IBaseService<SysUserRolesEntity, String> {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.sys.userRoles.service.impl;
|
||||
|
||||
import com.hzya.frame.sys.userRoles.entity.SysUserRolesEntity;
|
||||
import com.hzya.frame.sys.userRoles.dao.ISysUserRolesDao;
|
||||
import com.hzya.frame.sys.userRoles.service.ISysUserRolesService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 用户角色表(SysUserRoles)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-03-26 15:28:59
|
||||
*/
|
||||
@Service(value = "sysUserRolesService")
|
||||
public class SysUserRolesServiceImpl extends BaseService<SysUserRolesEntity, String> implements ISysUserRolesService {
|
||||
|
||||
private ISysUserRolesDao sysUserRolesDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysUserRolesDao(ISysUserRolesDao dao) {
|
||||
this.sysUserRolesDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -145,11 +145,11 @@ public class MyApplicationListener implements ApplicationListener<ApplicationRea
|
|||
|
||||
///////////////////////////////////////////////////////////公司服务器
|
||||
defaultDataSourceProperties.put("datasource_code", "ya251");
|
||||
defaultDataSourceProperties.put("source_url", "jdbc:mysql://hzya.ufyct.com:9096/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true");
|
||||
defaultDataSourceProperties.put("source_url", "jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true");
|
||||
defaultDataSourceProperties.put("source_type", "mysql");
|
||||
defaultDataSourceProperties.put("login_name", "root");
|
||||
defaultDataSourceProperties.put("password", "hzya1314");
|
||||
defaultDataSourceProperties.put("db_name", "businesscenter");
|
||||
defaultDataSourceProperties.put("db_name", "businesscenternew");
|
||||
|
||||
|
||||
//defaultDataSourceProperties.put("datasource_code", "bopro");
|
||||
|
|
Loading…
Reference in New Issue