| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?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>
- <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
- </where>
- </select>
- <select id="ditchListForIos" 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, is_delete, create_time
- from yt_ditch
- where ditch_id = #{ditchId}
- </select>
- </mapper>
|