20200724-游戏数学权限
This commit is contained in:
@ -61,7 +61,7 @@ public class ByMathController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取游戏数学详细信息
|
* 获取游戏数学详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:math:query')" + "||@ss.hasPermi('benyi:theme:list')")
|
@PreAuthorize("@ss.hasPermi('benyi:math:query')" + "||@ss.hasPermi('benyi:math:list')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
|
@ -31,8 +31,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/benyi/plan")
|
@RequestMapping("/benyi/plan")
|
||||||
public class ByMathPlanController extends BaseController
|
public class ByMathPlanController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IByMathPlanService byMathPlanService;
|
private IByMathPlanService byMathPlanService;
|
||||||
|
|
||||||
@ -42,10 +41,9 @@ public class ByMathPlanController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询游戏数学方案列表
|
* 查询游戏数学方案列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:plan:list')")
|
@PreAuthorize("@ss.hasPermi('benyi:math:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(ByMathPlan byMathPlan)
|
public TableDataInfo list(ByMathPlan byMathPlan) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -54,11 +52,10 @@ public class ByMathPlanController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 导出游戏数学方案列表
|
* 导出游戏数学方案列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:plan:export')")
|
@PreAuthorize("@ss.hasPermi('benyi:math:export')")
|
||||||
@Log(title = "游戏数学方案", businessType = BusinessType.EXPORT)
|
@Log(title = "游戏数学方案", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public AjaxResult export(ByMathPlan byMathPlan)
|
public AjaxResult export(ByMathPlan byMathPlan) {
|
||||||
{
|
|
||||||
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
||||||
ExcelUtil<ByMathPlan> util = new ExcelUtil<ByMathPlan>(ByMathPlan.class);
|
ExcelUtil<ByMathPlan> util = new ExcelUtil<ByMathPlan>(ByMathPlan.class);
|
||||||
return util.exportExcel(list, "plan");
|
return util.exportExcel(list, "plan");
|
||||||
@ -67,10 +64,9 @@ public class ByMathPlanController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取游戏数学方案详细信息
|
* 获取游戏数学方案详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:plan:query')")
|
@PreAuthorize("@ss.hasPermi('benyi:math:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
ByMathPlan byMathPlan = byMathPlanService.selectByMathPlanById(id);
|
ByMathPlan byMathPlan = byMathPlanService.selectByMathPlanById(id);
|
||||||
// 将数据库中的type类型分割 然后返回给前端
|
// 将数据库中的type类型分割 然后返回给前端
|
||||||
@ -86,11 +82,10 @@ public class ByMathPlanController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增游戏数学方案
|
* 新增游戏数学方案
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:plan:add')")
|
@PreAuthorize("@ss.hasPermi('benyi:math:add')")
|
||||||
@Log(title = "游戏数学方案", businessType = BusinessType.INSERT)
|
@Log(title = "游戏数学方案", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ByMathPlan byMathPlan)
|
public AjaxResult add(@RequestBody ByMathPlan byMathPlan) {
|
||||||
{
|
|
||||||
byMathPlan.setCreatetime(new Date());
|
byMathPlan.setCreatetime(new Date());
|
||||||
return toAjax(byMathPlanService.insertByMathPlan(byMathPlan));
|
return toAjax(byMathPlanService.insertByMathPlan(byMathPlan));
|
||||||
}
|
}
|
||||||
@ -98,22 +93,20 @@ public class ByMathPlanController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改游戏数学方案
|
* 修改游戏数学方案
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:plan:edit')")
|
@PreAuthorize("@ss.hasPermi('benyi:math:edit')")
|
||||||
@Log(title = "游戏数学方案", businessType = BusinessType.UPDATE)
|
@Log(title = "游戏数学方案", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody ByMathPlan byMathPlan)
|
public AjaxResult edit(@RequestBody ByMathPlan byMathPlan) {
|
||||||
{
|
|
||||||
return toAjax(byMathPlanService.updateByMathPlan(byMathPlan));
|
return toAjax(byMathPlanService.updateByMathPlan(byMathPlan));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除游戏数学方案
|
* 删除游戏数学方案
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:plan:remove')")
|
@PreAuthorize("@ss.hasPermi('benyi:math:remove')")
|
||||||
@Log(title = "游戏数学方案", businessType = BusinessType.DELETE)
|
@Log(title = "游戏数学方案", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(byMathPlanService.deleteByMathPlanByIds(ids));
|
return toAjax(byMathPlanService.deleteByMathPlanByIds(ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user