commit
c19f854a41
@ -0,0 +1,15 @@ |
|||||||
|
package com.dxhy.order.consumer.openapi.service; |
||||||
|
|
||||||
|
import com.dxhy.order.consumer.modules.order.model.GsClient; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @title: GsClientService |
||||||
|
* @Author: wrr |
||||||
|
* @Date: 2023/11/2 15:49 |
||||||
|
* @Description: |
||||||
|
*/ |
||||||
|
public interface GsClientService { |
||||||
|
void updateGsClient(List<GsClient> list); |
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
package com.dxhy.order.consumer.openapi.service.impl; |
||||||
|
|
||||||
|
import com.dxhy.order.consumer.dao.GsClientMapper; |
||||||
|
import com.dxhy.order.consumer.modules.order.model.GsClient; |
||||||
|
import com.dxhy.order.consumer.openapi.service.GsClientService; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import org.springframework.transaction.annotation.Transactional; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @title: GsClientServiceImpl |
||||||
|
* @Author: wrr |
||||||
|
* @Date: 2023/11/2 15:52 |
||||||
|
* @Description: |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
@Slf4j |
||||||
|
public class GsClientServiceImpl implements GsClientService { |
||||||
|
private static final String LOGGER_MSG = "(SAP获取公司clientService)"; |
||||||
|
|
||||||
|
@Resource |
||||||
|
private GsClientMapper gsClientMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public void updateGsClient(List<GsClient> list) { |
||||||
|
log.info("{}删除gs_client表数据",LOGGER_MSG); |
||||||
|
gsClientMapper.deleteAll(); |
||||||
|
log.info("{}插入gs_client表",LOGGER_MSG); |
||||||
|
gsClientMapper.insertList(list); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue