CustomerMgrServiceImpl.java
1.31 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
package com.glsx.service.impl;
import com.glsx.mapper.PlatformCustomerMapper;
import com.glsx.mapper.PlatformDeviceMapper;
import com.glsx.model.PlatformCustomer;
import com.glsx.service.CustomerMgrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import java.util.List;
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();
}
}