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