Example #1
0
 private MemberRewardModel GetReward(OrderModel order)
 {
     MemberRewardRuleModel rule = GetCurRewardRule();
     MemberRewardModel reward = new MemberRewardModel();
     reward.setPk(reward.createPk());
     reward.createDate = DateTime.Now;
     if (order.totalPrice < rule.rebateScaleAmount)
     {
         reward.amount = rule.rebateAmount;
     }
     else {
         reward.amount = (float)(order.totalPrice * rule.rebateScale);
     }
     reward.memberFk = order.memberFk;
     return reward;
 }
 public ActionResult SaveMemberCommentReward()
 {
     MemberRewardModel e = new MemberRewardModel();
     e = ObjectUtil.Eval(e, Request.Params, "", "");
     if (string.IsNullOrEmpty(e.id))
     {
         e.id = e.createPk().ToString();
     }
     JsResultObject result = BaseZdBiz.SaveOrUpdate(e, "会员点评奖励");
     return JsonText(result, JsonRequestBehavior.AllowGet);
 }
Example #3
0
 public JsResultObject grantMemberCommentReward(MemberRewardModel reward)
 {
     return new JsResultObject();
 }