Commit abc2df5a by 刘宇峰

同步修改

1 parent debf0122
......@@ -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)
public interface ShopmallAfterSalesOrderApiService {
}
......@@ -3,12 +3,11 @@ package cn.com.glsx.admin.api;
import cn.com.glsx.admin.modules.model.cloudcrane.response.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
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 {
/**
......@@ -104,16 +103,16 @@ public interface ShopmallBaseDataApiService {
@GetMapping(value = "/queryExpressList")
public List<QueryExpressListResponse> queryExpressList();
@PostMapping(value = "/syncAddressData")
@GetMapping(value = "/syncAddressData")
public Integer syncAddressData();
@PostMapping(value = "/syncCategoryData")
@GetMapping(value = "/syncCategoryData")
public Integer syncCategoryData();
@PostMapping(value = "/syncBrandData")
@GetMapping(value = "/syncBrandData")
public Integer syncBrandData();
@PostMapping(value = "/syncExpressData")
@GetMapping(value = "/syncExpressData")
public Integer syncExpressData();
}
......@@ -57,6 +57,28 @@
<build>
<plugins>
<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>
<artifactId>mybatis-generator-maven-plugin</artifactId>
</plugin>
......
......@@ -35,7 +35,7 @@ public class BaseBrandService {
return cloudCraneService.queryBrandList();
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public Integer syncBrandData() {
log.info("开始同步品牌数据");
List<QueryBrandListResponse> brandList = cloudCraneService.queryBrandList();
......
......@@ -12,6 +12,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collectors;
......@@ -66,6 +67,7 @@ public class BaseCategoryService {
return cloudCraneService.queryCategoryList();
}
@Transactional(rollbackFor = Exception.class)
public Integer syncCategoryData() {
log.info("开始同步分类数据");
List<QueryCategoryListResponse> categoryList = cloudCraneService.queryCategoryList();
......
......@@ -12,6 +12,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
......@@ -102,6 +103,7 @@ public class BaseDistrictService {
return cloudCraneService.queryAddressList();
}
@Transactional(rollbackFor = Exception.class)
public Integer syncAddressData() {
log.info("开始同步地址数据");
List<QueryAddressListResponse> addressList = cloudCraneService.queryAddressList();
......
......@@ -9,6 +9,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collectors;
......@@ -34,6 +35,7 @@ public class BaseExpressService {
return cloudCraneService.queryExpressList();
}
@Transactional(rollbackFor = Exception.class)
public Integer syncExpressData() {
log.info("开始同步快递公司数据");
List<QueryExpressListResponse> expressList = cloudCraneService.queryExpressList();
......
......@@ -49,6 +49,6 @@
)
</foreach>
ON DUPLICATE KEY UPDATE
updated_time=sysdate()
updated_date=sysdate()
</insert>
</mapper>
\ No newline at end of file
......@@ -63,6 +63,6 @@
)
</foreach>
ON DUPLICATE KEY UPDATE
updated_time=sysdate()
updated_date=sysdate()
</insert>
</mapper>
\ No newline at end of file
......@@ -61,6 +61,6 @@
)
</foreach>
ON DUPLICATE KEY UPDATE
updated_time=sysdate()
updated_date=sysdate()
</insert>
</mapper>
\ No newline at end of file
......@@ -41,6 +41,6 @@
)
</foreach>
ON DUPLICATE KEY UPDATE
updated_time=sysdate()
updated_date=sysdate()
</insert>
</mapper>
\ 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!