增加权限

master
杜函宇 1 day ago
parent e5e1ef80e1
commit ffed318958

@ -150,7 +150,7 @@ public class BasicInformationController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
@ApiOperation(value = "政务端审核")
@PostMapping("/audit")
public AjaxResult audit(@RequestBody AuditRequest req) {
@ -181,7 +181,7 @@ public class BasicInformationController extends BaseController {
* @param id
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
@ApiOperation(value = "通过主键查询单条项目所有数据(政务端)", response = BasicInformationResponse.class)
@GetMapping("/{id}")
public AjaxResult selectOne(@PathVariable Long id) {

@ -10,6 +10,7 @@ import com.ruoyi.gysl.service.DpclglService;
import com.ruoyi.web.controller.common.CommonController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -26,7 +27,7 @@ import java.util.List;
@Api(tags = "单片材料管理")
@RestController
@RequestMapping("/gysl/dpclgl")
//@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
public class DpclglController extends BaseController {

@ -30,7 +30,7 @@ import java.util.List;
@RestController
@RequestMapping("/gysl/ml")
@Api(tags = "目录管理")
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
public class MlController extends BaseController {
/**
*

@ -25,7 +25,7 @@ import java.util.List;
@Api(tags = "项目评价配置")
@RestController
@RequestMapping("/gysl/pjpz")
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
public class PjpzController extends BaseController {
/**
*

@ -61,7 +61,7 @@ public class PlanInformationController extends BaseController {
* @param planInformation
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
@PostMapping("/add")
@ApiOperation("新增数据")
public AjaxResult insert(@RequestBody PlanInformation planInformation) {

@ -23,7 +23,7 @@ import javax.annotation.Resource;
@Api(tags = "企业统计")
@RestController
@RequestMapping("/gysl/qyStats")
//@PreAuthorize("@ss.hasAnyRoles('company')")
@PreAuthorize("@ss.hasAnyRoles('company')")
public class QyStatsController extends BaseController {
@Resource

@ -56,7 +56,7 @@ public class WysmxInformationController extends BaseController {
* @param wysmxInformation
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
@PostMapping("/add")
@ApiOperation("新增数据")
public AjaxResult insert(@RequestBody WysmxInformation wysmxInformation) {

@ -29,7 +29,7 @@ import java.util.List;
@Api(tags ="细分产业管理" )
@RestController
@RequestMapping("/gysl/xfcygl")
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
public class XfcyglController extends BaseController {
/**
*

@ -30,7 +30,7 @@ import java.util.List;
@Api(tags = "项目知识库")
@RestController
@RequestMapping("/gysl/xmzsk")
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
public class XmzskController extends BaseController {
/**
*

@ -13,6 +13,7 @@ import com.ruoyi.gysl.service.BasicInformationService;
import com.ruoyi.gysl.service.ZwStatsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -37,7 +38,7 @@ import java.util.Map;
@Api(tags = "政务统计")
@RestController
@RequestMapping("/gysl/zwStats")
//@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
public class ZwStatsController extends BaseController {
@Resource

@ -57,7 +57,11 @@ public class LoginTokenServiceImpl implements LoginTokenService {
user.setEmail(email);
Long[] roles = new Long[1];
if ("01".equals(type)) {
roles[0] = 2L;
if("jjdntest".equals(accountName)||"yanyq".equals(accountName)){
roles[0] = 101L;
}else {
roles[0] = 2L;
}
} else if ("02".equals(type)) {
roles[0] = 100L;
}

Loading…
Cancel
Save