package com.xcong.excoin.modules.agent.controller;
|
|
import com.xcong.excoin.common.entity.FebsConstant;
|
import com.xcong.excoin.common.utils.FebsUtil;
|
import com.xcong.excoin.system.entity.User;
|
import com.xcong.excoin.system.service.IUserService;
|
import lombok.RequiredArgsConstructor;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.ui.Model;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
/**
|
* @author wzy
|
* @date 2020-06-10
|
**/
|
@Controller("memberView")
|
@RequestMapping(FebsConstant.VIEW_PREFIX + "/agent")
|
@RequiredArgsConstructor
|
public class ViewController {
|
|
private final IUserService userService;
|
|
/**
|
* 数据总览
|
* @return
|
*/
|
@GetMapping("allMemberData")
|
@RequiresPermissions("allMemberData:view")
|
public String allMemberData() {
|
return FebsUtil.view("modules/contract/total-data");
|
}
|
|
@GetMapping("member")
|
@RequiresPermissions("amember:view")
|
public String member() {
|
return FebsUtil.view("modules/agent/member");
|
}
|
|
@GetMapping("agent")
|
@RequiresPermissions("agent:view")
|
public String agent() {
|
return FebsUtil.view("modules/agent/agent");
|
}
|
|
@GetMapping("agentAdd")
|
@RequiresPermissions("agent:add")
|
public String agentAdd() {
|
return FebsUtil.view("modules/agent/agentAdd");
|
}
|
|
@GetMapping("agentEdit/{id}")
|
@RequiresPermissions("agent:edit")
|
public String agentEdit(@PathVariable Long id, Model model) {
|
User user = userService.findUserInfoById(id);
|
model.addAttribute("user", user);
|
return FebsUtil.view("modules/agent/agentEdit");
|
}
|
}
|