1
13693261870
2022-09-16 762f2fb45db004618ba099aa3c0bd89dba1eb843
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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.landtool.lanbase.modules.sys.dao.SysDiyAppDao">
 
    <!-- 可根据自己的需求,是否要使用 -->
    <resultMap type="com.landtool.lanbase.modules.sys.entity.SysDiyApp" id="sysDiyAppMap">
        <result property="id" column="ID"/>
        <result property="appid" column="APPID"/>
        <result property="userid" column="USERID"/>
        <result property="orderid" column="ORDERID"/>
        <result property="type" column="TYPE"/>
    </resultMap>
 
    <insert id="save" parameterType="com.landtool.lanbase.modules.sys.entity.SysDiyApp">
        insert into SYS_DIYAPP
        (
        APPID,
        USERID,
        ORDERID,
        TYPE
        )
        values
        (
        #{appid},
        #{userid},
        #{orderid},
        #{type,jdbcType=VARCHAR}
        )
    </insert>
 
    <delete id="delete">
        delete from SYS_DIYAPP where ID = #{id}
    </delete>
 
    <delete id="deleteByUseridAndAppid" parameterType="com.landtool.lanbase.modules.sys.entity.SysDiyApp">
        delete from SYS_DIYAPP where appid= #{appid} and userid = #{userid}
    </delete>
 
    <select id="selectByUserid" resultType="int">
      select count(*) from SYS_DIYAPP where userid = #{userid} and type = #{type}
    </select>
</mapper>