Browse Source

切换网格初始提交

dev_shibei_match
yinzuomei 5 years ago
parent
commit
f243849a3c
  1. 27
      epmet-module/gov-mine/gov-mine-client/src/main/java/com/epmet/dto/form/SwitchGridFormDTO.java
  2. 16
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/StaffAgencyController.java
  3. 11
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/StaffAgencyService.java
  4. 12
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java

27
epmet-module/gov-mine/gov-mine-client/src/main/java/com/epmet/dto/form/SwitchGridFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 切换网格入参
* @Author yinzuomei
* @Date 2020/4/23 10:41
*/
@Data
public class SwitchGridFormDTO implements Serializable {
private static final long serialVersionUID = -2898130727929596798L;
/**
* sessionKey
*/
private String customerId;
/**
* sessionKey
*/
private String gridId;
}

16
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/StaffAgencyController.java

@ -20,14 +20,17 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.SwitchGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.LatestCustomerResultDTO;
import com.epmet.service.StaffAgencyService;
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;
import java.util.List;
/**
@ -49,7 +52,7 @@ public class StaffAgencyController {
* @Author sun
*/
@PostMapping("getmygrids")
public Result<List<CustomerGridByUserIdResultDTO>> getMyGrids(TokenDto tokenDTO) {
public Result<List<CustomerGridByUserIdResultDTO>> getMyGrids(@LoginUser TokenDto tokenDTO) {
return staffAgencyService.getMyGrids(tokenDTO);
}
@ -64,4 +67,15 @@ public class StaffAgencyController {
return staffAgencyService.getLatestCustomer(tokenDTO);
}
/**
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result<java.util.List < java.lang.String>>
* @Author yinzuomei
* @Description 切换网格
* @Date 2020/4/23 10:34
**/
@PostMapping("switchgrid")
public Result<List<String>> switchGrid(@LoginUser TokenDto tokenDto, @RequestBody @Valid SwitchGridFormDTO switchGridFormDTO) {
return staffAgencyService.switchGrid(switchGridFormDTO);
}
}

11
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/StaffAgencyService.java

@ -19,6 +19,7 @@ package com.epmet.service;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.SwitchGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.LatestCustomerResultDTO;
@ -41,8 +42,18 @@ public interface StaffAgencyService {
/**
* 获取最近一次登录的客户信息
*
* @param tokenDTO
* @return
*/
Result<LatestCustomerResultDTO> getLatestCustomer(TokenDto tokenDTO);
/**
* @param switchGridFormDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < java.lang.String>>
* @Author yinzuomei
* @Description 切换网格
* @Date 2020/4/23 10:49
**/
Result<List<String>> switchGrid(SwitchGridFormDTO switchGridFormDTO);
}

12
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java

@ -19,9 +19,9 @@ package com.epmet.service.impl;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.SwitchGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.LatestCustomerResultDTO;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.service.StaffAgencyService;
import org.springframework.beans.factory.annotation.Autowired;
@ -39,8 +39,6 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
@Autowired
private GovOrgFeignClient govOrgFeignClient;
@Autowired
private EpmetUserFeignClient epmetUserFeignClient;
/**
* @param tokenDTO
@ -59,4 +57,12 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
}
@Override
public Result<List<String>> switchGrid(SwitchGridFormDTO switchGridFormDTO) {
//记录网格访问记录
//查询网格的权限
return new Result<>();
}
}
Loading…
Cancel
Save