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 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; } }