Merge branch 'master' of codeup.aliyun.com:64d9c5feeceb191898f636d7/honor-dd-light-ds-java

20230922-ljl-fixBug
cxxxxxxx详 1 year ago
commit ce5b86fa06

@ -1,5 +1,7 @@
package com.ms.api.dto.order;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.Data;
import java.math.BigDecimal;
@ -82,6 +84,7 @@ public class DsPurchaseSettingDTO {
/**
*
*/
@JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue)
private Date gmtIsAutoPurchase;
/**

@ -1,18 +1,5 @@
package com.ms.api.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@ -26,90 +13,28 @@ import com.doudian.open.api.order_BatchSearchIndex.param.OrderBatchSearchIndexPa
import com.doudian.open.api.order_BatchSearchIndex.param.PlainTextListItem;
import com.ms.api.common.ApiResult;
import com.ms.api.common.Pager;
import com.ms.api.consts.AfterSaleConst;
import com.ms.api.consts.DsOrderConst;
import com.ms.api.consts.OrderChildTagConst;
import com.ms.api.consts.OrderConst;
import com.ms.api.consts.PurchaseOrderConst;
import com.ms.api.consts.RedisKeyConst;
import com.ms.api.consts.StatusConst;
import com.ms.api.consts.TblConst;
import com.ms.api.dto.order.AllowAutoPurchaseProductDTO;
import com.ms.api.dto.order.DsPurchaseSettingDTO;
import com.ms.api.dto.order.FilterAutoPurchaseProductDTO;
import com.ms.api.dto.order.PurchaseSettingDTO;
import com.ms.api.dto.order.SearchDsOrderFilterDTO;
import com.ms.api.service.AfterSaleService;
import com.ms.api.service.OpLogisticsPlatformService;
import com.ms.api.service.OpOrderAddressHistoryService;
import com.ms.api.service.OpOrderAmountDetailService;
import com.ms.api.service.OpOrderChildLogisticsService;
import com.ms.api.service.OpOrderDsService;
import com.ms.api.service.OpOrderEncryptIndexService;
import com.ms.api.service.OpOrderGivenProductService;
import com.ms.api.service.OpOrderOutstorageHistoryService;
import com.ms.api.service.OpOrderPhaseService;
import com.ms.api.service.OpOrderPriceProtectionService;
import com.ms.api.service.OpOrderRedpackInfoService;
import com.ms.api.service.OrderPrintService;
import com.ms.api.service.ProductToDsItemService;
import com.ms.api.service.PurchaseOrderService;
import com.ms.api.service.PurchaseSettingService;
import com.ms.api.service.ShopService;
import com.ms.api.tool.CommonTool;
import com.ms.api.tool.DsOrderTool;
import com.ms.api.tool.OrderPrintTool;
import com.ms.api.tool.OrderTool;
import com.ms.api.tool.PurchaseTool;
import com.ms.api.consts.*;
import com.ms.api.dto.order.*;
import com.ms.api.service.*;
import com.ms.api.tool.*;
import com.ms.api.util.DdRequestUtil;
import com.ms.api.util.WebUtil;
import com.ms.dal.bo.OpLogisticsPlatformBO;
import com.ms.dal.bo.OpOrderAddressHistoryBO;
import com.ms.dal.bo.OpOrderChildBO;
import com.ms.dal.bo.PurchaseOrderBO;
import com.ms.dal.entity.AfterSale;
import com.ms.dal.entity.DsAllowAutoPurchaseProduct;
import com.ms.dal.entity.DsAutoPurchaseLog;
import com.ms.dal.entity.DsFilterAutoPurchaseProduct;
import com.ms.dal.entity.DsPurchaseSetting;
import com.ms.dal.entity.OpOrder;
import com.ms.dal.entity.OpOrderAmountDetail;
import com.ms.dal.entity.OpOrderChildLogistics;
import com.ms.dal.entity.OpOrderEncryptIndex;
import com.ms.dal.entity.OpOrderExt;
import com.ms.dal.entity.OpOrderGivenProduct;
import com.ms.dal.entity.OpOrderOutstorageHistory;
import com.ms.dal.entity.OpOrderPhase;
import com.ms.dal.entity.OpOrderPriceProtection;
import com.ms.dal.entity.OpOrderRedpackInfo;
import com.ms.dal.entity.OpOrderSensitive;
import com.ms.dal.entity.ProductToDsItem;
import com.ms.dal.entity.PurchaseOrder;
import com.ms.dal.entity.PurchaseOrderItem;
import com.ms.dal.entity.PurchaseOrderSetting;
import com.ms.dal.entity.PurchaseSetting;
import com.ms.dal.entity.PurchaseSettingLog;
import com.ms.dal.entity.Shop;
import com.ms.dal.entity.ShopTo1688DsMember;
import com.ms.dal.mapper.DsAllowAutoPurchaseProductMapper;
import com.ms.dal.mapper.DsAutoPurchaseLogMapper;
import com.ms.dal.mapper.DsFilterAutoPurchaseProductMapper;
import com.ms.dal.mapper.DsPurchaseSettingMapper;
import com.ms.dal.mapper.OpOrderChildMapper;
import com.ms.dal.mapper.OpOrderEncryptIndexMapper;
import com.ms.dal.mapper.OpOrderMapper;
import com.ms.dal.mapper.PurchaseOrderItemMapper;
import com.ms.dal.mapper.PurchaseOrderMapper;
import com.ms.dal.mapper.PurchaseOrderSettingMapper;
import com.ms.dal.mapper.PurchaseSettingLogMapper;
import com.ms.dal.mapper.PurchaseSettingMapper;
import com.ms.dal.mapper.ShopTo1688DsMemberMapper;
import com.ms.dal.entity.*;
import com.ms.dal.mapper.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
/**
*
*/
@ -154,6 +79,9 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
@Autowired
private PurchaseSettingLogMapper purchaseSettingLogMapper;
@Autowired
private DsPurchaseSettingLogMapper dsPurchaseSettingLogMapper;
@Autowired
private ShopService shopService;
@ -784,6 +712,102 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
return true;
}
@Transactional(rollbackFor = Exception.class)
public boolean saveDsPurchaseSetting(Long shopId, DsPurchaseSettingDTO dsPurchaseSettingDTO) {
if (dsPurchaseSettingDTO == null) {
return false;
}
DsPurchaseSetting oldSetting= dsPurchaseSettingMapper.selectByShopId(shopId);
List<Long> allowIdList = dsAllowAutoPurchaseProductMapper.getProductIdListByShopId(shopId);
List<Long> filterIdList = dsFilterAutoPurchaseProductMapper.getProductIdListByShopId(shopId);
List<String> allowIdStrList = allowIdList.stream()
.map(String::valueOf)
.collect(Collectors.toList());
List<String> filterIdStrList = filterIdList.stream()
.map(String::valueOf)
.collect(Collectors.toList());
String allowAutoPurchaseProductIds = String.join(",", allowIdStrList);
String filterAutoPurchaseProductIds = String.join(",", filterIdStrList);
String oldSettingJson = JSONObject.toJSONString(oldSetting);
JSONObject oldSettingObject = JSONObject.parseObject(oldSettingJson);
oldSettingObject.remove("gmtCreate");
oldSettingObject.remove("gmtModified");
oldSettingObject.put("allowAutoPurchaseProductIds", allowAutoPurchaseProductIds);
oldSettingObject.put("filterAutoPurchaseProductIds", filterAutoPurchaseProductIds);
oldSettingJson = oldSettingObject.toJSONString();
DsPurchaseSetting setting = new DsPurchaseSetting();
setting.setShopId(shopId);
setting.setIsPurchaseLogisticsUpdateToPlatform(dsPurchaseSettingDTO.getIsPurchaseLogisticsUpdateToPlatform());
setting.setDeliveryTimeType(dsPurchaseSettingDTO.getDeliveryTimeType());
setting.setIsAutoPay(dsPurchaseSettingDTO.getIsAutoPay());
setting.setIsAutoPurchase(dsPurchaseSettingDTO.getIsAutoPurchase());
setting.setDelayPurchaseMinute(dsPurchaseSettingDTO.getDelayPurchaseMinute());
setting.setIsUseForbiddenPurchaseProfit(dsPurchaseSettingDTO.getIsUseForbiddenPurchaseProfit());
setting.setForbiddenPurchaseProfit(dsPurchaseSettingDTO.getForbiddenPurchaseProfit());
setting.setIsUseForbiddenKeywords(dsPurchaseSettingDTO.getIsUseForbiddenKeywords());
setting.setForbiddenKeywords(dsPurchaseSettingDTO.getForbiddenKeywords());
setting.setIsUseAllProduct(setting.getIsUseAllProduct());
setting.setIsUsePartProduct(setting.getIsUsePartProduct());
setting.setIsForbidIsolationPurchase(setting.getIsForbidIsolationPurchase());
setting.setGmtIsAutoPurchase(setting.getGmtIsAutoPurchase());
setting.setGmtModified(new Date());
// 更新配置
dsPurchaseSettingMapper.updateByShopIdSelective(setting);
DsPurchaseSettingLog log = new DsPurchaseSettingLog();
log.setShopId(shopId);
log.setIsPurchaseLogisticsUpdateToPlatform(dsPurchaseSettingDTO.getIsPurchaseLogisticsUpdateToPlatform());
log.setDeliveryTimeType(dsPurchaseSettingDTO.getDeliveryTimeType());
log.setIsAutoPay(dsPurchaseSettingDTO.getIsAutoPay());
log.setIsAutoPurchase(dsPurchaseSettingDTO.getIsAutoPurchase());
log.setDelayPurchaseMinute(dsPurchaseSettingDTO.getDelayPurchaseMinute());
log.setIsUseForbiddenPurchaseProfit(dsPurchaseSettingDTO.getIsUseForbiddenPurchaseProfit());
log.setForbiddenPurchaseProfit(dsPurchaseSettingDTO.getForbiddenPurchaseProfit());
log.setIsUseForbiddenKeywords(dsPurchaseSettingDTO.getIsUseForbiddenKeywords());
log.setForbiddenKeywords(dsPurchaseSettingDTO.getForbiddenKeywords());
log.setIsUseAllProduct(setting.getIsUseAllProduct());
log.setIsUsePartProduct(setting.getIsUsePartProduct());
log.setIsForbidIsolationPurchase(setting.getIsForbidIsolationPurchase());
log.setGmtIsAutoPurchase(setting.getGmtIsAutoPurchase());
log.setGmtCreate(new Date());
log.setGmtModified(new Date());
log.setActionSource(PurchaseOrderConst.ACTION_SOURCE_PLATFORM_PURCHASE_SETTING);
log.setBeforeData(oldSettingJson);
// 操作员信息之前都是从session取这边先跳过todo:
log.setOperateShopId(shopId);
// log.setOperateIp("");
// log.setOperateMemberId("");
// 配置更新日志
dsPurchaseSettingLogMapper.insertSelective(log);
// 配置其他关联表的更新
saveDsAutoPurchaseSettingExtendData(shopId, oldSetting, dsPurchaseSettingDTO, allowIdList, filterIdList);
return true;
}
public boolean saveDsAutoPurchaseSettingExtendData(Long shopId, DsPurchaseSetting oldSetting, DsPurchaseSettingDTO dsPurchaseSettingDTO, List<Long> oldAllowIdList, List<Long> oldFilterIdList) {
boolean isChange = false;
if (dsPurchaseSettingDTO.getIsUseAllProduct() != 0) {
}
if (dsPurchaseSettingDTO.getIsUsePartProduct() != 0) {
}
return isChange;
}
public DsPurchaseSettingDTO getDsPurchaseSettingByShopId(Long shopId) {
DsPurchaseSetting dsPurchaseSetting = dsPurchaseSettingMapper.selectByShopId(shopId);

@ -23,4 +23,6 @@ public interface DsAllowAutoPurchaseProductMapper {
int updateByPrimaryKey(DsAllowAutoPurchaseProduct record);
List<DsAllowAutoPurchaseProduct> getListByShopId(Long shopId);
List<Long> getProductIdListByShopId(Long shopId);
}

@ -24,4 +24,6 @@ public interface DsFilterAutoPurchaseProductMapper {
int updateByPrimaryKey(DsFilterAutoPurchaseProduct record);
List<DsFilterAutoPurchaseProduct> getListByShopId(Long shopId);
List<Long> getProductIdListByShopId(Long shopId);
}

@ -22,6 +22,8 @@ public interface DsPurchaseSettingMapper {
int updateByPrimaryKey(DsPurchaseSetting record);
int updateByShopIdSelective(DsPurchaseSetting record);
DsPurchaseSetting selectByShopId(Long shopId);
}

@ -32,6 +32,10 @@
<include refid="Base_Column_List" />
from ds_allow_auto_purchase_product where shop_id = #{shopId,jdbcType=BIGINT}
</select>
<select id="getProductIdListByShopId" resultType="java.lang.Long">
select product_id from ds_allow_auto_purchase_product where shop_id = #{shopId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ds_allow_auto_purchase_product
where ds_allow_auto_purchase_product_id = #{dsAllowAutoPurchaseProductId,jdbcType=BIGINT}

@ -24,12 +24,12 @@
select
<include refid="Base_Column_List" />
from ds_auto_purchase_switch_log
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ds_auto_purchase_switch_log
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="ds_auto_purchase_switch_log_id" keyProperty="dsAutoPurchaseSwitchLogId" parameterType="com.ms.dal.entity.DsAutoPurchaseSwitchLog" useGeneratedKeys="true">
insert into ds_auto_purchase_switch_log
@ -43,22 +43,22 @@
<insert id="insertSelective" keyColumn="ds_auto_purchase_switch_log_id" keyProperty="dsAutoPurchaseSwitchLogId" parameterType="com.ms.dal.entity.DsAutoPurchaseSwitchLog" useGeneratedKeys="true">
insert into ds_auto_purchase_switch_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dsAutoPurchaseSwitchLogId != null">dsAutoPurchaseSwitchLogId,</if>
<if test="shopId != null">shopId,</if>
<if test="isAutoPurchase != null">isAutoPurchase,</if>
<if test="operateShopId != null">operateShopId,</if>
<if test="operateIp != null">operateIp,</if>
<if test="gmtCreate != null">gmtCreate,</if>
<if test="gmtModified != null">gmtModified,</if>
<if test="dsAutoPurchaseSwitchLogId != null">ds_auto_purchase_switch_log_id,</if>
<if test="shopId != null">shop_id,</if>
<if test="isAutoPurchase != null">is_auto_purchase,</if>
<if test="operateShopId != null">operate_shop_id,</if>
<if test="operateIp != null">operate_ip,</if>
<if test="gmtCreate != null">gmt_create,</if>
<if test="gmtModified != null">gmt_modified,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dsAutoPurchaseSwitchLogId != null">ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT},</if>
<if test="shopId != null">shop_id = #{shopId,jdbcType=BIGINT},</if>
<if test="isAutoPurchase != null">is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN},</if>
<if test="operateShopId != null">operate_shop_id = #{operateShopId,jdbcType=BIGINT},</if>
<if test="operateIp != null">operate_ip = #{operateIp,jdbcType=VARCHAR},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},</if>
<if test="gmtModified != null">gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},</if>
<if test="dsAutoPurchaseSwitchLogId != null">#{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT},</if>
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
<if test="isAutoPurchase != null">#{isAutoPurchase,jdbcType=BOOLEAN},</if>
<if test="operateShopId != null">#{operateShopId,jdbcType=BIGINT},</if>
<if test="operateIp != null">#{operateIp,jdbcType=VARCHAR},</if>
<if test="gmtCreate != null">#{gmtCreate,jdbcType=TIMESTAMP},</if>
<if test="gmtModified != null">#{gmtModified,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.DsAutoPurchaseSwitchLog">
@ -83,17 +83,17 @@
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
</set>
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.DsAutoPurchaseSwitchLog">
update ds_auto_purchase_switch_log
set
set
shop_id = #{shopId,jdbcType=BIGINT},
is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN},
operate_shop_id = #{operateShopId,jdbcType=BIGINT},
operate_ip = #{operateIp,jdbcType=VARCHAR},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
where ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}
</update>
</mapper>

@ -32,6 +32,9 @@
<include refid="Base_Column_List" />
from ds_filter_auto_purchase_product where shop_id = #{shopId,jdbcType=BIGINT}
</select>
<select id="getProductIdListByShopId" resultType="java.lang.Long">
select product_id from ds_filter_auto_purchase_product where shop_id = #{shopId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ds_filter_auto_purchase_product

@ -46,12 +46,12 @@
select
<include refid="Base_Column_List" />
from ds_purchase_setting_log
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ds_purchase_setting_log
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="ds_purchase_setting_log_id" keyProperty="dsPurchaseSettingLogId" parameterType="com.ms.dal.entity.DsPurchaseSettingLog" useGeneratedKeys="true">
insert into ds_purchase_setting_log
@ -77,56 +77,56 @@
<insert id="insertSelective" keyColumn="ds_purchase_setting_log_id" keyProperty="dsPurchaseSettingLogId" parameterType="com.ms.dal.entity.DsPurchaseSettingLog" useGeneratedKeys="true">
insert into ds_purchase_setting_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dsPurchaseSettingLogId != null">dsPurchaseSettingLogId,</if>
<if test="shopId != null">shopId,</if>
<if test="isAutoPurchase != null">isAutoPurchase,</if>
<if test="gmtIsAutoPurchase != null">gmtIsAutoPurchase,</if>
<if test="isAutoPay != null">isAutoPay,</if>
<if test="delayPurchaseMinute != null">delayPurchaseMinute,</if>
<if test="isUseForbiddenPurchaseProfit != null">isUseForbiddenPurchaseProfit,</if>
<if test="forbiddenPurchaseProfit != null">forbiddenPurchaseProfit,</if>
<if test="isUseForbiddenKeywords != null">isUseForbiddenKeywords,</if>
<if test="forbiddenKeywords != null">forbiddenKeywords,</if>
<if test="isUseAllProduct != null">isUseAllProduct,</if>
<if test="isUsePartProduct != null">isUsePartProduct,</if>
<if test="isForbidIsolationPurchase != null">isForbidIsolationPurchase,</if>
<if test="filterAutoPurchaseProductIds != null">filterAutoPurchaseProductIds,</if>
<if test="allowAutoPurchaseProductIds != null">allowAutoPurchaseProductIds,</if>
<if test="isPurchaseLogisticsUpdateToPlatform != null">isPurchaseLogisticsUpdateToPlatform,</if>
<if test="deliveryTimeType != null">deliveryTimeType,</if>
<if test="operateShopId != null">operateShopId,</if>
<if test="operateMemberId != null">operateMemberId,</if>
<if test="actionSource != null">actionSource,</if>
<if test="operateIp != null">operateIp,</if>
<if test="gmtCreate != null">gmtCreate,</if>
<if test="gmtModified != null">gmtModified,</if>
<if test="beforeData != null">beforeData,</if>
<if test="dsPurchaseSettingLogId != null">ds_Purchase_Setting_Log_Id,</if>
<if test="shopId != null">shop_Id,</if>
<if test="isAutoPurchase != null">is_Auto_Purchase,</if>
<if test="gmtIsAutoPurchase != null">gmt_Is_Auto_Purchase,</if>
<if test="isAutoPay != null">is_Auto_Pay,</if>
<if test="delayPurchaseMinute != null">delay_Purchase_Minute,</if>
<if test="isUseForbiddenPurchaseProfit != null">is_Use_Forbidden_Purchase_Profit,</if>
<if test="forbiddenPurchaseProfit != null">forbidden_Purchase_Profit,</if>
<if test="isUseForbiddenKeywords != null">is_Use_Forbidden_Keywords,</if>
<if test="forbiddenKeywords != null">forbidden_Keywords,</if>
<if test="isUseAllProduct != null">is_Use_All_Product,</if>
<if test="isUsePartProduct != null">is_Use_Part_Product,</if>
<if test="isForbidIsolationPurchase != null">is_Forbid_Isolation_Purchase,</if>
<if test="filterAutoPurchaseProductIds != null">filter_Auto_Purchase_Product_Ids,</if>
<if test="allowAutoPurchaseProductIds != null">allow_Auto_Purchase_Product_Ids,</if>
<if test="isPurchaseLogisticsUpdateToPlatform != null">is_Purchase_Logistics_Update_To_Platform,</if>
<if test="deliveryTimeType != null">delivery_Time_Type,</if>
<if test="operateShopId != null">operate_Shop_Id,</if>
<if test="operateMemberId != null">operate_Member_Id,</if>
<if test="actionSource != null">action_Source,</if>
<if test="operateIp != null">operate_Ip,</if>
<if test="gmtCreate != null">gmt_Create,</if>
<if test="gmtModified != null">gmt_Modified,</if>
<if test="beforeData != null">before_Data,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dsPurchaseSettingLogId != null">ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT},</if>
<if test="shopId != null">shop_id = #{shopId,jdbcType=BIGINT},</if>
<if test="isAutoPurchase != null">is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN},</if>
<if test="gmtIsAutoPurchase != null">gmt_is_auto_purchase = #{gmtIsAutoPurchase,jdbcType=TIMESTAMP},</if>
<if test="isAutoPay != null">is_auto_pay = #{isAutoPay,jdbcType=BOOLEAN},</if>
<if test="delayPurchaseMinute != null">delay_purchase_minute = #{delayPurchaseMinute,jdbcType=SMALLINT},</if>
<if test="isUseForbiddenPurchaseProfit != null">is_use_forbidden_purchase_profit = #{isUseForbiddenPurchaseProfit,jdbcType=BOOLEAN},</if>
<if test="forbiddenPurchaseProfit != null">forbidden_purchase_profit = #{forbiddenPurchaseProfit,jdbcType=DECIMAL},</if>
<if test="isUseForbiddenKeywords != null">is_use_forbidden_keywords = #{isUseForbiddenKeywords,jdbcType=BOOLEAN},</if>
<if test="forbiddenKeywords != null">forbidden_keywords = #{forbiddenKeywords,jdbcType=VARCHAR},</if>
<if test="isUseAllProduct != null">is_use_all_product = #{isUseAllProduct,jdbcType=BOOLEAN},</if>
<if test="isUsePartProduct != null">is_use_part_product = #{isUsePartProduct,jdbcType=BOOLEAN},</if>
<if test="isForbidIsolationPurchase != null">is_forbid_isolation_purchase = #{isForbidIsolationPurchase,jdbcType=BOOLEAN},</if>
<if test="filterAutoPurchaseProductIds != null">filter_auto_purchase_product_ids = #{filterAutoPurchaseProductIds,jdbcType=VARCHAR},</if>
<if test="allowAutoPurchaseProductIds != null">allow_auto_purchase_product_ids = #{allowAutoPurchaseProductIds,jdbcType=VARCHAR},</if>
<if test="isPurchaseLogisticsUpdateToPlatform != null">is_purchase_logistics_update_to_platform = #{isPurchaseLogisticsUpdateToPlatform,jdbcType=BOOLEAN},</if>
<if test="deliveryTimeType != null">delivery_time_type = #{deliveryTimeType,jdbcType=VARCHAR},</if>
<if test="operateShopId != null">operate_shop_id = #{operateShopId,jdbcType=BIGINT},</if>
<if test="operateMemberId != null">operate_member_id = #{operateMemberId,jdbcType=VARCHAR},</if>
<if test="actionSource != null">action_source = #{actionSource,jdbcType=VARCHAR},</if>
<if test="operateIp != null">operate_ip = #{operateIp,jdbcType=VARCHAR},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},</if>
<if test="gmtModified != null">gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},</if>
<if test="beforeData != null">before_data = #{beforeData,jdbcType=VARCHAR},</if>
<if test="dsPurchaseSettingLogId != null">#{dsPurchaseSettingLogId,jdbcType=BIGINT},</if>
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
<if test="isAutoPurchase != null">#{isAutoPurchase,jdbcType=BOOLEAN},</if>
<if test="gmtIsAutoPurchase != null">#{gmtIsAutoPurchase,jdbcType=TIMESTAMP},</if>
<if test="isAutoPay != null">#{isAutoPay,jdbcType=BOOLEAN},</if>
<if test="delayPurchaseMinute != null">#{delayPurchaseMinute,jdbcType=SMALLINT},</if>
<if test="isUseForbiddenPurchaseProfit != null">#{isUseForbiddenPurchaseProfit,jdbcType=BOOLEAN},</if>
<if test="forbiddenPurchaseProfit != null">#{forbiddenPurchaseProfit,jdbcType=DECIMAL},</if>
<if test="isUseForbiddenKeywords != null">#{isUseForbiddenKeywords,jdbcType=BOOLEAN},</if>
<if test="forbiddenKeywords != null">#{forbiddenKeywords,jdbcType=VARCHAR},</if>
<if test="isUseAllProduct != null">#{isUseAllProduct,jdbcType=BOOLEAN},</if>
<if test="isUsePartProduct != null">#{isUsePartProduct,jdbcType=BOOLEAN},</if>
<if test="isForbidIsolationPurchase != null">#{isForbidIsolationPurchase,jdbcType=BOOLEAN},</if>
<if test="filterAutoPurchaseProductIds != null">#{filterAutoPurchaseProductIds,jdbcType=VARCHAR},</if>
<if test="allowAutoPurchaseProductIds != null">#{allowAutoPurchaseProductIds,jdbcType=VARCHAR},</if>
<if test="isPurchaseLogisticsUpdateToPlatform != null">#{isPurchaseLogisticsUpdateToPlatform,jdbcType=BOOLEAN},</if>
<if test="deliveryTimeType != null">#{deliveryTimeType,jdbcType=VARCHAR},</if>
<if test="operateShopId != null">#{operateShopId,jdbcType=BIGINT},</if>
<if test="operateMemberId != null">#{operateMemberId,jdbcType=VARCHAR},</if>
<if test="actionSource != null">#{actionSource,jdbcType=VARCHAR},</if>
<if test="operateIp != null">#{operateIp,jdbcType=VARCHAR},</if>
<if test="gmtCreate != null">#{gmtCreate,jdbcType=TIMESTAMP},</if>
<if test="gmtModified != null">#{gmtModified,jdbcType=TIMESTAMP},</if>
<if test="beforeData != null">#{beforeData,jdbcType=VARCHAR},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.DsPurchaseSettingLog">
@ -202,11 +202,11 @@
before_data = #{beforeData,jdbcType=VARCHAR},
</if>
</set>
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.DsPurchaseSettingLog">
update ds_purchase_setting_log
set
set
shop_id = #{shopId,jdbcType=BIGINT},
is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN},
gmt_is_auto_purchase = #{gmtIsAutoPurchase,jdbcType=TIMESTAMP},
@ -230,6 +230,6 @@
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
before_data = #{beforeData,jdbcType=VARCHAR}
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}
</update>
</mapper>

@ -214,6 +214,69 @@
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT}
</update>
<update id="updateByShopIdSelective" parameterType="com.ms.dal.entity.DsPurchaseSetting">
update ds_purchase_setting
<set>
<if test="isAutoPurchase != null">
is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN},
</if>
<if test="gmtIsAutoPurchase != null">
gmt_is_auto_purchase = #{gmtIsAutoPurchase,jdbcType=TIMESTAMP},
</if>
<if test="isAutoPay != null">
is_auto_pay = #{isAutoPay,jdbcType=BOOLEAN},
</if>
<if test="delayPurchaseMinute != null">
delay_purchase_minute = #{delayPurchaseMinute,jdbcType=SMALLINT},
</if>
<if test="isUseForbiddenPurchaseProfit != null">
is_use_forbidden_purchase_profit = #{isUseForbiddenPurchaseProfit,jdbcType=BOOLEAN},
</if>
<if test="forbiddenPurchaseProfit != null">
forbidden_purchase_profit = #{forbiddenPurchaseProfit,jdbcType=DECIMAL},
</if>
<if test="isUseForbiddenKeywords != null">
is_use_forbidden_keywords = #{isUseForbiddenKeywords,jdbcType=BOOLEAN},
</if>
<if test="forbiddenKeywords != null">
forbidden_keywords = #{forbiddenKeywords,jdbcType=VARCHAR},
</if>
<if test="isUseAllProduct != null">
is_use_all_product = #{isUseAllProduct,jdbcType=BOOLEAN},
</if>
<if test="isUsePartProduct != null">
is_use_part_product = #{isUsePartProduct,jdbcType=BOOLEAN},
</if>
<if test="isPurchaseLogisticsUpdateToPlatform != null">
is_purchase_logistics_update_to_platform = #{isPurchaseLogisticsUpdateToPlatform,jdbcType=BOOLEAN},
</if>
<if test="deliveryTimeType != null">
delivery_time_type = #{deliveryTimeType,jdbcType=VARCHAR},
</if>
<if test="isForbidIsolationPurchase != null">
is_forbid_isolation_purchase = #{isForbidIsolationPurchase,jdbcType=BOOLEAN},
</if>
<if test="operateShopId != null">
operate_shop_id = #{operateShopId,jdbcType=BIGINT},
</if>
<if test="operateMemberId != null">
operate_member_id = #{operateMemberId,jdbcType=VARCHAR},
</if>
<if test="actionSource != null">
action_source = #{actionSource,jdbcType=VARCHAR},
</if>
<if test="operateIp != null">
operate_ip = #{operateIp,jdbcType=VARCHAR},
</if>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="gmtModified != null">
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
</set>
where shop_id = #{shopId,jdbcType=BIGINT}
</update>
<select id="getByShopId" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />

Loading…
Cancel
Save