liusheng
16 小时以前 529ff531c27c117b0ff80294557c6964da4d0b04
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
package com.smartor.service.impl;
 
 
import com.smartor.mapper.UtilsMapper;
import com.smartor.service.IServiceTelInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
@Slf4j
@Service
public class ServiceTelInfoServiceImpl implements IServiceTelInfoService {
    @Autowired
    private UtilsMapper utilsMapper;
 
    /**
     * 设置电话状态
     *
     * @return 结果
     */
    @Override
    public List<Map<String,Object>> getList() {
       List<Map<String,Object>> lists= utilsMapper.getList("select * from service_telinfo where state=0 ");
        return lists;
    }
    /**
     * 设置电话状态
     *
     * @param id 主键
     * @param state 0正常1占线
     * @return 结果
     */
    @Override
    public int setState(Integer id, Integer state) {
        Integer result= utilsMapper.updateSql("update service_telinfo set state= "+state+" where id="+id+" ");
        return result;
    }
}