1
This commit is contained in:
@@ -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.jarvis.mapper.TgScalperPhoneMapper">
|
||||
|
||||
<resultMap type="TgScalperPhone" id="TgScalperPhoneResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTgScalperPhoneVo">
|
||||
select id, phone, remark, status, create_time, update_time
|
||||
from jarvis_tg_scalper_phone
|
||||
</sql>
|
||||
|
||||
<select id="selectTgScalperPhoneList" parameterType="TgScalperPhone" resultMap="TgScalperPhoneResult">
|
||||
<include refid="selectTgScalperPhoneVo"/>
|
||||
<where>
|
||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="status != null"> and status = #{status}</if>
|
||||
</where>
|
||||
order by update_time desc, id desc
|
||||
</select>
|
||||
|
||||
<select id="selectTgScalperPhoneById" parameterType="Long" resultMap="TgScalperPhoneResult">
|
||||
<include refid="selectTgScalperPhoneVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectTgScalperPhoneByPhone" parameterType="String" resultMap="TgScalperPhoneResult">
|
||||
<include refid="selectTgScalperPhoneVo"/>
|
||||
where phone = #{phone}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEnabledByPhone" parameterType="String" resultMap="TgScalperPhoneResult">
|
||||
<include refid="selectTgScalperPhoneVo"/>
|
||||
where phone = #{phone} and status = 1
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertTgScalperPhone" parameterType="TgScalperPhone" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into jarvis_tg_scalper_phone
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="status != null">status,</if>
|
||||
create_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTgScalperPhone" parameterType="TgScalperPhone">
|
||||
update jarvis_tg_scalper_phone
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTgScalperPhoneById" parameterType="Long">
|
||||
delete from jarvis_tg_scalper_phone where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTgScalperPhoneByIds" parameterType="Long">
|
||||
delete from jarvis_tg_scalper_phone where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user