Your ROOT_URL in app.ini is http://git.zky.com/ but you are visiting http://61.178.84.89:8998/luoluo/ry_zhky/src/commit/2f4f9a3b74ed9a311e302d8402a5ecd600f2afe3/ruoyi-system/src/main/resources/mapper/system/TdTrainMapper.xml You should set ROOT_URL correctly, otherwise the web may not work correctly.
ry_zhky/ruoyi-system/src/main/resources/mapper/system/TdTrainMapper.xml

164 lines
9.4 KiB

<?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.TdTrainMapper">
<resultMap type="TdTrain" id="TdTrainResult">
<result property="id" column="id" />
<result property="username" column="username" />
<result property="deptName" column="dept_name" />
<result property="trainType" column="train_type" />
<result property="trainSubject" column="train_subject" />
<result property="trainAddress" column="train_address" />
<result property="trainDate" column="train_date" />
<result property="createStaffid" column="create_staffid" />
<result property="createDepartid" column="create_departid" />
<result property="createDate" column="create_date" />
<result property="updateDepartid" column="update_departid" />
<result property="updateStaffid" column="update_staffid" />
<result property="updateDate" column="update_date" />
<result property="areaid" column="areaid" />
<result property="framework" column="framework" />
<result property="trainName" column="train_name" />
<result property="trainState" column="train_state" />
<result property="trainTimeend" column="train_timeend" />
<result property="part" column="part" />
<result property="traininfo" column="traininfo" />
<result property="deptId" column="dept_id" jdbcType="INTEGER"/>
</resultMap>
<sql id="selectTdTrainVo">
select id, username, dept_name, train_type, train_subject, train_address, train_date, create_staffid, create_departid, create_date, update_departid, update_staffid, update_date, areaid, framework, train_name, train_state, train_timeend, part, traininfo,dept_id from td_train d
</sql>
<select id="selectTdTrainList" parameterType="TdTrain" resultMap="TdTrainResult">
<include refid="selectTdTrainVo"/>
<where>
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
<if test="trainSubject != null and trainSubject != ''"> and train_subject = #{trainSubject}</if>
<if test="trainAddress != null and trainAddress != ''"> and train_address = #{trainAddress}</if>
<if test="trainDate != null "> and train_date = #{trainDate}</if>
<if test="createStaffid != null and createStaffid != ''"> and create_staffid = #{createStaffid}</if>
<if test="createDepartid != null and createDepartid != ''"> and create_departid = #{createDepartid}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
<if test="updateDepartid != null and updateDepartid != ''"> and update_departid = #{updateDepartid}</if>
<if test="updateStaffid != null and updateStaffid != ''"> and update_staffid = #{updateStaffid}</if>
<if test="updateDate != null "> and update_date = #{updateDate}</if>
<if test="areaid != null and areaid != ''"> and areaid = #{areaid}</if>
<if test="framework != null and framework != ''"> and framework = #{framework}</if>
<if test="trainName != null and trainName != ''"> and train_name like concat('%', #{trainName}, '%')</if>
<if test="trainState != null "> and train_state = #{trainState}</if>
<if test="trainTimeend != null "> and train_timeend = #{trainTimeend}</if>
<if test="part != null and part != ''"> and part = #{part}</if>
<if test="traininfo != null and traininfo != ''"> and traininfo = #{traininfo}</if>
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by create_date desc
</select>
<select id="selectTdTrainByID" parameterType="Long" resultMap="TdTrainResult">
<include refid="selectTdTrainVo"/>
where id = #{id}
</select>
<insert id="insertTdTrain" parameterType="TdTrain" useGeneratedKeys="true" keyProperty="id">
insert into td_train
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="username != null">username,</if>
<if test="deptName != null">dept_name,</if>
<if test="trainType != null">train_type,</if>
<if test="trainSubject != null">train_subject,</if>
<if test="trainAddress != null">train_address,</if>
<if test="trainDate != null">train_date,</if>
<if test="createStaffid != null">create_staffid,</if>
<if test="createDepartid != null">create_departid,</if>
<if test="createDate != null">create_date,</if>
<if test="updateDepartid != null">update_departid,</if>
<if test="updateStaffid != null">update_staffid,</if>
<if test="updateDate != null">update_date,</if>
<if test="areaid != null and areaid != ''">areaid,</if>
<if test="framework != null">framework,</if>
<if test="trainName != null">train_name,</if>
<if test="trainState != null">train_state,</if>
<if test="trainTimeend != null">train_timeend,</if>
<if test="part != null">part,</if>
<if test="traininfo != null">traininfo,</if>
<if test="deptId != null">dept_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="username != null">#{username},</if>
<if test="deptName != null">#{deptName},</if>
<if test="trainType != null">#{trainType},</if>
<if test="trainSubject != null">#{trainSubject},</if>
<if test="trainAddress != null">#{trainAddress},</if>
<if test="trainDate != null">#{trainDate},</if>
<if test="createStaffid != null">#{createStaffid},</if>
<if test="createDepartid != null">#{createDepartid},</if>
<if test="createDate != null">#{createDate},</if>
<if test="updateDepartid != null">#{updateDepartid},</if>
<if test="updateStaffid != null">#{updateStaffid},</if>
<if test="updateDate != null">#{updateDate},</if>
<if test="areaid != null and areaid != ''">#{areaid},</if>
<if test="framework != null">#{framework},</if>
<if test="trainName != null">#{trainName},</if>
<if test="trainState != null">#{trainState},</if>
<if test="trainTimeend != null">#{trainTimeend},</if>
<if test="part != null">#{part},</if>
<if test="traininfo != null">#{traininfo},</if>
<if test="deptId != null">#{deptId},</if>
</trim>
</insert>
<update id="updateTdTrain" parameterType="TdTrain">
update td_train
<trim prefix="SET" suffixOverrides=",">
<if test="username != null">username = #{username},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="trainType != null">train_type = #{trainType},</if>
<if test="trainSubject != null">train_subject = #{trainSubject},</if>
<if test="trainAddress != null">train_address = #{trainAddress},</if>
<if test="trainDate != null">train_date = #{trainDate},</if>
<if test="createStaffid != null">create_staffid = #{createStaffid},</if>
<if test="createDepartid != null">create_departid = #{createDepartid},</if>
<if test="createDate != null">create_date = #{createDate},</if>
<if test="updateDepartid != null">update_departid = #{updateDepartid},</if>
<if test="updateStaffid != null">update_staffid = #{updateStaffid},</if>
<if test="updateDate != null">update_date = #{updateDate},</if>
<if test="areaid != null and areaid != ''">areaid = #{areaid},</if>
<if test="framework != null">framework = #{framework},</if>
<if test="trainName != null">train_name = #{trainName},</if>
<if test="trainState != null">train_state = #{trainState},</if>
<if test="trainTimeend != null">train_timeend = #{trainTimeend},</if>
<if test="part != null">part = #{part},</if>
<if test="traininfo != null">traininfo = #{traininfo},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTdTrainByID" parameterType="Long">
delete from td_train where id = #{id}
</delete>
<delete id="deleteTdTrainByIDs" parameterType="Long">
delete from td_train where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectCountList" resultType="com.ruoyi.system.domain.count.TrainCountDTO">
SELECT
count(1) as total,
SUM (CASE WHEN train_state = '2' THEN 1 ELSE 0 END) AS dsh,
SUM (CASE WHEN train_state = '0' THEN 1 ELSE 0 END) AS shtg,
SUM (CASE WHEN train_state = '1' THEN 1 ELSE 0 END) AS shwtg
from td_train
</select>
</mapper>