CustomerMgrServiceImpl.java
1.56 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
51
52
53
54
55
56
57
58
package com.glsx.service.impl;
import com.glsx.mapper.PlatformCustomerMapper;
import com.glsx.model.PlatformCustomer;
import com.glsx.service.CustomerMgrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class CustomerMgrServiceImpl implements CustomerMgrService {
/**
* 日志
*/
private final static Logger LOGGER = LoggerFactory.getLogger(CustomerMgrServiceImpl.class);
@Resource
private PlatformCustomerMapper customerMapper;
@Override
public List<PlatformCustomer> getCustomerMgrList() {
return customerMapper.getCustomerMgrList();
}
@Override
public int reset(int id) {
PlatformCustomer customer = new PlatformCustomer();
customer.setId(id);
customer.setPassword("12345678");
return customerMapper.updateByPrimaryKeySelective(customer);
}
@Override
public int startAndStop(int id, int status) {
PlatformCustomer customer = new PlatformCustomer();
customer.setId(id);
customer.setStatus(status);
return customerMapper.updateByPrimaryKeySelective(customer);
}
@Override
public int getCustomerCount() {
return customerMapper.getCustomerCount();
}
@Override
public int register(PlatformCustomer customer) {
return customerMapper.insertSelective(customer);
}
@Override
public int login(PlatformCustomer customer) {
return customerMapper.login(customer);
}
}