| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?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.ytpm.lemonios.dao.DitchMapper">
- <insert id="insertOne" keyProperty="ditchId" useGeneratedKeys="true">
- insert into yt_ditch
- (
- ditch_id,
- ditch_name,
- user_id,
- app_type,
- app_id,
- is_delete,
- create_time
- )
- values
- (
- #{ditchId},
- #{ditchName},
- #{userId},
- #{appType},
- #{appId},
- #{isDelete},
- #{createTime}
- )
- </insert>
- <delete id="deleteByAppId">
- update yt_ditch set is_delete = 1 where app_id = #{appId}
- </delete>
- <select id="ditchList" resultType="com.ytpm.agent.view.AgentDitchView">
- select ditch_id,
- ditch_name,
- create_time
- from yt_ditch
- where user_id = #{userId} and is_delete = 0
- </select>
- <select id="ditchListByAppId" resultType="com.ytpm.agent.view.AgentDitchView">
- select
- ditch_id, ditch_name, create_time
- from yt_ditch
- <where>
- is_delete = 0
- <if test="appId != null and appId != ''">
- and app_id = #{appId}
- </if>
- </where>
- </select>
- <select id="selectById" resultType="com.ytpm.agent.model.YtDitch">
- select
- ditch_id, ditch_name, user_id, app_id, app_type, is_delete, create_time
- from yt_ditch
- where is_delete = 0 and ditch_id = #{ditchId}
- </select>
- </mapper>
|