admin
2025-08-20 f318c9c7c127b00f353bf45f273096d1dc4b424f
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?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.taoke.autopay.dao.OrderTaskMapper">
    <resultMap id="BaseResultMap" type="com.taoke.autopay.entity.js2.OrderTask">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="keyword_content" property="keywordContent" jdbcType="VARCHAR"/>
        <result column="keyword_md5" property="keywordMd5" jdbcType="VARCHAR"/>
        <result column="product_source" property="productSource" jdbcType="INTEGER"/>
        <result column="product_name" property="productName" jdbcType="VARCHAR"/>
        <result column="shop_name" property="shopName" jdbcType="VARCHAR"/>
        <result column="required_order_count" property="requiredOrderCount" jdbcType="INTEGER"/>
        <result column="completed_order_count" property="completedOrderCount" jdbcType="INTEGER"/>
        <result column="received_order_count" property="receivedOrderCount" jdbcType="INTEGER"/>
        <result column="reviewed_order_count" property="reviewedOrderCount" jdbcType="INTEGER"/>
        <result column="receive_cycle_hours" property="receiveCycleHours" jdbcType="INTEGER"/>
        <result column="receive_cycle_minutes" property="receiveCycleMinutes" jdbcType="INTEGER"/>
        <result column="order_start_time" property="orderStartTime" jdbcType="TIMESTAMP"/>
        <result column="order_end_time" property="orderEndTime" jdbcType="TIMESTAMP"/>
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
        <result column="estimated_receive_time" property="estimatedReceiveTime" jdbcType="TIMESTAMP"/>
        <result column="status" property="status" jdbcType="INTEGER"/>
        <result column="status_description" property="statusDescription" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">id,keyword_content,keyword_md5,product_source,product_name,shop_name,required_order_count,completed_order_count,received_order_count,reviewed_order_count,receive_cycle_hours,receive_cycle_minutes,order_start_time,order_end_time,create_time,update_time,estimated_receive_time,status,status_description</sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List"/>
        from table_order_task where id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List"/>
        from table_order_task where id = #{id,jdbcType=BIGINT} for update
    </select>
    <sql id="listWhereSQL">
        <if test="query.id!=null">AND id = #{query.id}</if>
        <if test="query.keywordContent!=null">AND keyword_content = #{query.keywordContent}</if>
        <if test="query.keywordMd5!=null">AND keyword_md5 = #{query.keywordMd5}</if>
        <if test="query.productSource!=null">AND product_source = #{query.productSource}</if>
        <if test="query.productName!=null">AND product_name = #{query.productName}</if>
        <if test="query.shopName!=null">AND shop_name = #{query.shopName}</if>
        <if test="query.requiredOrderCount!=null">AND required_order_count = #{query.requiredOrderCount}</if>
        <if test="query.completedOrderCount!=null">AND completed_order_count = #{query.completedOrderCount}</if>
        <if test="query.receivedOrderCount!=null">AND received_order_count = #{query.receivedOrderCount}</if>
        <if test="query.reviewedOrderCount!=null">AND reviewed_order_count = #{query.reviewedOrderCount}</if>
        <if test="query.receiveCycleHours!=null">AND receive_cycle_hours = #{query.receiveCycleHours}</if>
        <if test="query.receiveCycleMinutes!=null">AND receive_cycle_minutes = #{query.receiveCycleMinutes}</if>
        <if test="query.orderStartTime!=null">AND order_start_time = #{query.orderStartTime}</if>
        <if test="query.orderEndTime!=null">AND order_end_time = #{query.orderEndTime}</if>
        <if test="query.minCreateTime!=null">AND create_time >= #{query.minCreateTime}</if>
        <if test="query.maxCreateTime!=null">AND #{query.maxCreateTime} > create_time</if>
        <if test="query.minUpdateTime!=null">AND update_time >= #{query.minUpdateTime}</if>
        <if test="query.maxUpdateTime!=null">AND #{query.maxUpdateTime} > update_time</if>
        <if test="query.minEstimatedReceiveTime!=null">AND estimated_receive_time >= #{query.minEstimatedReceiveTime}</if>
        <if test="query.maxEstimatedReceiveTime!=null">AND #{query.maxEstimatedReceiveTime} > estimated_receive_time</if>
        <if test="query.status!=null">AND status = #{query.status}</if>
        <if test="query.statusDescription!=null">AND status_description = #{query.statusDescription}</if>
    </sql>
    <select id="list" resultMap="BaseResultMap">select
        <include refid="Base_Column_List"/>
        from table_order_task where 1=1
        <include refid="listWhereSQL"/>
        <if test="query.sortList!=null">
            <foreach collection="query.sortList" item="item" open=" order by " separator=",">${item}</foreach>
        </if>
        limit #{query.start},#{query.count}
    </select>
 
 
    <select id="listByIds" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List"/>
        from table_order_task where 1=1
        <if test="ids!=null">
            <foreach collection="ids" item="item" open="and (" separator=" or " close=")">id=#{item}
            </foreach>
        </if>
    </select>
 
    <select id="count" resultType="java.lang.Long">select count(*) from table_order_task where 1=1
        <include refid="listWhereSQL"/>
    </select>
    <delete id="deleteByPrimaryKey"
            parameterType="java.lang.Long">delete from table_order_task where id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.taoke.autopay.entity.js2.OrderTask" useGeneratedKeys="true"
            keyProperty="id">insert into table_order_task (id,keyword_content,keyword_md5,product_source,product_name,shop_name,required_order_count,completed_order_count,received_order_count,reviewed_order_count,receive_cycle_hours,receive_cycle_minutes,order_start_time,order_end_time,create_time,update_time,estimated_receive_time,status,status_description) values (#{id,jdbcType=BIGINT},#{keywordContent,jdbcType=VARCHAR},#{keywordMd5,jdbcType=VARCHAR},#{productSource,jdbcType=INTEGER},#{productName,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR},#{requiredOrderCount,jdbcType=INTEGER},#{completedOrderCount,jdbcType=INTEGER},#{receivedOrderCount,jdbcType=INTEGER},#{reviewedOrderCount,jdbcType=INTEGER},#{receiveCycleHours,jdbcType=INTEGER},#{receiveCycleMinutes,jdbcType=INTEGER},#{orderStartTime,jdbcType=TIMESTAMP},#{orderEndTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{estimatedReceiveTime,jdbcType=TIMESTAMP},#{status,jdbcType=INTEGER},#{statusDescription,jdbcType=VARCHAR})</insert>
    <insert id="insertSelective" parameterType="com.taoke.autopay.entity.js2.OrderTask" useGeneratedKeys="true"
            keyProperty="id">insert into table_order_task
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="keywordContent != null">keyword_content,</if>
            <if test="keywordMd5 != null">keyword_md5,</if>
            <if test="productSource != null">product_source,</if>
            <if test="productName != null">product_name,</if>
            <if test="shopName != null">shop_name,</if>
            <if test="requiredOrderCount != null">required_order_count,</if>
            <if test="completedOrderCount != null">completed_order_count,</if>
            <if test="receivedOrderCount != null">received_order_count,</if>
            <if test="reviewedOrderCount != null">reviewed_order_count,</if>
            <if test="receiveCycleHours != null">receive_cycle_hours,</if>
            <if test="receiveCycleMinutes != null">receive_cycle_minutes,</if>
            <if test="orderStartTime != null">order_start_time,</if>
            <if test="orderEndTime != null">order_end_time,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="estimatedReceiveTime != null">estimated_receive_time,</if>
            <if test="status != null">status,</if>
            <if test="statusDescription != null">status_description,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="keywordContent != null">#{keywordContent,jdbcType=VARCHAR},</if>
            <if test="keywordMd5 != null">#{keywordMd5,jdbcType=VARCHAR},</if>
            <if test="productSource != null">#{productSource,jdbcType=INTEGER},</if>
            <if test="productName != null">#{productName,jdbcType=VARCHAR},</if>
            <if test="shopName != null">#{shopName,jdbcType=VARCHAR},</if>
            <if test="requiredOrderCount != null">#{requiredOrderCount,jdbcType=INTEGER},</if>
            <if test="completedOrderCount != null">#{completedOrderCount,jdbcType=INTEGER},</if>
            <if test="receivedOrderCount != null">#{receivedOrderCount,jdbcType=INTEGER},</if>
            <if test="reviewedOrderCount != null">#{reviewedOrderCount,jdbcType=INTEGER},</if>
            <if test="receiveCycleHours != null">#{receiveCycleHours,jdbcType=INTEGER},</if>
            <if test="receiveCycleMinutes != null">#{receiveCycleMinutes,jdbcType=INTEGER},</if>
            <if test="orderStartTime != null">#{orderStartTime,jdbcType=TIMESTAMP},</if>
            <if test="orderEndTime != null">#{orderEndTime,jdbcType=TIMESTAMP},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="estimatedReceiveTime != null">#{estimatedReceiveTime,jdbcType=TIMESTAMP},</if>
            <if test="status != null">#{status,jdbcType=INTEGER},</if>
            <if test="statusDescription != null">#{statusDescription,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey"
            parameterType="com.taoke.autopay.entity.js2.OrderTask">update table_order_task set keyword_content = #{keywordContent,jdbcType=VARCHAR},keyword_md5 = #{keywordMd5,jdbcType=VARCHAR},product_source = #{productSource,jdbcType=INTEGER},product_name = #{productName,jdbcType=VARCHAR},shop_name = #{shopName,jdbcType=VARCHAR},required_order_count = #{requiredOrderCount,jdbcType=INTEGER},completed_order_count = #{completedOrderCount,jdbcType=INTEGER},received_order_count = #{receivedOrderCount,jdbcType=INTEGER},reviewed_order_count = #{reviewedOrderCount,jdbcType=INTEGER},receive_cycle_hours = #{receiveCycleHours,jdbcType=INTEGER},receive_cycle_minutes = #{receiveCycleMinutes,jdbcType=INTEGER},order_start_time = #{orderStartTime,jdbcType=TIMESTAMP},order_end_time = #{orderEndTime,jdbcType=TIMESTAMP},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP},estimated_receive_time = #{estimatedReceiveTime,jdbcType=TIMESTAMP},status = #{status,jdbcType=INTEGER},status_description = #{statusDescription,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.js2.OrderTask">update table_order_task
        <set>
            <if test="keywordContent != null">keyword_content=#{keywordContent,jdbcType=VARCHAR},</if>
            <if test="keywordMd5 != null">keyword_md5=#{keywordMd5,jdbcType=VARCHAR},</if>
            <if test="productSource != null">product_source=#{productSource,jdbcType=INTEGER},</if>
            <if test="productName != null">product_name=#{productName,jdbcType=VARCHAR},</if>
            <if test="shopName != null">shop_name=#{shopName,jdbcType=VARCHAR},</if>
            <if test="requiredOrderCount != null">required_order_count=#{requiredOrderCount,jdbcType=INTEGER},</if>
            <if test="completedOrderCount != null">completed_order_count=#{completedOrderCount,jdbcType=INTEGER},</if>
            <if test="receivedOrderCount != null">received_order_count=#{receivedOrderCount,jdbcType=INTEGER},</if>
            <if test="reviewedOrderCount != null">reviewed_order_count=#{reviewedOrderCount,jdbcType=INTEGER},</if>
            <if test="receiveCycleHours != null">receive_cycle_hours=#{receiveCycleHours,jdbcType=INTEGER},</if>
            <if test="receiveCycleMinutes != null">receive_cycle_minutes=#{receiveCycleMinutes,jdbcType=INTEGER},</if>
            <if test="orderStartTime != null">order_start_time=#{orderStartTime,jdbcType=TIMESTAMP},</if>
            <if test="orderEndTime != null">order_end_time=#{orderEndTime,jdbcType=TIMESTAMP},</if>
            <if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="estimatedReceiveTime != null">estimated_receive_time=#{estimatedReceiveTime,jdbcType=TIMESTAMP},</if>
            <if test="status != null">status=#{status,jdbcType=INTEGER},</if>
            <if test="statusDescription != null">status_description=#{statusDescription,jdbcType=VARCHAR},</if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
</mapper>