commit
65dc4f2480
@ -0,0 +1,16 @@ |
|||||||
|
package com.dxhy.core.service.gsclient; |
||||||
|
|
||||||
|
import com.dxhy.core.entity.GsClient; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @title: GsClient |
||||||
|
* @Author: wrr |
||||||
|
* @Date: 2023/11/3 09:02 |
||||||
|
* @Description: |
||||||
|
*/ |
||||||
|
public interface GsClientService { |
||||||
|
void updateGsClient(List<GsClient> list); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
package com.dxhy.core.service.gsclient; |
||||||
|
|
||||||
|
import com.dxhy.core.dao.GsClientMapper; |
||||||
|
import com.dxhy.core.entity.GsClient; |
||||||
|
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/3 09:03 |
||||||
|
* @Description: |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
@Slf4j |
||||||
|
public class GsClientServiceImpl implements GsClientService{ |
||||||
|
private static final String LOGGER_MSG = "pt(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