| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?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.dz.mapper.DzCardsMapper">
-
- <resultMap type="DzCards" id="DzCardsResult">
- <result property="cardId" column="card_id" />
- <result property="cardNo" column="card_no" />
- <result property="password" column="password" />
- <result property="type" column="type" />
- <result property="status" column="status" />
- <result property="distributeStatus" column="distribute_status" />
- <result property="timeStatus" column="time_status" />
- <result property="payStatus" column="pay_status" />
- <result property="isSettlement" column="is_settlement" />
- <result property="deptId" column="dept_id" />
- <result property="agentId" column="agent_id" />
- <result property="leafAgentId" column="leaf_agent_id" />
- <result property="campusId" column="campus_id" />
- <result property="assignLocation" column="assign_location" />
- <result property="assignExamType" column="assign_exam_type" />
- <result property="assignSchoolId" column="assign_school_id" />
- <result property="schoolId" column="school_id" />
- <result property="classId" column="class_id" />
- <result property="year" column="year" />
- <result property="endYear" column="end_year" />
- <result property="openId" column="open_id" />
- <result property="remark" column="remark" />
- <result property="distributeTime" column="distribute_time" />
- <result property="outDate" column="out_date" />
- <result property="openTime" column="open_time" />
- <result property="payTime" column="pay_time" />
- <result property="activeTime" column="active_time" />
- <result property="settlementTime" column="settlement_time" />
- <result property="refundTime" column="refund_time" />
- <result property="closeTime" column="close_time" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- </resultMap>
- <sql id="selectDzCardsVo">
- select card_id, card_no, password, type, status, distribute_status, time_status, pay_status, is_settlement, dept_id, agent_id, leaf_agent_id, campus_id, assign_location,assign_exam_type,assign_school_id, school_id, class_id, year, end_year, open_id, remark, distribute_time, out_date, open_time, pay_time, active_time, settlement_time, refund_time, close_time, create_time, update_time from dz_cards
- </sql>
- <select id="selectDzCardsList" parameterType="DzCards" resultMap="DzCardsResult">
- <include refid="selectDzCardsVo"/>
- <where>
- <if test="cardNo != null and cardNo != ''"> and card_no = #{cardNo}</if>
- <if test="password != null and password != ''"> and password = #{password}</if>
- <if test="type != null "> and type = #{type}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="distributeStatus != null "> and distribute_status = #{distributeStatus}</if>
- <if test="timeStatus != null "> and time_status = #{timeStatus}</if>
- <if test="payStatus != null "> and pay_status = #{payStatus}</if>
- <if test="isSettlement != null "> and is_settlement = #{isSettlement}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="agentId != null "> and agent_id = #{agentId}</if>
- <if test="leafAgentId != null "> and leaf_agent_id = #{leafAgentId}</if>
- <if test="campusId != null "> and campus_id = #{campusId}</if>
- <if test="assignLocation != null "> and assign_location = #{assignLocation}</if>
- <if test="assignExamType != null "> and assign_exam_type = #{assignExamType}</if>
- <if test="assignSchoolId != null "> and assign_school_id = #{assignSchoolId}</if>
- <if test="schoolId != null "> and school_id = #{schoolId}</if>
- <if test="classId != null "> and class_id = #{classId}</if>
- <if test="year != null "> and year = #{year}</if>
- <if test="endYear != null "> and end_year = #{endYear}</if>
- <if test="openId != null "> and open_id = #{openId}</if>
- <if test="distributeTime != null "> and distribute_time = #{distributeTime}</if>
- <if test="outDate != null "> and out_date = #{outDate}</if>
- <if test="openTime != null "> and open_time = #{openTime}</if>
- <if test="payTime != null "> and pay_time = #{payTime}</if>
- <if test="activeTime != null "> and active_time = #{activeTime}</if>
- <if test="settlementTime != null "> and settlement_time = #{settlementTime}</if>
- <if test="refundTime != null "> and refund_time = #{refundTime}</if>
- <if test="closeTime != null "> and close_time = #{closeTime}</if>
- </where>
- </select>
-
- <select id="selectDzCardsByCardId" parameterType="Long" resultMap="DzCardsResult">
- <include refid="selectDzCardsVo"/>
- where card_id = #{cardId}
- </select>
- <insert id="insertDzCards" parameterType="DzCards" useGeneratedKeys="true" keyProperty="cardId">
- insert into dz_cards
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="cardNo != null">card_no,</if>
- <if test="password != null">password,</if>
- <if test="type != null">type,</if>
- <if test="status != null">status,</if>
- <if test="distributeStatus != null">distribute_status,</if>
- <if test="timeStatus != null">time_status,</if>
- <if test="payStatus != null">pay_status,</if>
- <if test="isSettlement != null">is_settlement,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="agentId != null">agent_id,</if>
- <if test="leafAgentId != null">leaf_agent_id,</if>
- <if test="campusId != null">campus_id,</if>
- assign_location,assign_exam_type,assign_school_id,
- <if test="schoolId != null">school_id,</if>
- <if test="classId != null">class_id,</if>
- <if test="year != null">year,</if>
- <if test="endYear != null">end_year,</if>
- <if test="openId != null">open_id,</if>
- <if test="remark != null">remark,</if>
- <if test="distributeTime != null">distribute_time,</if>
- <if test="outDate != null">out_date,</if>
- <if test="openTime != null">open_time,</if>
- <if test="payTime != null">pay_time,</if>
- <if test="activeTime != null">active_time,</if>
- <if test="settlementTime != null">settlement_time,</if>
- <if test="refundTime != null">refund_time,</if>
- <if test="closeTime != null">close_time,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="cardNo != null">#{cardNo},</if>
- <if test="password != null">#{password},</if>
- <if test="type != null">#{type},</if>
- <if test="status != null">#{status},</if>
- <if test="distributeStatus != null">#{distributeStatus},</if>
- <if test="timeStatus != null">#{timeStatus},</if>
- <if test="payStatus != null">#{payStatus},</if>
- <if test="isSettlement != null">#{isSettlement},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="agentId != null">#{agentId},</if>
- <if test="leafAgentId != null">#{leafAgentId},</if>
- <if test="campusId != null">#{campusId},</if>
- #{assignLocation},#{assignExamType},#{assignSchoolId},
- <if test="schoolId != null">#{schoolId},</if>
- <if test="classId != null">#{classId},</if>
- <if test="year != null">#{year},</if>
- <if test="endYear != null">#{endYear},</if>
- <if test="openId != null">#{openId},</if>
- <if test="remark != null">#{remark},</if>
- <if test="distributeTime != null">#{distributeTime},</if>
- <if test="outDate != null">#{outDate},</if>
- <if test="openTime != null">#{openTime},</if>
- <if test="payTime != null">#{payTime},</if>
- <if test="activeTime != null">#{activeTime},</if>
- <if test="settlementTime != null">#{settlementTime},</if>
- <if test="refundTime != null">#{refundTime},</if>
- <if test="closeTime != null">#{closeTime},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- </trim>
- </insert>
- <update id="updateDzCards" parameterType="DzCards">
- update dz_cards
- <trim prefix="SET" suffixOverrides=",">
- <if test="cardNo != null">card_no = #{cardNo},</if>
- <if test="password != null">password = #{password},</if>
- <if test="type != null">type = #{type},</if>
- <if test="status != null">status = #{status},</if>
- <if test="distributeStatus != null">distribute_status = #{distributeStatus},</if>
- <if test="timeStatus != null">time_status = #{timeStatus},</if>
- <if test="payStatus != null">pay_status = #{payStatus},</if>
- <if test="isSettlement != null">is_settlement = #{isSettlement},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="agentId != null">agent_id = #{agentId},</if>
- <if test="leafAgentId != null">leaf_agent_id = #{leafAgentId},</if>
- <if test="campusId != null">campus_id = #{campusId},</if>
- assign_location = #{assignLocation},assign_exam_type = #{assignExamType},assign_school_id = #{assignSchoolId},
- <if test="schoolId != null">school_id = #{schoolId},</if>
- <if test="classId != null">class_id = #{classId},</if>
- <if test="year != null">year = #{year},</if>
- <if test="endYear != null">end_year = #{endYear},</if>
- <if test="openId != null">open_id = #{openId},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="distributeTime != null">distribute_time = #{distributeTime},</if>
- <if test="outDate != null">out_date = #{outDate},</if>
- <if test="openTime != null">open_time = #{openTime},</if>
- <if test="payTime != null">pay_time = #{payTime},</if>
- <if test="activeTime != null">active_time = #{activeTime},</if>
- <if test="settlementTime != null">settlement_time = #{settlementTime},</if>
- <if test="refundTime != null">refund_time = #{refundTime},</if>
- <if test="closeTime != null">close_time = #{closeTime},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- </trim>
- where card_id = #{cardId}
- </update>
- <delete id="deleteDzCardsByCardId" parameterType="Long">
- delete from dz_cards where card_id = #{cardId}
- </delete>
- <delete id="deleteDzCardsByCardIds" parameterType="String">
- delete from dz_cards where card_id in
- <foreach item="cardId" collection="array" open="(" separator="," close=")">
- #{cardId}
- </foreach>
- </delete>
- <select id="selectListByCond" parameterType="com.ruoyi.criteria.CardCriteria" resultMap="DzCardsResult">
- <include refid="selectDzCardsVo"/>
- <where>
- <if test="startNo != null and startNo != ''"> and card_no > #{cardNo}</if>
- <if test="endNo != null and endNo != ''"> and card_no < #{cardNo}</if>
- <if test="cardNo != null and cardNo != ''"> and card_no = #{cardNo}</if>
- <if test="password != null and password != ''"> and password = #{password}</if>
- <if test="type != null "> and type = #{type}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="distributeStatus != null "> and distribute_status = #{distributeStatus}</if>
- <if test="timeStatus != null "> and time_status = #{timeStatus}</if>
- <if test="payStatus != null "> and pay_status = #{payStatus}</if>
- <if test="isSettlement != null "> and is_settlement = #{isSettlement}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="agentId != null "> and agent_id = #{agentId}</if>
- <if test="leafAgentId != null "> and leaf_agent_id = #{leafAgentId}</if>
- <if test="campusId != null "> and campus_id = #{campusId}</if>
- <if test="assignLocation != null "> and assign_location = #{assignLocation}</if>
- <if test="assignExamType != null "> and assign_exam_type = #{assignExamType}</if>
- <if test="assignSchoolId != null "> and assign_school_id = #{assignSchoolId}</if>
- <if test="schoolId != null "> and school_id = #{schoolId}</if>
- <if test="classId != null "> and class_id = #{classId}</if>
- <if test="year != null "> and year = #{year}</if>
- <if test="endYear != null "> and end_year = #{endYear}</if>
- <if test="openId != null "> and open_id = #{openId}</if>
- <if test="distributeTime != null "> and distribute_time = #{distributeTime}</if>
- <if test="outDate != null "> and out_date = #{outDate}</if>
- <if test="openTime != null "> and open_time = #{openTime}</if>
- <if test="payTime != null "> and pay_time = #{payTime}</if>
- <if test="activeTime != null "> and active_time = #{activeTime}</if>
- <if test="settlementTime != null "> and settlement_time = #{settlementTime}</if>
- <if test="refundTime != null "> and refund_time = #{refundTime}</if>
- <if test="closeTime != null "> and close_time = #{closeTime}</if>
- </where>
- </select>
- <select id="selectCardsByCardIds" parameterType="String" resultMap="DzCardsResult">
- <include refid="selectDzCardsVo"/>
- where card_id in <foreach item="cardId" collection="array" open="(" separator="," close=")">#{cardId}</foreach>
- </select>
- <select id="selectMaxNo" parameterType="Integer" resultType="Long">
- select max(card_no) from dz_cards where type = #{type}
- </select>
- </mapper>
|