调解系统初始化版本

This commit is contained in:
gy b
2024-01-04 16:58:19 +08:00
parent 30a6a3a428
commit 04b4df2964
549 changed files with 69911 additions and 0 deletions
@@ -0,0 +1,117 @@
<?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.ruoyi.system.mapper.SysConfigMapper">
<resultMap type="SysConfig" id="SysConfigResult">
<id property="configId" column="config_id" />
<result property="configName" column="config_name" />
<result property="configKey" column="config_key" />
<result property="configValue" column="config_value" />
<result property="configType" column="config_type" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectConfigVo">
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
from sys_config
</sql>
<!-- 查询条件 -->
<sql id="sqlwhereSearch">
<where>
<if test="configId !=null">
and config_id = #{configId}
</if>
<if test="configKey !=null and configKey != ''">
and config_key = #{configKey}
</if>
</where>
</sql>
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
<include refid="sqlwhereSearch"/>
</select>
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
<where>
<if test="configName != null and configName != ''">
AND config_name like concat('%', #{configName}, '%')
</if>
<if test="configType != null and configType != ''">
AND config_type = #{configType}
</if>
<if test="configKey != null and configKey != ''">
AND config_key like concat('%', #{configKey}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
</select>
<select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
where config_id = #{configId}
</select>
<select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
where config_key = #{configKey} limit 1
</select>
<insert id="insertConfig" parameterType="SysConfig">
insert into sys_config (
<if test="configName != null and configName != '' ">config_name,</if>
<if test="configKey != null and configKey != '' ">config_key,</if>
<if test="configValue != null and configValue != '' ">config_value,</if>
<if test="configType != null and configType != '' ">config_type,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if>
create_time
)values(
<if test="configName != null and configName != ''">#{configName},</if>
<if test="configKey != null and configKey != ''">#{configKey},</if>
<if test="configValue != null and configValue != ''">#{configValue},</if>
<if test="configType != null and configType != ''">#{configType},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
sysdate()
)
</insert>
<update id="updateConfig" parameterType="SysConfig">
update sys_config
<set>
<if test="configName != null and configName != ''">config_name = #{configName},</if>
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
<if test="configValue != null and configValue != ''">config_value = #{configValue},</if>
<if test="configType != null and configType != ''">config_type = #{configType},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
update_time = sysdate()
</set>
where config_id = #{configId}
</update>
<delete id="deleteConfigById" parameterType="Long">
delete from sys_config where config_id = #{configId}
</delete>
<delete id="deleteConfigByIds" parameterType="Long">
delete from sys_config where config_id in
<foreach item="configId" collection="array" open="(" separator="," close=")">
#{configId}
</foreach>
</delete>
</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.ruoyi.system.mapper.SysDeptMapper">
<resultMap type="SysDept" id="SysDeptResult">
<id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
<result property="deptName" column="dept_name" />
<result property="deptType" column="dept_type" />
<result property="orderNum" column="order_num" />
<result property="leader" column="leader" />
<result property="phone" column="phone" />
<result property="email" column="email" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="parentName" column="parent_name" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_type,d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
from sys_dept d
</sql>
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
<include refid="selectDeptVo"/>
where d.del_flag = '0'
<if test="deptId != null and deptId != 0">
AND dept_id = #{deptId}
</if>
<if test="parentId != null and parentId != 0">
AND parent_id = #{parentId}
</if>
<if test="deptName != null and deptName != ''">
AND dept_name like concat('%', #{deptName}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
order by d.parent_id, d.order_num
</select>
<select id="selectDeptListByRoleId" resultType="Long">
select d.dept_id
from sys_dept d
left join sys_role_dept rd on d.dept_id = rd.dept_id
where rd.role_id = #{roleId}
<if test="deptCheckStrictly">
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
</if>
order by d.parent_id, d.order_num
</select>
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name,d.dept_type, d.order_num, d.leader, d.phone, d.email, d.status,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d
where d.dept_id = #{deptId}
</select>
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
</select>
<select id="hasChildByDeptId" parameterType="Long" resultType="int">
select count(1) from sys_dept
where del_flag = '0' and parent_id = #{deptId} limit 1
</select>
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
select * from sys_dept where find_in_set(#{deptId}, ancestors)
</select>
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
</select>
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
<include refid="selectDeptVo"/>
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select>
<select id="selectUserDeptListByRoleId" resultType="java.lang.Long">
select u.dept_id from sys_user_role r
join sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
</select>
<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
insert into sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
<if test="deptName != null and deptName != ''">dept_name,</if>
<if test="deptType != null">dept_type,</if>
<if test="ancestors != null and ancestors != ''">ancestors,</if>
<if test="orderNum != null">order_num,</if>
<if test="leader != null and leader != ''">leader,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="email != null and email != ''">email,</if>
<if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="deptId != null and deptId != 0">#{deptId},</if>
<if test="parentId != null and parentId != 0">#{parentId},</if>
<if test="deptName != null and deptName != ''">#{deptName},</if>
<if test="deptType != null">#{deptType},</if>
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="leader != null and leader != ''">#{leader},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
);
</insert>
<insert id="batchSave">
insert into sys_dept(
dept_id,
parent_id,
dept_name,
dept_type,
ancestors,
order_num,
leader,
phone,
email,
status,
create_by,
create_time
)values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.deptId},
#{item.parentId},
#{item.deptName},
#{item.deptType},
#{item.ancestors},
#{item.orderNum},
#{item.leader},
#{item.phone},
#{item.email},
#{item.status},
#{item.createBy},
sysdate()
)
</foreach>;
</insert>
<update id="updateDept" parameterType="SysDept">
update sys_dept
<set>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
<if test="deptType != null">dept_type = #{deptType},</if>
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="leader != null">leader = #{leader},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where dept_id = #{deptId}
</update>
<update id="updateDeptChildren" parameterType="java.util.List">
update sys_dept set ancestors =
<foreach collection="depts" item="item" index="index"
separator=" " open="case dept_id" close="end">
when #{item.deptId} then #{item.ancestors}
</foreach>
where dept_id in
<foreach collection="depts" item="item" index="index"
separator="," open="(" close=")">
#{item.deptId}
</foreach>
</update>
<update id="updateDeptStatusNormal" parameterType="Long">
update sys_dept set status = '0' where dept_id in
<foreach collection="array" item="deptId" open="(" separator="," close=")">
#{deptId}
</foreach>
</update>
<delete id="deleteDeptById" parameterType="Long">
update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
</mapper>
@@ -0,0 +1,124 @@
<?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.ruoyi.system.mapper.SysDictDataMapper">
<resultMap type="SysDictData" id="SysDictDataResult">
<id property="dictCode" column="dict_code" />
<result property="dictSort" column="dict_sort" />
<result property="dictLabel" column="dict_label" />
<result property="dictValue" column="dict_value" />
<result property="dictType" column="dict_type" />
<result property="cssClass" column="css_class" />
<result property="listClass" column="list_class" />
<result property="isDefault" column="is_default" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDictDataVo">
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
from sys_dict_data
</sql>
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
<where>
<if test="dictType != null and dictType != ''">
AND dict_type = #{dictType}
</if>
<if test="dictLabel != null and dictLabel != ''">
AND dict_label like concat('%', #{dictLabel}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
</where>
order by dict_sort asc
</select>
<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
where status = '0' and dict_type = #{dictType} order by dict_sort asc
</select>
<select id="selectDictLabel" resultType="String">
select dict_label from sys_dict_data
where dict_type = #{dictType} and dict_value = #{dictValue}
</select>
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
where dict_code = #{dictCode}
</select>
<select id="countDictDataByType" resultType="Integer">
select count(1) from sys_dict_data where dict_type=#{dictType}
</select>
<delete id="deleteDictDataById" parameterType="Long">
delete from sys_dict_data where dict_code = #{dictCode}
</delete>
<delete id="deleteDictDataByIds" parameterType="Long">
delete from sys_dict_data where dict_code in
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
#{dictCode}
</foreach>
</delete>
<update id="updateDictData" parameterType="SysDictData">
update sys_dict_data
<set>
<if test="dictSort != null">dict_sort = #{dictSort},</if>
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
<if test="cssClass != null">css_class = #{cssClass},</if>
<if test="listClass != null">list_class = #{listClass},</if>
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where dict_code = #{dictCode}
</update>
<update id="updateDictDataType" parameterType="String">
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
</update>
<insert id="insertDictData" parameterType="SysDictData">
insert into sys_dict_data(
<if test="dictSort != null">dict_sort,</if>
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
<if test="dictValue != null and dictValue != ''">dict_value,</if>
<if test="dictType != null and dictType != ''">dict_type,</if>
<if test="cssClass != null and cssClass != ''">css_class,</if>
<if test="listClass != null and listClass != ''">list_class,</if>
<if test="isDefault != null and isDefault != ''">is_default,</if>
<if test="status != null">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="dictSort != null">#{dictSort},</if>
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
<if test="dictType != null and dictType != ''">#{dictType},</if>
<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
<if test="listClass != null and listClass != ''">#{listClass},</if>
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
<if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
</mapper>
@@ -0,0 +1,105 @@
<?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.ruoyi.system.mapper.SysDictTypeMapper">
<resultMap type="SysDictType" id="SysDictTypeResult">
<id property="dictId" column="dict_id" />
<result property="dictName" column="dict_name" />
<result property="dictType" column="dict_type" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDictTypeVo">
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
from sys_dict_type
</sql>
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/>
<where>
<if test="dictName != null and dictName != ''">
AND dict_name like concat('%', #{dictName}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="dictType != null and dictType != ''">
AND dict_type like concat('%', #{dictType}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
</select>
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/>
</select>
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/>
where dict_id = #{dictId}
</select>
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/>
where dict_type = #{dictType}
</select>
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/>
where dict_type = #{dictType} limit 1
</select>
<delete id="deleteDictTypeById" parameterType="Long">
delete from sys_dict_type where dict_id = #{dictId}
</delete>
<delete id="deleteDictTypeByIds" parameterType="Long">
delete from sys_dict_type where dict_id in
<foreach collection="array" item="dictId" open="(" separator="," close=")">
#{dictId}
</foreach>
</delete>
<update id="updateDictType" parameterType="SysDictType">
update sys_dict_type
<set>
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where dict_id = #{dictId}
</update>
<insert id="insertDictType" parameterType="SysDictType">
insert into sys_dict_type(
<if test="dictName != null and dictName != ''">dict_name,</if>
<if test="dictType != null and dictType != ''">dict_type,</if>
<if test="status != null">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="dictName != null and dictName != ''">#{dictName},</if>
<if test="dictType != null and dictType != ''">#{dictType},</if>
<if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
</mapper>
@@ -0,0 +1,57 @@
<?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.ruoyi.system.mapper.SysLogininforMapper">
<resultMap type="SysLogininfor" id="SysLogininforResult">
<id property="infoId" column="info_id" />
<result property="userName" column="user_name" />
<result property="status" column="status" />
<result property="ipaddr" column="ipaddr" />
<result property="loginLocation" column="login_location" />
<result property="browser" column="browser" />
<result property="os" column="os" />
<result property="msg" column="msg" />
<result property="loginTime" column="login_time" />
</resultMap>
<insert id="insertLogininfor" parameterType="SysLogininfor">
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
</insert>
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
<where>
<if test="ipaddr != null and ipaddr != ''">
AND ipaddr like concat('%', #{ipaddr}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="userName != null and userName != ''">
AND user_name like concat('%', #{userName}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND login_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND login_time &lt;= #{params.endTime}
</if>
</where>
order by info_id desc
</select>
<delete id="deleteLogininforByIds" parameterType="Long">
delete from sys_logininfor where info_id in
<foreach collection="array" item="infoId" open="(" separator="," close=")">
#{infoId}
</foreach>
</delete>
<update id="cleanLogininfor">
truncate table sys_logininfor
</update>
</mapper>
@@ -0,0 +1,202 @@
<?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.ruoyi.system.mapper.SysMenuMapper">
<resultMap type="SysMenu" id="SysMenuResult">
<id property="menuId" column="menu_id" />
<result property="menuName" column="menu_name" />
<result property="parentName" column="parent_name" />
<result property="parentId" column="parent_id" />
<result property="orderNum" column="order_num" />
<result property="path" column="path" />
<result property="component" column="component" />
<result property="query" column="query" />
<result property="isFrame" column="is_frame" />
<result property="isCache" column="is_cache" />
<result property="menuType" column="menu_type" />
<result property="visible" column="visible" />
<result property="status" column="status" />
<result property="perms" column="perms" />
<result property="icon" column="icon" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
from sys_menu
</sql>
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
<where>
<if test="menuName != null and menuName != ''">
AND menu_name like concat('%', #{menuName}, '%')
</if>
<if test="visible != null and visible != ''">
AND visible = #{visible}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
</where>
order by parent_id, order_num
</select>
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
order by m.parent_id, m.order_num
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
where ur.user_id = #{params.userId}
<if test="menuName != null and menuName != ''">
AND m.menu_name like concat('%', #{menuName}, '%')
</if>
<if test="visible != null and visible != ''">
AND m.visible = #{visible}
</if>
<if test="status != null and status != ''">
AND m.status = #{status}
</if>
order by m.parent_id, m.order_num
</select>
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
left join sys_user u on ur.user_id = u.user_id
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0
order by m.parent_id, m.order_num
</select>
<select id="selectMenuListByRoleId" resultType="Long">
select m.menu_id
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
where rm.role_id = #{roleId}
<if test="menuCheckStrictly">
and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
</if>
order by m.parent_id, m.order_num
</select>
<select id="selectMenuPerms" resultType="String">
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
</select>
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role r on r.role_id = ur.role_id
where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
</select>
<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
where m.status = '0' and rm.role_id = #{roleId}
</select>
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
where menu_id = #{menuId}
</select>
<select id="hasChildByMenuId" resultType="Integer">
select count(1) from sys_menu where parent_id = #{menuId}
</select>
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
</select>
<update id="updateMenu" parameterType="SysMenu">
update sys_menu
<set>
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="path != null and path != ''">path = #{path},</if>
<if test="component != null">component = #{component},</if>
<if test="query != null">`query` = #{query},</if>
<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
<if test="visible != null">visible = #{visible},</if>
<if test="status != null">status = #{status},</if>
<if test="perms !=null">perms = #{perms},</if>
<if test="icon !=null and icon != ''">icon = #{icon},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where menu_id = #{menuId}
</update>
<insert id="insertMenu" parameterType="SysMenu">
insert into sys_menu(
<if test="menuId != null and menuId != 0">menu_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
<if test="menuName != null and menuName != ''">menu_name,</if>
<if test="orderNum != null">order_num,</if>
<if test="path != null and path != ''">path,</if>
<if test="component != null and component != ''">component,</if>
<if test="query != null and query != ''">`query`,</if>
<if test="isFrame != null and isFrame != ''">is_frame,</if>
<if test="isCache != null and isCache != ''">is_cache,</if>
<if test="menuType != null and menuType != ''">menu_type,</if>
<if test="visible != null">visible,</if>
<if test="status != null">status,</if>
<if test="perms !=null and perms != ''">perms,</if>
<if test="icon != null and icon != ''">icon,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="menuId != null and menuId != 0">#{menuId},</if>
<if test="parentId != null and parentId != 0">#{parentId},</if>
<if test="menuName != null and menuName != ''">#{menuName},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="path != null and path != ''">#{path},</if>
<if test="component != null and component != ''">#{component},</if>
<if test="query != null and query != ''">#{query},</if>
<if test="isFrame != null and isFrame != ''">#{isFrame},</if>
<if test="isCache != null and isCache != ''">#{isCache},</if>
<if test="menuType != null and menuType != ''">#{menuType},</if>
<if test="visible != null">#{visible},</if>
<if test="status != null">#{status},</if>
<if test="perms !=null and perms != ''">#{perms},</if>
<if test="icon != null and icon != ''">#{icon},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<delete id="deleteMenuById" parameterType="Long">
delete from sys_menu where menu_id = #{menuId}
</delete>
</mapper>
@@ -0,0 +1,89 @@
<?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.ruoyi.system.mapper.SysNoticeMapper">
<resultMap type="SysNotice" id="SysNoticeResult">
<result property="noticeId" column="notice_id" />
<result property="noticeTitle" column="notice_title" />
<result property="noticeType" column="notice_type" />
<result property="noticeContent" column="notice_content" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectNoticeVo">
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
from sys_notice
</sql>
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
where notice_id = #{noticeId}
</select>
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
<where>
<if test="noticeTitle != null and noticeTitle != ''">
AND notice_title like concat('%', #{noticeTitle}, '%')
</if>
<if test="noticeType != null and noticeType != ''">
AND notice_type = #{noticeType}
</if>
<if test="createBy != null and createBy != ''">
AND create_by like concat('%', #{createBy}, '%')
</if>
</where>
</select>
<insert id="insertNotice" parameterType="SysNotice">
insert into sys_notice (
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
<if test="status != null and status != '' ">status, </if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
<if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
<if test="status != null and status != ''">#{status}, </if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<update id="updateNotice" parameterType="SysNotice">
update sys_notice
<set>
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
<if test="noticeContent != null">notice_content = #{noticeContent}, </if>
<if test="status != null and status != ''">status = #{status}, </if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where notice_id = #{noticeId}
</update>
<delete id="deleteNoticeById" parameterType="Long">
delete from sys_notice where notice_id = #{noticeId}
</delete>
<delete id="deleteNoticeByIds" parameterType="Long">
delete from sys_notice where notice_id in
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
#{noticeId}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,84 @@
<?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.ruoyi.system.mapper.SysOperLogMapper">
<resultMap type="SysOperLog" id="SysOperLogResult">
<id property="operId" column="oper_id" />
<result property="title" column="title" />
<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="operName" column="oper_name" />
<result property="deptName" column="dept_name" />
<result property="operUrl" column="oper_url" />
<result property="operIp" column="oper_ip" />
<result property="operLocation" column="oper_location" />
<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" />
<result property="costTime" column="cost_time" />
</resultMap>
<sql id="selectOperLogVo">
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
from sys_oper_log
</sql>
<insert id="insertOperlog" parameterType="SysOperLog">
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
</insert>
<select id="selectOperLogList" parameterType="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 oper_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND oper_time &lt;= #{params.endTime}
</if>
</where>
order by oper_id desc
</select>
<delete id="deleteOperLogByIds" parameterType="Long">
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>
</mapper>
@@ -0,0 +1,127 @@
<?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.ruoyi.system.mapper.SysPostMapper">
<resultMap type="SysPost" id="SysPostResult">
<id property="postId" column="post_id" />
<result property="postCode" column="post_code" />
<result property="postName" column="post_name" />
<result property="postSort" column="post_sort" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectPostVo">
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
from sys_post
</sql>
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
<include refid="selectPostVo"/>
<where>
<if test="postCode != null and postCode != ''">
AND post_code like concat('%', #{postCode}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="postName != null and postName != ''">
AND post_name like concat('%', #{postName}, '%')
</if>
</where>
</select>
<select id="selectPostAll" resultMap="SysPostResult">
<include refid="selectPostVo"/>
</select>
<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
<include refid="selectPostVo"/>
where post_id = #{postId}
</select>
<select id="selectPostByPostCode" parameterType="String" resultMap="SysPostResult">
<include refid="selectPostVo"/>
where post_code = #{postCode}
</select>
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
select p.post_id
from sys_post p
left join sys_user_post up on up.post_id = p.post_id
left join sys_user u on u.user_id = up.user_id
where u.user_id = #{userId}
</select>
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
select p.post_id, p.post_name, p.post_code
from sys_post p
left join sys_user_post up on up.post_id = p.post_id
left join sys_user u on u.user_id = up.user_id
where u.user_name = #{userName}
</select>
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
<include refid="selectPostVo"/>
where post_name=#{postName} limit 1
</select>
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
<include refid="selectPostVo"/>
where post_code=#{postCode} limit 1
</select>
<update id="updatePost" parameterType="SysPost">
update sys_post
<set>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="postName != null and postName != ''">post_name = #{postName},</if>
<if test="postSort != null">post_sort = #{postSort},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where post_id = #{postId}
</update>
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
insert into sys_post(
<if test="postId != null and postId != 0">post_id,</if>
<if test="postCode != null and postCode != ''">post_code,</if>
<if test="postName != null and postName != ''">post_name,</if>
<if test="postSort != null">post_sort,</if>
<if test="status != null and status != ''">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="postId != null and postId != 0">#{postId},</if>
<if test="postCode != null and postCode != ''">#{postCode},</if>
<if test="postName != null and postName != ''">#{postName},</if>
<if test="postSort != null">#{postSort},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<delete id="deletePostById" parameterType="Long">
delete from sys_post where post_id = #{postId}
</delete>
<delete id="deletePostByIds" parameterType="Long">
delete from sys_post where post_id in
<foreach collection="array" item="postId" open="(" separator="," close=")">
#{postId}
</foreach>
</delete>
</mapper>
@@ -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.ruoyi.system.mapper.SysRoleDeptMapper">
<resultMap type="SysRoleDept" id="SysRoleDeptResult">
<result property="roleId" column="role_id" />
<result property="deptId" column="dept_id" />
</resultMap>
<delete id="deleteRoleDeptByRoleId" parameterType="Long">
delete from sys_role_dept where role_id=#{roleId}
</delete>
<select id="selectCountRoleDeptByDeptId" resultType="Integer">
select count(1) from sys_role_dept where dept_id=#{deptId}
</select>
<delete id="deleteRoleDept" parameterType="Long">
delete from sys_role_dept where role_id in
<foreach collection="array" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
</delete>
<insert id="batchRoleDept">
insert into sys_role_dept(role_id, dept_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.roleId},#{item.deptId})
</foreach>
</insert>
</mapper>
@@ -0,0 +1,155 @@
<?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.ruoyi.system.mapper.SysRoleMapper">
<resultMap type="SysRole" id="SysRoleResult">
<id property="roleId" column="role_id" />
<result property="roleName" column="role_name" />
<result property="roleKey" column="role_key" />
<result property="roleSort" column="role_sort" />
<result property="dataScope" column="data_scope" />
<result property="menuCheckStrictly" column="menu_check_strictly" />
<result property="deptCheckStrictly" column="dept_check_strictly" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectRoleVo">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
r.status, r.del_flag, r.create_time, r.remark
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id
left join sys_dept d on u.dept_id = d.dept_id
</sql>
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
where r.del_flag = '0'
<if test="roleId != null and roleId != 0">
AND r.role_id = #{roleId}
</if>
<if test="roleName != null and roleName != ''">
AND r.role_name like concat('%', #{roleName}, '%')
</if>
<if test="status != null and status != ''">
AND r.status = #{status}
</if>
<if test="roleKey != null and roleKey != ''">
AND r.role_key like concat('%', #{roleKey}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
order by r.role_sort
</select>
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
WHERE r.del_flag = '0' and ur.user_id = #{userId}
</select>
<select id="selectRoleAll" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
</select>
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
select r.role_id
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id
where u.user_id = #{userId}
</select>
<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
where r.role_id = #{roleId}
</select>
<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
WHERE r.del_flag = '0' and u.user_name = #{userName}
</select>
<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
where r.role_name=#{roleName} and r.del_flag = '0' limit 1
</select>
<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
</select>
<select id="selectRoleIdByName" resultType="java.lang.Long" >
select role_id from sys_role where role_name=#{roleName}
</select>
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
insert into sys_role(
<if test="roleId != null and roleId != 0">role_id,</if>
<if test="roleName != null and roleName != ''">role_name,</if>
<if test="roleKey != null and roleKey != ''">role_key,</if>
<if test="roleSort != null">role_sort,</if>
<if test="dataScope != null and dataScope != ''">data_scope,</if>
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
<if test="deptCheckStrictly != null">dept_check_strictly,</if>
<if test="status != null and status != ''">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="roleId != null and roleId != 0">#{roleId},</if>
<if test="roleName != null and roleName != ''">#{roleName},</if>
<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
<if test="roleSort != null">#{roleSort},</if>
<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<update id="updateRole" parameterType="SysRole">
update sys_role
<set>
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
<if test="roleSort != null">role_sort = #{roleSort},</if>
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where role_id = #{roleId}
</update>
<delete id="deleteRoleById" parameterType="Long">
update sys_role set del_flag = '2' where role_id = #{roleId}
</delete>
<delete id="deleteRoleByIds" parameterType="Long">
update sys_role set del_flag = '2' where role_id in
<foreach collection="array" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
</delete>
</mapper>
@@ -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.ruoyi.system.mapper.SysRoleMenuMapper">
<resultMap type="SysRoleMenu" id="SysRoleMenuResult">
<result property="roleId" column="role_id" />
<result property="menuId" column="menu_id" />
</resultMap>
<select id="checkMenuExistRole" resultType="Integer">
select count(1) from sys_role_menu where menu_id = #{menuId}
</select>
<delete id="deleteRoleMenuByRoleId" parameterType="Long">
delete from sys_role_menu where role_id=#{roleId}
</delete>
<delete id="deleteRoleMenu" parameterType="Long">
delete from sys_role_menu where role_id in
<foreach collection="array" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
</delete>
<insert id="batchRoleMenu">
insert into sys_role_menu(role_id, menu_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.roleId},#{item.menuId})
</foreach>
</insert>
</mapper>
@@ -0,0 +1,339 @@
<?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.ruoyi.system.mapper.SysUserMapper">
<resultMap type="SysUser" id="SysUserResult">
<id property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="userName" column="user_name" />
<result property="nickName" column="nick_name" />
<result property="idCard" column="id_card" />
<result property="email" column="email" />
<result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" />
<result property="avatar" column="avatar" />
<result property="password" column="password" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="loginIp" column="login_ip" />
<result property="loginDate" column="login_date" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<association property="dept" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap>
<resultMap id="deptResult" type="SysDept">
<id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" />
<result property="deptName" column="dept_name" />
<result property="ancestors" column="ancestors" />
<result property="orderNum" column="order_num" />
<result property="leader" column="leader" />
<result property="status" column="dept_status" />
</resultMap>
<resultMap id="RoleResult" type="SysRole">
<id property="roleId" column="role_id" />
<result property="roleName" column="role_name" />
<result property="roleKey" column="role_key" />
<result property="roleSort" column="role_sort" />
<result property="dataScope" column="data_scope" />
<result property="status" column="role_status" />
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name,
d.leader , r.role_id, r.role_name, d.dept_id
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
</if>
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="status != null and status != ''">
AND u.status = #{status}
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
where u.del_flag = '0' and r.role_id = #{roleId}
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/>
where u.user_name = #{userName} and u.del_flag = '0'
</select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
<include refid="selectUserVo"/>
where u.user_id = #{userId}
</select>
<select id="selectUserByDeptId" parameterType="Long" resultMap="SysUserResult">
SELECT ud.user_id , ud.nick_name ,ud.phonenumber ,ud.dept_id ,d.dept_name
FROM (SELECT u.user_id , u.nick_name ,u.phonenumber ,u.dept_id
FROM sys_user_post up left join sys_user u on u.user_id = up.user_id
left join sys_post sp on up.post_id = sp.post_id
where sp.post_code = 'jbr') ud left join sys_dept d on ud.dept_id = d.dept_id
where d.dept_id = #{deptId}
</select>
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
</select>
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
</select>
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select>
<select id="selectUserListByAdRole" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
join sys_user_role ur on ur.user_id =u.user_id
join sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
where r.del_flag = '0' and r.status='0'
and u.del_flag = '0' and u.status='0'
<if test="arbitratorName != null and arbitratorName != ''">
AND u.nick_name like concat('%', #{arbitratorName}, '%')
</if>
<if test="idList != null and idList.size() > 0">
AND u.user_id in
<foreach item="id" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="selectUserListByIds" resultMap="SysUserResult">
select u.user_id, u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from sys_user u
<where>
<if test="idList != null and idList.size() > 0">
AND u.user_id in
<foreach item="id" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
</select>
<select id="selectUserByIdCard" parameterType="String" resultMap="SysUserResult">
select u.*,d.dept_name,ur.role_id
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
</select>
<select id="selectUserByPhone" parameterType="String" resultMap="SysUserResult">
select u.*,d.dept_name,ur.role_id
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
where u.phonenumber = #{phone} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
</select>
<select id="selectByDeptIdAndRole" resultMap="SysUserResult">
select u.* from
sys_user u
join sys_user_role ur on u.user_id = ur.user_id
join sys_role r on ur.role_id = r.role_id
where u.dept_id = #{deptId} and r.role_name = #{roleName} and u.del_flag = '0' and r.del_flag='0'
</select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if>
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="idCard != null and idCard != ''">id_card,</if>
<if test="email != null and email != ''">email,</if>
<if test="avatar != null and avatar != ''">avatar,</if>
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
<if test="sex != null and sex != ''">sex,</if>
<if test="password != null and password != ''">password,</if>
<if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if>
create_time
)values(
<if test="userId != null and userId != ''">#{userId},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="idCard != null and idCard != ''">#{idCard},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
<if test="sex != null and sex != ''">#{sex},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
sysdate()
)
</insert>
<insert id="batchSave">
insert into sys_user(
user_id,
dept_id,
user_name,
nick_name,
id_card,
email,
avatar,
phonenumber,
sex,
password,
status,
create_by,
remark,
create_time
)values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.userId},
#{item.deptId},
#{item.userName},
#{item.nickName},
#{item.idCard},
#{item.email},
#{item.avatar},
#{item.phonenumber},
#{item.sex},
#{item.password},
#{item.status},
#{item.createBy},
#{item.remark},
sysdate()
)
</foreach>;
</insert>
<update id="updateUser" parameterType="SysUser">
update sys_user
<set>
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
<if test="email != null ">email = #{email},</if>
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if>
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
<if test="password != null and password != ''">password = #{password},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
<if test="loginDate != null">login_date = #{loginDate},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
update_time = sysdate()
</set>
where user_id = #{userId}
</update>
<update id="updateUserStatus" parameterType="SysUser">
update sys_user set status = #{status} where user_id = #{userId}
</update>
<update id="updateUserAvatar" parameterType="SysUser">
update sys_user set avatar = #{avatar} where user_name = #{userName}
</update>
<update id="resetUserPwd" parameterType="SysUser">
update sys_user set password = #{password} where user_name = #{userName}
</update>
<delete id="deleteUserById" parameterType="Long">
update sys_user set del_flag = '2' where user_id = #{userId}
</delete>
<delete id="deleteUserByIds" parameterType="Long">
update sys_user set del_flag = '2' where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
<select id="selectRoleUserByDeptId" parameterType="long" resultMap="SysUserResult">
SELECT u.* FROM sys_user u
INNER JOIN sys_user_role ur ON u.user_id = ur.user_id
INNER JOIN sys_dept d ON u.dept_id = d.dept_id
WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
</select>
</mapper>
@@ -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.ruoyi.system.mapper.SysUserPostMapper">
<resultMap type="SysUserPost" id="SysUserPostResult">
<result property="userId" column="user_id" />
<result property="postId" column="post_id" />
</resultMap>
<delete id="deleteUserPostByUserId" parameterType="Long">
delete from sys_user_post where user_id=#{userId}
</delete>
<select id="countUserPostById" resultType="Integer">
select count(1) from sys_user_post where post_id=#{postId}
</select>
<delete id="deleteUserPost" parameterType="Long">
delete from sys_user_post where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
<insert id="batchUserPost">
insert into sys_user_post(user_id, post_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.postId})
</foreach>
</insert>
</mapper>
@@ -0,0 +1,44 @@
<?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.ruoyi.system.mapper.SysUserRoleMapper">
<resultMap type="SysUserRole" id="SysUserRoleResult">
<result property="userId" column="user_id" />
<result property="roleId" column="role_id" />
</resultMap>
<delete id="deleteUserRoleByUserId" parameterType="Long">
delete from sys_user_role where user_id=#{userId}
</delete>
<select id="countUserRoleByRoleId" resultType="Integer">
select count(1) from sys_user_role where role_id=#{roleId}
</select>
<delete id="deleteUserRole" parameterType="Long">
delete from sys_user_role where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
<insert id="batchUserRole">
insert into sys_user_role(user_id, role_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.roleId})
</foreach>
</insert>
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
</delete>
<delete id="deleteUserRoleInfos">
delete from sys_user_role where role_id=#{roleId} and user_id in
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,109 @@
<?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.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper">
<resultMap type="ArbitrateRecord" id="ArbitrateRecordResult">
<id property="id" column="id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="evidenDetermi" column="eviden_determi" />
<result property="factDetermi" column="fact_determi" />
<result property="caseSketch" column="case_sketch" />
<result property="arbitrateThink" column="arbitrate_think" />
<result property="rulingFollows" column="ruling_follows" />
<result property="verificaOpinion" column="verifica_opinion" />
<result property="checkOpinion" column="check_opinion" />
<result property="annexId" column="annex_id" />
<result property="caseFocus" column="case_focus" />
<result property="caseFacts" column="case_facts" />
<result property="respondentOpinion" column="respondent_opinion" />
<result property="applicantOpinion" column="applicant_opinion" />
</resultMap>
<insert id="insertArbitrateRecord" parameterType="ArbitrateRecord" useGeneratedKeys="true" keyProperty="id">
insert into arbitrate_record(
<if test="caseAppliId != null">case_appli_id,</if>
<if test="evidenDetermi != null and evidenDetermi != ''">eviden_determi,</if>
<if test="factDetermi != null and factDetermi != ''">fact_determi,</if>
<if test="caseSketch != null and caseSketch != ''">case_sketch,</if>
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows,</if>
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion,</if>
<if test="arbitrateThink != null and arbitrateThink != ''">arbitrate_think,</if>
<if test="checkOpinion != null and checkOpinion != ''">check_opinion,</if>
<if test="caseCheckReject != null and caseCheckReject != ''">case_check_reject,</if>
<if test="arbitrateReject != null and arbitrateReject != ''">arbitrate_reject,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
case_focus,
case_facts,
respondent_opinion,
applicant_opinion,
create_time
)values(
<if test="caseAppliId != null ">#{caseAppliId},</if>
<if test="evidenDetermi != null and evidenDetermi != ''">#{evidenDetermi},</if>
<if test="factDetermi != null and factDetermi != ''">#{factDetermi},</if>
<if test="caseSketch != null and caseSketch != ''">#{caseSketch},</if>
<if test="rulingFollows != null and rulingFollows != ''">#{rulingFollows},</if>
<if test="verificaOpinion != null and verificaOpinion != ''">#{verificaOpinion},</if>
<if test="arbitrateThink != null and arbitrateThink != ''">#{arbitrateThink},</if>
<if test="checkOpinion != null and checkOpinion != ''">#{checkOpinion},</if>
<if test="caseCheckReject != null and caseCheckReject != ''">#{caseCheckReject},</if>
<if test="arbitrateReject != null and arbitrateReject != ''">#{arbitrateReject},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
#{caseFocus},
#{caseFacts},
#{respondentOpinion},
#{applicantOpinion},
sysdate()
)
</insert>
<update id="updataArbitrateRecord" parameterType="ArbitrateRecord">
update arbitrate_record
<set>
<if test="evidenDetermi != null and evidenDetermi != ''">eviden_determi = #{evidenDetermi},</if>
<if test="factDetermi != null and factDetermi != ''">fact_determi = #{factDetermi},</if>
<if test="caseSketch != null and caseSketch != ''">case_sketch = #{caseSketch},</if>
<if test="arbitrateThink != null and arbitrateThink != ''">arbitrate_think = #{arbitrateThink},</if>
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows = #{rulingFollows},</if>
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion = #{verificaOpinion},</if>
<if test="checkOpinion != null and checkOpinion != ''">check_opinion = #{checkOpinion},</if>
<if test="arbitraCheckOpinion != null and arbitraCheckOpinion != ''">arbitra_check_opinion = #{arbitraCheckOpinion},</if>
<if test="annexId != null ">annex_id = #{annexId},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="caseFocus != null and caseFocus != ''">case_focus = #{caseFocus},</if>
<if test="caseFacts != null and caseFacts != ''">case_facts = #{caseFacts},</if>
<if test="respondentOpinion != null and respondentOpinion != ''">respondent_opinion = #{respondentOpinion},</if>
<if test="applicantOpinion != null and applicantOpinion != ''">applicant_opinion = #{applicantOpinion},</if>
<if test="caseCheckReject != null and caseCheckReject != ''">case_check_reject = #{caseCheckReject},</if>
<if test="arbitrateReject != null and arbitrateReject != ''">arbitrate_reject = #{arbitrateReject},</if>
<if test="deptorReject != null and deptorReject != ''">deptor_reject = #{deptorReject},</if>
update_time = sysdate()
</set>
where id = #{id}
</update>
<select id="selectArbitrateRecord" parameterType="ArbitrateRecord" resultMap="ArbitrateRecordResult">
SELECT a.id ,a.case_appli_id ,a.eviden_determi ,a.fact_determi ,a.case_sketch ,a.arbitrate_think ,a.ruling_follows ,
a.verifica_opinion ,a.check_opinion,a.annex_id,a.case_focus,a.case_facts,a.respondent_opinion,a.applicant_opinion,
a.case_check_reject ,a.arbitrate_reject,a.deptor_reject
from arbitrate_record a
<where>
<if test="caseAppliId != null ">
AND a.case_appli_id = #{caseAppliId}
</if>
</where>
</select>
</mapper>
@@ -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.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper">
<resultMap type="Arbitrator" id="ArbitratorResult">
<id property="id" column="id" />
<result property="arbitratorName" column="arbitrator_name" />
<result property="title" column="title" />
<result property="career" column="career" />
<result property="professiClassifi" column="professi_classifi" />
<result property="education" column="education" />
<result property="area" column="area" />
<result property="telephone" column="telephone" />
<result property="currentCaseNum" column="current_case_num" />
<result property="closedCaseNum" column="closed_case_num" />
</resultMap>
<select id="selectArbitratorList" parameterType="Arbitrator" resultMap="ArbitratorResult">
select a.id ,a.arbitrator_name ,a.title ,a.career ,a.professi_classifi ,
a.education ,a.area ,a.telephone ,a.current_case_num ,a.closed_case_num
from arbitrator a
<where>
<if test="arbitratorName != null and arbitratorName != ''">
AND a.arbitrator_name like concat('%', #{arbitratorName}, '%')
</if>
<if test="idList != null and idList.size() > 0">
AND a.id in
<foreach item="id" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
</select>
</mapper>
@@ -0,0 +1,137 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseAffiliateLogMapper">
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate" id="CaseAffiliateResult">
<id property="id" column="id" />
<result property="caseAppliLogId" column="case_appli_log_id" />
<result property="identityType" column="identity_type" />
<result property="name" column="name" />
<result property="identityNum" column="identity_num" />
<result property="workTelphone" column="work_telphone" />
<result property="contactTelphone" column="contact_telphone" />
<result property="contactAddress" column="contact_address" />
<result property="workAddress" column="work_address" />
<result property="nameAgent" column="name_agent" />
<result property="identityNumAgent" column="identity_num_agent" />
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
<result property="contactAddressAgent" column="contact_address_agent" />
<result property="trackNum" column="track_num" />
<result property="applicationOrganId" column="application_organ_id" />
<result property="applicationOrganName" column="application_organ_name" />
<result property="compLegalPerson" column="comp_legal_person" />
<result property="compLegalperPost" column="comp_legalper_post" />
<result property="responSex" column="respon_sex" />
<result property="responBirth" column="respon_birth" />
<result property="residenAffili" column="residen_affili" />
<result property="appliAgentTitle" column="appli_agent_title" />
<result property="userId" column="user_id" />
<result property="email" column="email" />
<result property="sendEmail" column="send_email" />
<result property="applicantAgentUserId" column="applicant_agent_user_id" />
<result property="agentEmail" column="agent_email" />
</resultMap>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
select c.*,s.user_id
from case_affiliate_log c
left join sys_user s on c.identity_num=s.id_card
<where>
<if test="caseAppliLogId != null ">
AND c.case_appli_log_id = #{caseAppliLogId}
</if>
</where>
</select>
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
select c.*
from case_affiliate_log c
<where>
<if test="caseAppliLogId != null ">
AND c.case_appli_log_id = #{caseAppliLogId}
</if>
<if test="identityType != null ">
AND c.identity_type = #{identityType}
</if>
</where>
</select>
<insert id="batchCaseAffiliate">
insert into case_affiliate_log(case_appli_log_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
residen_affili,appli_agent_title,
contact_address_agent,email , send_email,track_num,applicant_agent_user_id,agent_email) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliLogId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
#{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex}, #{item.responBirth},
#{item.residenAffili},#{item.appliAgentTitle},
#{item.contactAddressAgent},
#{item.email},
#{item.sendEmail},
#{item.trackNum},
#{item.applicantAgentUserId},
#{item.agentEmail}
)
</foreach>;
</insert>
<update id="updataCaseAffiliate" parameterType="CaseAffiliate">
update case_affiliate_log
set
case_appli_log_id=#{caseAppliLogId},
identity_type= #{identityType},
application_organ_id= #{applicationOrganId},
application_organ_name= #{applicationOrganName},
name = #{name},
identity_num = #{identityNum},
contact_telphone = #{contactTelphone},
contact_address = #{contactAddress},
work_address = #{workAddress},
work_telphone = #{workTelphone},
name_agent = #{nameAgent},
identity_num_agent = #{identityNumAgent},
contact_telphone_agent = #{contactTelphoneAgent},
contact_address_agent = #{contactAddressAgent},
send_email = #{sendEmail},
residen_affili = #{residenAffili},
email= #{email},
track_num = #{trackNum},
comp_legal_person=#{compLegalPerson},
comp_legalper_post=#{compLegalperPost},
applicant_agent_user_id=#{applicantAgentUserId},
respon_sex=#{responSex},
respon_birth=#{responBirth},
residen_affili=#{residenAffili},
appli_agent_title=#{appliAgentTitle}
<if test="agentEmail !=null and agentEmail!=''">
,agent_email=#{agentEmail}
</if>
where id = #{id}
</update>
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
delete from case_affiliate_log where case_appli_log_id = #{caseAppliLogId}
</delete>
<delete id="batchDeletecaseAffiliate">
delete from case_affiliate_log where case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,204 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper">
<resultMap type="CaseAffiliate" id="CaseAffiliateResult">
<id property="id" column="id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="identityType" column="identity_type" />
<result property="name" column="name" />
<result property="identityNum" column="identity_num" />
<result property="workTelphone" column="work_telphone" />
<result property="contactTelphone" column="contact_telphone" />
<result property="contactAddress" column="contact_address" />
<result property="workAddress" column="work_address" />
<result property="nameAgent" column="name_agent" />
<result property="identityNumAgent" column="identity_num_agent" />
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
<result property="contactAddressAgent" column="contact_address_agent" />
<result property="trackNum" column="track_num" />
<result property="applicationOrganId" column="application_organ_id" />
<result property="applicationOrganName" column="application_organ_name" />
<result property="compLegalPerson" column="comp_legal_person" />
<result property="compLegalperPost" column="comp_legalper_post" />
<result property="responSex" column="respon_sex" />
<result property="responBirth" column="respon_birth" />
<result property="residenAffili" column="residen_affili" />
<result property="appliAgentTitle" column="appli_agent_title" />
<result property="userId" column="user_id" />
<result property="email" column="email" />
<result property="sendEmail" column="send_email" />
<result property="applicantAgentUserId" column="applicant_agent_user_id" />
<result property="agentEmail" column="agent_email" />
</resultMap>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
select distinct (c.id),
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
c.residen_affili,appli_agent_title,
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
from case_affiliate c
left join sys_user s on c.identity_num=s.id_card
<where>
<if test="caseAppliId != null ">
AND c.case_appli_id = #{caseAppliId}
</if>
</where>
</select>
<select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
select (c.id),
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
c.residen_affili,appli_agent_title,
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
from case_affiliate c
left join sys_user s on c.identity_num=s.id_card
<where>
<if test="ids != null ">
case_appli_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
select c.*
from case_affiliate c
<where>
<if test="caseAppliId != null ">
AND c.case_appli_id = #{caseAppliId}
</if>
<if test="identityType != null ">
AND c.identity_type = #{identityType}
</if>
</where>
</select>
<select id="emailByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate">
select c.identity_type identityType,c.email
from case_affiliate c
where c.case_appli_id=#{caseAppliId}
</select>
<insert id="batchCaseAffiliate">
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
residen_affili,appli_agent_title,
contact_address_agent,email, send_email,track_num,applicant_agent_user_id,agent_email) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
#{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex}, #{item.responBirth},
#{item.residenAffili},#{item.appliAgentTitle},
#{item.contactAddressAgent},
#{item.email},
#{item.sendEmail},
#{item.trackNum},
#{item.applicantAgentUserId},
#{item.agentEmail}
)
</foreach>
</insert>
<update id="updataCaseAffiliate" parameterType="CaseAffiliate">
update case_affiliate
set
case_appli_id=#{caseAppliId},
identity_type= #{identityType},
application_organ_id= #{applicationOrganId},
application_organ_name= #{applicationOrganName},
name = #{name},
identity_num = #{identityNum},
contact_telphone = #{contactTelphone},
contact_address = #{contactAddress},
work_address = #{workAddress},
work_telphone = #{workTelphone},
name_agent = #{nameAgent},
identity_num_agent = #{identityNumAgent},
contact_telphone_agent = #{contactTelphoneAgent},
contact_address_agent = #{contactAddressAgent},
send_email = #{sendEmail},
residen_affili = #{residenAffili},
email= #{email},
track_num = #{trackNum},
comp_legal_person=#{compLegalPerson},
comp_legalper_post=#{compLegalperPost},
applicant_agent_user_id=#{applicantAgentUserId},
respon_sex=#{responSex},
respon_birth=#{responBirth},
residen_affili=#{residenAffili},
appli_agent_title=#{appliAgentTitle}
<if test="agentEmail !=null and agentEmail!=''">
,agent_email=#{agentEmail}
</if>
where id = #{id}
</update>
<update id="updateCaseAffiliateByCaseId">
<foreach collection="list" item="item" >
update case_affiliate
<set>
application_organ_id= #{item.applicationOrganId},
application_organ_name= #{item.applicationOrganName},
name = #{item.name},
identity_num = #{item.identityNum},
contact_telphone = #{item.contactTelphone},
contact_address = #{item.contactAddress},
work_address = #{item.workAddress},
work_telphone = #{item.workTelphone},
name_agent = #{item.nameAgent},
identity_num_agent = #{item.identityNumAgent},
contact_telphone_agent = #{item.contactTelphoneAgent},
contact_address_agent = #{item.contactAddressAgent},
send_email = #{item.sendEmail},
residen_affili = #{item.residenAffili},
email= #{item.email},
track_num = #{item.trackNum},
comp_legal_person=#{item.compLegalPerson},
comp_legalper_post=#{item.compLegalperPost},
applicant_agent_user_id=#{item.applicantAgentUserId},
respon_sex=#{item.responSex},
respon_birth=#{item.responBirth},
residen_affili=#{item.residenAffili},
appli_agent_title=#{item.appliAgentTitle}
<if test="agentEmail !=null and agentEmail!=''">
,agent_email=#{agentEmail}
</if>
</set>
where case_appli_id = #{caseAppliId} and identity_type= #{item.identityType};
</foreach>
</update>
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
delete from case_affiliate where case_appli_id = #{id}
</delete>
<delete id="batchDeletecaseAffiliate">
delete from case_affiliate where case_appli_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<delete id="deleteByCaseId">
delete from case_affiliate where case_appli_id = #{caseAppliId}
</delete>
</mapper>
@@ -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.ruoyi.wisdomarbitrate.mapper.CaseApplicationLogMapper">
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseApplication" id="CaseApplicationResult">
<id property="id" column="id" />
<result property="caseAppliId" column="caseAppliId" />
<result property="caseNum" column="case_num" />
<result property="caseName" column="case_name" />
<result property="caseSubjectAmount" column="case_subject_amount" />
<result property="registerDate" column="register_date" />
<result property="arbitratMethod" column="arbitrat_method" />
<result property="caseStatus" column="case_status" />
<result property="hearDate" column="hear_date" />
<result property="arbitratClaims" column="arbitrat_claims" />
<result property="loanStartDate" column="loan_start_date" />
<result property="loanEndDate" column="loan_end_date" />
<result property="claimPrinciOwed" column="claim_princi_owed" />
<result property="claimInterestOwed" column="claim_interest_owed" />
<result property="claimLiquidDamag" column="claim_liquid_damag" />
<result property="feePayable" column="fee_payable" />
<result property="beginVideoDate" column="begin_video_date" />
<result property="onlineVideoPerson" column="online_video_person" />
<result property="contractNumber" column="contract_number" />
<result property="caseStatusName" column="caseStatusName" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="arbitratMethodName" column="arbitratMethodName" />
<result property="isAbsence" column="is_absence" />
<result property="responCrossOpin" column="respon_cross_opin" />
<result property="applicaCrossOpin" column="applica_cross_opin" />
<result property="responDefenOpini" column="respon_defen_opini" />
<result property="arbitratorId" column="arbitrator_id" />
<result property="arbitratorName" column="arbitrator_name" />
<result property="paymentStatus" column="payment_status" />
<result property="paymentStatusName" column="paymentStatusName" />
<result property="filearbitraUrl" column="filearbitra_url" />
<result property="requestRule" column="request_rule" />
<result property="properPreser" column="proper_preser" />
<result property="adjudicaCounter" column="adjudica_counter" />
<result property="lockStatus" column="lock_status" />
<result property="version" column="version" />
<result property="updateSubmitStatus" column="update_submit_status" />
<result property="properPreser" column="proper_preser" />
<result property="interestRate" column="interest_rate" />
<result property="outstandingMoney" column="outstanding_money" />
<result property="facts" column="facts" />
<result property="partyA" column="party_a" />
<result property="disputes" column="disputes" />
<result property="loanType" column="loan_type" />
<result property="loanTerm" column="loan_term" />
<result property="mediationAgreement" column="mediation_agreement" />
</resultMap>
<insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
insert into case_application_log(
<if test="caseLogId != null ">id ,</if>
<if test="caseAppliId != null ">case_appli_id ,</if>
<if test="caseName != null and caseName != ''">case_name ,</if>
<if test="caseNum != null and caseNum != ''">case_num,</if>
<if test="caseSubjectAmount != null">case_subject_amount,</if>
<if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
<if test="requestRule != null and requestRule != ''">request_rule,</if>
<if test="loanStartDate != null ">loan_start_date,</if>
<if test="loanEndDate != null ">loan_end_date,</if>
<if test="claimPrinciOwed != null ">claim_princi_owed,</if>
<if test="claimInterestOwed != null ">claim_interest_owed,</if>
<if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
<if test="feePayable != null ">fee_payable,</if>
<if test="contractNumber != null and contractNumber != ''">contract_number,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="version != null ">version,</if>
<if test="updateSubmitStatus != null ">update_submit_status,</if>
<if test="properPreser != null ">proper_preser,</if>
interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement,
create_time
)values(
<if test="caseLogId != null ">#{id} ,</if>
<if test="caseAppliId != null">#{caseAppliId},</if>
<if test="caseName != null and caseName != ''">#{caseName},</if>
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
<if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
<if test="requestRule != null and requestRule != ''">#{requestRule},</if>
<if test="loanStartDate != null ">#{loanStartDate},</if>
<if test="loanEndDate != null ">#{loanEndDate},</if>
<if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
<if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
<if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
<if test="feePayable != null ">#{feePayable},</if>
<if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="version != null ">#{version},</if>
<if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
<if test="properPreser != null ">#{properPreser},</if>
#{interestRate},
#{outstandingMoney},
#{facts},
#{partyA},
#{disputes},
#{loanType},
#{loanTerm},
#{mediationAgreement},
sysdate()
)
</insert>
<insert id="batchSave">
insert into case_application_log(
id,
case_appli_id ,
case_name ,
case_num,
case_subject_amount,
arbitrat_claims,
request_rule,
loan_start_date,
loan_end_date,
claim_princi_owed,
claim_interest_owed,
claim_liquid_damag,
fee_payable,
contract_number,
create_by,
version,
update_submit_status,
proper_preser,
interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement,
create_time
)values
<foreach item="item" index="index" collection="list" separator=",">
(
id=#{item.id},
#{item.caseAppliId},
#{item.caseName},
#{item.caseNum},
#{item.caseSubjectAmount},
#{item.arbitratClaims},
#{item.requestRule},
#{item.loanStartDate},
#{item.loanEndDate},
#{item.claimPrinciOwed},
#{item.claimInterestOwed},
#{item.claimLiquidDamag},
#{item.feePayable},
#{item.contractNumber},
#{item.createBy},
#{item.version},
#{item.updateSubmitStatus},
#{item.properPreser},
#{item.interestRate},
#{item.outstandingMoney},
#{item.facts},
#{item.partyA},
#{item.disputes},
#{item.loanType},
#{item.loanTerm},
#{item.mediationAgreement},
sysdate()
)
</foreach>
</insert>
<update id="updateStatus">
update case_application_log
<set>
<if test="updateSubmitStatus!= null ">update_submit_status=#{updateSubmitStatus},</if>
</set>
<where>
<if test="caseId!= null ">AND case_appli_id=#{caseId}</if>
<if test="version!= null ">AND version=#{version}</if>
</where>
</update>
<delete id="deleteById" >
DELETE FROM case_application_log
WHERE id = #{id}
</delete>
<delete id="batchDeleteLog">
delete from case_application_log l where l.id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
delete from case_affiliate_log l where l.case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
delete from case_attach_log l where l.case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
delete from column_value_log l where l.case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
</delete>
<select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} and version=#{version}
</select>
<select id="selectLatestCase" resultMap="CaseApplicationResult">
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
</select>
<select id="selectMaxVersionByCaseId" resultType="java.lang.Integer">
SELECT max(version)
FROM case_application_log
WHERE case_appli_id = #{caseAppliId}
</select>
<select id="selectMaxVersionBySecret" resultType="java.lang.Integer">
SELECT max(version)
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
</select>
<select id="selectBeforeCase" resultMap="CaseApplicationResult">
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement
FROM case_application_log
WHERE case_appli_id = #{caseId} and version &lt; #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
</select>
<select id="selectLogsByCaseIds" resultType="java.lang.Long">
select id from case_application_log where case_appli_id in
<foreach collection="ids" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</select>
</mapper>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,108 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseAttachLogMapper">
<resultMap type="CaseAttach" id="CaseAttachResult">
<id property="annexId" column="annex_id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="annexName" column="annex_name" />
<result property="annexPath" column="annex_path" />
<result property="annexType" column="annex_type" />
<result property="note" column="note" />
<result property="userId" column="use_id" />
<result property="userName" column="use_account" />
<result property="sealStatus" column="seal_status" />
<result property="caseAppliLogId" column="case_appli_log_id" />
</resultMap>
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
VALUES (#{caseAppliLogId},#{annexId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
</insert>
<insert id="batchSave">
INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
VALUES
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliLogId},#{item.annexId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.userId},#{item.userName},#{item.sealStatus})
</foreach>
</insert>
<delete id="deleteByFileIds">
delete from case_attach_log
where annex_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach_log
where case_appli_log_id =#{id}
</select>
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach_log
<where>
<if test="caseAppliLogId != null ">
AND case_appli_log_id = #{caseAppliLogId}
</if>
<if test="annexType != null ">
AND annex_type = #{annexType}
</if>
</where>
</select>
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
select *
from case_attach_log
<where>
<if test="caseLogId != null ">
AND case_appli_log_id = #{caseLogId}
</if>
<if test="annexType != null ">
AND annex_type = #{annexType}
</if>
<if test="annexTypeList != null and annexTypeList.size() > 0">
and annex_type in
<foreach item="annexType" collection="annexTypeList" open="(" separator="," close=")">
#{annexType}
</foreach>
</if>
</where>
</select>
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach_log
<where>
<if test="annexId != null ">
AND annex_id = #{annexId}
</if>
</where>
</select>
<update id="updateCaseAttach" parameterType="CaseAttach">
update case_attach_log
set
case_appli_log_id= #{caseAppliLogId}
where annex_id = #{annexId}
</update>
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
update case_attach_log
<set>
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
</set>
<where>
<if test="caseAppliId != null ">
AND case_appli_log_id = #{caseAppliLogId}
</if>
<if test="annexType != null ">
AND annex_type = #{annexType}
</if>
</where>
</update>
</mapper>
@@ -0,0 +1,124 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper">
<resultMap type="CaseAttach" id="CaseAttachResult">
<id property="annexId" column="annex_id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="annexName" column="annex_name" />
<result property="annexPath" column="annex_path" />
<result property="annexType" column="annex_type" />
<result property="note" column="note" />
<result property="userId" column="use_id" />
<result property="userName" column="use_account" />
<result property="sealStatus" column="seal_status" />
</resultMap>
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus},#{isBatchUpload})
</insert>
<insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
VALUES
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.userId},#{item.userName},#{item.sealStatus},#{item.isBatchUpload})
</foreach>
</insert>
<delete id="deleteByFileIds">
delete from case_attach
where annex_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteByCasedIdAndType">
delete from case_attach
where case_appli_id = #{caseAppliId}
and annex_type = #{annexType}
<if test="isBatchUpload != null ">
AND is_batch_upload = #{isBatchUpload}
</if>
</delete>
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
from case_attach
where case_appli_id =#{id}
</select>
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
from case_attach
<where>
<if test="caseAppliId != null ">
AND case_appli_id = #{caseAppliId}
</if>
<if test="annexType != null ">
AND annex_type = #{annexType}
</if>
</where>
</select>
<delete id="deleteCaseAttachByCasedIdAndType">
delete from case_attach
where case_appli_id = #{caseAppliId}
and annex_type = #{annexType}
</delete>
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
from case_attach
<where>
<if test="id != null ">
AND case_appli_id = #{id}
</if>
<if test="annexType != null ">
AND annex_type = #{annexType}
</if>
<if test="annexTypeList != null and annexTypeList.size() > 0">
and annex_type in
<foreach item="annexType" collection="annexTypeList" open="(" separator="," close=")">
#{annexType}
</foreach>
</if>
</where>
</select>
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach
<where>
<if test="annexId != null ">
AND annex_id = #{annexId}
</if>
</where>
</select>
<update id="updateCaseAttach" parameterType="CaseAttach">
update case_attach
set
case_appli_id= #{caseAppliId}
where annex_id = #{annexId}
</update>
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
update case_attach
<set>
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
</set>
<where>
<if test="caseAppliId != null ">
AND case_appli_id = #{caseAppliId}
</if>
<if test="annexType != null ">
AND annex_type = #{annexType}
</if>
</where>
</update>
</mapper>
@@ -0,0 +1,79 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseEvidenceDirectoryMapper">
<resultMap type="CaseEvidenceDirectory" id="CaseEvidenceDirectoryResult">
<id property="id" column="id" />
<result property="parentId" column="parent_id" />
<result property="evidenceName" column="evidence_name" />
<result property="annexId" column="annex_id" />
<result property="series" column="series" />
<result property="caseId" column="case_appli_id" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="annexName" column="annex_name" />
<result property="annexPath" column="annex_path" />
</resultMap>
<insert id="save" parameterType="CaseEvidenceDirectory" useGeneratedKeys="true" keyProperty="id">
insert into case_evidence_directory(
<if test="parentId != null ">parent_id,</if>
<if test="evidenceName != null and evidenceName != ''">evidence_name,</if>
<if test="annexId != null ">annex_id,</if>
<if test="series != null ">series,</if>
<if test="caseId != null ">case_appli_id,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="parentId != null ">#{parentId},</if>
<if test="evidenceName != null and evidenceName != ''">#{evidenceName},</if>
<if test="annexId != null ">#{annexId},</if>
<if test="series != null ">#{series},</if>
<if test="caseId != null ">#{caseId},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<select id="selectList" parameterType="CaseEvidenceDirectory" resultMap="CaseEvidenceDirectoryResult">
select ced.id,ced.parent_id,ced.evidence_name,ced.annex_id,ced.series,ced.create_time
,ced.update_time,ced.case_appli_id,ced.create_by,ced.update_by,ca.annex_name,ca.annex_path
from case_evidence_directory ced
left join case_attach ca on ced.annex_id = ca.annex_id
<where>
<if test="id != null ">
AND ced.id = #{id}
</if>
<if test="parentId != null ">
AND ced.parent_id = #{parentId}
</if>
<if test="evidenceName != null ">
AND ced.evidence_name = #{evidenceName}
</if>
<if test="annexId != null ">
AND ced.annex_id = #{annexId}
</if>
<if test="series != null ">
AND ced.series = #{series}
</if>
<if test="caseId != null ">
AND ced.case_appli_id = #{caseId}
</if>
order by ced.parent_id
</where>
</select>
<select id="selectDeptListByEvidenceName" resultType="INTEGER">
select ced.id
from case_evidence_directory ced
left join case_attach ca on ced.annex_id = ca.annex_id
where ced.evidence_name = #{evidenceName}
<if test="deptCheckStrictly">
and ced.annex_id not in (select ced.parent_id from case_evidence_directory ced inner join case_attach ca on ced.annex_id = ca.annex_id and ced.evidence_name = #{evidenceName})
</if>
order by ced.parent_id
</select>
</mapper>
@@ -0,0 +1,31 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper">
<resultMap type="CaseEvidenceVO" id="CaseEvidenceVOResult">
<id property="id" column="id" />
<result property="caseNum" column="case_num" />
<result property="caseStatus" column="case_status" />
<result property="roomId" column="room_id" />
<result property="scheduleStartTime" column="schedule_start_time" />
</resultMap>
<select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
select DISTINCT(c.id) id, c.case_num,c.case_status,rc.room_id,rc.schedule_start_time
from case_application as c join case_affiliate as d on c.id = d.case_appli_id
left join reserved_conference rc on rc.case_id=c.id
where c.id = d.case_appli_id
<if test="identityNum != null and identityNum != ''">
and d.identity_num = #{identityNum}
</if>
<if test="identityType != null ">
and d.identity_type = #{identityType}
</if>
<if test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
#{caseStatus}
</foreach>
</if>
</select>
</mapper>
@@ -0,0 +1,66 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper">
<resultMap type="CaseLogRecord" id="CaseLogRecordResult">
<id property="id" column="id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="caseNode" column="case_node" />
<result property="caseNodeTime" column="case_node_time" />
<result property="notes" column="notes" />
<result property="caseNum" column="case_num" />
<result property="createBy" column=" create_by" />
<result property="createNickName" column="create_nick_name" />
</resultMap>
<insert id="insertCaseLogRecord">
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values(
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},#{createNickName},sysdate(),#{updateBy},sysdate()
)
</insert>
<insert id="batchInsertRecord">
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.caseAppliId},#{item.caseNode},sysdate(),#{item.notes},#{item.createBy},#{item.createNickName},sysdate(),#{item.updateBy},sysdate()
)
</foreach>
</insert>
<select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes ,cl.id ,cl.case_appli_id caseAppliId,
cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
CASE cl.case_node when 0 then '立案申请' when 1 then '提交立案申请' when 2 then '立案审查'
when 3 then '支付成功' when 4 then '缴费确认' when 5 then '案件质证'
when 6 then '组庭审核' when 7 then '组庭确认' when 8 then '当前仲裁方式为开庭审理'
when 9 then '当前仲裁方式为书面审理' when 10 then '书面审理' when 11 then '秘书审核裁决书'
when 12 then '部门长核验裁决书' when 13 then '同意裁决书' when 14 then '签名成功'
when 15 then '用印成功' when 16 then '送达仲裁文书' when 17 then '案件归档'
when 26 then '证据确认成功'
when 31 then '修改开庭时间'
when 18 then '仲裁员审核仲裁文书'
ELSE '无案件状态'
END content,
CASE cl.case_node when 0 then '申请人' when 1 then '申请人' when 2 then '法律顾问'
when 3 then '申请人' when 4 then '财务' when 5 then '被申请人'
when 6 then '部门长' when 7 then '仲裁员' when 8 then '仲裁员'
when 9 then '仲裁员' when 10 then '仲裁员' when 11 then '法律顾问'
when 12 then '仲裁员' when 13 then '仲裁员' when 14 then '部门长'
when 15 then '法律顾问' when 16 then '法律顾问'
ELSE '无角色'
END roleName
from case_log_record cl
<where>
<if test="caseAppliId != null and caseAppliId != ''">
AND cl.case_appli_id = #{caseAppliId}
</if>
</where>
order by create_time asc
</select>
</mapper>
@@ -0,0 +1,105 @@
<?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.ruoyi.wisdomarbitrate.mapper.CaseNumRuleMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.CaseNumRule" >
<result column="id" property="id" />
<result column="rule_type" property="ruleType" />
<result column="prefixstr" property="prefixstr" />
<result column="date_format" property="dateFormat" />
<result column="dept_name" property="deptName" />
<result column="current_num" property="currentNum" />
<result column="dept_name_firchar" property="deptNameFirchar" />
</resultMap>
<insert id="insertCaseNumRule" parameterType="CaseNumRule" useGeneratedKeys="true" keyProperty="id">
insert into case_num_rule(
<if test="ruleType != null">rule_type,</if>
<if test="prefixstr != null and prefixstr != '' ">prefixstr,</if>
<if test="dateFormat != null">date_format,</if>
<if test="deptName != null and deptName != '' ">dept_name,</if>
<if test="currentNum != null and currentNum != '' ">current_num,</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">dept_name_firchar,</if>
create_by,
create_time
)values(
<if test="ruleType != null">#{ruleType},</if>
<if test="prefixstr != null and prefixstr != '' ">#{prefixstr},</if>
<if test="dateFormat != null">#{dateFormat},</if>
<if test="deptName != null and deptName != '' ">#{deptName},</if>
<if test="currentNum != null and currentNum != '' ">#{currentNum},</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">#{deptNameFirchar},</if>
#{createBy},
sysdate()
)
</insert>
<update id="updateCaseNumRule" parameterType="CaseNumRule">
update case_num_rule
<set>
<if test="ruleType != null">rule_type = #{ruleType},</if>
<if test="prefixstr != null and prefixstr != '' ">prefixstr = #{prefixstr},</if>
<if test="dateFormat != null ">date_format = #{dateFormat},</if>
<if test="deptName != null and deptName != '' ">dept_name = #{deptName},</if>
<if test="currentNum != null and currentNum != '' ">current_num = #{currentNum},</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">dept_name_firchar = #{deptNameFirchar},</if>
</set>
<where>
<if test="id != null">
AND id = #{id}
</if>
</where>
</update>
<delete id="deleteCaseNumRule" parameterType="CaseNumRule">
delete from case_num_rule where id = #{id}
</delete>
<select id="selectCaseNumRules" parameterType="CaseNumRule" resultMap="BaseResultMap">
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
FROM case_num_rule
<where>
<if test="deptNameFirchar != null and deptNameFirchar != ''">
AND dept_name_firchar = #{deptNameFirchar}
</if>
</where>
order by create_time desc
</select>
<select id="countCaseNumRule" resultType="Integer">
select count(1) from case_num_rule c
<where>
<if test="prefixstr != null and prefixstr != '' ">
AND c.prefixstr = #{prefixstr}
</if>
<if test="ruleType != null ">
AND c.rule_type = #{ruleType}
</if>
<if test="dateFormat != null ">
AND c.date_format = #{dateFormat}
</if>
<if test="deptName != null and deptName != '' ">
AND c.dept_name = #{deptName}
</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">
AND c.dept_name_firchar = #{deptNameFirchar}
</if>
</where>
</select>
<select id="selectCaseNumRule" parameterType="CaseNumRule" resultMap="BaseResultMap">
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
FROM case_num_rule
<where>
<if test="id != null ">
AND id = #{id}
</if>
</where>
</select>
</mapper>
@@ -0,0 +1,57 @@
<?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.ruoyi.wisdomarbitrate.mapper.CasePaymentRecordMapper">
<resultMap type="CasePaymentRecord" id="CasePaymentRecordResult">
<id property="id" column="id" />
<result property="caseId" column="case_id" />
<result property="orderNumber" column="order_number" />
<result property="paymentStatus" column="payment_status" />
<result property="paymentTime" column="payment_time" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="payType" column="pay_type" />
</resultMap>
<insert id="saveRecord">
INSERT INTO case_payment_record (case_id, order_number, payment_status , create_time)
VALUES (#{caseId}, #{orderNumber}, #{paymentStatus},#{createTime})
</insert>
<update id="update">
update case_payment_record
<set>
<if test="caseId != null">case_id= #{caseId},</if>
<if test="orderNumber != null and orderNumber != ''">order_number = #{orderNumber},</if>
<if test="paymentTime != null ">payment_time = #{paymentTime},</if>
<if test="paymentStatus != null ">payment_status = #{paymentStatus},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
<if test="payType != null ">pay_type = #{payType},</if>
</set>
<where>
<if test="caseId != null ">
AND case_id = #{caseId}
</if>
<if test="id != null ">
AND id = #{id}
</if>
</where>
</update>
<select id="queryRecord" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult">
select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status
from case_payment_record c
<where>
<if test="orderNumber != null and orderNumber != '' ">
AND c.order_number = #{orderNumber}
</if>
</where>
</select>
<select id="selectRecordByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult">
select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status
from case_payment_record c
<where>
<if test="id != null ">
AND c.case_id = #{id}
</if>
</where>
</select>
</mapper>
@@ -0,0 +1,50 @@
<?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.ruoyi.wisdomarbitrate.mapper.ColumnValueLogMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue" >
<result column="id" property="id" />
<result column="column" property="column" />
<result column="name" property="name" />
<result column="value" property="value" />
<result column="case_appli_log_id" property="caseAppliLogId" />
</resultMap>
<insert id="batchSave">
INSERT INTO column_value_log ( `COLUMN`, `NAME`, `VALUE`, case_appli_log_id,is_default )
values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.column},#{item.name},#{item.value},#{item.caseAppliLogId},#{item.isDefault})
</foreach>
</insert>
<select id="listBycaseAppliLogId" resultMap="BaseResultMap">
select * from column_value_log where case_appli_log_id=#{caseAppliLogId}
</select>
<update id="batchUpdate">
<foreach collection="list" item="item" >
update column_value_log
<set>
<if test="item.value != null and item.value != ''">
`VALUE` = #{item.value},
</if>
`id`=#{item.id}
</set>
where `COLUMN`=#{item.column} and `NAME`=#{item.name} and case_appli_log_id=#{item.caseAppliLogId};
</foreach>
</update>
<select id="queryColumnValueList" parameterType="ColumnValue" resultMap="BaseResultMap">
select * from column_value_log c
<where>
<if test="caseAppliLogId != null">
AND c.case_appli_log_id = #{caseAppliLogId}
</if>
<if test="isDefault != null">
AND c.is_default = #{isDefault}
</if>
</where>
</select>
</mapper>
@@ -0,0 +1,62 @@
<?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.ruoyi.wisdomarbitrate.mapper.ColumnValueMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue" >
<result column="id" property="id" />
<result column="column" property="column" />
<result column="name" property="name" />
<result column="value" property="value" />
<result column="case_id" property="caseId" />
<result column="is_default" property="isDefault" />
</resultMap>
<insert id="batchSave">
INSERT INTO column_value ( `COLUMN`, `NAME`, `VALUE`, case_id,is_default )
values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.column},#{item.name},#{item.value},#{item.caseId},#{item.isDefault})
</foreach>
</insert>
<update id="batchUpdate">
<foreach collection="list" item="item" >
update column_value
<set>
<if test="item.value != null and item.value != ''">
`VALUE` = #{item.value},
</if>
</set>
where id=#{item.id};
</foreach>
</update>
<update id="updateColumnValue" parameterType="ColumnValue">
update column_value
<set>
<if test="value != null and value != ''">
`VALUE` = #{value},
</if>
</set>
where id=#{id}
</update>
<select id="listByCaseId" resultMap="BaseResultMap">
select * from column_value where case_id=#{caseId}
</select>
<select id="queryColumnValueList" parameterType="ColumnValue" resultMap="BaseResultMap">
select * from column_value c
<where>
<if test="caseId != null">
AND c.case_id = #{caseId}
</if>
<if test="isDefault != null">
AND c.is_default = #{isDefault}
</if>
</where>
</select>
</mapper>
@@ -0,0 +1,133 @@
<?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.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper">
<resultMap type="DeptIdentify" id="DeptIdentifyResult">
<id property="id" column="id" />
<result property="identifyStatus" column="identify_status" />
<result property="identifyDate" column="identify_date" />
<result property="isUse" column="is_use" />
<result property="orgId" column="org_id" />
<result property="authFlowId" column="auth_flow_id" />
<result property="identifyName" column="identify_name" />
<result property="operName" column="oper_name" />
<result property="operPhone" column="oper_phone" />
<result property="identifyType" column="identify_type" />
<result property="delFlag" column="del_flag" />
<result property="creditCode" column="credit_code" />
<result property="legalPerName" column="legal_per_name" />
<result property="legalPerPhone" column="legal_per_phone" />
<result property="identifyEmail" column="identify_email" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
</resultMap>
<select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
oper_name,oper_phone,identify_type,credit_code,legal_per_name,legal_per_phone
,identify_email,dept_id ,user_id
FROM dept_identify
<where>
<if test="id != null">
AND id = #{id}
</if>
<if test="identifyStatus != null">
AND identify_status = #{identifyStatus}
</if>
<if test="isUse != null">
AND is_use = #{isUse}
</if>
<if test="identifyName != null and identifyName != ''">
AND identify_name = #{identifyName}
</if>
<if test="operName != null and operName != ''">
AND oper_name = #{operName}
</if>
<if test="operPhone != null and operPhone != ''">
AND oper_phone = #{operPhone}
</if>
AND identify_type = 1
AND del_flag =0
</where>
ORDER BY id DESC
</select>
<insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
insert into dept_identify(
<if test="identifyName != null and identifyName != ''">identify_name,</if>
<if test="identifyStatus != null">identify_status,</if>
<if test="identifyDate != null">identify_date,</if>
<if test="isUse != null">is_use,</if>
<if test="orgId != null and orgId != ''">org_id,</if>
<if test="operName != null and operName != ''">oper_name,</if>
<if test="operPhone != null and operPhone != ''">oper_phone,</if>
<if test="identifyType != null">identify_type,</if>
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
<if test="creditCode != null and creditCode != ''">credit_code,</if>
<if test="legalPerName != null and legalPerName != ''">legal_per_name,</if>
<if test="legalPerPhone != null and legalPerPhone != ''">legal_per_phone,</if>
<if test="identifyEmail != null and identifyEmail != ''">identify_email,</if>
<if test="deptId != null ">dept_id,</if>
<if test="userId != null ">user_id,</if>
del_flag
)values(
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
<if test="identifyStatus != null">#{identifyStatus},</if>
<if test="identifyDate != null">#{identifyDate},</if>
<if test="isUse != null">#{isUse},</if>
<if test="orgId != null and orgId != ''">#{orgId},</if>
<if test="operName != null and operName != ''">#{operName},</if>
<if test="operPhone != null and operPhone != ''">#{operPhone},</if>
<if test="identifyType != null ">#{identifyType},</if>
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
<if test="creditCode != null and creditCode != '' ">#{creditCode},</if>
<if test="legalPerName != null and legalPerName != '' ">#{legalPerName},</if>
<if test="legalPerPhone != null and legalPerPhone != '' ">#{legalPerPhone},</if>
<if test="identifyEmail != null and identifyEmail != '' ">#{identifyEmail},</if>
<if test="deptId != null ">#{deptId},</if>
<if test="userId != null ">#{userId},</if>
0
)
</insert>
<update id="updateDeptIdentify" parameterType="DeptIdentify">
update dept_identify
<set>
<if test="identifyDate != null">identify_date = #{identifyDate},</if>
<if test="identifyName != null">identify_name = #{identifyName},</if>
<if test="isUse != null">is_use = #{isUse},</if>
<if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
<if test="orgId != null and orgId != ''">org_id = #{orgId},</if>
<if test="delFlag != null ">del_flag = #{delFlag},</if>
<if test="operName != null and operName != ''">oper_name = #{operName},</if>
<if test="operPhone != null and operPhone != ''">oper_phone = #{operPhone},</if>
<if test="creditCode != null and creditCode != ''">credit_code = #{creditCode},</if>
<if test="legalPerName != null and legalPerName != ''">legal_per_name = #{legalPerName},</if>
<if test="legalPerPhone != null and legalPerPhone != ''">legal_per_phone = #{legalPerPhone},</if>
<if test="identifyEmail != null and identifyEmail != ''">identify_email = #{identifyEmail},</if>
<if test="userId != null ">user_id = #{userId},</if>
<if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
</set>
<where>
<if test="id != null">
AND id = #{id}
</if>
</where>
</update>
</mapper>
@@ -0,0 +1,116 @@
<?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.ruoyi.wisdomarbitrate.mapper.FatchRuleMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.FatchRule" >
<result column="id" property="id" />
<result column="batch_number" property="batchNumber" />
<result column="file_name" property="fileName" />
<result column="start_content" property="startContent" />
<result column="end_content" property="endContent" />
<result column="column" property="column" />
<result column="column_name" property="columnName" />
<result column="is_default" property="isDefault" />
<result column="start_content_repeat_order" property="startContentRepeatOrder" />
<result column="end_content_repeat_order" property="endContentRepeatOrder" />
<result column="fatch_order" property="fatchOrder" />
</resultMap>
<select id="listByTemplateId" resultMap="BaseResultMap">
select f.id ,f.file_name ,f.start_content ,f.end_content ,
f.`column` , ifnull(f.is_default,0) is_default ,f.`column_name`,ifnull(f.start_content_repeat_order,1) start_content_repeat_order,ifnull(f.end_content_repeat_order,1) end_content_repeat_order,ifnull(f.fatch_order,0) fatch_order
from fatch_rule f join template_fatch_rule tfr on f.id=tfr.fatch_rule_id
where tfr.template_id=#{templateId}
</select>
<select id="selectFatchRuleList" parameterType="FatchRule" resultMap="BaseResultMap">
SELECT f.id ,f.file_name ,f.start_content ,f.end_content ,
f.`column` ,f.is_default ,f.`column_name`,f.start_content_repeat_order,f.end_content_repeat_order,f.fatch_order
FROM template_fatch_rule tf
left join template_manage t on tf.template_id = t.id
LEFT JOIN fatch_rule f on tf.fatch_rule_id = f.id
<where>
<if test="templateId != null">
AND tf.template_id = #{templateId}
</if>
</where>
</select>
<select id="selectColumnandComment" parameterType="FatchRule" resultMap="BaseResultMap">
select
a.COLUMN_name as `column`,
a.COLumn_comment as column_name
from
information_schema.COLUMNS a
where
TABLE_schema = #{databaseName}
and TABLE_name in('case_application','case_affiliate')
and COLUMN_NAME not in('id','case_appli_id','case_num','case_subject_amount',
'register_date','arbitrat_method','case_status','hear_date','begin_video_date',
'online_video_person','create_time','update_by','update_time','create_by',
'arbitrator_id','arbitrator_name','pended_trial_arbitorid','pending_appoint_arbotrar',
'case_name','case_result','is_agree_pend_tral','objection_add_eviden','open_court_hear',
'paid_expenses','filearbitra_url','pay_type','adjudica_counter','proper_preser','objecti_juris',
'is_absence','respon_cross_opin','applica_cross_opin','respon_defen_opini','appli_is_absen',
'lock_status','room_id','import_flag','version','batch_number','template_id','applicant_agent_user_id','contract_number','identity_type','application_organ_id')
</select>
<select id="selectColumnbycomment" parameterType="FatchRule" resultMap="BaseResultMap">
select
COLUMN_NAME
from
information_schema.COLUMNS
where
TABLE_schema = #{databaseName}
and TABLE_name in('case_application','case_affiliate')
and COLumn_comment = #{columnName}
</select>
<select id="selectFatchRuleListIsDefault" parameterType="FatchRule" resultMap="BaseResultMap">
SELECT f.id ,f.file_name ,f.start_content ,f.end_content ,
f.`column` ,f.is_default ,f.`column_name`
FROM fatch_rule f
<where>
<if test="isDefault != null">
AND f.is_default = #{isDefault}
</if>
</where>
</select>
<delete id="deletebatchFatchRule">
delete from fatch_rule where id in
<foreach collection="fatchRuleIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="insertFatchRule" parameterType="FatchRule" useGeneratedKeys="true" keyProperty="id">
insert into fatch_rule(
<if test="fileName != null and fileName != ''">file_name,</if>
<if test="startContent != null and startContent != ''">start_content,</if>
<if test="endContent != null and endContent != ''">end_content,</if>
<if test="column != null and column != ''">`column`,</if>
<if test="columnName != null and columnName != ''">`column_name`,</if>
<if test="isDefault != null">is_default,</if>
start_content_repeat_order,end_content_repeat_order,fatch_order
)values(
<if test="fileName != null and fileName != ''">#{fileName},</if>
<if test="startContent != null and startContent != ''">#{startContent},</if>
<if test="endContent != null and endContent != ''">#{endContent},</if>
<if test="column != null and column != ''">#{column},</if>
<if test="columnName != null and columnName != ''">#{columnName},</if>
<if test="isDefault != null">#{isDefault},</if>
#{startContentRepeatOrder},#{endContentRepeatOrder},#{fatchOrder}
)
</insert>
</mapper>
@@ -0,0 +1,90 @@
<?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.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper">
<resultMap type="IdentityAuthentication" id="IdentityAuthenticationResult">
<id property="id" column="id" />
<result property="name" column="name" />
<result property="identityNo" column="identity_no" />
<result property="certificationTime" column="certification_time" />
<result property="certificationStatus" column="certification_status" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="idAddress" column="id_address" />
</resultMap>
<insert id="insertIdentityAuthentication" parameterType="IdentityAuthentication" useGeneratedKeys="true" keyProperty="id">
insert into identi_authenti(
<if test="userId != null">user_id,</if>
<if test="idAddress != null and idAddress != ''">id_address,</if>
<if test="name != null and name != ''">name,</if>
<if test="identityNo != null and identityNo != ''">identity_no,</if>
certification_time,
<if test="certificationStatus != null">certification_status,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="userId != null ">#{userId},</if>
<if test="idAddress != null and idAddress != ''">#{idAddress},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="identityNo != null and identityNo != ''">#{identityNo},</if>
sysdate(),
<if test="certificationStatus != null ">#{certificationStatus},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<update id="updateIdentityAuthentication">
update identi_authenti
<set>
<if test="userId != null ">user_id = #{userId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="identityNo != null and identityNo != ''">identity_no = #{identityNo},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where id = #{id}
</update>
<select id="selectIdentityAuthentication" parameterType="IdentityAuthentication" resultMap="IdentityAuthenticationResult">
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name
from identi_authenti i
<where>
certification_status=0
<if test="userName != null and userName != '' ">
AND i.user_name = #{userName}
</if>
<if test="userId != null ">
AND i.user_id = #{userId}
</if>
<if test="identityNo != null and identityNo != '' ">
AND i.identity_no = #{identityNo}
</if>
</where>
limit 1
</select>
<select id="selectCountIdentityAuthentication" resultType="Integer">
select count(1) from identi_authenti i
<where>
<if test="userName != null and userName != '' ">
AND i.user_name = #{userName}
</if>
<if test="userId != null ">
AND i.user_id = #{userId}
</if>
</where>
</select>
</mapper>
@@ -0,0 +1,37 @@
<?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.ruoyi.wisdomarbitrate.mapper.ReservedConferenceMapper">
<insert id="insert">
insert into reserved_conference(
case_id,
room_id,
schedule_start_time,
schedule_end_time,
user_id
)values(
#{caseId},
#{roomId},
#{scheduleStartTime},
#{scheduleEndTime},
#{userId}
)
</insert>
<delete id="deleteByRoomId">
delete from reserved_conference where room_id=#{roomId}
</delete>
<delete id="batchDeleteByIds">
delete from reserved_conference where id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<select id="selectListByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.ReservedConference">
select id, case_id caseId,room_id roomId,schedule_start_time scheduleStartTime,schedule_end_time scheduleEndTime,user_id userId
from reserved_conference where case_id=#{caseId}
</select>
</mapper>
@@ -0,0 +1,65 @@
<?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.ruoyi.wisdomarbitrate.mapper.SealManageMapper">
<resultMap type="SealManage" id="SealManageResult">
<id property="id" column="id" />
<result property="identifyId" column="identify_id" />
<result property="sealName" column="seal_name" />
<result property="sealId" column="seal_id" />
<result property="annexId" column="annex_id" />
<result property="sealStatus" column="seal_status" />
<result property="isUse" column="is_use" />
</resultMap>
<select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
SELECT id, identify_id ,seal_name , seal_id,annex_id,seal_status,is_use
FROM seal_manage
<where>
<if test="identifyId != null">
AND identify_id = #{identifyId}
</if>
<if test="sealStatus != null">
AND seal_status = #{sealStatus}
</if>
</where>
</select>
<insert id="insertSealManage" parameterType="SealManage" useGeneratedKeys="true" keyProperty="id">
insert into seal_manage(
<if test="identifyId != null">identify_id,</if>
<if test="sealName != null and sealName != ''">seal_name,</if>
<if test="sealId != null and sealId != ''">seal_id,</if>
<if test="annexId != null">annex_id,</if>
<if test="sealStatus != null">seal_status,</if>
<if test="isUse != null">is_use</if>
)values(
<if test="identifyId != null">#{identifyId},</if>
<if test="sealName != null and sealName != ''">#{sealName},</if>
<if test="sealId != null and sealId != ''">#{sealId},</if>
<if test="annexId != null">#{annexId},</if>
<if test="sealStatus != null">#{sealStatus},</if>
<if test="isUse != null">#{isUse}</if>
)
</insert>
<update id="updateSealManage" parameterType="SealManage">
update seal_manage
<set>
<if test="identifyId != null">identify_id = #{identifyId},</if>
<if test="sealName != null">seal_name = #{sealName},</if>
<if test="sealId != null ">seal_id = #{sealId},</if>
<if test="annexId != null ">annex_id = #{annexId},</if>
<if test="sealStatus != null ">seal_status = #{sealStatus},</if>
<if test="isUse != null ">is_use = #{isUse}</if>
</set>
<where>
<if test="id != null">
AND id = #{id}
</if>
</where>
</update>
</mapper>
@@ -0,0 +1,95 @@
<?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.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
<insert id="insertSealSignRecord" useGeneratedKeys="true" keyProperty="id">
INSERT INTO seal_sign_record (file_id, file_name, sign_flow_id , penson_account
,penson_name,orgnize_name,orgn_name_psn_acc,orgn_name_psn_name,position_pagepsn
,position_xpsn,position_ypsn,position_pageorg,position_xorg,position_yorg,case_appli_id
,sign_flow_status)
VALUES (#{fileid}, #{filename}, #{signFlowid},#{pensonAccount},#{pensonName},#{orgnizeName}
,#{orgnizeNamePsnAccount},#{orgnizeNamepsnName},#{positionPagepsn},#{positionXpsn},#{positionYpsn}
,#{positionPageorg},#{positionXorg},#{positionYorg},#{caseAppliId},#{signFlowStatus})
</insert>
<resultMap type="SealSignRecord" id="SealSignRecordResult">
<id property="id" column="id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="fileid" column="file_id" />
<result property="signFlowid" column="sign_flow_id" />
<result property="signFlowStatus" column="sign_flow_status" />
<result property="pensonAccount" column="penson_account" />
<result property="orgnizeName" column="orgnize_name" />
<result property="orgnizeNamePsnAccount" column="orgn_name_psn_acc" />
</resultMap>
<select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.penson_account ,s.orgnize_name ,s.orgn_name_psn_acc
from seal_sign_record s
<where>
<if test="signFlowStatus != null ">
AND s.sign_flow_status = #{signFlowStatus}
</if>
<if test="caseAppliId != null ">
AND s.case_appli_id = #{caseAppliId}
</if>
</where>
</select>
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.sign_flow_status
from seal_sign_record s join case_application c on s.case_appli_id=c.id
where s.sign_flow_status in (1,2)
</select>
<select id="selectSealSigning" resultType="com.ruoyi.wisdomarbitrate.domain.CaseApplication">
SELECT s.sign_flow_id signFlowId,c.id id,c.case_status caseStatus,
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 18 then '待仲裁员审核仲裁文书'
when 31 then '待修改开庭时间'
ELSE '无案件状态'
END caseStatusName,
c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
c.arbitrat_method arbitratMethod ,
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
ELSE '无审理方式'
END arbitratMethodName,
c.arbitrator_id arbitratorId,
c.arbitrator_name arbitratorName
from seal_sign_record s
join case_application c on s.case_appli_id=c.id
JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
<!-- where s.sign_flow_status in (0,1,2)-->
<where>
<if test="penSonAccount != null and penSonAccount!='' ">
AND s.penson_account = #{penSonAccount}
</if>
<if test="caseStatus != null and caseStatus!='' ">
AND c.case_status = #{caseStatus}
</if>
</where>
order by c.case_num desc
</select>
<update id="updataSealSignRecord" parameterType="SealSignRecord">
update seal_sign_record
<set>
<if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
<if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
</set>
where id = #{id}
</update>
</mapper>
@@ -0,0 +1,61 @@
<?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.ruoyi.wisdomarbitrate.mapper.SendMailRecordMapper">
<resultMap type="SendMailRecord" id="SendMailRecordResult">
<id property="id" column="id" />
<result property="mailName" column="mail_name" />
<result property="mailContent" column="mail_content" />
<result property="mailAddress" column="mail_address" />
<result property="sendTime" column="send_time" />
<result property="caseId" column="case_id" />
<result property="caseNum" column="case_num" />
<result property="sendStatus" column="send_status" />
</resultMap>
<select id="selectSendMailRecord" parameterType="SendMailRecord" resultMap="SendMailRecordResult">
SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
s.update_by ,s.update_time , s.send_status ,c.case_num
from send_mail_record s left join case_application c
on s.case_id = c.id
<where>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
</where>
order by s.send_time desc
</select>
<insert id="saveSendMailRecord">
insert into send_mail_record(
<if test="mailName != null and mailName != ''">mail_name,</if>
<if test="mailContent != null and mailContent != ''">mail_content,</if>
<if test="mailAddress != null and mailAddress != ''">mail_address,</if>
<if test="sendTime != null ">send_time,</if>
<if test="caseId != null ">case_id,</if>
<if test="sendStatus != null ">send_status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="mailName != null and mailName != ''">#{mailName},</if>
<if test="mailContent != null and mailContent != ''">#{mailContent},</if>
<if test="mailAddress != null and mailAddress != ''">#{mailAddress},</if>
<if test="sendTime != null ">#{sendTime},</if>
<if test="caseId != null ">#{caseId},</if>
<if test="sendStatus != null ">#{sendStatus},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
</mapper>
@@ -0,0 +1,80 @@
<?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.ruoyi.wisdomarbitrate.mapper.SmsRecordMapper">
<resultMap type="SmsSendRecord" id="SmsSendRecordResult">
<id property="id" column="id" />
<result property="caseId" column="case_appli_id" />
<result property="caseNum" column="case_num" />
<result property="phone" column="phone" />
<result property="sendTime" column="send_time" />
<result property="sendContent" column="send_content" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="sendStatus" column="send_status" />
</resultMap>
<insert id="saveSmsSendRecord" parameterType="SmsSendRecord" useGeneratedKeys="true" keyProperty="id">
insert into sms_send_record(
<if test="caseId != null ">case_appli_id,</if>
<if test="caseNum != null ">case_num,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="sendTime != null ">send_time,</if>
<if test="sendContent != null ">send_content,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="sendStatus != null ">send_status,</if>
create_time
)values(
<if test="caseId != null ">#{caseId},</if>
<if test="caseNum != null ">#{caseNum},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="sendTime != null ">#{sendTime},</if>
<if test="sendContent != null ">#{sendContent},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="sendStatus != null ">#{sendStatus},</if>
sysdate()
)
</insert>
<insert id="batchSaveSmsSendRecord">
insert into sms_send_record(
case_appli_id,
case_num,
phone,
send_time,
send_content,
create_by,
send_status,
create_time
)values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.caseId},
#{item.caseNum},
#{item.phone},
#{item.sendTime},
#{item.sendContent},
#{item.createBy},
#{item.sendStatus},
sysdate()
)
</foreach>
</insert>
<select id="getSmsSendRecord" parameterType="SmsSendRecord" resultMap="SmsSendRecordResult">
select id ,case_appli_id ,case_num ,phone ,send_time ,send_content,send_status
from sms_send_record
<where>
<if test="caseNum != null and caseNum != ''">
AND case_num = #{caseNum}
</if>
</where>
order by send_time desc
</select>
</mapper>
@@ -0,0 +1,49 @@
<?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.ruoyi.wisdomarbitrate.mapper.TemplateFatchRuleMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.vo.TemplateFatchRule" >
<result column="id" property="id" />
<result column="template_id" property="templateId" />
<result column="fatch_rule_id" property="fatchRuleId" />
</resultMap>
<select id="selectTemplateFatchRulecount" parameterType="TemplateFatchRule" resultType="Integer">
select count(1) from template_fatch_rule t
<where>
<if test="templateId != null">
AND t.template_id = #{templateId}
</if>
</where>
</select>
<select id="selectTemplateFatchRuleList" parameterType="TemplateFatchRule" resultMap="BaseResultMap">
SELECT t.id ,t.template_id ,t.fatch_rule_id
from template_fatch_rule t
<where>
<if test="templateId != null">
AND t.template_id = #{templateId}
</if>
</where>
</select>
<delete id="deleteTemplateFatchRule" parameterType="Long">
delete from template_fatch_rule where template_id=#{id}
</delete>
<insert id="insertTemplateFatchRule" parameterType="TemplateFatchRule" useGeneratedKeys="true" keyProperty="id">
insert into template_fatch_rule(
<if test="templateId != null">template_id,</if>
<if test="fatchRuleId != null">fatch_rule_id</if>
)values(
<if test="templateId != null">#{templateId},</if>
<if test="fatchRuleId != null">#{fatchRuleId}</if>
)
</insert>
</mapper>
@@ -0,0 +1,85 @@
<?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.ruoyi.wisdomarbitrate.mapper.TemplateManageMapper">
<resultMap type="TemplateManage" id="TemplateManageResult">
<id property="id" column="id" />
<result property="identifyId" column="identify_id" />
<result property="temName" column="tem_name" />
<result property="temType" column="tem_type" />
<result property="temFormat" column="tem_format" />
<result property="temOrigPath" column="tem_orig_path" />
<result property="temRevisPath" column="tem_revis_path" />
<result property="delFlag" column="del_flag" />
<result property="fileName" column="file_name" />
</resultMap>
<insert id="insertTemplateManage" parameterType="TemplateManage" useGeneratedKeys="true" keyProperty="id">
insert into template_manage(
<if test="identifyId != null">identify_id,</if>
<if test="temName != null and temName != ''">tem_name,</if>
<if test="temType != null">tem_type,</if>
<if test="temFormat != null and temFormat != '' ">tem_format,</if>
<if test="temOrigPath != null and temOrigPath != '' ">tem_orig_path,</if>
<if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path,</if>
<if test="createBy != null and createBy != '' ">create_by,</if>
<if test="fileName != null and fileName != '' ">file_name,</if>
del_flag,create_time
)values(
<if test="identifyId != null">#{identifyId},</if>
<if test="temName != null and temName != ''">#{temName},</if>
<if test="temType != null">#{temType},</if>
<if test="temFormat != null and temFormat != ''">#{temFormat},</if>
<if test="temOrigPath != null and temOrigPath != ''">#{temOrigPath},</if>
<if test="temRevisPath != null and temRevisPath != ''">#{temRevisPath},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="fileName != null and fileName != ''">#{fileName},</if>
0,sysdate()
)
</insert>
<update id="updateTemplateManage" parameterType="TemplateManage">
update template_manage
<set>
<if test="identifyId != null">identify_id = #{identifyId},</if>
<if test="temName != null and temName != ''">tem_name = #{temName},</if>
<if test="temType != null">tem_type = #{temType},</if>
<if test="temFormat != null and temFormat != '' ">tem_format = #{temFormat},</if>
<if test="temOrigPath != null and temOrigPath != ''">tem_orig_path = #{temOrigPath},</if>
<if test="delFlag != null ">del_flag = #{delFlag},</if>
<if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path = #{temRevisPath},</if>
<if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
<if test="fileName != null and fileName != '' ">file_name = #{fileName},</if>
update_time = sysdate()
</set>
<where>
<if test="id != null">
AND id = #{id}
</if>
</where>
</update>
<select id="selectTemplateList" parameterType="TemplateManage" resultMap="TemplateManageResult">
SELECT id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path ,file_name
FROM template_manage
<where>
<if test="id != null">
AND id = #{id}
</if>
<if test="identifyId != null">
AND identify_id = #{identifyId}
</if>
<if test="temName != null and temName != ''">
AND tem_name = #{temName}
</if>
<if test="temType != null ">
AND tem_type = #{temType}
</if>
AND del_flag =0
</where>
ORDER BY create_time DESC
</select>
</mapper>
@@ -0,0 +1,62 @@
<?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.ruoyi.wisdomarbitrate.mapper.TemplateManualMapper">
<resultMap type="TemplateManual" id="TemplateManualResult">
<id property="id" column="id" />
<result property="name" column="name" />
<result property="content" column="content" />
<result property="type" column="type" />
<result property="delFlag" column="del_flag" />
</resultMap>
<insert id="insertTemplateManual" parameterType="TemplateManual" useGeneratedKeys="true" keyProperty="id">
insert into template_manual(
<if test="name != null and name != ''">name,</if>
<if test="content != null and content != '' ">content,</if>
<if test="type != null ">type,</if>
del_flag
)values(
<if test="name != null and name != ''">#{name},</if>
<if test="content != null and content != '' ">#{content},</if>
<if test="type != null ">#{type},</if>
0
)
</insert>
<update id="updateTemplateManual" parameterType="TemplateManual">
update template_manual
<set>
<if test="name != null and name != ''">name = #{name},</if>
<if test="content != null and content != '' ">content = #{content},</if>
<if test="type != null ">type = #{type},</if>
<if test="delFlag != null ">del_flag = #{delFlag},</if>
</set>
<where>
<if test="id != null">
AND id = #{id}
</if>
</where>
</update>
<select id="selectTemplateManual" parameterType="TemplateManual" resultMap="TemplateManualResult">
SELECT id, name ,content , type
FROM template_manual
<where>
<if test="id != null">
AND id = #{id}
</if>
<if test="name != null and name != ''">
AND name = #{name}
</if>
<if test="content != null and content != ''">
AND content = #{content}
</if>
<if test="type != null ">
AND type = #{type}
</if>
AND del_flag =0
</where>
</select>
</mapper>
@@ -0,0 +1,61 @@
<?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.ruoyi.wisdomarbitrate.mapper.WeChatUserMapper">
<resultMap type="com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO" id="BaseResult">
<id property="id" column="id" />
<result property="name" column="name" />
<result property="identityNo" column="identity_no" />
<result property="certificationTime" column="certification_time" />
<result property="certificationStatus" column="certification_status" />
<result property="openId" column="open_id" />
<result property="phone" column="phone" />
<result property="email" column="email" />
</resultMap>
<insert id="insertUser">
insert into identi_authenti(
<if test="name != null and name != ''">name,</if>
<if test="identityNo != null and identityNo != ''">identity_no,</if>
certification_time,
<if test="certificationStatus != null ">certification_status,</if>
<if test="openId != null ">open_id,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="email != null and email != ''">email,</if>
create_time
)values(
<if test="name != null and name != ''">#{name},</if>
<if test="identityNo != null and identityNo != ''">#{identityNo},</if>
sysdate(),
<if test="certificationStatus != null ">#{certificationStatus},</if>
<if test="openId != null ">#{openId},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="email != null and email != ''">#{email},</if>
sysdate()
)
</insert>
<update id="updateUser">
update identi_authenti
<set>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where id = #{id}
</update>
<select id="selectIdentityAuthentication" resultMap="BaseResult">
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
from identi_authenti i
</select>
<select id="selectUserByOppenId" resultMap="BaseResult">
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
from identi_authenti i where open_id=#{oppenId}
</select>
</mapper>