diff --git a/app/service/plugins/Premium.php b/app/service/plugins/Premium.php
index 06eb85d..17d21b1 100755
--- a/app/service/plugins/Premium.php
+++ b/app/service/plugins/Premium.php
@@ -2095,7 +2095,7 @@ TG ID: {$from['id']}
}
$this->telegram->answerCallback($callback_id, "订单支付超时!", true);
}
- } elseif ($moth == "payue") {
+ }elseif ($moth == "payue") {
// $user= $this->db->select ('order',"*",['order_no' => $order_no]);
@@ -2198,7 +2198,83 @@ TG ID: {$from['id']}
// $this->db->update('order',['message_id' => $isid],['order_no' => $order_no]);
Db::name('order')->where("order_no", $order_no)->update(['message_id' => $isid]);
+ }elseif($moth == "admin"){
+ $odder = Db::name('order')->where("order_no", $order_no)->find();
+ if ($this->bots['botad'] == $callback_from['id']) {
+
+ Db::name('order')->where(['order_no' => $order_no])->update(['start' => 1, "remakess" => "管理员手动"]);
+ if ($odder['moth'] == "huiyuangoumaai") {
+ $tmuid = Db::name("conf")->where("key", 'tmuid')->value('value');
+ $tmkey = Db::name("conf")->where("key", 'tmkey')->value('value');
+ $cycleMap = ['3' => '0', '6' => '1', '12' => '2'];
+ $mappedValue = $cycleMap[$odder['tancan']] ?? '3';
+
+
+ $reqx = $this->Customer->submitkt($tmuid, $tmkey,$this->bots['botid'],$order_no,$odder['money'], $odder['username'], $mappedValue, $this->bots['apiurl']);
+ if ($reqx['code'] == 0) {
+ Db::name('order')->where("order_no", $order_no)->update(['start' => 1]);
+
+ $this->telegram->sendMessage($this->bots['botad'], $reqx['msg'] . "\r\n" . "单号:" . $order_no . "" . "\r\n" . "用户名:" . $odder['username'] . "" . "\r\n" . "开通时间:" . $odder['tancan'] . "" . "\r\n" . "消费金额:" . $odder['money'] . "" . "\r\n" . "处理方法:充值余额后手动提交给机器人代替客户开通");
+ //return true;
+ $this->telegram->sendMessage($odder['userid'], "订单提交成功!请联系客服,尽快处理!单号:" . $order_no . "");
+ } else {
+ $this->telegram->sendMessage($odder['userid'], $reqx['msg']);
+ //return true;
+ }
+
+
+ }
+ if ($odder['moth'] == 'pkaihuiy') {
+ if(!cache::get($odder['moth'].$order_no)){
+ $tmuid = Db::name("conf")->where("key", 'tmuid')->value('value');
+ $tmkey = Db::name("conf")->where("key", 'tmkey')->value('value');
+ $cycleMap = ['3' => '0', '6' => '1', '12' => '2'];
+ $mappedValue = $cycleMap[$odder['tancan']] ?? '3';
+ cache::set($odder['moth'].$order_no,$odder['userid'],5);
+ $dakai = json_decode($odder['username'], true);
+ foreach ($dakai as $key => $value) {
+ $reqx = $this->Customer->submitkt($tmuid, $tmkey,$this->bots['botid'],$order_no,$odder['danprice'], "@" . $value, $mappedValue, $this->bots['apiurl']);
+ if ($reqx['code'] == 0) {
+ $this->telegram->sendMessage($this->bots['botad'], $reqx['msg'] . "\r\n" . "单号:" . $order_no . "" . "\r\n" . "用户名:" . $odder['username'] . "" . "\r\n" . "开通时间:" . $odder['tancan'] . "" . "\r\n" . "消费金额:" . $odder['money'] . "" . "\r\n" . "处理方法:充值余额后手动提交给机器人代替客户开通");
+ //return true;
+ $this->telegram->sendMessage($odder['userid'], "订单提交成功!请联系客服,尽快处理!单号:" . $order_no . "");
+ } else {
+ $this->telegram->sendMessage($odder['userid'], $reqx['msg']);
+ //return true;
+ }
+ }
+
+
+
+
+ }else{
+ $this->telegram->answerCallback($callback_id, "消息已处理", true);
+ }
+ }
+
+ $this->telegram->deleteMessage($chat['id'], $message_id);
+ $this->telegram->answerCallback($callback_id, "已经提交了", true);
+
+ } else {
+ $this->telegram->answerCallback($callback_id, "没你啥事儿啊", true);
+ // return true;
+ }
+ //如果余额 够 直接
+ // $user= $this->db->select('user_money',"*",['userid' =>$odder['userid']]);
+
+
+
+ return true;
+
+
+
+
+
}
+
+
+
+
}
if ($tou == "otherpay") {
$order_no = $callbackExplode[1];