Newer
Older
huludao / src / main / java / com / newfiber / api / pc / controller / MenuJurisdictionController.java
package com.newfiber.api.pc.controller;

import com.newfiber.api.core.annotation.SysLog;
import com.newfiber.api.core.bean.RespBodyObj;
import com.newfiber.api.pc.model.request.MenuJurisdictionSaveRequest;
import com.newfiber.api.pc.service.DataMenuJurisdictionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@Api(tags = "SYS-14、菜单权限管理", position = 114)
public class MenuJurisdictionController {
	
	@Autowired
	private DataMenuJurisdictionService menuJurisdictionService;


	@ApiOperation(value = "添加菜单权限信息")
	@PostMapping(value="AddMenuJurisdiction",produces = "application/json; charset=utf-8")
	@ResponseBody
	@SysLog(actionType="1",value = "添加菜单权限信息")
	public RespBodyObj AddMenuJurisdiction(@RequestBody MenuJurisdictionSaveRequest params){
		try {
			menuJurisdictionService.addMenuJurisdiction(params.getMenuNo(),params.getJurisdictionNo());
			return RespBodyObj.ok("添加成功!");
		} catch (Exception e) {
			e.printStackTrace();
			return RespBodyObj.error("添加失败!");
		}
	}

}