diff --git a/ms-api/src/main/java/com/ms/api/dto/order/DsPurchaseSettingDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/DsPurchaseSettingDTO.java index 79cfd46c..451800b0 100644 --- a/ms-api/src/main/java/com/ms/api/dto/order/DsPurchaseSettingDTO.java +++ b/ms-api/src/main/java/com/ms/api/dto/order/DsPurchaseSettingDTO.java @@ -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; /** diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java index 84f69587..32f4e8c9 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/PurchaseOrderServiceImpl.java @@ -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 allowIdList = dsAllowAutoPurchaseProductMapper.getProductIdListByShopId(shopId); + List filterIdList = dsFilterAutoPurchaseProductMapper.getProductIdListByShopId(shopId); + List allowIdStrList = allowIdList.stream() + .map(String::valueOf) + .collect(Collectors.toList()); + List 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 oldAllowIdList, List oldFilterIdList) { + boolean isChange = false; + + if (dsPurchaseSettingDTO.getIsUseAllProduct() != 0) { + + } + + if (dsPurchaseSettingDTO.getIsUsePartProduct() != 0) { + + } + + return isChange; + } + public DsPurchaseSettingDTO getDsPurchaseSettingByShopId(Long shopId) { DsPurchaseSetting dsPurchaseSetting = dsPurchaseSettingMapper.selectByShopId(shopId); diff --git a/ms-dal/src/main/java/com/ms/dal/mapper/DsAllowAutoPurchaseProductMapper.java b/ms-dal/src/main/java/com/ms/dal/mapper/DsAllowAutoPurchaseProductMapper.java index ce5accf2..8c323484 100644 --- a/ms-dal/src/main/java/com/ms/dal/mapper/DsAllowAutoPurchaseProductMapper.java +++ b/ms-dal/src/main/java/com/ms/dal/mapper/DsAllowAutoPurchaseProductMapper.java @@ -23,4 +23,6 @@ public interface DsAllowAutoPurchaseProductMapper { int updateByPrimaryKey(DsAllowAutoPurchaseProduct record); List getListByShopId(Long shopId); + + List getProductIdListByShopId(Long shopId); } diff --git a/ms-dal/src/main/java/com/ms/dal/mapper/DsFilterAutoPurchaseProductMapper.java b/ms-dal/src/main/java/com/ms/dal/mapper/DsFilterAutoPurchaseProductMapper.java index 04b81313..0af38203 100644 --- a/ms-dal/src/main/java/com/ms/dal/mapper/DsFilterAutoPurchaseProductMapper.java +++ b/ms-dal/src/main/java/com/ms/dal/mapper/DsFilterAutoPurchaseProductMapper.java @@ -24,4 +24,6 @@ public interface DsFilterAutoPurchaseProductMapper { int updateByPrimaryKey(DsFilterAutoPurchaseProduct record); List getListByShopId(Long shopId); + + List getProductIdListByShopId(Long shopId); } diff --git a/ms-dal/src/main/java/com/ms/dal/mapper/DsPurchaseSettingMapper.java b/ms-dal/src/main/java/com/ms/dal/mapper/DsPurchaseSettingMapper.java index 5a684ecd..cefff234 100644 --- a/ms-dal/src/main/java/com/ms/dal/mapper/DsPurchaseSettingMapper.java +++ b/ms-dal/src/main/java/com/ms/dal/mapper/DsPurchaseSettingMapper.java @@ -22,6 +22,8 @@ public interface DsPurchaseSettingMapper { int updateByPrimaryKey(DsPurchaseSetting record); + int updateByShopIdSelective(DsPurchaseSetting record); + DsPurchaseSetting selectByShopId(Long shopId); } diff --git a/ms-dal/src/main/resources/mapper/DsAllowAutoPurchaseProductMapper.xml b/ms-dal/src/main/resources/mapper/DsAllowAutoPurchaseProductMapper.xml index e6357c10..05b8d609 100644 --- a/ms-dal/src/main/resources/mapper/DsAllowAutoPurchaseProductMapper.xml +++ b/ms-dal/src/main/resources/mapper/DsAllowAutoPurchaseProductMapper.xml @@ -32,6 +32,10 @@ from ds_allow_auto_purchase_product where shop_id = #{shopId,jdbcType=BIGINT} + + delete from ds_allow_auto_purchase_product where ds_allow_auto_purchase_product_id = #{dsAllowAutoPurchaseProductId,jdbcType=BIGINT} diff --git a/ms-dal/src/main/resources/mapper/DsAutoPurchaseSwitchLogMapper.xml b/ms-dal/src/main/resources/mapper/DsAutoPurchaseSwitchLogMapper.xml index 02bd9c31..371ceb31 100644 --- a/ms-dal/src/main/resources/mapper/DsAutoPurchaseSwitchLogMapper.xml +++ b/ms-dal/src/main/resources/mapper/DsAutoPurchaseSwitchLogMapper.xml @@ -24,12 +24,12 @@ select 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 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} insert into ds_auto_purchase_switch_log @@ -43,22 +43,22 @@ insert into ds_auto_purchase_switch_log - dsAutoPurchaseSwitchLogId, - shopId, - isAutoPurchase, - operateShopId, - operateIp, - gmtCreate, - gmtModified, + ds_auto_purchase_switch_log_id, + shop_id, + is_auto_purchase, + operate_shop_id, + operate_ip, + gmt_create, + gmt_modified, - ds_auto_purchase_switch_log_id = #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}, - 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}, + #{dsAutoPurchaseSwitchLogId,jdbcType=BIGINT}, + #{shopId,jdbcType=BIGINT}, + #{isAutoPurchase,jdbcType=BOOLEAN}, + #{operateShopId,jdbcType=BIGINT}, + #{operateIp,jdbcType=VARCHAR}, + #{gmtCreate,jdbcType=TIMESTAMP}, + #{gmtModified,jdbcType=TIMESTAMP}, @@ -83,17 +83,17 @@ 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 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} diff --git a/ms-dal/src/main/resources/mapper/DsFilterAutoPurchaseProductMapper.xml b/ms-dal/src/main/resources/mapper/DsFilterAutoPurchaseProductMapper.xml index 876e1898..6e30d750 100644 --- a/ms-dal/src/main/resources/mapper/DsFilterAutoPurchaseProductMapper.xml +++ b/ms-dal/src/main/resources/mapper/DsFilterAutoPurchaseProductMapper.xml @@ -32,6 +32,9 @@ from ds_filter_auto_purchase_product where shop_id = #{shopId,jdbcType=BIGINT} + delete from ds_filter_auto_purchase_product diff --git a/ms-dal/src/main/resources/mapper/DsPurchaseSettingLogMapper.xml b/ms-dal/src/main/resources/mapper/DsPurchaseSettingLogMapper.xml index 3dfe4936..028834ab 100644 --- a/ms-dal/src/main/resources/mapper/DsPurchaseSettingLogMapper.xml +++ b/ms-dal/src/main/resources/mapper/DsPurchaseSettingLogMapper.xml @@ -46,12 +46,12 @@ select from ds_purchase_setting_log - where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT} + where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT} delete from ds_purchase_setting_log - where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT} + where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT} insert into ds_purchase_setting_log @@ -77,56 +77,56 @@ insert into ds_purchase_setting_log - dsPurchaseSettingLogId, - shopId, - isAutoPurchase, - gmtIsAutoPurchase, - isAutoPay, - delayPurchaseMinute, - isUseForbiddenPurchaseProfit, - forbiddenPurchaseProfit, - isUseForbiddenKeywords, - forbiddenKeywords, - isUseAllProduct, - isUsePartProduct, - isForbidIsolationPurchase, - filterAutoPurchaseProductIds, - allowAutoPurchaseProductIds, - isPurchaseLogisticsUpdateToPlatform, - deliveryTimeType, - operateShopId, - operateMemberId, - actionSource, - operateIp, - gmtCreate, - gmtModified, - beforeData, + ds_Purchase_Setting_Log_Id, + shop_Id, + is_Auto_Purchase, + gmt_Is_Auto_Purchase, + is_Auto_Pay, + delay_Purchase_Minute, + is_Use_Forbidden_Purchase_Profit, + forbidden_Purchase_Profit, + is_Use_Forbidden_Keywords, + forbidden_Keywords, + is_Use_All_Product, + is_Use_Part_Product, + is_Forbid_Isolation_Purchase, + filter_Auto_Purchase_Product_Ids, + allow_Auto_Purchase_Product_Ids, + is_Purchase_Logistics_Update_To_Platform, + delivery_Time_Type, + operate_Shop_Id, + operate_Member_Id, + action_Source, + operate_Ip, + gmt_Create, + gmt_Modified, + before_Data, - ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT}, - shop_id = #{shopId,jdbcType=BIGINT}, - is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN}, - gmt_is_auto_purchase = #{gmtIsAutoPurchase,jdbcType=TIMESTAMP}, - is_auto_pay = #{isAutoPay,jdbcType=BOOLEAN}, - delay_purchase_minute = #{delayPurchaseMinute,jdbcType=SMALLINT}, - is_use_forbidden_purchase_profit = #{isUseForbiddenPurchaseProfit,jdbcType=BOOLEAN}, - forbidden_purchase_profit = #{forbiddenPurchaseProfit,jdbcType=DECIMAL}, - is_use_forbidden_keywords = #{isUseForbiddenKeywords,jdbcType=BOOLEAN}, - forbidden_keywords = #{forbiddenKeywords,jdbcType=VARCHAR}, - is_use_all_product = #{isUseAllProduct,jdbcType=BOOLEAN}, - is_use_part_product = #{isUsePartProduct,jdbcType=BOOLEAN}, - is_forbid_isolation_purchase = #{isForbidIsolationPurchase,jdbcType=BOOLEAN}, - filter_auto_purchase_product_ids = #{filterAutoPurchaseProductIds,jdbcType=VARCHAR}, - allow_auto_purchase_product_ids = #{allowAutoPurchaseProductIds,jdbcType=VARCHAR}, - is_purchase_logistics_update_to_platform = #{isPurchaseLogisticsUpdateToPlatform,jdbcType=BOOLEAN}, - delivery_time_type = #{deliveryTimeType,jdbcType=VARCHAR}, - operate_shop_id = #{operateShopId,jdbcType=BIGINT}, - operate_member_id = #{operateMemberId,jdbcType=VARCHAR}, - action_source = #{actionSource,jdbcType=VARCHAR}, - operate_ip = #{operateIp,jdbcType=VARCHAR}, - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, - before_data = #{beforeData,jdbcType=VARCHAR}, + #{dsPurchaseSettingLogId,jdbcType=BIGINT}, + #{shopId,jdbcType=BIGINT}, + #{isAutoPurchase,jdbcType=BOOLEAN}, + #{gmtIsAutoPurchase,jdbcType=TIMESTAMP}, + #{isAutoPay,jdbcType=BOOLEAN}, + #{delayPurchaseMinute,jdbcType=SMALLINT}, + #{isUseForbiddenPurchaseProfit,jdbcType=BOOLEAN}, + #{forbiddenPurchaseProfit,jdbcType=DECIMAL}, + #{isUseForbiddenKeywords,jdbcType=BOOLEAN}, + #{forbiddenKeywords,jdbcType=VARCHAR}, + #{isUseAllProduct,jdbcType=BOOLEAN}, + #{isUsePartProduct,jdbcType=BOOLEAN}, + #{isForbidIsolationPurchase,jdbcType=BOOLEAN}, + #{filterAutoPurchaseProductIds,jdbcType=VARCHAR}, + #{allowAutoPurchaseProductIds,jdbcType=VARCHAR}, + #{isPurchaseLogisticsUpdateToPlatform,jdbcType=BOOLEAN}, + #{deliveryTimeType,jdbcType=VARCHAR}, + #{operateShopId,jdbcType=BIGINT}, + #{operateMemberId,jdbcType=VARCHAR}, + #{actionSource,jdbcType=VARCHAR}, + #{operateIp,jdbcType=VARCHAR}, + #{gmtCreate,jdbcType=TIMESTAMP}, + #{gmtModified,jdbcType=TIMESTAMP}, + #{beforeData,jdbcType=VARCHAR}, @@ -202,11 +202,11 @@ before_data = #{beforeData,jdbcType=VARCHAR}, - where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT} + where ds_purchase_setting_log_id = #{dsPurchaseSettingLogId,jdbcType=BIGINT} 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} diff --git a/ms-dal/src/main/resources/mapper/DsPurchaseSettingMapper.xml b/ms-dal/src/main/resources/mapper/DsPurchaseSettingMapper.xml index c93acfc0..b72fbd27 100644 --- a/ms-dal/src/main/resources/mapper/DsPurchaseSettingMapper.xml +++ b/ms-dal/src/main/resources/mapper/DsPurchaseSettingMapper.xml @@ -214,6 +214,69 @@ gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} where ds_purchase_setting_id = #{dsPurchaseSettingId,jdbcType=BIGINT} + + update ds_purchase_setting + + + is_auto_purchase = #{isAutoPurchase,jdbcType=BOOLEAN}, + + + gmt_is_auto_purchase = #{gmtIsAutoPurchase,jdbcType=TIMESTAMP}, + + + is_auto_pay = #{isAutoPay,jdbcType=BOOLEAN}, + + + delay_purchase_minute = #{delayPurchaseMinute,jdbcType=SMALLINT}, + + + is_use_forbidden_purchase_profit = #{isUseForbiddenPurchaseProfit,jdbcType=BOOLEAN}, + + + forbidden_purchase_profit = #{forbiddenPurchaseProfit,jdbcType=DECIMAL}, + + + is_use_forbidden_keywords = #{isUseForbiddenKeywords,jdbcType=BOOLEAN}, + + + forbidden_keywords = #{forbiddenKeywords,jdbcType=VARCHAR}, + + + is_use_all_product = #{isUseAllProduct,jdbcType=BOOLEAN}, + + + is_use_part_product = #{isUsePartProduct,jdbcType=BOOLEAN}, + + + is_purchase_logistics_update_to_platform = #{isPurchaseLogisticsUpdateToPlatform,jdbcType=BOOLEAN}, + + + delivery_time_type = #{deliveryTimeType,jdbcType=VARCHAR}, + + + is_forbid_isolation_purchase = #{isForbidIsolationPurchase,jdbcType=BOOLEAN}, + + + operate_shop_id = #{operateShopId,jdbcType=BIGINT}, + + + operate_member_id = #{operateMemberId,jdbcType=VARCHAR}, + + + action_source = #{actionSource,jdbcType=VARCHAR}, + + + operate_ip = #{operateIp,jdbcType=VARCHAR}, + + + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, + + + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, + + + where shop_id = #{shopId,jdbcType=BIGINT} +