/** * Copyright 2018 人人开源 https://www.renren.io *

* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *

* This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *

* You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.result.CustomerGridByUserIdResultDTO; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.StaffGridVisitedFormDTO; import com.epmet.service.StaffGridVisitedService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; /** * 工作人员进入网格日志表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-21 */ @RestController @RequestMapping("staffgridvisited") public class StaffGridVisitedController { @Autowired private StaffGridVisitedService staffGridVisitedService; /** * @Description 查询工作人员上次登录的网格 * @Param LatestGridFormDTO -> customerId ; staffId * @return Result * @Author wangc * @Date 2020.04.23 10:05 **/ @PostMapping("getstafflatestgrid") Result getStaffLatestGrid(@RequestBody LatestGridFormDTO latestGridFormDTO){ ValidatorUtils.validateEntity(latestGridFormDTO); return staffGridVisitedService.getStaffLatestGrid(latestGridFormDTO); } /** * @param staffGridVisitedFormDTO * @return com.epmet.commons.tools.utils.Result * @Author yinzuomei * @Description 保存网格访问记录 * @Date 2020/4/23 11:19 **/ @PostMapping("savestaffgridvisitedrecord") public Result saveStaffGridVisitedRecord(@RequestBody StaffGridVisitedFormDTO staffGridVisitedFormDTO) { ValidatorUtils.validateEntity(staffGridVisitedFormDTO); return staffGridVisitedService.saveStaffGridVisitedRecord(staffGridVisitedFormDTO); } }