增加权限

master
杜函宇 2 days 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 = "政务端审核") @ApiOperation(value = "政务端审核")
@PostMapping("/audit") @PostMapping("/audit")
public AjaxResult audit(@RequestBody AuditRequest req) { public AjaxResult audit(@RequestBody AuditRequest req) {
@ -181,7 +181,7 @@ public class BasicInformationController extends BaseController {
* @param id * @param id
* @return * @return
*/ */
@PreAuthorize("@ss.hasAnyRoles('admin,common')") @PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
@ApiOperation(value = "通过主键查询单条项目所有数据(政务端)", response = BasicInformationResponse.class) @ApiOperation(value = "通过主键查询单条项目所有数据(政务端)", response = BasicInformationResponse.class)
@GetMapping("/{id}") @GetMapping("/{id}")
public AjaxResult selectOne(@PathVariable Long 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 com.ruoyi.web.controller.common.CommonController;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -26,7 +27,7 @@ import java.util.List;
@Api(tags = "单片材料管理") @Api(tags = "单片材料管理")
@RestController @RestController
@RequestMapping("/gysl/dpclgl") @RequestMapping("/gysl/dpclgl")
//@PreAuthorize("@ss.hasAnyRoles('admin,common')") @PreAuthorize("@ss.hasAnyRoles('admin,common,gov')")
public class DpclglController extends BaseController { public class DpclglController extends BaseController {

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save