stanley-king 3 tahun lalu
induk
melakukan
179a6a80dc

+ 9 - 3
admin/control/merchant.php

@@ -521,6 +521,7 @@ class merchantControl extends SystemControl
         showMessage(L('nc_common_save_succ'), urlAdmin('refill_evidence', 'index'));
     }
 
+    //处理充值申请
     public function rechargeOp()
     {
         if (chksubmit()) {
@@ -713,9 +714,7 @@ class merchantControl extends SystemControl
 
         $available_predeposit = floatval($member_info['available_predeposit']);
         $freeze_predeposit = floatval($member_info['freeze_predeposit']);
-//        if ($_POST['operatetype'] == 2 && $money > $available_predeposit) {
-//            showMessage(('预存款不足,会员当前预存款') . $available_predeposit, 'index.php?act=predeposit&op=predeposit_add', '', 'error');
-//        }
+
         if ($_POST['operatetype'] == 3 && $money > $available_predeposit) {
             showMessage(('可冻结预存款不足,会员当前预存款') . $available_predeposit, 'index.php?act=predeposit&op=predeposit_add', '', 'error');
         }
@@ -743,6 +742,13 @@ class merchantControl extends SystemControl
         }
         try {
             $trans = new trans_wapper($model_pd, __METHOD__);
+            $evidence_info = $model_merchant->getRefillEvidenceInfo(['apply_id' => $apply_id], '*', true,true);
+            if ($evidence_info['is_operation'] == 2) {
+                $trans->commit();
+                showMessage('已经处理', 'index.php?act=refill_evidence&op=index', 'html', 'error');
+                exit;
+            }
+
             //扣除冻结的预存款
             $data = [];
             $data['member_id'] = $member_info['member_id'];

+ 15 - 15
admin/templates/default/merchant.edit.php

@@ -96,21 +96,21 @@
             </tr>
             <tr class="noborder">
                 <td class="vatop">
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::Normal){ echo 'checked';}?> value="<?php echo \refill\Quality::Normal;?>" type="radio">普通
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::Quick){ echo 'checked';}?> value="<?php echo \refill\Quality::Quick;?>" type="radio">快速
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::CardKey){ echo 'checked';}?> value="<?php echo \refill\Quality::CardKey;?>" type="radio">卡密
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::ThirdShop){ echo 'checked';}?> value="<?php echo \refill\Quality::ThirdShop;?>" type="radio">三方
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::SlowTwentyFour){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowTwentyFour;?>" type="radio">慢24
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::SlowSix){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowSix;?>" type="radio">慢6
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::SlowTwo){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowTwo;?>" type="radio">慢2
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::SlowFortyEight){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowFortyEight;?>" type="radio">慢48
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::SlowSeventyTwo){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowSeventyTwo;?>" type="radio">慢72
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::Fastest){ echo 'checked';}?> value="<?php echo \refill\Quality::Fastest;?>" type="radio">速充
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::SlowNormal){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowNormal;?>" type="radio">慢充一次+普充
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::ThirdNormal){ echo 'checked';}?> value="<?php echo \refill\Quality::ThirdNormal;?>" type="radio">三方一次+普充
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::DefSuccess){ echo 'checked';}?> value="<?php echo \refill\Quality::DefSuccess;?>" type="radio">普充+卡密+快充
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::NormalQuick){ echo 'checked';}?> value="<?php echo \refill\Quality::NormalQuick;?>" type="radio">普充+快充
-                    <input name="quality" <?php if($output['merchant']['quality'] == \refill\Quality::SlowSixNormal){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowSixNormal;?>" type="radio">慢充6+普充
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::Normal){ echo 'checked';}?> value="<?php echo \refill\Quality::Normal;?>" type="radio">普通
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::Quick){ echo 'checked';}?> value="<?php echo \refill\Quality::Quick;?>" type="radio">快速
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::CardKey){ echo 'checked';}?> value="<?php echo \refill\Quality::CardKey;?>" type="radio">卡密
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::ThirdShop){ echo 'checked';}?> value="<?php echo \refill\Quality::ThirdShop;?>" type="radio">三方
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::SlowTwentyFour){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowTwentyFour;?>" type="radio">慢24
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::SlowSix){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowSix;?>" type="radio">慢6
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::SlowTwo){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowTwo;?>" type="radio">慢2
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::SlowFortyEight){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowFortyEight;?>" type="radio">慢48
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::SlowSeventyTwo){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowSeventyTwo;?>" type="radio">慢72
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::Fastest){ echo 'checked';}?> value="<?php echo \refill\Quality::Fastest;?>" type="radio">速充
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::SlowNormal){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowNormal;?>" type="radio">慢充一次+普充
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::ThirdNormal){ echo 'checked';}?> value="<?php echo \refill\Quality::ThirdNormal;?>" type="radio">三方一次+普充
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::DefSuccess){ echo 'checked';}?> value="<?php echo \refill\Quality::DefSuccess;?>" type="radio">普充+卡密+快充
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::NormalQuick){ echo 'checked';}?> value="<?php echo \refill\Quality::NormalQuick;?>" type="radio">普充+快充
+                    <input name="quality" <?php if($output['merchant']['quality'] == refill\Quality::SlowSixNormal){ echo 'checked';}?> value="<?php echo \refill\Quality::SlowSixNormal;?>" type="radio">慢充6+普充
                 </td>
             </tr>
             </tbody>

+ 6 - 1
crontab/control/date.php

@@ -16,6 +16,8 @@ require_once(BASE_ROOT_PATH . '/helper/stat_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/bonus_helper.php');
 require_once(BASE_DATA_PATH . '/mobile/omsid.php');
 require_once(BASE_HELPER_PATH . '/stat_helper.php');
+require_once(BASE_HELPER_PATH . '/message/publisher.php');
+
 
 
 class dateControl extends BaseCronControl
@@ -53,7 +55,6 @@ class dateControl extends BaseCronControl
 
     }
 
-
     /**
      * 默认方法
      */
@@ -118,11 +119,15 @@ class dateControl extends BaseCronControl
     public function merchant_daytimeOp()
     {
         $this->update_timeout(true);
+        $publisher = new message\publisher();
+        $publisher->modify_refill_merchant();
     }
 
     public function merchant_nightimeOp()
     {
         $this->update_timeout(false);
+        $publisher = new message\publisher();
+        $publisher->modify_refill_merchant();
     }
 
     private function update_timeout($toDay)

+ 2 - 2
data/model/merchant.model.php

@@ -64,9 +64,9 @@ class merchantModel extends Model
         return $list;
     }
 
-    public function getRefillEvidenceInfo($condition, $field = '*', $master = false)
+    public function getRefillEvidenceInfo($condition, $field = '*', $master = false, $lock = false)
     {
-        $result = $this->table('refill_evidence,member')->join('inner')->on('member.member_id=refill_evidence.member_id')->where($condition)->field($field)->master($master)->find();
+        $result = $this->table('refill_evidence,member')->join('inner')->on('member.member_id=refill_evidence.member_id')->where($condition)->field($field)->master($master)->lock($lock)->find();
         return $result;
     }
 

+ 2 - 1
docker/compose/xyz/conf/crontab/slave_root

@@ -17,4 +17,5 @@
 */1    *   *   *   *   php /var/www/html/crontab/index.php minutes update_channel_balance
 0   4   *   *   *   php /var/www/html/crontab/index.php date forth_clock
 1   0   *   *   *   php /var/www/html/crontab/index.php date merchant_nightime
-1   6   *   *   *   php /var/www/html/crontab/index.php date merchant_daytime
+1   6   *   *   *   php /var/www/html/crontab/index.php date merchant_daytime
+0   0    *   *   *   php /var/www/html/crontab/index.php date merchant_available