CustomerBaseRelationService.java
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package cn.com.glsx.entmicro.service;
import cn.com.glsx.entmicro.entity.CustomerBaseRelation;
import cn.com.glsx.entmicro.mapper.CustomerBaseRelationMapper;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 群成员服务
* @date 2021/10/1 9:11
*/
@Service
public class CustomerBaseRelationService {
@Autowired
private CustomerBaseRelationMapper customerBaseRelationMapper;
@Transactional(rollbackFor = RpcServiceException.class)
public void insertList(List<CustomerBaseRelation> buildCustomerRel) {
customerBaseRelationMapper.insertList(buildCustomerRel);
}
public void deleteByCustomerBaseId(Integer customerBaseId) {
customerBaseRelationMapper.deleteByCustomerBaseId(customerBaseId);
}
public List<CustomerBaseRelation> findByCustomerId(Integer id) {
return customerBaseRelationMapper.findByCustomerId(id);
}
@Transactional(rollbackFor = RpcServiceException.class)
public void updatelist(List<CustomerBaseRelation> updatelist) {
customerBaseRelationMapper.updatelist(updatelist);
}
@Transactional(rollbackFor = RpcServiceException.class)
public void deletelist(List<CustomerBaseRelation> deletelist) {
customerBaseRelationMapper.deletelist(deletelist);
}
public CustomerBaseRelation getFirstCustomerByCustomerId(Integer id) {
return customerBaseRelationMapper.findFirstCustomerByCustomerId(id);
}
}