public async Task <IActionResult> AddMembers([FromBody] AddMembersInput input) { if (input == null || input.MemberIds == null) { return(Json(false, null, "请输入正确的数据")); } await this._contactGroupMemberAppService.AddMembersAsync(input.GroupId, input.MemberIds); return(Json(true, null, "加入成功")); }
//return 1 是成功,2是验证码错误,3 失败 public ContentResult AddUser(AddMembersInput mms) { string code = WebHelper.GetSession <string>(VerifyCodeKey); WebHelper.RemoveSession(VerifyCodeKey); if (code.IsNullOrEmpty() || code.ToLower() != mms.VCode.ToLower()) { return(null); } return(this.JsonContent(this.CreateService <IMembersAppService>().Add(mms))); }
public MALU_Members Add(AddMembersInput input) { MALU_Members entity = this.CreateEntity <MALU_Members>(); entity.IdCard = input.IdCard; entity.MobilePhone = input.MobilePhone; entity.Name = input.Name; // entity.PassWord = input.PassWord; //entity.WeChatKey = input.WeChatKey; //entity.WeChatName = input.WeChatName; return(this.DbContext.Insert(entity)); }
public int Update(AddMembersInput input) { if (this.DbContext.Update <MALU_Members>(a => a.Id == input.Id, a => new MALU_Members() { CreateTime = DateTime.Now, IdCard = input.IdCard, MobilePhone = input.MobilePhone, Name = input.Name, PassWord = input.PassWord, WeChatKey = input.WeChatKey, WeChatName = input.WeChatName }) > 0) { return(1); } return(0); }