采购单同步

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent 78e33de73f
commit 22af68a24f

@ -650,11 +650,13 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
return new HashMap<>();
}
StringBuilder where = new StringBuilder();
if (ObjectUtil.isNotEmpty(filter.getPurchaseStartTime())) {
where.append(String.format(" and purchase_order_start_time >= '%s'", DateUtil.formatDateTime(filter.getPurchaseStartTime())));
}
if (ObjectUtil.isNotEmpty(filter.getPurchaseEndTime())) {
where.append(String.format(" and purchase_order_start_time <= '%s'", DateUtil.formatDateTime(filter.getPurchaseEndTime())));
if (ObjectUtil.isNotEmpty(filter)) {
if (ObjectUtil.isNotEmpty(filter.getPurchaseStartTime())) {
where.append(String.format(" and purchase_order_start_time >= '%s'", DateUtil.formatDateTime(filter.getPurchaseStartTime())));
}
if (ObjectUtil.isNotEmpty(filter.getPurchaseEndTime())) {
where.append(String.format(" and purchase_order_start_time <= '%s'", DateUtil.formatDateTime(filter.getPurchaseEndTime())));
}
}
List<PurchaseOrderBO> purchaseOrders = purchaseOrderMapper.selectPurchaseOrders(shopIds, orderIds, StatusConst.normal, where.toString());
if (ObjectUtil.isEmpty(purchaseOrders)) {
@ -1503,7 +1505,7 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
return orderPhaseInfo;
}
private List<JSONObject> appendItemsIsUseManualConsignee(List<JSONObject> returnOrderItems, Map<String, JSONObject> returnPurchaseOrders, Map<Long, Long> skuIdAndPurchaseOrderIdMap) {
for (JSONObject item : returnOrderItems) {

@ -68,7 +68,7 @@
select
<include refid="Base_Column_List" />
from op_order
where op_order_id = #{opOrderId,jdbcType=BIGINT}
where op_order_id = #{opOrderId,jdbcType=BIGINT}
</select>
<select id="selectByOrderId" resultType="com.ms.dal.entity.OpOrder">
select * from op_order where order_id = #{orderId}
@ -106,7 +106,7 @@
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from op_order
where op_order_id = #{opOrderId,jdbcType=BIGINT}
where op_order_id = #{opOrderId,jdbcType=BIGINT}
</delete>
<delete id="deleteByOrderId">
delete from op_order
@ -351,11 +351,11 @@
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
</set>
where op_order_id = #{opOrderId,jdbcType=BIGINT}
where op_order_id = #{opOrderId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.OpOrder">
update op_order
set
set
order_id = #{orderId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=BIGINT},
coupon_amount = #{couponAmount,jdbcType=DECIMAL},
@ -395,14 +395,14 @@
gmt_exp_ship_time = #{gmtExpShipTime,jdbcType=TIMESTAMP},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where op_order_id = #{opOrderId,jdbcType=BIGINT}
where op_order_id = #{opOrderId,jdbcType=BIGINT}
</update>
<select id="getListByOrderIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from op_order
where order_id in
<foreach collection="orderIds" item="orderId" index="index" open="(" close=")" separator=",">
<foreach collection="list" item="orderId" index="index" open="(" close=")" separator=",">
#{orderId}
</foreach>
</select>

Loading…
Cancel
Save