...
|
...
|
@@ -15,6 +15,7 @@ |
|
|
<result column="create_time" property="createTime" jdbcType="INTEGER" />
|
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
|
|
|
<result column="extra_activity_id" property="extraActivityId" jdbcType="INTEGER" />
|
|
|
<result column="cps_extra_activity_id" property="cpsExtraActivityId" jdbcType="INTEGER" />
|
|
|
<result column="activity_id" property="activityId" jdbcType="INTEGER" />
|
|
|
<result column="activity_name" property="activityName" jdbcType="VARCHAR" />
|
|
|
<result column="extra_amount" property="extraAmount" jdbcType="DECIMAL" />
|
...
|
...
|
@@ -24,7 +25,7 @@ |
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, order_code,settlement_code, promote_uid,order_uid, status, last_order_amount, order_time, is_new, amount, create_time,
|
|
|
update_time,extra_activity_id,activity_id,activity_name,extra_amount,order_amount,special_status,payment_type
|
|
|
update_time,extra_activity_id,cps_extra_activity_id,activity_id,activity_name,extra_amount,order_amount,special_status,payment_type
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
...
|
...
|
@@ -104,13 +105,13 @@ |
|
|
order_uid, settlement_code, status,
|
|
|
last_order_amount, order_time, is_new,
|
|
|
amount, create_time, update_time,
|
|
|
extra_activity_id, activity_id,activity_name, extra_amount,
|
|
|
extra_activity_id,cps_extra_activity_id, activity_id,activity_name, extra_amount,
|
|
|
order_amount,special_status,payment_type)
|
|
|
values (#{id,jdbcType=INTEGER}, #{orderCode,jdbcType=VARCHAR}, #{promoteUid,jdbcType=INTEGER},
|
|
|
#{orderUid,jdbcType=INTEGER}, #{settlementCode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
|
|
#{lastOrderAmount,jdbcType=DECIMAL}, #{orderTime,jdbcType=INTEGER}, #{isNew,jdbcType=TINYINT},
|
|
|
#{amount,jdbcType=DECIMAL}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
|
|
|
#{extraActivityId,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER},#{activityName,jdbcType=VARCHAR}, #{extraAmount,jdbcType=DECIMAL},
|
|
|
#{extraActivityId,jdbcType=INTEGER},#{cpsExtraActivityId,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER},#{activityName,jdbcType=VARCHAR}, #{extraAmount,jdbcType=DECIMAL},
|
|
|
#{orderAmount,jdbcType=DECIMAL}), #{specialStatus,jdbcType=TINYINT}, #{paymentType,jdbcType=TINYINT}
|
|
|
</insert>
|
|
|
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.yoho.unions.dal.model.UnionShareOrders" >
|
...
|
...
|
@@ -155,6 +156,9 @@ |
|
|
<if test="extraActivityId != null" >
|
|
|
extra_activity_id,
|
|
|
</if>
|
|
|
<if test="cpsExtraActivityId != null" >
|
|
|
cps_extra_activity_id,
|
|
|
</if>
|
|
|
<if test="activityId != null" >
|
|
|
activity_id,
|
|
|
</if>
|
...
|
...
|
@@ -214,6 +218,9 @@ |
|
|
<if test="extraActivityId != null" >
|
|
|
#{extraActivityId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="cpsExtraActivityId != null" >
|
|
|
#{cpsExtraActivityId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="activityId != null" >
|
|
|
#{activityId,jdbcType=INTEGER},
|
|
|
</if>
|
...
|
...
|
@@ -273,6 +280,9 @@ |
|
|
<if test="extraActivityId != null" >
|
|
|
extra_activity_id = #{extraActivityId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="cpsExtraActivityId != null" >
|
|
|
cps_extra_activity_id = #{cpsExtraActivityId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="activityId != null" >
|
|
|
activity_id = #{activityId,jdbcType=INTEGER},
|
|
|
</if>
|
...
|
...
|
@@ -306,7 +316,7 @@ |
|
|
<update id="updateByIdsForCpsUserActivity" >
|
|
|
update union_share_orders
|
|
|
set update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
extra_activity_id = #{cpsExtraActivityId,jdbcType=INTEGER}
|
|
|
cps_extra_activity_id = #{cpsExtraActivityId,jdbcType=INTEGER}
|
|
|
where id in
|
|
|
<foreach collection="ids" separator="," item="item" index="index" close=")" open="(">
|
|
|
#{item}
|
...
|
...
|
@@ -326,6 +336,7 @@ |
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
extra_activity_id = #{extraActivityId,jdbcType=INTEGER},
|
|
|
cps_extra_activity_id = #{cpsExtraActivityId,jdbcType=INTEGER},
|
|
|
activity_id = #{activityId,jdbcType=INTEGER},
|
|
|
activity_name = #{activityName,jdbcType=VARCHAR},
|
|
|
extra_amount = #{extraAmount,jdbcType=DECIMAL},
|
...
|
...
|
@@ -562,7 +573,7 @@ |
|
|
<select id="selectNewPromoteUidsOrder" resultMap="BaseResultMap">
|
|
|
select <include refid="Base_Column_List" />
|
|
|
from union_share_orders
|
|
|
where promote_uid in
|
|
|
where order_code is not null and promote_uid in
|
|
|
<foreach collection="promoteUids" separator="," item="item" index="index" close=")" open="(">
|
|
|
#{item}
|
|
|
</foreach>
|
...
|
...
|
@@ -571,7 +582,7 @@ |
|
|
<select id="selectNewPromoteUidOrder" resultMap="BaseResultMap">
|
|
|
select <include refid="Base_Column_List" />
|
|
|
from union_share_orders
|
|
|
where promote_uid = #{promoteUid} and order_time <#{endTime} and status in (10,20,30,40)
|
|
|
where promote_uid = #{promoteUid} and order_code is not null and order_time <#{endTime} and status in (10,20,30,40)
|
|
|
</select>
|
|
|
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|