init
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?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.cool.store.mapper.EnterpriseConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.EnterpriseConfigDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="current_package" jdbcType="BIGINT" property="currentPackage"/>
|
||||
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
|
||||
<result column="staff_count" jdbcType="INTEGER" property="staffCount"/>
|
||||
<result column="db_source_name" jdbcType="VARCHAR" property="dbSourceName"/>
|
||||
<result column="db_server" jdbcType="VARCHAR" property="dbServer"/>
|
||||
<result column="db_port" jdbcType="INTEGER" property="dbPort"/>
|
||||
<result column="db_name" jdbcType="VARCHAR" property="dbName"/>
|
||||
<result column="db_user" jdbcType="VARCHAR" property="dbUser"/>
|
||||
<result column="db_pwd" jdbcType="VARCHAR" property="dbPwd"/>
|
||||
<result column="license" jdbcType="VARCHAR" property="license"/>
|
||||
<result column="license_expires" jdbcType="TIMESTAMP" property="licenseExpires"/>
|
||||
<result column="license_type" jdbcType="INTEGER" property="licenseType"/>
|
||||
<result column="ding_corp_id" jdbcType="VARCHAR" property="dingCorpId"/>
|
||||
<result column="ding_corp_secret" jdbcType="VARCHAR" property="dingCorpSecret"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser"/>
|
||||
<result column="main_corp_id" jdbcType="VARCHAR" property="mainCorpId"/>
|
||||
<result column="app_type" jdbcType="VARCHAR" property="appType"/>
|
||||
<result column="permanent_code" jdbcType="VARCHAR" property="permanentCode"/>
|
||||
<result column="agentid" jdbcType="VARCHAR" property="agentid"/>
|
||||
<result column="cool_college_enterprise_id" jdbcType="VARCHAR" property="coolCollegeEnterpriseId"/>
|
||||
<result column="cool_college_secret" jdbcType="VARCHAR" property="coolCollegeSecret"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, current_package, enterprise_id, staff_count, db_source_name, db_server, db_port,
|
||||
db_name, db_user, db_pwd, license, license_expires, license_type, ding_corp_id, ding_corp_secret,
|
||||
create_time, create_user, main_corp_id, app_type, permanent_code, agentid, cool_college_enterprise_id,
|
||||
cool_college_secret
|
||||
</sql>
|
||||
|
||||
<select id="selectByEnterpriseId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
enterprise_config
|
||||
where
|
||||
enterprise_id = #{enterpriseId}
|
||||
</select>
|
||||
|
||||
<select id="getDistinctDbServer" resultMap="BaseResultMap">
|
||||
select
|
||||
distinct db_server, db_port, db_user, db_pwd
|
||||
from
|
||||
enterprise_config
|
||||
</select>
|
||||
|
||||
<select id="getDbInfoByDbName" resultMap="BaseResultMap">
|
||||
select
|
||||
db_server, db_port, db_user, db_pwd
|
||||
from
|
||||
enterprise_config
|
||||
where
|
||||
db_name = #{dbName} limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,391 @@
|
||||
<?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.cool.store.mapper.EnterpriseUserMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.EnterpriseUserDO">
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="tel" jdbcType="VARCHAR" property="tel"/>
|
||||
<result column="work_place" jdbcType="VARCHAR" property="workPlace"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
||||
<result column="email" jdbcType="VARCHAR" property="email"/>
|
||||
<result column="org_email" jdbcType="VARCHAR" property="orgEmail"/>
|
||||
<result column="active" jdbcType="BIT" property="active"/>
|
||||
<result column="order_in_depts" jdbcType="VARCHAR" property="orderInDepts"/>
|
||||
<result column="main_admin" jdbcType="TINYINT" property="mainAdmin"/>
|
||||
<result column="is_admin" jdbcType="BIT" property="isAdmin"/>
|
||||
<result column="is_boss" jdbcType="BIT" property="isBoss"/>
|
||||
<result column="dingId" jdbcType="VARCHAR" property="dingid"/>
|
||||
<result column="unionid" jdbcType="VARCHAR" property="unionid"/>
|
||||
<result column="is_hide" jdbcType="BIT" property="isHide"/>
|
||||
<result column="position" jdbcType="VARCHAR" property="position"/>
|
||||
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
|
||||
<result column="extattr" jdbcType="VARCHAR" property="extattr"/>
|
||||
<result column="is_enterprise" jdbcType="BIT" property="isEnterprise"/>
|
||||
<result column="roles" jdbcType="VARCHAR" property="roles"/>
|
||||
<result column="is_leader" jdbcType="BIT" property="isLeader"/>
|
||||
<result column="face_url" jdbcType="VARCHAR" property="faceUrl"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="language" jdbcType="CHAR" property="language"/>
|
||||
<result column="user_status" jdbcType="TINYINT" property="userStatus"/>
|
||||
<result column="third_oa_unique_flag" jdbcType="VARCHAR" property="thirdOaUniqueFlag"/>
|
||||
<result column="subordinate_change" jdbcType="TINYINT" property="subordinateChange"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="subordinate_range" jdbcType="VARCHAR" property="subordinateRange"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.model.entity.EnterpriseUserDO">
|
||||
<result column="is_leader_in_depts" jdbcType="LONGVARCHAR" property="isLeaderInDepts"/>
|
||||
<result column="department" jdbcType="LONGVARCHAR" property="department"/>
|
||||
<result column="jobnumber" jdbcType="LONGVARCHAR" property="jobnumber"/>
|
||||
<result column="monitored_departments" jdbcType="LONGVARCHAR" property="monitoredDepartments"/>
|
||||
<result column="departments" jdbcType="LONGVARCHAR" property="departments"/>
|
||||
<result column="user_region_ids" jdbcType="LONGVARCHAR" property="userRegionIds"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, name, tel, work_place, remark, mobile, email, org_email, active, order_in_depts,
|
||||
main_admin, is_admin, is_boss, dingId, unionid, is_hide, position, avatar, extattr,
|
||||
is_enterprise, roles, is_leader, face_url, create_time, language, user_status, third_oa_unique_flag,
|
||||
subordinate_change, update_time, subordinate_range
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
is_leader_in_depts, department, jobnumber, monitored_departments, departments, user_region_ids
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into enterprise_user_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="record.tel != null">
|
||||
tel,
|
||||
</if>
|
||||
<if test="record.workPlace != null">
|
||||
work_place,
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="record.mobile != null">
|
||||
mobile,
|
||||
</if>
|
||||
<if test="record.email != null">
|
||||
email,
|
||||
</if>
|
||||
<if test="record.orgEmail != null">
|
||||
org_email,
|
||||
</if>
|
||||
<if test="record.active != null">
|
||||
active,
|
||||
</if>
|
||||
<if test="record.orderInDepts != null">
|
||||
order_in_depts,
|
||||
</if>
|
||||
<if test="record.mainAdmin != null">
|
||||
main_admin,
|
||||
</if>
|
||||
<if test="record.isAdmin != null">
|
||||
is_admin,
|
||||
</if>
|
||||
<if test="record.isBoss != null">
|
||||
is_boss,
|
||||
</if>
|
||||
<if test="record.dingid != null">
|
||||
dingId,
|
||||
</if>
|
||||
<if test="record.unionid != null">
|
||||
unionid,
|
||||
</if>
|
||||
<if test="record.isHide != null">
|
||||
is_hide,
|
||||
</if>
|
||||
<if test="record.position != null">
|
||||
position,
|
||||
</if>
|
||||
<if test="record.avatar != null">
|
||||
avatar,
|
||||
</if>
|
||||
<if test="record.extattr != null">
|
||||
extattr,
|
||||
</if>
|
||||
<if test="record.isEnterprise != null">
|
||||
is_enterprise,
|
||||
</if>
|
||||
<if test="record.roles != null">
|
||||
roles,
|
||||
</if>
|
||||
<if test="record.isLeader != null">
|
||||
is_leader,
|
||||
</if>
|
||||
<if test="record.faceUrl != null">
|
||||
face_url,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.language != null">
|
||||
language,
|
||||
</if>
|
||||
<if test="record.userStatus != null">
|
||||
user_status,
|
||||
</if>
|
||||
<if test="record.thirdOaUniqueFlag != null">
|
||||
third_oa_unique_flag,
|
||||
</if>
|
||||
<if test="record.subordinateChange != null">
|
||||
subordinate_change,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="record.subordinateRange != null">
|
||||
subordinate_range,
|
||||
</if>
|
||||
<if test="record.isLeaderInDepts != null">
|
||||
is_leader_in_depts,
|
||||
</if>
|
||||
<if test="record.department != null">
|
||||
department,
|
||||
</if>
|
||||
<if test="record.jobnumber != null">
|
||||
jobnumber,
|
||||
</if>
|
||||
<if test="record.monitoredDepartments != null">
|
||||
monitored_departments,
|
||||
</if>
|
||||
<if test="record.departments != null">
|
||||
departments,
|
||||
</if>
|
||||
<if test="record.userRegionIds != null">
|
||||
user_region_ids,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.userId != null">
|
||||
#{record.userId},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
#{record.name},
|
||||
</if>
|
||||
<if test="record.tel != null">
|
||||
#{record.tel},
|
||||
</if>
|
||||
<if test="record.workPlace != null">
|
||||
#{record.workPlace},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
#{record.remark},
|
||||
</if>
|
||||
<if test="record.mobile != null">
|
||||
#{record.mobile},
|
||||
</if>
|
||||
<if test="record.email != null">
|
||||
#{record.email},
|
||||
</if>
|
||||
<if test="record.orgEmail != null">
|
||||
#{record.orgEmail},
|
||||
</if>
|
||||
<if test="record.active != null">
|
||||
#{record.active},
|
||||
</if>
|
||||
<if test="record.orderInDepts != null">
|
||||
#{record.orderInDepts},
|
||||
</if>
|
||||
<if test="record.mainAdmin != null">
|
||||
#{record.mainAdmin},
|
||||
</if>
|
||||
<if test="record.isAdmin != null">
|
||||
#{record.isAdmin},
|
||||
</if>
|
||||
<if test="record.isBoss != null">
|
||||
#{record.isBoss},
|
||||
</if>
|
||||
<if test="record.dingid != null">
|
||||
#{record.dingid},
|
||||
</if>
|
||||
<if test="record.unionid != null">
|
||||
#{record.unionid},
|
||||
</if>
|
||||
<if test="record.isHide != null">
|
||||
#{record.isHide},
|
||||
</if>
|
||||
<if test="record.position != null">
|
||||
#{record.position},
|
||||
</if>
|
||||
<if test="record.avatar != null">
|
||||
#{record.avatar},
|
||||
</if>
|
||||
<if test="record.extattr != null">
|
||||
#{record.extattr},
|
||||
</if>
|
||||
<if test="record.isEnterprise != null">
|
||||
#{record.isEnterprise},
|
||||
</if>
|
||||
<if test="record.roles != null">
|
||||
#{record.roles},
|
||||
</if>
|
||||
<if test="record.isLeader != null">
|
||||
#{record.isLeader},
|
||||
</if>
|
||||
<if test="record.faceUrl != null">
|
||||
#{record.faceUrl},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.language != null">
|
||||
#{record.language},
|
||||
</if>
|
||||
<if test="record.userStatus != null">
|
||||
#{record.userStatus},
|
||||
</if>
|
||||
<if test="record.thirdOaUniqueFlag != null">
|
||||
#{record.thirdOaUniqueFlag},
|
||||
</if>
|
||||
<if test="record.subordinateChange != null">
|
||||
#{record.subordinateChange},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
<if test="record.subordinateRange != null">
|
||||
#{record.subordinateRange},
|
||||
</if>
|
||||
<if test="record.isLeaderInDepts != null">
|
||||
#{record.isLeaderInDepts},
|
||||
</if>
|
||||
<if test="record.department != null">
|
||||
#{record.department},
|
||||
</if>
|
||||
<if test="record.jobnumber != null">
|
||||
#{record.jobnumber},
|
||||
</if>
|
||||
<if test="record.monitoredDepartments != null">
|
||||
#{record.monitoredDepartments},
|
||||
</if>
|
||||
<if test="record.departments != null">
|
||||
#{record.departments},
|
||||
</if>
|
||||
<if test="record.userRegionIds != null">
|
||||
#{record.userRegionIds},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update enterprise_user_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name},
|
||||
</if>
|
||||
<if test="record.tel != null">
|
||||
tel = #{record.tel},
|
||||
</if>
|
||||
<if test="record.workPlace != null">
|
||||
work_place = #{record.workPlace},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark = #{record.remark},
|
||||
</if>
|
||||
<if test="record.mobile != null">
|
||||
mobile = #{record.mobile},
|
||||
</if>
|
||||
<if test="record.email != null">
|
||||
email = #{record.email},
|
||||
</if>
|
||||
<if test="record.orgEmail != null">
|
||||
org_email = #{record.orgEmail},
|
||||
</if>
|
||||
<if test="record.active != null">
|
||||
active = #{record.active},
|
||||
</if>
|
||||
<if test="record.orderInDepts != null">
|
||||
order_in_depts = #{record.orderInDepts},
|
||||
</if>
|
||||
<if test="record.mainAdmin != null">
|
||||
main_admin = #{record.mainAdmin},
|
||||
</if>
|
||||
<if test="record.isAdmin != null">
|
||||
is_admin = #{record.isAdmin},
|
||||
</if>
|
||||
<if test="record.isBoss != null">
|
||||
is_boss = #{record.isBoss},
|
||||
</if>
|
||||
<if test="record.dingid != null">
|
||||
dingId = #{record.dingid},
|
||||
</if>
|
||||
<if test="record.unionid != null">
|
||||
unionid = #{record.unionid},
|
||||
</if>
|
||||
<if test="record.isHide != null">
|
||||
is_hide = #{record.isHide},
|
||||
</if>
|
||||
<if test="record.position != null">
|
||||
position = #{record.position},
|
||||
</if>
|
||||
<if test="record.avatar != null">
|
||||
avatar = #{record.avatar},
|
||||
</if>
|
||||
<if test="record.extattr != null">
|
||||
extattr = #{record.extattr},
|
||||
</if>
|
||||
<if test="record.isEnterprise != null">
|
||||
is_enterprise = #{record.isEnterprise},
|
||||
</if>
|
||||
<if test="record.roles != null">
|
||||
roles = #{record.roles},
|
||||
</if>
|
||||
<if test="record.isLeader != null">
|
||||
is_leader = #{record.isLeader},
|
||||
</if>
|
||||
<if test="record.faceUrl != null">
|
||||
face_url = #{record.faceUrl},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.language != null">
|
||||
language = #{record.language},
|
||||
</if>
|
||||
<if test="record.userStatus != null">
|
||||
user_status = #{record.userStatus},
|
||||
</if>
|
||||
<if test="record.thirdOaUniqueFlag != null">
|
||||
third_oa_unique_flag = #{record.thirdOaUniqueFlag},
|
||||
</if>
|
||||
<if test="record.subordinateChange != null">
|
||||
subordinate_change = #{record.subordinateChange},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.subordinateRange != null">
|
||||
subordinate_range = #{record.subordinateRange},
|
||||
</if>
|
||||
<if test="record.isLeaderInDepts != null">
|
||||
is_leader_in_depts = #{record.isLeaderInDepts},
|
||||
</if>
|
||||
<if test="record.department != null">
|
||||
department = #{record.department},
|
||||
</if>
|
||||
<if test="record.jobnumber != null">
|
||||
jobnumber = #{record.jobnumber},
|
||||
</if>
|
||||
<if test="record.monitoredDepartments != null">
|
||||
monitored_departments = #{record.monitoredDepartments},
|
||||
</if>
|
||||
<if test="record.departments != null">
|
||||
departments = #{record.departments},
|
||||
</if>
|
||||
<if test="record.userRegionIds != null">
|
||||
user_region_ids = #{record.userRegionIds},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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.cool.store.mapper.EnterpriseUserRoleMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.EnterpriseUserRoleDO">
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="role_id" jdbcType="BIGINT" property="roleId"/>
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, role_id, user_id, create_time, update_time
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into enterprise_user_role_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.roleId != null">
|
||||
role_id,
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.roleId != null">
|
||||
#{record.roleId},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
#{record.userId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update enterprise_user_role_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.roleId != null">
|
||||
role_id = #{record.roleId},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
205
coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml
Normal file
205
coolstore-partner-dao/src/main/resources/mapper/RegionMapper.xml
Normal file
@@ -0,0 +1,205 @@
|
||||
<?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.cool.store.mapper.RegionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.RegionDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="region_id" jdbcType="VARCHAR" property="regionId"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId"/>
|
||||
<result column="group_id" jdbcType="VARCHAR" property="groupId"/>
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
|
||||
<result column="create_name" jdbcType="VARCHAR" property="createName"/>
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
|
||||
<result column="update_name" jdbcType="VARCHAR" property="updateName"/>
|
||||
<result column="vds_group_corp_id" jdbcType="VARCHAR" property="vdsGroupCorpId"/>
|
||||
<result column="syn_ding_dept_id" jdbcType="VARCHAR" property="synDingDeptId"/>
|
||||
<result column="region_type" jdbcType="VARCHAR" property="regionType"/>
|
||||
<result column="region_path" jdbcType="VARCHAR" property="regionPath"/>
|
||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||
<result column="store_num" jdbcType="INTEGER" property="storeNum"/>
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
|
||||
<result column="unclassified_flag" jdbcType="TINYINT" property="unclassifiedFlag"/>
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum"/>
|
||||
<result column="third_dept_id" jdbcType="VARCHAR" property="thirdDeptId"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, region_id, name, parent_id, group_id, create_time, create_name, update_time,
|
||||
update_name, vds_group_corp_id, syn_ding_dept_id, region_type, region_path, deleted,
|
||||
store_num, store_id, unclassified_flag, order_num, third_dept_id
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into region_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.regionId != null">
|
||||
region_id,
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="record.groupId != null">
|
||||
group_id,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.createName != null">
|
||||
create_name,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="record.updateName != null">
|
||||
update_name,
|
||||
</if>
|
||||
<if test="record.vdsGroupCorpId != null">
|
||||
vds_group_corp_id,
|
||||
</if>
|
||||
<if test="record.synDingDeptId != null">
|
||||
syn_ding_dept_id,
|
||||
</if>
|
||||
<if test="record.regionType != null">
|
||||
region_type,
|
||||
</if>
|
||||
<if test="record.regionPath != null">
|
||||
region_path,
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="record.storeNum != null">
|
||||
store_num,
|
||||
</if>
|
||||
<if test="record.storeId != null">
|
||||
store_id,
|
||||
</if>
|
||||
<if test="record.unclassifiedFlag != null">
|
||||
unclassified_flag,
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
<if test="record.thirdDeptId != null">
|
||||
third_dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.regionId != null">
|
||||
#{record.regionId},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
#{record.name},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
#{record.parentId},
|
||||
</if>
|
||||
<if test="record.groupId != null">
|
||||
#{record.groupId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.createName != null">
|
||||
#{record.createName},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
<if test="record.updateName != null">
|
||||
#{record.updateName},
|
||||
</if>
|
||||
<if test="record.vdsGroupCorpId != null">
|
||||
#{record.vdsGroupCorpId},
|
||||
</if>
|
||||
<if test="record.synDingDeptId != null">
|
||||
#{record.synDingDeptId},
|
||||
</if>
|
||||
<if test="record.regionType != null">
|
||||
#{record.regionType},
|
||||
</if>
|
||||
<if test="record.regionPath != null">
|
||||
#{record.regionPath},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
#{record.deleted},
|
||||
</if>
|
||||
<if test="record.storeNum != null">
|
||||
#{record.storeNum},
|
||||
</if>
|
||||
<if test="record.storeId != null">
|
||||
#{record.storeId},
|
||||
</if>
|
||||
<if test="record.unclassifiedFlag != null">
|
||||
#{record.unclassifiedFlag},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
#{record.orderNum},
|
||||
</if>
|
||||
<if test="record.thirdDeptId != null">
|
||||
#{record.thirdDeptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update region_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.regionId != null">
|
||||
region_id = #{record.regionId},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId},
|
||||
</if>
|
||||
<if test="record.groupId != null">
|
||||
group_id = #{record.groupId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.createName != null">
|
||||
create_name = #{record.createName},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.updateName != null">
|
||||
update_name = #{record.updateName},
|
||||
</if>
|
||||
<if test="record.vdsGroupCorpId != null">
|
||||
vds_group_corp_id = #{record.vdsGroupCorpId},
|
||||
</if>
|
||||
<if test="record.synDingDeptId != null">
|
||||
syn_ding_dept_id = #{record.synDingDeptId},
|
||||
</if>
|
||||
<if test="record.regionType != null">
|
||||
region_type = #{record.regionType},
|
||||
</if>
|
||||
<if test="record.regionPath != null">
|
||||
region_path = #{record.regionPath},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted},
|
||||
</if>
|
||||
<if test="record.storeNum != null">
|
||||
store_num = #{record.storeNum},
|
||||
</if>
|
||||
<if test="record.storeId != null">
|
||||
store_id = #{record.storeId},
|
||||
</if>
|
||||
<if test="record.unclassifiedFlag != null">
|
||||
unclassified_flag = #{record.unclassifiedFlag},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum},
|
||||
</if>
|
||||
<if test="record.thirdDeptId != null">
|
||||
third_dept_id = #{record.thirdDeptId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,200 @@
|
||||
<?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.cool.store.mapper.SysDepartmentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.SysDepartmentDO">
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="parent_id" jdbcType="VARCHAR" property="parentId"/>
|
||||
<result column="depart_order" jdbcType="INTEGER" property="departOrder"/>
|
||||
<result column="create_dept_group" jdbcType="BIT" property="createDeptGroup"/>
|
||||
<result column="auto_add_user" jdbcType="BIT" property="autoAddUser"/>
|
||||
<result column="dep_Hiding" jdbcType="BIT" property="depHiding"/>
|
||||
<result column="dept_perimits" jdbcType="VARCHAR" property="deptPerimits"/>
|
||||
<result column="user_perimits" jdbcType="VARCHAR" property="userPerimits"/>
|
||||
<result column="outer_dept" jdbcType="BIT" property="outerDept"/>
|
||||
<result column="outer_permit_depts" jdbcType="VARCHAR" property="outerPermitDepts"/>
|
||||
<result column="outer_permit_users" jdbcType="VARCHAR" property="outerPermitUsers"/>
|
||||
<result column="org_dept_owner" jdbcType="VARCHAR" property="orgDeptOwner"/>
|
||||
<result column="dept_manager_userid_list" jdbcType="VARCHAR" property="deptManagerUseridList"/>
|
||||
<result column="user_count" jdbcType="INTEGER" property="userCount"/>
|
||||
<result column="unactive_user_count" jdbcType="INTEGER" property="unactiveUserCount"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.model.entity.SysDepartmentDO">
|
||||
<result column="parent_ids" jdbcType="LONGVARCHAR" property="parentIds"/>
|
||||
<result column="sub_ids" jdbcType="LONGVARCHAR" property="subIds"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, parent_id, depart_order, create_dept_group, auto_add_user, dep_Hiding,
|
||||
dept_perimits, user_perimits, outer_dept, outer_permit_depts, outer_permit_users,
|
||||
org_dept_owner, dept_manager_userid_list, user_count, unactive_user_count
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
parent_ids, sub_ids
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into sys_department_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="record.departOrder != null">
|
||||
depart_order,
|
||||
</if>
|
||||
<if test="record.createDeptGroup != null">
|
||||
create_dept_group,
|
||||
</if>
|
||||
<if test="record.autoAddUser != null">
|
||||
auto_add_user,
|
||||
</if>
|
||||
<if test="record.depHiding != null">
|
||||
dep_Hiding,
|
||||
</if>
|
||||
<if test="record.deptPerimits != null">
|
||||
dept_perimits,
|
||||
</if>
|
||||
<if test="record.userPerimits != null">
|
||||
user_perimits,
|
||||
</if>
|
||||
<if test="record.outerDept != null">
|
||||
outer_dept,
|
||||
</if>
|
||||
<if test="record.outerPermitDepts != null">
|
||||
outer_permit_depts,
|
||||
</if>
|
||||
<if test="record.outerPermitUsers != null">
|
||||
outer_permit_users,
|
||||
</if>
|
||||
<if test="record.orgDeptOwner != null">
|
||||
org_dept_owner,
|
||||
</if>
|
||||
<if test="record.deptManagerUseridList != null">
|
||||
dept_manager_userid_list,
|
||||
</if>
|
||||
<if test="record.userCount != null">
|
||||
user_count,
|
||||
</if>
|
||||
<if test="record.unactiveUserCount != null">
|
||||
unactive_user_count,
|
||||
</if>
|
||||
<if test="record.parentIds != null">
|
||||
parent_ids,
|
||||
</if>
|
||||
<if test="record.subIds != null">
|
||||
sub_ids,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.name != null">
|
||||
#{record.name},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
#{record.parentId},
|
||||
</if>
|
||||
<if test="record.departOrder != null">
|
||||
#{record.departOrder},
|
||||
</if>
|
||||
<if test="record.createDeptGroup != null">
|
||||
#{record.createDeptGroup},
|
||||
</if>
|
||||
<if test="record.autoAddUser != null">
|
||||
#{record.autoAddUser},
|
||||
</if>
|
||||
<if test="record.depHiding != null">
|
||||
#{record.depHiding},
|
||||
</if>
|
||||
<if test="record.deptPerimits != null">
|
||||
#{record.deptPerimits},
|
||||
</if>
|
||||
<if test="record.userPerimits != null">
|
||||
#{record.userPerimits},
|
||||
</if>
|
||||
<if test="record.outerDept != null">
|
||||
#{record.outerDept},
|
||||
</if>
|
||||
<if test="record.outerPermitDepts != null">
|
||||
#{record.outerPermitDepts},
|
||||
</if>
|
||||
<if test="record.outerPermitUsers != null">
|
||||
#{record.outerPermitUsers},
|
||||
</if>
|
||||
<if test="record.orgDeptOwner != null">
|
||||
#{record.orgDeptOwner},
|
||||
</if>
|
||||
<if test="record.deptManagerUseridList != null">
|
||||
#{record.deptManagerUseridList},
|
||||
</if>
|
||||
<if test="record.userCount != null">
|
||||
#{record.userCount},
|
||||
</if>
|
||||
<if test="record.unactiveUserCount != null">
|
||||
#{record.unactiveUserCount},
|
||||
</if>
|
||||
<if test="record.parentIds != null">
|
||||
#{record.parentIds},
|
||||
</if>
|
||||
<if test="record.subIds != null">
|
||||
#{record.subIds},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update sys_department_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId},
|
||||
</if>
|
||||
<if test="record.departOrder != null">
|
||||
depart_order = #{record.departOrder},
|
||||
</if>
|
||||
<if test="record.createDeptGroup != null">
|
||||
create_dept_group = #{record.createDeptGroup},
|
||||
</if>
|
||||
<if test="record.autoAddUser != null">
|
||||
auto_add_user = #{record.autoAddUser},
|
||||
</if>
|
||||
<if test="record.depHiding != null">
|
||||
dep_Hiding = #{record.depHiding},
|
||||
</if>
|
||||
<if test="record.deptPerimits != null">
|
||||
dept_perimits = #{record.deptPerimits},
|
||||
</if>
|
||||
<if test="record.userPerimits != null">
|
||||
user_perimits = #{record.userPerimits},
|
||||
</if>
|
||||
<if test="record.outerDept != null">
|
||||
outer_dept = #{record.outerDept},
|
||||
</if>
|
||||
<if test="record.outerPermitDepts != null">
|
||||
outer_permit_depts = #{record.outerPermitDepts},
|
||||
</if>
|
||||
<if test="record.outerPermitUsers != null">
|
||||
outer_permit_users = #{record.outerPermitUsers},
|
||||
</if>
|
||||
<if test="record.orgDeptOwner != null">
|
||||
org_dept_owner = #{record.orgDeptOwner},
|
||||
</if>
|
||||
<if test="record.deptManagerUseridList != null">
|
||||
dept_manager_userid_list = #{record.deptManagerUseridList},
|
||||
</if>
|
||||
<if test="record.userCount != null">
|
||||
user_count = #{record.userCount},
|
||||
</if>
|
||||
<if test="record.unactiveUserCount != null">
|
||||
unactive_user_count = #{record.unactiveUserCount},
|
||||
</if>
|
||||
<if test="record.parentIds != null">
|
||||
parent_ids = #{record.parentIds},
|
||||
</if>
|
||||
<if test="record.subIds != null">
|
||||
sub_ids = #{record.subIds},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,164 @@
|
||||
<?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.cool.store.mapper.SysRoleMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.SysRoleDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="role_name" jdbcType="VARCHAR" property="roleName"/>
|
||||
<result column="is_internal" jdbcType="BIT" property="isInternal"/>
|
||||
<result column="role_auth" jdbcType="VARCHAR" property="roleAuth"/>
|
||||
<result column="source" jdbcType="CHAR" property="source"/>
|
||||
<result column="position_type" jdbcType="VARCHAR" property="positionType"/>
|
||||
<result column="app_menu" jdbcType="VARCHAR" property="appMenu"/>
|
||||
<result column="syn_ding_role_id" jdbcType="BIGINT" property="synDingRoleId"/>
|
||||
<result column="priority" jdbcType="INTEGER" property="priority"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="role_enum" jdbcType="VARCHAR" property="roleEnum"/>
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser"/>
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser"/>
|
||||
<result column="third_unique_id" jdbcType="VARCHAR" property="thirdUniqueId"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, role_name, is_internal, role_auth, source, position_type, app_menu, syn_ding_role_id,
|
||||
priority, create_time, update_time, role_enum, create_user, update_user, third_unique_id
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into sys_role_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.roleName != null">
|
||||
role_name,
|
||||
</if>
|
||||
<if test="record.isInternal != null">
|
||||
is_internal,
|
||||
</if>
|
||||
<if test="record.roleAuth != null">
|
||||
role_auth,
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
source,
|
||||
</if>
|
||||
<if test="record.positionType != null">
|
||||
position_type,
|
||||
</if>
|
||||
<if test="record.appMenu != null">
|
||||
app_menu,
|
||||
</if>
|
||||
<if test="record.synDingRoleId != null">
|
||||
syn_ding_role_id,
|
||||
</if>
|
||||
<if test="record.priority != null">
|
||||
priority,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="record.roleEnum != null">
|
||||
role_enum,
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="record.thirdUniqueId != null">
|
||||
third_unique_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.roleName != null">
|
||||
#{record.roleName},
|
||||
</if>
|
||||
<if test="record.isInternal != null">
|
||||
#{record.isInternal},
|
||||
</if>
|
||||
<if test="record.roleAuth != null">
|
||||
#{record.roleAuth},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
#{record.source},
|
||||
</if>
|
||||
<if test="record.positionType != null">
|
||||
#{record.positionType},
|
||||
</if>
|
||||
<if test="record.appMenu != null">
|
||||
#{record.appMenu},
|
||||
</if>
|
||||
<if test="record.synDingRoleId != null">
|
||||
#{record.synDingRoleId},
|
||||
</if>
|
||||
<if test="record.priority != null">
|
||||
#{record.priority},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
<if test="record.roleEnum != null">
|
||||
#{record.roleEnum},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
#{record.createUser},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
#{record.updateUser},
|
||||
</if>
|
||||
<if test="record.thirdUniqueId != null">
|
||||
#{record.thirdUniqueId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update sys_role_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.roleName != null">
|
||||
role_name = #{record.roleName},
|
||||
</if>
|
||||
<if test="record.isInternal != null">
|
||||
is_internal = #{record.isInternal},
|
||||
</if>
|
||||
<if test="record.roleAuth != null">
|
||||
role_auth = #{record.roleAuth},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
source = #{record.source},
|
||||
</if>
|
||||
<if test="record.positionType != null">
|
||||
position_type = #{record.positionType},
|
||||
</if>
|
||||
<if test="record.appMenu != null">
|
||||
app_menu = #{record.appMenu},
|
||||
</if>
|
||||
<if test="record.synDingRoleId != null">
|
||||
syn_ding_role_id = #{record.synDingRoleId},
|
||||
</if>
|
||||
<if test="record.priority != null">
|
||||
priority = #{record.priority},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.roleEnum != null">
|
||||
role_enum = #{record.roleEnum},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser},
|
||||
</if>
|
||||
<if test="record.thirdUniqueId != null">
|
||||
third_unique_id = #{record.thirdUniqueId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?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.cool.store.mapper.SysRoleMenuMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.SysRoleMenuDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="menu_id" jdbcType="BIGINT" property="menuId"/>
|
||||
<result column="role_id" jdbcType="BIGINT" property="roleId"/>
|
||||
<result column="platform" jdbcType="VARCHAR" property="platform"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, menu_id, role_id, platform
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into sys_role_menu_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.menuId != null">
|
||||
menu_id,
|
||||
</if>
|
||||
<if test="record.roleId != null">
|
||||
role_id,
|
||||
</if>
|
||||
<if test="record.platform != null">
|
||||
platform,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.menuId != null">
|
||||
#{record.menuId},
|
||||
</if>
|
||||
<if test="record.roleId != null">
|
||||
#{record.roleId},
|
||||
</if>
|
||||
<if test="record.platform != null">
|
||||
#{record.platform},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update sys_role_menu_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.menuId != null">
|
||||
menu_id = #{record.menuId},
|
||||
</if>
|
||||
<if test="record.roleId != null">
|
||||
role_id = #{record.roleId},
|
||||
</if>
|
||||
<if test="record.platform != null">
|
||||
platform = #{record.platform},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?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.cool.store.mapper.UserAuthMappingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.UserAuthMappingDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||
<result column="mapping_id" jdbcType="VARCHAR" property="mappingId"/>
|
||||
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||
<result column="create_id" jdbcType="VARCHAR" property="createId"/>
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
|
||||
<result column="update_id" jdbcType="VARCHAR" property="updateId"/>
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, mapping_id, type, source, create_id, create_time, update_id, update_time
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into user_auth_mapping_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="record.mappingId != null">
|
||||
mapping_id,
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
source,
|
||||
</if>
|
||||
<if test="record.createId != null">
|
||||
create_id,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateId != null">
|
||||
update_id,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.userId != null">
|
||||
#{record.userId},
|
||||
</if>
|
||||
<if test="record.mappingId != null">
|
||||
#{record.mappingId},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
#{record.type},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
#{record.source},
|
||||
</if>
|
||||
<if test="record.createId != null">
|
||||
#{record.createId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateId != null">
|
||||
#{record.updateId},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update user_auth_mapping_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId},
|
||||
</if>
|
||||
<if test="record.mappingId != null">
|
||||
mapping_id = #{record.mappingId},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
type = #{record.type},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
source = #{record.source},
|
||||
</if>
|
||||
<if test="record.createId != null">
|
||||
create_id = #{record.createId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateId != null">
|
||||
update_id = #{record.updateId},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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.cool.store.mapper.UserRegionMappingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.UserRegionMappingDO">
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="region_id" jdbcType="VARCHAR" property="regionId"/>
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||
<result column="create_id" jdbcType="VARCHAR" property="createId"/>
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
|
||||
<result column="update_id" jdbcType="VARCHAR" property="updateId"/>
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, region_id, user_id, create_id, create_time, update_id, update_time
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into user_region_mapping_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.regionId != null">
|
||||
region_id,
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="record.createId != null">
|
||||
create_id,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateId != null">
|
||||
update_id,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.regionId != null">
|
||||
#{record.regionId},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
#{record.userId},
|
||||
</if>
|
||||
<if test="record.createId != null">
|
||||
#{record.createId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateId != null">
|
||||
#{record.updateId},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update user_region_mapping_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.regionId != null">
|
||||
region_id = #{record.regionId},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId},
|
||||
</if>
|
||||
<if test="record.createId != null">
|
||||
create_id = #{record.createId},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateId != null">
|
||||
update_id = #{record.updateId},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user