mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-09 12:30:07 +08:00
定时任务处理未分帐订单
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.OrderUnsplitRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Repository
|
||||
public interface OrderUnsplitRecordMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
@@ -24,4 +25,6 @@ public interface OrderUnsplitRecordMapper {
|
||||
int insertOrUpdate(OrderUnsplitRecord record);
|
||||
|
||||
int insertOrUpdateSelective(OrderUnsplitRecord record);
|
||||
}
|
||||
|
||||
List<OrderUnsplitRecord> queryUnsplitOrders(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
}
|
||||
|
||||
@@ -6,4 +6,8 @@ import java.util.List;
|
||||
|
||||
public interface OrderUnsplitRecordService {
|
||||
void batchInsert(List<OrderUnsplitRecord> orderUnsplitRecordList);
|
||||
|
||||
List<OrderUnsplitRecord> queryUnsplitOrders(String startTime, String endTime);
|
||||
|
||||
void updateOrderUnsplitRecord(OrderUnsplitRecord orderUnsplitRecord);
|
||||
}
|
||||
|
||||
@@ -18,4 +18,14 @@ public class OrderUnsplitRecordServiceImpl implements OrderUnsplitRecordService
|
||||
public void batchInsert(List<OrderUnsplitRecord> orderUnsplitRecordList) {
|
||||
orderUnsplitRecordMapper.batchInsert(orderUnsplitRecordList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderUnsplitRecord> queryUnsplitOrders(String startTime, String endTime) {
|
||||
return orderUnsplitRecordMapper.queryUnsplitOrders(startTime, endTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOrderUnsplitRecord(OrderUnsplitRecord orderUnsplitRecord) {
|
||||
orderUnsplitRecordMapper.insertOrUpdateSelective(orderUnsplitRecord);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, payment_id, `status`, order_code, pay_amount, refund_amount, settle_amount, order_time,
|
||||
id, payment_id, `status`, order_code, pay_amount, refund_amount, settle_amount, order_time,
|
||||
create_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from order_unsplit_record
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
@@ -237,12 +237,12 @@
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into order_unsplit_record
|
||||
(payment_id, `status`, order_code, pay_amount, refund_amount, settle_amount, order_time,
|
||||
(payment_id, `status`, order_code, pay_amount, refund_amount, settle_amount, order_time,
|
||||
create_time)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.paymentId,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.orderCode,jdbcType=VARCHAR},
|
||||
#{item.payAmount,jdbcType=DECIMAL}, #{item.refundAmount,jdbcType=DECIMAL}, #{item.settleAmount,jdbcType=DECIMAL},
|
||||
(#{item.paymentId,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.orderCode,jdbcType=VARCHAR},
|
||||
#{item.payAmount,jdbcType=DECIMAL}, #{item.refundAmount,jdbcType=DECIMAL}, #{item.settleAmount,jdbcType=DECIMAL},
|
||||
#{item.orderTime,jdbcType=TIMESTAMP}, #{item.createTime,jdbcType=TIMESTAMP})
|
||||
</foreach>
|
||||
</insert>
|
||||
@@ -276,7 +276,7 @@
|
||||
#{orderTime,jdbcType=TIMESTAMP},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</trim>
|
||||
on duplicate key update
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
@@ -353,7 +353,7 @@
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
@@ -384,4 +384,13 @@
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
<select id="queryUnsplitOrders" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from order_unsplit_record
|
||||
where status = 'unsplit'
|
||||
and order_time between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
|
||||
order by order_time
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user