SysRelevanceController.cs 951 Bytes
using Hh.Mes.Service;
using Hh.Mes.Service.SystemAuth;
using Hh.Mes.Service.WebService.Base;
using Microsoft.AspNetCore.Mvc;

namespace WebMvc
{
    [Area("base")]
    public class SysRelevanceController : BaseController
    {
        private readonly SysRelevanceService service;

        public SysRelevanceController(IAuth authUtil, SysRelevanceService service) : base(authUtil)
        {
            this.service = service;
            this.service.sysWebUser = authUtil.GetCurrentUser().User;
        }

        [HttpPost]
        public string Assign(string type, int firstId, int[] secIds)
        {
            var response = service.Assign(type, firstId, secIds);
            return Serialize(response);
        }
        [HttpPost]
        public string UnAssign(string type, int firstId, int[] secIds)
        {
            var response = service.UnAssign(type, firstId, secIds);
            return Serialize(response);
        }
    }
}