/// <summary> /// 变更任务状态 /// </summary> /// <param name="id"></param> /// <param name="type"></param> /// <returns></returns> public static string ChangeTaskStatus(int id, int type, string desc, string accid) { string stat = RequirementManageBLL.ChangeTaskStatus(id, type, desc); if (stat != "0" && !string.IsNullOrEmpty(accid) && type == 3) { try { #region Kafka Message 反馈转为需求后 AfterImportReq iModel = new AfterImportReq(); iModel.EventId = 7; iModel.AccId = Convert.ToInt32(accid); iModel.RequirementDesc = desc; string specModel = CommonLib.Helper.JsonSerializeObject(iModel); KafkaMessage mSend = new KafkaMessage(); mSend.SendMsg(7, specModel); #endregion } catch (Exception ex) { Logger.Error("反馈转为需求后推送模板消息错误", ex); } } return(stat); }
public static string AddNewReqModel(int accId, int refId, int cateId, int reqType, string desc, int op, string originDesc, int device, int val, int diff) { Model.RequirementManage model = new Model.RequirementManage(); model.AccId = accId.ToString(); model.RefId = refId; model.CategoryId = cateId; model.RequirementType = reqType; model.Description = desc; model.Operator = op; model.Status = 0; model.OriginDesc = originDesc; model.Terminal = device; model.UserVal = val; model.Difficult = diff; int reqId = RequirementManageBLL.AddNewModel(model); if (reqId != 0) { if (Sys_TaskDailyBLL.UpdateReqId(reqId, refId) != 0) { try { #region Kafka Message 反馈转为需求后 AfterImportReq iModel = new AfterImportReq(); iModel.EventId = 6; iModel.AccId = accId; iModel.RequirementDesc = desc; string specModel = CommonLib.Helper.JsonSerializeObject(iModel); KafkaMessage mSend = new KafkaMessage(); mSend.SendMsg(6, specModel); #endregion } catch (Exception ex) { Logger.Error("反馈转为需求后推送模板消息错误", ex); } return("添加成功!"); } else { return("添加关联信息出错!请联系技术~"); } } else { return("添加新的需求记录出错!请联系技术~"); } }
public string AddExpressInfo(int oid, int accId, string expressCompany, string expressCode) { ManageUserModel uM = (ManageUserModel)Session["logUser"]; int uid = uM.UserID; string uName = uM.Name; int reVal = T_OrderInfoBLL.AddExpressInfo(oid, accId, expressCompany, expressCode, uid, uName); //发货完成后推送消息 if (reVal == 1) { //获取实物商品名称 T_OrderInfoDAL dal = new T_OrderInfoDAL(); string goodsName = dal.GetMaterialGoodsName(Convert.ToInt32(dal.GetBusIdByOid(oid))); try { #region Kafka Message 实物订单发货后 AfterExpress eModel = new AfterExpress(); eModel.EventId = 5; eModel.AccId = accId; eModel.GoodsName = goodsName; eModel.ExpressName = expressCompany; eModel.ExpressCode = expressCode; string specModel = CommonLib.Helper.JsonSerializeObject(eModel); KafkaMessage mSend = new KafkaMessage(); mSend.SendMsg(5, specModel); #endregion } catch (Exception ex) { Logger.Error("实物订单发货后推送模板消息错误", ex); } } return(reVal.ToString()); }
/// <summary> /// 绑定优惠券 /// <para>{-1:处理错误,0:优惠券不存在,1:优惠券已使用或者已经作废,2:绑定成功}</para> /// </summary> /// <param name="accountid">店铺ID</param> /// <param name="CouponID">优惠券编号</param> /// <returns></returns> public static int BingingCoupon(int accountid, string CouponID) { int reVal = T_Order_CouponListBLL.BindingAccount(accountid, CouponID); //绑定成功推送消息提醒 if (reVal == 2) { var model = T_Order_CouponListBLL.GetCouponInfoByCode(CouponID); if (model != null) { try { #region Kafka Message 优惠券到账后 AfterBindCoupon cModel = new AfterBindCoupon(); cModel.EventId = 4; cModel.AccId = accountid; cModel.CouponDesc = model.couponDesc; cModel.EndDate = model.endDate; string specModel = CommonLib.Helper.JsonSerializeObject(cModel); KafkaMessage mSend = new KafkaMessage(); mSend.SendMsg(4, specModel); #endregion ////绑定礼金券 推送模板消息 //CommonLib.SystemAPI sysApi = new CommonLib.SystemAPI(); //sysApi.CouponBindingNotifyPushMessage(accId, couponListModel.CouponDesc, couponListModel.EndDate); } catch (Exception ex) { Logger.Error("绑定礼金券推送模板消息错误", ex); } } } return(reVal); }