xingzilong
2017-08-18 9e5babf9db52e64bdae60137be7696e56241fca6
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
package cn.com.basic.face.discern.component.visit.controller;
 
import java.util.List;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
import cn.com.basic.face.discern.business.constant.Code;
import cn.com.basic.face.discern.business.constant.Message;
import cn.com.basic.face.discern.business.transfer.TransferBeanDTO;
import cn.com.basic.face.discern.component.visit.service.VisitMatterManagerService;
 
@Controller
@RequestMapping("/selectManager")
public class VisitMatterManagerController {
    
    @Autowired
    private VisitMatterManagerService visitMatterManagerService;
    
    @RequestMapping("/getVisitMatterByUserID")
    @ResponseBody
    public TransferBeanDTO getVisitMatterByUserID(String userID){
        TransferBeanDTO tb = new TransferBeanDTO();
        if(userID == null){
            tb.setCode(Code.dataReceiveException);
            tb.setMsg(Message.dataReceiveException);
            tb.setData(null);
        }
        List<String> visitors = visitMatterManagerService.getVisitMatterByUserID(userID);
        if(visitors != null){
            tb.setCode(Code.success);
            tb.setMsg(Message.success);
            tb.setData(visitors);
        }else{
            tb.setCode(Code.exception);
            tb.setMsg(Message.exception);
            tb.setData(null);
        }
        return tb;
    }
 
}