|
|
@@ -0,0 +1,75 @@
|
|
|
+<?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.usoftchina.saas.commons.mapper.SystemRemindMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.dto.AddApplyDTO">
|
|
|
+ <result column="re_id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="re_applyname" jdbcType="VARCHAR" property="username" />
|
|
|
+ <result column="re_applymobile" jdbcType="VARCHAR" property="mobile" />
|
|
|
+ <result column="re_status" jdbcType="VARCHAR" property="status" />
|
|
|
+ <result column="creatorId" jdbcType="INTEGER" property="creatorId" />
|
|
|
+ <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
|
|
|
+ <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ </resultMap>
|
|
|
+ <select id="getApplyList" resultMap="BaseResultMap">
|
|
|
+ SELECT * FROM REMIND
|
|
|
+ <where>
|
|
|
+ <if test="condition != null">
|
|
|
+ ${condition}
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ AND COMPANYID = #{companyId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY RE_STATUS, CREATETIME DESC
|
|
|
+ </select>
|
|
|
+ <update id="confirmApply">
|
|
|
+ UPDATE REMIND SET STATUS = #{status}, updateTime = now(), updaterId = #{updaterId}
|
|
|
+ where re_id = #{id}
|
|
|
+ </update>
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.AddApply">
|
|
|
+ <selectKey resultType="java.lang.Long" keyProperty="id">
|
|
|
+ SELECT LAST_INSERT_ID() AS ID
|
|
|
+ </selectKey>
|
|
|
+ insert into remind
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="username != null">
|
|
|
+ re_applyname,
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null">
|
|
|
+ re_applymobile,
|
|
|
+ </if>
|
|
|
+ <if test="creatorId != null">
|
|
|
+ creatorId,
|
|
|
+ </if>
|
|
|
+ <if test="creatorName != null">
|
|
|
+ creatorName,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ createTime,
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ companyId
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="username != null">
|
|
|
+ #{username, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null">
|
|
|
+ #{mobile, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="creatorId != null">
|
|
|
+ #{creatorId, jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="creatorName != null">
|
|
|
+ #{creatorName, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime, jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ #{companyId, jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+</mapper>
|