Commit abc2df5a by 刘宇峰

同步修改

1 parent debf0122
...@@ -5,6 +5,4 @@ import org.springframework.cloud.openfeign.FeignClient; ...@@ -5,6 +5,4 @@ import org.springframework.cloud.openfeign.FeignClient;
@FeignClient(name = "${feign.shopmall.name}", path = "${feign.shopmall.path}/api/aftersalesorder", contextId = "feignAfterSalesOrderApi", decode404 = true) @FeignClient(name = "${feign.shopmall.name}", path = "${feign.shopmall.path}/api/aftersalesorder", contextId = "feignAfterSalesOrderApi", decode404 = true)
public interface ShopmallAfterSalesOrderApiService { public interface ShopmallAfterSalesOrderApiService {
} }
...@@ -3,12 +3,11 @@ package cn.com.glsx.admin.api; ...@@ -3,12 +3,11 @@ package cn.com.glsx.admin.api;
import cn.com.glsx.admin.modules.model.cloudcrane.response.*; import cn.com.glsx.admin.modules.model.cloudcrane.response.*;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
@FeignClient(name = "${feign.shopmall.name}", path = "${feign.shopmall.path}/api/basedata", contextId = "feignBaseDataApi", decode404 = true) @FeignClient(name = "${feign.shopmall.name}", path = "/api/basedata", contextId = "feignBaseDataApi", decode404 = true)
public interface ShopmallBaseDataApiService { public interface ShopmallBaseDataApiService {
/** /**
...@@ -104,16 +103,16 @@ public interface ShopmallBaseDataApiService { ...@@ -104,16 +103,16 @@ public interface ShopmallBaseDataApiService {
@GetMapping(value = "/queryExpressList") @GetMapping(value = "/queryExpressList")
public List<QueryExpressListResponse> queryExpressList(); public List<QueryExpressListResponse> queryExpressList();
@PostMapping(value = "/syncAddressData") @GetMapping(value = "/syncAddressData")
public Integer syncAddressData(); public Integer syncAddressData();
@PostMapping(value = "/syncCategoryData") @GetMapping(value = "/syncCategoryData")
public Integer syncCategoryData(); public Integer syncCategoryData();
@PostMapping(value = "/syncBrandData") @GetMapping(value = "/syncBrandData")
public Integer syncBrandData(); public Integer syncBrandData();
@PostMapping(value = "/syncExpressData") @GetMapping(value = "/syncExpressData")
public Integer syncExpressData(); public Integer syncExpressData();
} }
...@@ -57,6 +57,28 @@ ...@@ -57,6 +57,28 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId> <artifactId>mybatis-generator-maven-plugin</artifactId>
</plugin> </plugin>
......
...@@ -35,7 +35,7 @@ public class BaseBrandService { ...@@ -35,7 +35,7 @@ public class BaseBrandService {
return cloudCraneService.queryBrandList(); return cloudCraneService.queryBrandList();
} }
@Transactional @Transactional(rollbackFor = Exception.class)
public Integer syncBrandData() { public Integer syncBrandData() {
log.info("开始同步品牌数据"); log.info("开始同步品牌数据");
List<QueryBrandListResponse> brandList = cloudCraneService.queryBrandList(); List<QueryBrandListResponse> brandList = cloudCraneService.queryBrandList();
......
...@@ -12,6 +12,7 @@ import org.apache.commons.collections4.CollectionUtils; ...@@ -12,6 +12,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -66,6 +67,7 @@ public class BaseCategoryService { ...@@ -66,6 +67,7 @@ public class BaseCategoryService {
return cloudCraneService.queryCategoryList(); return cloudCraneService.queryCategoryList();
} }
@Transactional(rollbackFor = Exception.class)
public Integer syncCategoryData() { public Integer syncCategoryData() {
log.info("开始同步分类数据"); log.info("开始同步分类数据");
List<QueryCategoryListResponse> categoryList = cloudCraneService.queryCategoryList(); List<QueryCategoryListResponse> categoryList = cloudCraneService.queryCategoryList();
......
...@@ -12,6 +12,7 @@ import org.apache.commons.collections4.CollectionUtils; ...@@ -12,6 +12,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -102,6 +103,7 @@ public class BaseDistrictService { ...@@ -102,6 +103,7 @@ public class BaseDistrictService {
return cloudCraneService.queryAddressList(); return cloudCraneService.queryAddressList();
} }
@Transactional(rollbackFor = Exception.class)
public Integer syncAddressData() { public Integer syncAddressData() {
log.info("开始同步地址数据"); log.info("开始同步地址数据");
List<QueryAddressListResponse> addressList = cloudCraneService.queryAddressList(); List<QueryAddressListResponse> addressList = cloudCraneService.queryAddressList();
......
...@@ -9,6 +9,7 @@ import org.apache.commons.collections4.CollectionUtils; ...@@ -9,6 +9,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -34,6 +35,7 @@ public class BaseExpressService { ...@@ -34,6 +35,7 @@ public class BaseExpressService {
return cloudCraneService.queryExpressList(); return cloudCraneService.queryExpressList();
} }
@Transactional(rollbackFor = Exception.class)
public Integer syncExpressData() { public Integer syncExpressData() {
log.info("开始同步快递公司数据"); log.info("开始同步快递公司数据");
List<QueryExpressListResponse> expressList = cloudCraneService.queryExpressList(); List<QueryExpressListResponse> expressList = cloudCraneService.queryExpressList();
......
...@@ -49,6 +49,6 @@ ...@@ -49,6 +49,6 @@
) )
</foreach> </foreach>
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
updated_time=sysdate() updated_date=sysdate()
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -63,6 +63,6 @@ ...@@ -63,6 +63,6 @@
) )
</foreach> </foreach>
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
updated_time=sysdate() updated_date=sysdate()
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -61,6 +61,6 @@ ...@@ -61,6 +61,6 @@
) )
</foreach> </foreach>
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
updated_time=sysdate() updated_date=sysdate()
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -41,6 +41,6 @@ ...@@ -41,6 +41,6 @@
) )
</foreach> </foreach>
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
updated_time=sysdate() updated_date=sysdate()
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!