public static Resp_Binary Cmt_Shield_Handle(this Req_Cmt_Shield shield) { var accuseId = shield.u_id.ToInt(); var tip = DataAccess.Cmt_TipOff_Select(shield.cmt_id, shield.cmt_type, accuseId); if (tip != null && tip.cto_shield == 0) { tip.cto_shield = 1; DataAccess.Cmt_TipOff_Update(tip); } else { var t = new CommentTipOffInfo(); //t.cto_BeiGao_Uid = to.accused_uid.ToInt(); t.cto_BeiGao_Uname = ""; t.cto_des = ""; //t.cto_status = 0; t.cto_tiezi_id = shield.cmt_id; t.cto_tiezi_type = shield.cmt_type; t.cto_time = DateTime.Parse("1900-01-01"); t.cto_YuanGao_Uid = accuseId; t.cto_YuanGao_Uname = shield.u_name ?? ""; t.cto_shield = 1; DataAccess.Cmt_TipOff_Insert(t); } return(new Resp_Binary() { status = true, remark = "屏蔽成功" }); }
public static Resp_Binary Cmt_TipOff_Handle(this Req_Cmt_TipOff to) { var accuseId = to.accuse_uid.ToInt(); var tip = DataAccess.Cmt_TipOff_Select(to.cmt_id, to.cmt_type, accuseId); if (tip == null) { var t = new CommentTipOffInfo(); t.cto_BeiGao_Uid = to.accused_uid.ToInt(); t.cto_BeiGao_Uname = to.accused_uname ?? ""; t.cto_des = to.to_des; t.cto_status = 1; t.cto_tiezi_id = to.cmt_id; t.cto_tiezi_type = to.cmt_type; t.cto_time = DateTime.Now; t.cto_YuanGao_Uid = accuseId; t.cto_YuanGao_Uname = to.accuse_uname ?? ""; DataAccess.Cmt_TipOff_Insert(t); } else { tip.cto_YuanGao_Uname = to.accuse_uname; tip.cto_BeiGao_Uid = to.accused_uid.ToInt(); tip.cto_BeiGao_Uname = to.accused_uname; tip.cto_des = to.to_des; tip.cto_status = 1; //tip.cto_tiezi_id = to.cmt_id; //tip.cto_tiezi_type = to.cmt_type; tip.cto_time = DateTime.Now; //tip.cto_YuanGao_Uid = accuseId; tip.cto_YuanGao_Uname = to.accuse_uname ?? ""; DataAccess.Cmt_TipOff_Update(tip); } return(new Resp_Binary() { status = true, remark = "举报成功" }); }