public Member_productInfo Save() { if (this.Member_id != null && this.Product_id != null) { Member_product.Update(this); return(this); } this.Create_time = DateTime.Now; return(Member_product.Insert(this)); }
public APIReturn _Edit([FromQuery] uint Member_id, [FromQuery] uint Product_id) { Member_productInfo item = Member_product.GetItem(Member_id, Product_id); if (item == null) { return(APIReturn.记录不存在_或者没有权限); } item.Create_time = DateTime.Now; int affrows = Member_product.Update(item); if (affrows > 0) { return(APIReturn.成功.SetMessage($"更新成功,影响行数:{affrows}")); } return(APIReturn.失败); }