This commit is contained in:
esacpe
2024-07-17 21:04:17 +08:00
commit 1fa3303972
1291 changed files with 92328 additions and 0 deletions

View File

@ -0,0 +1,5 @@
<?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.mosty.common.core.business.mapper.SysAppHomeconfigMapper">
</mapper>

View File

@ -0,0 +1,10 @@
<?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.mosty.common.core.business.mapper.SysAppHomeconfigPlateListMapper">
<!--根据ID删除明细-->
<update id="deleteByHomeid">
update sys_app_homeconfig_plate_list set xt_zxbz = 1 where plate_id = #{plateId}
</update>
</mapper>

View File

@ -0,0 +1,10 @@
<?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.mosty.common.core.business.mapper.SysAppHomeconfigPlateMapper">
<!--根据ID删除明细-->
<update id="deleteByPlateId">
update sys_app_homeconfig_plate set xt_zxbz = 1 where homeid = #{homeid}
</update>
</mapper>

View File

@ -0,0 +1,150 @@
<?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.mosty.common.core.business.mapper.SysDeptMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysDept">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="orgCode" column="org_code" jdbcType="VARCHAR"/>
<result property="orgName" column="org_name" jdbcType="VARCHAR"/>
<result property="rootPath" column="root_path" jdbcType="VARCHAR"/>
<result property="orgType" column="org_type" jdbcType="VARCHAR"/>
<result property="orgLevel" column="org_level" jdbcType="VARCHAR"/>
<result property="orgBizType" column="org_biz_type" jdbcType="VARCHAR"/>
<result property="orgNo" column="org_no" jdbcType="VARCHAR"/>
<result property="parentId" column="parent_id" jdbcType="BIGINT"/>
<result property="bmpyszm" column="bmpyszm" jdbcType="VARCHAR"/>
<result property="orgJc" column="org_jc" jdbcType="VARCHAR"/>
<result property="orgQc" column="org_qc" jdbcType="VARCHAR"/>
<result property="address" column="address" jdbcType="VARCHAR"/>
<result property="linkTel" column="link_tel" jdbcType="VARCHAR"/>
<result property="linkMan" column="link_man" jdbcType="VARCHAR"/>
<result property="linkManTel" column="link_man_tel" jdbcType="VARCHAR"/>
<result property="webUrl" column="web_url" jdbcType="VARCHAR"/>
<result property="email" column="email" jdbcType="VARCHAR"/>
<result property="xzqh" column="xzqh" jdbcType="VARCHAR"/>
<result property="bz" column="bz" jdbcType="VARCHAR"/>
<result property="xtZxbz" column="xt_zxbz" jdbcType="INTEGER"/>
<result property="xtCjsj" column="xt_cjsj" jdbcType="TIMESTAMP"/>
<result property="xtLrsj" column="xt_lrsj" jdbcType="TIMESTAMP"/>
<result property="xtLrrxm" column="xt_lrrxm" jdbcType="VARCHAR"/>
<result property="xtLrrid" column="xt_lrrid" jdbcType="BIGINT"/>
<result property="xtLrrbm" column="xt_lrrbm" jdbcType="VARCHAR"/>
<result property="xtLrrbmid" column="xt_lrrbmid" jdbcType="VARCHAR"/>
<result property="xtLrip" column="xt_lrip" jdbcType="VARCHAR"/>
<result property="xtZhxgsj" column="xt_zhxgsj" jdbcType="TIMESTAMP"/>
<result property="xtZhxgrxm" column="xt_zhxgrxm" jdbcType="VARCHAR"/>
<result property="xtZhxgid" column="xt_zhxgid" jdbcType="BIGINT"/>
<result property="xtZhxgrbm" column="xt_zhxgrbm" jdbcType="VARCHAR"/>
<result property="xtZhxgrbmid" column="xt_zhxgrbmid" jdbcType="BIGINT"/>
<result property="xtZhxgrip" column="xt_zhxgrip" jdbcType="VARCHAR"/>
<result property="hasChildren" column="hasChildren" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id
,org_code,org_name,root_path,
org_type,org_level,org_biz_type,
org_no,parent_id,bmpyszm,
org_jc,org_qc,address,
link_tel,link_man,link_man_tel,
web_url,email,xzqh,
bz,xt_zxbz,xt_zxyz,
xt_cjsj,xt_lrsj,xt_lrrxm,
xt_lrrid,xt_lrrbm,xt_lrrbmid,
xt_lrip,xt_zhxgsj,xt_zhxgrxm,
xt_zhxgid,xt_zhxgrbm,xt_zhxgrbmid,
xt_zhxgrip
</sql>
<select id="selectUserDeptList" resultType="com.mosty.common.core.login.dto.DeptDTO">
select a.id as deptId,
a.root_path as path,
a.org_name as deptName,
a.org_code as deptCode,
a.org_level as deptLevel,
a.org_biz_type deptBizType,
a.org_jc deptJc
from sys_dept a
inner join sys_user_dept b
on
a.id = b.dept_id
where b.user_id = #{userId}
and a.xt_zxbz = 0
order by a.id asc
</select>
<select id="selectUserPageByDept" resultType="com.mosty.common.core.business.entity.vo.UserDeptVO">
select b.dept_id,
b.user_id,
a.user_name,
a.login_name,
a.xt_zxbz,
a.xt_lrsj
from sys_user a
inner join sys_user_dept b
on
a.id = b.user_id
WHERE
a.xt_zxbz = 0
<if test="param.deptId!=null and param.deptId!=''">
and b.dept_id = #{param.deptId}
</if>
<if test="param.userId!=null and param.userId!=''">
and b.user_id = #{param.userId}
</if>
order by a.id asc
</select>
<select id="selectRolePageByDept" resultType="com.mosty.common.core.business.entity.vo.RoleDeptVO">
select b.id,
b.dept_id,
b.role_id,
a.role_name,
a.role_desc,
a.xt_zxbz,
a.xt_lrsj
from sys_role a
inner join sys_role_dept b
on
a.id = b.role_id
WHERE
a.xt_zxbz = 0
<if test="param.deptId!=null and param.deptId!=''">
AND b.dept_id = #{param.deptId}
</if>
<if test="param.roleId!=null and param.roleId!=''">
AND b.role_id = #{param.roleId}
</if>
order by a.id asc
</select>
<select id="getDeptByUserId" resultMap="BaseResultMap">
select * from sys_user_dept a, sys_dept b where a.dept_id = b.id and a.user_id = #{id}
and b.xt_zxbz = '0'
</select>
<select id="getDeptListByParentId" resultMap="BaseResultMap">
select a.*,
case when (select count(1) from sys_dept b where b.xt_zxbz = '0' and parent_id = a.id) > 0 then 'true'
else 'false' end hasChildren
from sys_dept a where xt_zxbz = '0'
<if test="parentid != null">
and a.parent_id = #{parentid}
</if>
<if test="deptname != null and deptname != ''">
and a.org_name like concat('%',#{deptname},'%')
</if>
</select>
<select id="getDeptListByOrgcode" resultMap="BaseResultMap">
select a.*,
case when (select count(1) from sys_dept b where b.xt_zxbz = '0' and parent_id = a.id) > 0 then 'true'
else 'false' end hasChildren
from sys_dept a where xt_zxbz = '0'
<if test="deptCode != null and deptCode != ''">
and a.org_code = #{deptCode}
</if>
<if test="deptname != null and deptname != ''">
and a.org_name like concat('%',#{deptname},'%')
</if>
</select>
</mapper>

View File

@ -0,0 +1,34 @@
<?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.mosty.common.core.business.mapper.SysLogininforMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysLogininfor">
<id property="infoId" column="info_id" jdbcType="BIGINT"/>
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="ipaddr" column="ipaddr" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="CHAR"/>
<result property="msg" column="msg" jdbcType="VARCHAR"/>
<result property="accessTime" column="access_time" jdbcType="TIMESTAMP"/>
<result property="browser" column="browser" jdbcType="VARCHAR"/>
<result property="os" column="os" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
info_id
,user_name,ipaddr,
status,msg,access_time,browser,os
</sql>
<!--清空-->
<update id="cleanOperLog">
truncate table sys_oper_log
</update>
<!--删除-->
<delete id="deleteOperLogByIds" parameterType="String">
delete from sys_logininfor where oper_id in
<foreach collection="array" item="operId" open="(" separator="," close=")">
#{operId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,5 @@
<?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.mosty.common.core.business.mapper.SysMenuMapper">
</mapper>

View File

@ -0,0 +1,223 @@
<?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.mosty.operation.log.mapper.SysOperLogMapper">
<resultMap type="com.mosty.common.base.entity.log.SysOperLog" id="SysOperLogResult">
<id property="operId" column="oper_id"/>
<result property="title" column="title"/>
<result property="mkmc" column="mkmc"/>
<result property="businessType" column="business_type"/>
<result property="method" column="method"/>
<result property="requestMethod" column="request_method"/>
<result property="operatorType" column="operator_type"/>
<result property="operUserId" column="oper_user_id"/>
<result property="operSfzh" column="oper_sfzh"/>
<result property="operName" column="oper_name"/>
<result property="ssbmid" column="ssbmid"/>
<result property="ssbmdm" column="ssbmdm"/>
<result property="ssbm" column="ssbm"/>
<result property="operUrl" column="oper_url"/>
<result property="operIp" column="oper_ip"/>
<result property="operParam" column="oper_param"/>
<result property="jsonResult" column="json_result"/>
<result property="status" column="status"/>
<result property="errorMsg" column="error_msg"/>
<result property="operTime" column="oper_time"/>
</resultMap>
<sql id="selectOperLogVo">
select *
from sys_oper_log
</sql>
<insert id="insertOperlog" parameterType="com.mosty.common.base.entity.log.SysOperLog">
insert into sys_oper_log(mkmc, title, business_type, method, request_method, operator_type, oper_name,
ssbm, oper_user_id, oper_sfzh, ssbmid, ssbmdm,
oper_url, oper_ip, oper_param, json_result, status, error_msg,
oper_time)
values (#{mkmc}, #{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName},
#{ssbm}, #{operUserId}, #{operSfzh}, #{ssbmid}, #{ssbmdm},
#{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status},
#{errorMsg}, sysdate())
</insert>
<select id="selectOperLogList" parameterType="com.mosty.common.base.entity.log.SysOperLog"
resultMap="SysOperLogResult">
<include refid="selectOperLogVo"/>
<where>
<if test="title != null and title != ''">
AND title like concat('%', #{title}, '%')
</if>
<if test="businessType != null">
AND business_type = #{businessType}
</if>
<if test="businessTypes != null and businessTypes.length > 0">
AND business_type in
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
#{businessType}
</foreach>
</if>
<if test="status != null">
AND status = #{status}
</if>
<if test="operName != null and operName != ''">
AND oper_name like concat('%', #{operName}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''">
<!-- 开始时间检索 -->
and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''">
<!-- 结束时间检索 -->
and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
</select>
<delete id="deleteOperLogByIds" parameterType="String">
delete from sys_oper_log where oper_id in
<foreach collection="array" item="operId" open="(" separator="," close=")">
#{operId}
</foreach>
</delete>
<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
<include refid="selectOperLogVo"/>
where oper_id = #{operId}
</select>
<update id="cleanOperLog">
truncate table sys_oper_log
</update>
<select id="getSycs" resultType="int">
select count(1) from sys_oper_log where 1 = 1
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
${useSql}
</select>
<select id="getFwrs" resultType="int">
select count(DISTINCT oper_user_id) from sys_oper_log where 1 = 1
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${useSql}
</select>
<select id="bmStatistics" resultType="java.util.Map">
select count,ssbmid,ssbmdm,ssbm,IfNULL(pass,0) pass,IfNULL(noPass,0) noPass from (
select count(1) count,a.ssbmid,a.ssbmdm,a.ssbm,
(select count(1) from sys_oper_log b where status = '0' and a.ssbmid = b.ssbmid
and b.ssbmid is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${bUseSql}
group by ssbmid) pass,
(select count(1) from sys_oper_log b where status = '1' and a.ssbmid = b.ssbmid
and b.ssbmid is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${bUseSql}
group by ssbmid) noPass
from sys_oper_log a where a.ssbmid is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${aUseSql}
group by a.ssbmid,a.ssbmdm,a.ssbm order by count(1) desc limit 10
) ta
</select>
<select id="ryStatistics" resultType="java.util.Map">
select count,oper_name,ssbm,IfNULL(pass,0) pass,IfNULL(noPass,0) noPass from (
select count(1) count,a.oper_name,a.ssbm,
(select count(1) from sys_oper_log b where status = '0' and a.oper_user_id = b.oper_user_id
and b.oper_user_id is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${bUseSql}
group by oper_user_id) pass,
(select count(1) from sys_oper_log b where status = '1' and a.oper_user_id = b.oper_user_id
and b.oper_user_id is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${bUseSql}
group by oper_user_id) noPass
from sys_oper_log a where a.oper_user_id is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${aUseSql}
group by a.oper_name,a.ssbm order by count(1) desc limit 10
) ta
</select>
<select id="mkStatistics" resultType="java.util.Map">
select count,mkmc,IfNULL(pass,0) pass,IfNULL(noPass,0) noPass from (
select count(1) count,a.mkmc,
(select count(1) from sys_oper_log b where status = '0' and a.mkmc = b.mkmc
and b.mkmc is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${bUseSql}
group by mkmc) pass,
(select count(1) from sys_oper_log b where status = '1' and a.mkmc = b.mkmc
and b.mkmc is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${bUseSql}
group by mkmc) noPass
from sys_oper_log a where a.mkmc is not null
<if test="kssj != null and kssj != ''">
and oper_time >= #{kssj}
</if>
<if test="jssj != null and jssj != ''">
and oper_time &lt;= #{jssj}
</if>
${aUseSql}
group by a.mkmc order by count(1) desc
) ta
</select>
</mapper>

View File

@ -0,0 +1,5 @@
<?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.mosty.common.core.business.mapper.SysOssMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.mosty.common.core.business.mapper.SysPositionMapper">
</mapper>

View File

@ -0,0 +1,16 @@
<?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.mosty.common.core.business.mapper.SysRoleDeptMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysRoleDept">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="roleId" column="role_id" jdbcType="BIGINT"/>
<result property="deptId" column="dept_id" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
id,role_id,dept_id
</sql>
</mapper>

View File

@ -0,0 +1,40 @@
<?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.mosty.common.core.business.mapper.SysRoleMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysRole">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="roleName" column="role_name" jdbcType="VARCHAR"/>
<result property="roleCode" column="role_code" jdbcType="VARCHAR"/>
<result property="roleDesc" column="role_desc" jdbcType="VARCHAR"/>
<result property="orderNo" column="order_no" jdbcType="INTEGER"/>
<result property="bz" column="bz" jdbcType="VARCHAR"/>
<result property="xtCjsj" column="xt_cjsj" jdbcType="TIMESTAMP"/>
<result property="xtLrsj" column="xt_lrsj" jdbcType="TIMESTAMP"/>
<result property="xtLrrxm" column="xt_lrrxm" jdbcType="VARCHAR"/>
<result property="xtLrrid" column="xt_lrrid" jdbcType="VARCHAR"/>
<result property="xtLrrbm" column="xt_lrrbm" jdbcType="VARCHAR"/>
<result property="xtLrrbmid" column="xt_lrrbmid" jdbcType="VARCHAR"/>
<result property="xtLrip" column="xt_lrip" jdbcType="VARCHAR"/>
<result property="xtZhxgsj" column="xt_zhxgsj" jdbcType="TIMESTAMP"/>
<result property="xtZhxgrxm" column="xt_zhxgrxm" jdbcType="VARCHAR"/>
<result property="xtZhxgrid" column="xt_zhxgrid" jdbcType="VARCHAR"/>
<result property="xtZhxgrbm" column="xt_zhxgrbm" jdbcType="VARCHAR"/>
<result property="xtZhxgrbmid" column="xt_zhxgrbmid" jdbcType="VARCHAR"/>
<result property="xtZhxgip" column="xt_zhxgip" jdbcType="VARCHAR"/>
<result property="xtZxbz" column="xt_zxbz" jdbcType="INTEGER"/>
<result property="xtZxyy" column="xt_zxyy" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,role_name,role_code,role_desc,
order_no,bz,xt_cjsj,
xt_lrsj,xt_lrrxm,xt_lrrid,
xt_lrrbm,xt_lrrbmid,xt_lrip,
xt_zhxgsj,xt_zhxgrxm,xt_zhxgrid,
xt_zhxgrbm,xt_zhxgrbmid,xt_zhxgip,
xt_zxbz,xt_zxyy
</sql>
</mapper>

View File

@ -0,0 +1,16 @@
<?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.mosty.common.core.business.mapper.SysRoleMenuMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysRoleMenu">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="roleId" column="role_id" jdbcType="BIGINT"/>
<result property="menuId" column="menu_id" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
id,role_id,menu_id
</sql>
</mapper>

View File

@ -0,0 +1,10 @@
<?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.mosty.common.core.business.mapper.SysUserAppHomeconfigMapper">
<!--根据ID删除明细-->
<update id="deleteBySfzh">
update sys_user_app_homeconfig set xt_scbz = '1' where user_sfzh = #{sfzh}
</update>
</mapper>

View File

@ -0,0 +1,22 @@
<?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.mosty.common.core.business.mapper.SysUserAppHomeconfigPlateListMapper">
<!--根据ID删除明细-->
<update id="deleteByPzId">
update sys_user_app_homeconfig_plate_list set xt_zxbz = 1
where pz_id = #{pzId} and pz_plate_id = #{pzPlateId}
</update>
<update id="delByPzId">
update sys_user_app_homeconfig_plate_list set xt_zxbz = 1
where pz_id = #{pzId}
</update>
<update id="updateById">
update sys_user_app_homeconfig_plate_list set xt_zxbz = #{zxbz}
where pz_id = #{pzId} and pz_plate_id = #{pzPlateId} and plate_list_id = #{plateListId}
</update>
</mapper>

View File

@ -0,0 +1,15 @@
<?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.mosty.common.core.business.mapper.SysUserAppHomeconfigPlateMapper">
<!--根据ID删除明细-->
<update id="deleteByPzid">
update sys_user_app_homeconfig_plate set xt_zxbz = 1 where pz_id = #{pzId}
</update>
<!--根据ID删除明细-->
<update id="updateById">
update sys_user_app_homeconfig_plate set xt_zxbz = #{zxbz} where id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,16 @@
<?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.mosty.common.core.business.mapper.SysUserDeptMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysUserDept">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="userId" column="user_id" jdbcType="BIGINT"/>
<result property="deptId" column="dept_id" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
id,user_id,dept_id
</sql>
</mapper>

View File

@ -0,0 +1,207 @@
<?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.mosty.common.core.business.mapper.SysUserMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysUser">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="managerOrgId" column="manager_org_id" jdbcType="BIGINT"/>
<result property="managerOrgName" column="manager_org_name" jdbcType="VARCHAR"/>
<result property="positionId" column="position_id" jdbcType="BIGINT"/>
<result property="positionName" column="position_name" jdbcType="VARCHAR"/>
<result property="isVirtualUser" column="is_virtual_user" jdbcType="VARCHAR"/>
<result property="loginName" column="login_name" jdbcType="VARCHAR"/>
<result property="password" column="password" jdbcType="VARCHAR"/>
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="userType" column="user_type" jdbcType="VARCHAR"/>
<result property="email" column="email" jdbcType="VARCHAR"/>
<result property="mobile" column="mobile" jdbcType="VARCHAR"/>
<result property="telePhone" column="tele_phone" jdbcType="VARCHAR"/>
<result property="idEntityCard" column="id_entity_card" jdbcType="VARCHAR"/>
<result property="inDustRialId" column="in_dust_rial_id" jdbcType="VARCHAR"/>
<result property="sex" column="sex" jdbcType="VARCHAR"/>
<result property="nation" column="nation" jdbcType="INTEGER"/>
<result property="politic" column="politic" jdbcType="VARCHAR"/>
<result property="marital" column="marital" jdbcType="VARCHAR"/>
<result property="type" column="type" jdbcType="VARCHAR"/>
<result property="whcd" column="whcd" jdbcType="VARCHAR"/>
<result property="bz" column="bz" jdbcType="VARCHAR"/>
<result property="birthday" column="birthday" jdbcType="VARCHAR"/>
<result property="beginTime" column="begin_time" jdbcType="TIMESTAMP"/>
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
<result property="salt" column="salt" jdbcType="VARCHAR"/>
<result property="xtZxbz" column="xt_zxbz" jdbcType="INTEGER"/>
<result property="xtZxyz" column="xt_zxyz" jdbcType="VARCHAR"/>
<result property="xtCjsj" column="xt_cjsj" jdbcType="TIMESTAMP"/>
<result property="xtLrsj" column="xt_lrsj" jdbcType="TIMESTAMP"/>
<result property="xtLrrxm" column="xt_lrrxm" jdbcType="VARCHAR"/>
<result property="xtLrrid" column="xt_lrrid" jdbcType="BIGINT"/>
<result property="xtLrrbm" column="xt_lrrbm" jdbcType="VARCHAR"/>
<result property="xtLrrbmid" column="xt_lrrbmid" jdbcType="VARCHAR"/>
<result property="xtLrip" column="xt_lrip" jdbcType="VARCHAR"/>
<result property="xtZhxgsj" column="xt_zhxgsj" jdbcType="TIMESTAMP"/>
<result property="xtZhxgrxm" column="xt_zhxgrxm" jdbcType="VARCHAR"/>
<result property="xtZhxgid" column="xt_zhxgid" jdbcType="BIGINT"/>
<result property="xtZhxgrbm" column="xt_zhxgrbm" jdbcType="VARCHAR"/>
<result property="xtZhxgrbmid" column="xt_zhxgrbmid" jdbcType="BIGINT"/>
<result property="xtZhxgrip" column="xt_zhxgrip" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,manager_org_id,manager_org_name,
position_id,position_name,is_virtual_user,login_name,
password,user_name,user_type,
email,mobile,tele_phone,
id_entity_card,in_dust_rial_id,sex,
nation,politic, marital, type, whcd,bz,
birthday,begin_time,end_time,
salt,xt_zxbz,xt_zxyz,
xt_cjsj,xt_lrsj,xt_lrrxm,
xt_lrrid,xt_lrrbm,xt_lrrbmid,
xt_lrip,xt_zhxgsj,xt_zhxgrxm,
xt_zhxgid,xt_zhxgrbm,xt_zhxgrbmid,
xt_zhxgrip
</sql>
<select id="selectByCount" resultType="int">
SELECT
count(DISTINCT a.id)
FROM
sys_user a
INNER JOIN sys_user_dept b ON a.id = b.user_id
INNER JOIN sys_dept c ON b.dept_id = c.id
where
a.xt_zxbz = 0
<if test="userPage.deptId != null and userPage.deptId != '' ">
and b.dept_id in (${userPage.deptId})
</if>
<if test="userPage.phone != null and userPage.phone != '' ">
and a.mobile = #{userPage.phone}
</if>
<if test="userPage.loginName != null and userPage.loginName != '' ">
and (
a.login_name like concat('%', #{userPage.loginName}, '%')
or a.user_name like concat('%', #{userPage.loginName}, '%')
)
</if>
</select>
<select id="selectByPage" resultType="com.mosty.common.core.business.entity.vo.SysUserVO">
SELECT
DISTINCT
a.id,
a.position_id,
a.position_name,
a.login_name,
a.user_name,
a.mobile,
a.tele_phone,
a.sex,
a.xt_lrsj,
a.in_dust_rial_id,
a.id_entity_card,
a.politic,
a.marital,
a.type,
c.id as deptId,
c.org_code as deptCode,
c.org_name as deptName
FROM
sys_user a
INNER JOIN sys_user_dept b ON a.id = b.user_id
INNER JOIN sys_dept c ON b.dept_id = c.id
where
a.xt_zxbz = 0
<if test="userPage.orgcode != null and userPage.orgcode != '' ">
and c.org_code like concat(#{userPage.orgcode},'%')
</if>
<if test="userPage.phone != null and userPage.phone != '' ">
and a.mobile = #{userPage.phone}
</if>
<if test="userPage.loginName != null and userPage.loginName != '' ">
and (
a.login_name like concat('%', #{userPage.loginName}, '%')
or a.user_name like concat('%', #{userPage.loginName}, '%')
)
</if>
<if test="userPage.idEntityCard != null and userPage.idEntityCard !=''">
and a.id_entity_card like concat('%',#{userPage.idEntityCard},'%')
</if>
<if test="userPage.inDustRialId != null and userPage.inDustRialId !=''">
and a.in_dust_rial_id like concat('%',#{userPage.inDustRialId},'%')
</if>
</select>
<select id="selectUserDeptPage" resultType="com.mosty.common.core.business.entity.vo.SysUserDeptVO"
parameterType="com.mosty.common.core.business.entity.vo.UserDeptPage">
SELECT
a.id,
a.position_id as positionId,
a.position_name as positionName,
a.login_name as loginName,
a.user_name as userName,
a.mobile as mobile,
a.whcd as whcd,
a.in_dust_rial_id as inDustRialId,
a.tele_phone as telePhone,
a.sex as sex,
a.nation as nation,
a.id_entity_card as idEntityCard,
a.xt_lrsj as xtLrsj,
a.politic as politic,
a.marital as marital,
a.type as type,
c.id as deptId,
c.org_name as deptName
FROM
sys_user a
INNER JOIN sys_user_dept b ON a.id = b.user_id
inner join sys_dept c on b.dept_id = c.id
where
a.xt_zxbz = 0
<if test="userDeptPage.orgcode != null and userDeptPage.orgcode != '' ">
and c.org_code like concat(#{userDeptPage.orgcode},'%')
</if>
<if test="userDeptPage.deptName != null and userDeptPage.deptName != '' ">
and c.org_name like concat('%', #{userDeptPage.deptName}, '%')
</if>
<if test="userDeptPage.phone != null and userDeptPage.phone != '' ">
and a.mobile like concat('%',#{userDeptPage.phone}, '%')
</if>
<if test="userDeptPage.loginName != null and userDeptPage.loginName != '' ">
and a.login_name like concat('%', #{userDeptPage.loginName}, '%')
</if>
</select>
<select id="getUserListByDeptId" resultMap="BaseResultMap">
select a.* from sys_user a ,sys_dept b,sys_user_dept c where a.id = c.user_id
and a.xt_zxbz = '0' and b.xt_zxbz = '0'
<if test="keyword != null and keyword != ''">
and (a.user_name like concat('%',#{keyword},'%')
or a.login_name like concat('%',#{keyword},'%'))
</if>
and c.dept_id = b.id and a.is_virtual_user = '02' and b.id in
<foreach collection="deptIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="getUserListByDeptIdOne" resultMap="BaseResultMap">
select a.*
from sys_user a,
sys_dept b,
sys_user_dept c
where a.id = c.user_id
and a.xt_zxbz = '0'
and b.xt_zxbz = '0'
and c.dept_id = b.id
and a.is_virtual_user = '02'
and b.id = #{id}
</select>
<delete id="delById">
delete from sys_user where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,54 @@
<?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.mosty.common.core.business.mapper.SysUserRoleMapper">
<resultMap id="BaseResultMap" type="com.mosty.common.core.business.entity.SysUserRole">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="userId" column="user_id" jdbcType="BIGINT"/>
<result property="roleId" column="role_id" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
id,user_id,role_id
</sql>
<select id="roleUserList" resultType="com.mosty.common.core.business.entity.vo.SysUserVO">
select * from
sys_user_role a
inner join
sys_user b on a.user_id = b.id
inner join
sys_dept c on b.dept_id = c.id and b.root_path like concat(#{roleUserPage.rootPath}, '%') and b.xt_zxbz = 0
where
a.role_id = #{roleUserPage.roleId}
<if test="roleUserPage.loginName != null and roleUserPage.loginName != '' ">
and b.login_name like concat('%', #{roleUserPage.loginName}, '%')
</if>
<if test="roleUserPage.phone != null and roleUserPage.phone != '' ">
and b.mobile = #{roleUserPage.mobile}
</if>
limit #{roleUserPage.current}, #{roleUserPage.size}
</select>
<select id="getRoleUserList" resultType="com.mosty.common.core.business.entity.vo.SysUserVO">
select * from sys_user_role a inner join
sys_user b on a.user_id = b.id and b.xt_zxbz = 0
where a.role_id = #{roleId}
<if test="userName != null and userName != ''">
and (
b.user_name like concat('%',#{userName},'%')
or b.login_name like concat('%',#{userName},'%')
)
</if>
<if test="phone != null and phone != ''">
and (
b.mobile like concat('%',#{phone},'%')
or b.tele_phone like concat('%',#{phone},'%')
)
</if>
</select>
</mapper>