修复bug
This commit is contained in:
parent
729d67f8f3
commit
1c60f938b6
@ -100,19 +100,19 @@
|
||||
-->
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
<version>2.7.18</version>
|
||||
</dependency>
|
||||
<!-- <!– https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-starter-data-jpa</artifactId>-->
|
||||
<!-- <version>2.7.18</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-jpa</artifactId>
|
||||
<version>2.7.18</version>
|
||||
</dependency>
|
||||
<!-- <!– https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.data</groupId>-->
|
||||
<!-- <artifactId>spring-data-jpa</artifactId>-->
|
||||
<!-- <version>2.7.18</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--excel工具-->
|
||||
<dependency>
|
||||
|
||||
@ -61,6 +61,7 @@ import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
|
||||
@ -292,12 +292,12 @@
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.suisung.mall</groupId>
|
||||
<artifactId>mall-account</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.suisung.mall</groupId>-->
|
||||
<!-- <artifactId>mall-account</artifactId>-->
|
||||
<!-- <version>1.0-SNAPSHOT</version>-->
|
||||
<!-- <scope>compile</scope>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--打票机 使用的库 结束-->
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl<ShopBase
|
||||
@Autowired
|
||||
private ShopBaseProductTypeService shopBaseProductTypeService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private SxSyncCategoryService sxSyncCategoryService;
|
||||
|
||||
private final String LANG = "zh_CN"; // todo 多语言动态
|
||||
|
||||
@ -40,7 +40,7 @@ public class OrderPayedListener {
|
||||
// private ShopStorePrinterService shopStorePrinterService;
|
||||
// @Autowired
|
||||
// private MqMessageService mqMessageService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private SFExpressApiService sfExpressApiService;
|
||||
|
||||
@RabbitHandler
|
||||
|
||||
@ -101,6 +101,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.util.Pair;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
@ -109,7 +110,6 @@ import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
@ -277,13 +277,13 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
|
||||
private ThreadPoolExecutor executor;
|
||||
@Autowired
|
||||
private ShopActivityCutpriceService shopActivityCutpriceService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopOrderDeliveryAddressService shopOrderDeliveryAddressService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportBaseService shopStoreSameCityTransportBaseService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopMessageTemplateService shopMessageTemplateService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSfOrderService shopStoreSfOrderService;
|
||||
|
||||
|
||||
@ -8350,7 +8350,7 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
|
||||
QueryWrapper<ShopOrderItem> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("order_id", shopOrderId);
|
||||
List<ShopOrderItem> shopOrderItemList = shopOrderItemService.list(queryWrapper);
|
||||
if (shopOrderBase == null || shopOrderData==null || CollUtil.isEmpty(shopOrderItemList)) {
|
||||
if (shopOrderBase == null || shopOrderData == null || CollUtil.isEmpty(shopOrderItemList)) {
|
||||
logger.error("无法获取订单信息!");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -103,10 +103,10 @@ public class ShopOrderInfoServiceImpl extends BaseServiceImpl<ShopOrderInfoMappe
|
||||
@Autowired
|
||||
private ShopOrderInvoiceService shopOrderInvoiceService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopOrderStateLogService shopOrderStateLogService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseStateCodeService shopBaseStateCodeService;
|
||||
|
||||
@Autowired
|
||||
|
||||
@ -555,9 +555,11 @@ public class ShopPageBaseServiceImpl extends BaseServiceImpl<ShopPageBaseMapper,
|
||||
}
|
||||
|
||||
List<Long> item_ids = new ArrayList<>();
|
||||
List<Serializable> item_ids_key = shopProductItemService.findKey(new QueryWrapper<ShopProductItem>().in("item_id", item_id_104).eq("item_enable", 1001));
|
||||
if (CollUtil.isNotEmpty(item_ids_key)) {
|
||||
item_ids = Convert.toList(Long.class, item_ids_key);
|
||||
if(CollUtil.isNotEmpty(item_id_104)) {
|
||||
List<Serializable> item_ids_key = shopProductItemService.findKey(new QueryWrapper<ShopProductItem>().in("item_id", item_id_104).eq("item_enable", 1001));
|
||||
if (CollUtil.isNotEmpty(item_ids_key)) {
|
||||
item_ids = Convert.toList(Long.class, item_ids_key);
|
||||
}
|
||||
}
|
||||
|
||||
JSONArray data1 = new JSONArray();
|
||||
|
||||
@ -100,99 +100,99 @@ import static io.seata.common.util.LambdaUtils.distinctByKey;
|
||||
@Service
|
||||
public class ShopProductBaseServiceImpl extends BaseServiceImpl<ShopProductBaseMapper, ShopProductBase> implements ShopProductBaseService {
|
||||
private final Logger logger = LoggerFactory.getLogger(ShopProductBaseServiceImpl.class);
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductCategoryService shopBaseProductCategoryService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductMetaService shopProductMetaService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductPreSaleService shopProductPreSaleService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductBaseService shopProductBaseService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreAnalyticsService shopStoreAnalyticsService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductAnalyticsService shopProductAnalyticsService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductDetailService shopProductDetailService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductInfoService shopProductInfoService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductValidPeriodService shopProductValidPeriodService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductItemService shopProductItemService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private AccountBaseConfigService accountBaseConfigService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseCurrencyService shopBaseCurrencyService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopUserCartService shopUserCartService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreTransportTypeService transportTypeService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductCategoryService productCategoryService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductIndexService shopProductIndexService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductImageService shopProductImageService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreBaseService shopStoreBaseService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductSpecService baseProductSpecService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseStoreGradeService baseStoreGradeService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductAssistIndexService assistIndexService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductDataService shopProductDataService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductItemSeqService shopProductItemSeqService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductValidPeriodService validPeriodService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopUserSearchHistoryService shopUserSearchHistoryService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseStateCodeService shopBaseStateCodeService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductBaseMapper shopProductBaseMapper;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreActivityBaseService shopStoreActivityBaseService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreActivityItemService shopStoreActivityItemService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopActivityGroupbookingService shopActivityGroupbookingService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductTypeService shopBaseProductTypeService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopNumberSeqService shopNumberSeqService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private EduService eduService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseDistrictService shopBaseDistrictService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseContractTypeService shopBaseContractTypeService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseMarketCategoryService shopBaseMarketCategoryService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopOrderItemService shopOrderItemService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private SearchService searchService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopChainItemService shopChainItemService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopUserProductBrowseService shopUserProductBrowseService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopUserProductBuyService shopUserProductBuyService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopUserFavoritesItemService shopUserFavoritesItemService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private MqMessageService mqMessageService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ThreadPoolExecutor executor;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseLangMetaService shopBaseLangMetaService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private SxSyncGoodsService sxSyncGoodsService;
|
||||
|
||||
@Override
|
||||
|
||||
@ -15,6 +15,7 @@ import com.suisung.mall.shop.sfexpress.service.SFExpressApiService;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSfOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
@ -31,9 +32,9 @@ import java.util.concurrent.Executors;
|
||||
@RequestMapping("/mobile/shop/sf-express")
|
||||
public class SFExpressController {
|
||||
private final ExecutorService executor = Executors.newSingleThreadExecutor();
|
||||
@Resource
|
||||
@Autowired
|
||||
private SFExpressApiService sfExpressApiService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSfOrderService shopStoreSfOrderService;
|
||||
|
||||
@ApiOperation(value = "顺丰同城店铺发单", notes = "顺丰同城店铺发单")
|
||||
|
||||
@ -31,6 +31,7 @@ import com.suisung.mall.shop.sfexpress.service.SFExpressApiService;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSfOrderService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.util.Pair;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -54,13 +55,13 @@ public class SFExpressApiServiceImpl implements SFExpressApiService {
|
||||
@Value("${sf-express.dev_id}")
|
||||
private Integer devId;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSfOrderService shopStoreSfOrderService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopOrderBaseService shopOrderBaseService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopOrderInfoService shopOrderInfoService;
|
||||
|
||||
@Override
|
||||
|
||||
@ -17,6 +17,7 @@ import com.suisung.mall.shop.sixun.service.SxSyncGoodsService;
|
||||
import com.suisung.mall.shop.sixun.service.SxSyncVipService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@ -28,19 +29,19 @@ import javax.annotation.Resource;
|
||||
@RestController
|
||||
@RequestMapping("/admin/sixun")
|
||||
public class SxSyncController {
|
||||
@Resource
|
||||
@Autowired
|
||||
private SxSyncCategoryService sxSyncCategoryService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private SxSyncVipService sxSyncVipService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private SxSyncGoodsService sxSyncGoodsService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductCategoryService shopBaseProductCategoryService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopProductBaseService shopProductBaseService;
|
||||
|
||||
@ApiOperation(value = "获取思迅商品分类新增到数据库", notes = "获取思迅商品分类新增到数据库")
|
||||
|
||||
@ -46,7 +46,7 @@ public class ShopStoreBaseController extends BaseControllerImpl {
|
||||
@Autowired
|
||||
private ShopBaseStoreGradeService shopBaseStoreGradeService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportBaseService transportBaseService;
|
||||
|
||||
@ApiOperation(value = "店铺基础信息表-分页列表查询", notes = "店铺基础信息表-分页列表查询")
|
||||
|
||||
@ -9,6 +9,7 @@ import com.suisung.mall.shop.store.service.ShopStorePrinterService;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportBaseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@ -22,13 +23,13 @@ import java.math.BigDecimal;
|
||||
@RequestMapping("/admin/shop/store/printer")
|
||||
public class ShopStorePrinterController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStorePrinterService shopStorePrinterService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportBaseService shopStoreSameCityTransportBaseService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreEmployeeService shopStoreEmployeeService;
|
||||
|
||||
@ApiOperation(value = "内部测试案例", notes = "内部测试案例")
|
||||
|
||||
@ -7,6 +7,7 @@ import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportBaseService
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -16,10 +17,10 @@ import javax.annotation.Resource;
|
||||
@RequestMapping("/admin/shop/store/same-city-transport")
|
||||
public class ShopStoreSameCityTransportBaseController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportBaseService transportBaseService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportService transportService;
|
||||
|
||||
@ApiOperation(value = "获取同城配送运费设置详情", notes = "获取同城配送运费设置详情")
|
||||
|
||||
@ -4,6 +4,7 @@ import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportBaseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@ -16,7 +17,7 @@ import javax.annotation.Resource;
|
||||
@RequestMapping("/mobile/shop/store/same-city-transport")
|
||||
public class ShopStoreSameCityTransportBaseMobileController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportBaseService transportBaseService;
|
||||
|
||||
@ApiOperation(value = "下单前检测同城订单配送是否符合要求", notes = "下单前检测同城订单配送是否符合要求")
|
||||
|
||||
@ -23,6 +23,7 @@ import com.suisung.mall.shop.store.mapper.ShopStoreEmployeeMapper;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreEmployeeRightsGroupService;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreEmployeeService;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -44,16 +45,16 @@ import static com.suisung.mall.common.utils.ContextUtil.getCurrentUser;
|
||||
@Service
|
||||
public class ShopStoreEmployeeServiceImpl extends BaseServiceImpl<ShopStoreEmployeeMapper, ShopStoreEmployee> implements ShopStoreEmployeeService {
|
||||
|
||||
// @Resource
|
||||
// @Autowired
|
||||
// private ShopStoreEmployeeService shopStoreEmployeeService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private AccountService accountService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreEmployeeRightsGroupService shopStoreEmployeeRightsGroupService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreEmployeeMapper shopStoreEmployeeMapper;
|
||||
|
||||
@Override
|
||||
|
||||
@ -36,6 +36,7 @@ import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportBaseService
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.data.util.Pair;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -54,9 +55,9 @@ import static com.suisung.mall.common.utils.ContextUtil.getCurrentUser;
|
||||
public class ShopStoreSameCityTransportBaseServiceImpl extends BaseServiceImpl<ShopStoreSameCityTransportBaseMapper, ShopStoreSameCityTransportBase> implements ShopStoreSameCityTransportBaseService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ShopStoreSameCityTransportBaseServiceImpl.class);
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportService shopStoreSameCityTransportService;
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreBaseService shopStoreBaseService;
|
||||
|
||||
/**
|
||||
|
||||
@ -9,21 +9,21 @@
|
||||
package com.suisung.mall.shop.sync.controller;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
||||
import com.suisung.mall.common.pojo.res.ThirdApiRes;
|
||||
import com.suisung.mall.shop.sync.service.SyncThirdDataService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "第三方数据同步")
|
||||
@RestController
|
||||
@RequestMapping("/shop/sync/third")
|
||||
public class SyncThirdDataController {
|
||||
@Resource
|
||||
@Autowired
|
||||
private SyncThirdDataService syncThirdDataService;
|
||||
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ public interface SyncAppService {
|
||||
|
||||
/**
|
||||
* 根据 appId 获取一条记录
|
||||
*
|
||||
* @param appId
|
||||
* @return
|
||||
*/
|
||||
@ -22,6 +23,7 @@ public interface SyncAppService {
|
||||
|
||||
/**
|
||||
* 根据关键字搜索记录分页列表
|
||||
*
|
||||
* @param keyword
|
||||
* @param status
|
||||
* @param pageNum
|
||||
@ -32,6 +34,7 @@ public interface SyncAppService {
|
||||
|
||||
/**
|
||||
* 新增一条记录
|
||||
*
|
||||
* @param syncApp
|
||||
* @return
|
||||
*/
|
||||
@ -39,6 +42,7 @@ public interface SyncAppService {
|
||||
|
||||
/**
|
||||
* 修改一条记录
|
||||
*
|
||||
* @param syncApp
|
||||
* @return
|
||||
*/
|
||||
@ -46,6 +50,7 @@ public interface SyncAppService {
|
||||
|
||||
/**
|
||||
* 修改 app key 和 app 密钥
|
||||
*
|
||||
* @param appId
|
||||
* @param appKey
|
||||
* @param appSecret
|
||||
@ -55,6 +60,7 @@ public interface SyncAppService {
|
||||
|
||||
/**
|
||||
* 删除一条记录
|
||||
*
|
||||
* @param appId
|
||||
* @return
|
||||
*/
|
||||
@ -62,6 +68,7 @@ public interface SyncAppService {
|
||||
|
||||
/**
|
||||
* 删除一条记录
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -9,15 +9,13 @@
|
||||
package com.suisung.mall.shop.sync.service;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
||||
import com.suisung.mall.common.pojo.res.ThirdApiRes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SyncThirdDataService {
|
||||
|
||||
/**
|
||||
* 批量保存商品的分类
|
||||
*
|
||||
* @param categoryListJSON
|
||||
* @return
|
||||
*/
|
||||
@ -25,6 +23,7 @@ public interface SyncThirdDataService {
|
||||
|
||||
/**
|
||||
* 批量保存商品品牌记录
|
||||
*
|
||||
* @param brandListJSON
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -12,22 +12,19 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.suisung.mall.common.modules.sixun.SxSyncGoods;
|
||||
import com.suisung.mall.common.modules.sync.SyncApp;
|
||||
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
||||
import com.suisung.mall.shop.sixun.mapper.SxSyncGoodsMapper;
|
||||
import com.suisung.mall.shop.sixun.service.SxSyncGoodsService;
|
||||
import com.suisung.mall.shop.sync.mapper.SyncAppMapper;
|
||||
import com.suisung.mall.shop.sync.service.SyncAppService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@Service
|
||||
public class SyncAppServiceImpl extends BaseServiceImpl<SyncAppMapper, SyncApp> implements SyncAppService {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private SyncAppMapper syncAppMapper;
|
||||
|
||||
/**
|
||||
@ -63,12 +60,12 @@ public class SyncAppServiceImpl extends BaseServiceImpl<SyncAppMapper, SyncApp>
|
||||
QueryWrapper<SyncApp> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.like("intro", keyword).or((Consumer<QueryWrapper<SyncApp>>) queryWrapper);
|
||||
|
||||
if(status!=null && status>0){
|
||||
queryWrapper.eq("status",status);
|
||||
queryWrapper2.eq("status",status);
|
||||
if (status != null && status > 0) {
|
||||
queryWrapper.eq("status", status);
|
||||
queryWrapper2.eq("status", status);
|
||||
}
|
||||
|
||||
return lists(queryWrapper2,pageNum,pageSize);
|
||||
return lists(queryWrapper2, pageNum, pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,7 +76,7 @@ public class SyncAppServiceImpl extends BaseServiceImpl<SyncAppMapper, SyncApp>
|
||||
*/
|
||||
@Override
|
||||
public Boolean addSyncApp(SyncApp syncApp) {
|
||||
if(syncApp==null){
|
||||
if (syncApp == null) {
|
||||
return false;
|
||||
}
|
||||
return add(syncApp);
|
||||
@ -93,7 +90,7 @@ public class SyncAppServiceImpl extends BaseServiceImpl<SyncAppMapper, SyncApp>
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateSyncApp(SyncApp syncApp) {
|
||||
if(syncApp==null){
|
||||
if (syncApp == null) {
|
||||
return false;
|
||||
}
|
||||
return updateById(syncApp);
|
||||
|
||||
@ -22,22 +22,22 @@ import com.suisung.mall.shop.base.service.ShopBaseProductBrandService;
|
||||
import com.suisung.mall.shop.base.service.ShopBaseProductCategoryService;
|
||||
import com.suisung.mall.shop.base.service.ShopBaseProductTypeService;
|
||||
import com.suisung.mall.shop.sync.service.SyncThirdDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class SyncThirdDataServiceImpl implements SyncThirdDataService {
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductBrandService productBrandService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductCategoryService productCategoryService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopBaseProductTypeService productTypeService;
|
||||
|
||||
/**
|
||||
@ -116,7 +116,10 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
|
||||
}
|
||||
}
|
||||
|
||||
return new ThirdApiRes().success("成功同步" + count + "条记录!", count);
|
||||
Map<String, Integer> resp = new HashMap<>();
|
||||
resp.put("count", count);
|
||||
|
||||
return new ThirdApiRes().success("成功同步" + count + "条记录!", resp);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -157,6 +160,9 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
|
||||
count += productBrandService.saveOrUpdateBrand2(goodBrandList.get(i));
|
||||
}
|
||||
|
||||
return new ThirdApiRes().success("成功同步" + count + "条记录!", count);
|
||||
Map<String, Integer> resp = new HashMap<>();
|
||||
resp.put("count", count);
|
||||
|
||||
return new ThirdApiRes().success("成功同步" + count + "条记录!", resp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
||||
@Autowired
|
||||
private ShopProductImageService shopProductImageService;
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private ShopStoreSameCityTransportBaseService shopStoreSameCityTransportBaseService;
|
||||
|
||||
@Override
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<if test="param.product_id != null">
|
||||
AND b.product_id = #{param.product_id}
|
||||
</if>
|
||||
<if test="param.item_id != null">
|
||||
<if test="param.item_id != null and param.item_id.size() > 0">
|
||||
AND i.item_id in
|
||||
<foreach collection="param.item_id" item="item_id" index="index" open="(" close=")" separator=",">
|
||||
#{item_id}
|
||||
@ -28,8 +28,8 @@
|
||||
</if>
|
||||
<if test="param.category_ids != null">
|
||||
AND b.category_id in
|
||||
<foreach collection="param.category_ids" item="category_id" index="index" open="(" close=")"
|
||||
separator=",">#{category_id}
|
||||
<foreach collection="param.category_ids" item="category_id" index="index" open="(" close=")" separator=",">
|
||||
#{category_id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.product_name != null and param.product_name !=''">
|
||||
|
||||
11
pom.xml
11
pom.xml
@ -94,6 +94,7 @@
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!--MyBatis Plus 依赖-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
@ -321,6 +322,12 @@
|
||||
<mysql.user>root</mysql.user>
|
||||
<mysql.pwd>B1x1GuKZr55PPmox</mysql.pwd>
|
||||
<mysql.driver>com.mysql.cj.jdbc.Driver</mysql.driver>
|
||||
<!-- <mysql.host>127.0.0.1</mysql.host>-->
|
||||
<!-- <mysql.port>3306</mysql.port>-->
|
||||
<!-- <mysql.db>mall_dev</mysql.db>-->
|
||||
<!-- <mysql.user>root</mysql.user>-->
|
||||
<!-- <mysql.pwd>123456</mysql.pwd>-->
|
||||
<!-- <mysql.driver>com.mysql.cj.jdbc.Driver</mysql.driver>-->
|
||||
<!-- redis配置 -->
|
||||
<redis.host>114.132.210.208</redis.host>
|
||||
<redis.database>15</redis.database>
|
||||
@ -490,6 +497,10 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user