Beispiel #1
0
        public ResponseMessage <int> UpdateMap([FromBody] OwnQueryRequest reqMsg)
        {
            bool tf = true;

            foreach (var item in reqMsg.objs)
            {
                var roleid  = reqMsg.roleid;
                var mapid   = item.id;
                var tmpdata = _sysAppRoleMapService.GetByFilter(roleid, mapid, int.Parse(reqMsg.type));
                if (tmpdata.Count == 0)
                {
                    SysAppRoleMap enity = new SysAppRoleMap()
                    {
                        id        = 0,
                        role_id   = roleid,
                        map_id    = mapid,
                        type_code = reqMsg.type,
                        group_id  = ""
                    };
                    _sysAppRoleMapService.Insert(enity);
                }
            }
            return(new ResponseMessage <int> {
                data = tf ? 1 : 0
            });
        }
Beispiel #2
0
 public async Task <ResponseMessage <int> > UpdateAsync([FromBody] SysAppRoleMap sysAppRoleMap)
 {
     //SysAppRoleMap entity = await _sysAppRoleMapService.GetByIdAsync(sysAppRoleMap.id);
     //Utils.CommmonUtils.EntityToEntity(sysAppRoleMap, entity, null);
     //return new ResponseMessage<int> { data = await _sysAppRoleMapService.UpdateAsync(entity) };
     return(new ResponseMessage <int> {
         data = await _sysAppRoleMapService.UpdateAsync(sysAppRoleMap)
     });
 }
Beispiel #3
0
 public ResponseMessage <int> Update([FromBody] SysAppRoleMap sysAppRoleMap)
 {
     return(new ResponseMessage <int> {
         data = _sysAppRoleMapService.Update(sysAppRoleMap)
     });
 }
Beispiel #4
0
 public async Task <ResponseMessage <string> > InsertAsync([FromBody] SysAppRoleMap sysAppRoleMap)
 {
     return(new ResponseMessage <string> {
         data = await _sysAppRoleMapService.InsertAsync(sysAppRoleMap)
     });
 }
Beispiel #5
0
 public ResponseMessage <string> Insert([FromBody] SysAppRoleMap sysAppRoleMap)
 {
     return(new ResponseMessage <string> {
         data = _sysAppRoleMapService.Insert(sysAppRoleMap)
     });
 }
Beispiel #6
0
 ///<summary>
 ///异步更新
 ///</summary>
 public async Task <int> UpdateAsync(SysAppRoleMap sysAppRoleMap)
 {
     return(await SysAppRoleMapRepository.UpdateAsync(sysAppRoleMap));
 }
Beispiel #7
0
 ///<summary>
 ///更新
 ///</summary>
 public int Update(SysAppRoleMap sysAppRoleMap)
 {
     return(SysAppRoleMapRepository.Update(sysAppRoleMap));
 }
Beispiel #8
0
 ///<summary>
 ///异步新增
 ///</summary>
 public async Task <string> InsertAsync(SysAppRoleMap sysAppRoleMap)
 {
     return(await SysAppRoleMapRepository.InsertAsync(sysAppRoleMap));
 }
Beispiel #9
0
 ///<summary>
 ///新增
 ///</summary>
 public string Insert(SysAppRoleMap sysAppRoleMap)
 {
     return(SysAppRoleMapRepository.Insert(sysAppRoleMap));
 }