Browse Source

修改退款言语

stanley-king 8 years ago
parent
commit
f82d0c4ee2
3 changed files with 18 additions and 4 deletions
  1. 5 3
      crontab/control/hour.php
  2. 1 1
      helper/notify_helper.php
  3. 12 0
      test/systemTest.php

+ 5 - 3
crontab/control/hour.php

@@ -5,8 +5,9 @@
  *
  *
  *
  *
  *
  *
- 
  */
  */
+
+
 defined('InShopNC') or exit('Access Invalid!');
 defined('InShopNC') or exit('Access Invalid!');
 
 
 require_once(BASE_ROOT_PATH.'/helper/notify_helper.php');
 require_once(BASE_ROOT_PATH.'/helper/notify_helper.php');
@@ -260,17 +261,18 @@ class hourControl extends BaseCronControl
 
 
         foreach($bonus_types as $type)
         foreach($bonus_types as $type)
         {
         {
-            Model::beginTransaction();
             try
             try
             {
             {
                 $pred = new predeposit_helper($type['sender_id']);
                 $pred = new predeposit_helper($type['sender_id']);
-                $pred->bonus_refund($type);
+
+                Model::beginTransaction();
                 $bonus_type->edit(array('type_id' =>$type['type_id']),array('is_refund' => 1,'refund_time' => time()));
                 $bonus_type->edit(array('type_id' =>$type['type_id']),array('is_refund' => 1,'refund_time' => time()));
                 if ($bonus_type->affected_rows() <= 0) {
                 if ($bonus_type->affected_rows() <= 0) {
                     Model::rollback();
                     Model::rollback();
                     $sresult = implode(',',$type);
                     $sresult = implode(',',$type);
                     Log::record("bonus refund 更新状态失败,result:{$sresult}.");
                     Log::record("bonus refund 更新状态失败,result:{$sresult}.");
                 } else {
                 } else {
+                    $pred->bonus_refund($type);
                     $condition = array('type_id' =>$type['type_id'],'bonus_status' => array('in','0,1'));
                     $condition = array('type_id' =>$type['type_id'],'bonus_status' => array('in','0,1'));
                     Model('user_bonus')->where($condition)->delete();
                     Model('user_bonus')->where($condition)->delete();
                     Model::commit();
                     Model::commit();

+ 1 - 1
helper/notify_helper.php

@@ -36,7 +36,7 @@ class notify_helper
 
 
             $param = array();
             $param = array();
             $param['member_id'] = $bonus->user_id();
             $param['member_id'] = $bonus->user_id();
-            $param['text'] = "红包过期通知:您价值{$amount}元的红包将在{$remain_days}天内过期,请尽分享给好友或者买买买~";
+            $param['text'] = "红包过期通知:您价值{$amount}元的红包将在{$remain_days}天内过期,请尽分享给好友或者买买买~";
             $param['go_type'] = 'bonus';
             $param['go_type'] = 'bonus';
 
 
             QueueClient::push('upushSendMsg', $param);
             QueueClient::push('upushSendMsg', $param);

+ 12 - 0
test/systemTest.php

@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 16/8/8
+ * Time: 下午11:16
+ */
+class systemTest extends PHPUnit_Framework_TestCase
+{
+
+}