diff --git a/epmet-module/gov-mine/gov-mine-client/src/main/java/com/epmet/dto/form/SwitchGridFormDTO.java b/epmet-module/gov-mine/gov-mine-client/src/main/java/com/epmet/dto/form/SwitchGridFormDTO.java new file mode 100644 index 0000000000..f9908e24dc --- /dev/null +++ b/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; + +} + diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/StaffAgencyController.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/StaffAgencyController.java index 83b649e63a..372936494b 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/StaffAgencyController.java +++ b/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> getMyGrids(TokenDto tokenDTO) { + public Result> 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> + * @Author yinzuomei + * @Description 切换网格 + * @Date 2020/4/23 10:34 + **/ + @PostMapping("switchgrid") + public Result> switchGrid(@LoginUser TokenDto tokenDto, @RequestBody @Valid SwitchGridFormDTO switchGridFormDTO) { + return staffAgencyService.switchGrid(switchGridFormDTO); + } } \ No newline at end of file diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/StaffAgencyService.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/StaffAgencyService.java index 589a0ed64e..d2f7254998 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/StaffAgencyService.java +++ b/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 getLatestCustomer(TokenDto tokenDTO); + + /** + * @param switchGridFormDTO + * @return com.epmet.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 切换网格 + * @Date 2020/4/23 10:49 + **/ + Result> switchGrid(SwitchGridFormDTO switchGridFormDTO); } \ No newline at end of file diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java index 1a7a56e39a..575ab2ef4d 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java +++ b/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> switchGrid(SwitchGridFormDTO switchGridFormDTO) { + //记录网格访问记录 + //查询网格的权限 + return new Result<>(); + } + + } \ No newline at end of file