Zory před 19 hodinami
rodič
revize
8fdd6b6df3

+ 2 - 2
app/controller/admin/Shop.php

@@ -57,7 +57,7 @@ class Shop extends Base
         try {
             $param = $request->post();
             if (!isset($param['id'])) {
-                $param['agent_id'] = CodeExtend::random(16,1,date("md"));
+                $param['shop_id'] = CodeExtend::random(16,1,date("md"));
                 if (!empty($param['username'])) {
                     $userName = (new SystemUser)->where("username",$param['username'])->findOrEmpty();
                     if (!$userName->isEmpty()) return errorTrans("error.user-exist");
@@ -91,7 +91,7 @@ class Shop extends Base
             if (empty($param['shop_id'])) return errorTrans("empty.require");
             $combo = (new SaasCombo)->where("id",$param['combo'])->findOrEmpty();
             if ($combo->isEmpty()) return errorTrans("empty.data");
-            $shop = (new SaasAgent)->where("agent_id",$param['shop_id'])->findOrEmpty();
+            $shop = (new SaasShop)->where("shop_id",$param['shop_id'])->findOrEmpty();
             if ($shop->isEmpty()) return errorTrans("empty.data");
             if ($combo['unit'] == 1) { // 天
                 $shop->vip_end = date('Y-m-d H:i:s',strtotime("+{$combo['time']} day"));

+ 1 - 1
app/extra/service/system/UserService.php

@@ -16,7 +16,7 @@ class UserService extends Service
     {
         $this->mode = new SystemUser();
         return $this->searchVal($param,$this->searchFilter($param))->with(['account' => function ($query) {
-            $query->field("agent_id,shop_name");
+            $query->field("shop_id,shop_name");
         }])->paginate([
             "list_rows" => $param['pageSize'],
             "page"      => $param['page']

+ 0 - 1
app/functions.php

@@ -548,7 +548,6 @@ if (!function_exists("strToUniqueNumberV4"))
         static $lastStr = '';
         static $counter = 0;
         if ($str === $lastStr) {
-            $counter++;
             $number = ($number + $counter) % 1000000000000;
         } else {
             $lastStr = $str;

+ 1 - 1
app/model/system/SystemUser.php

@@ -57,7 +57,7 @@ class SystemUser extends Model
 
     public function account(): HasOne
     {
-        return $this->hasOne("app\model\saas\SaasShop","agent_id","agent_id");
+        return $this->hasOne("app\model\saas\SaasShop","shop_id","agent_id");
     }
 
 }

+ 2 - 2
app/validate/saas/ShopValidate.php

@@ -9,7 +9,7 @@ class ShopValidate extends Validate
 
 
     protected $rule = [
-        "agent_id"      => "require",
+        "shop_id"      => "require",
         "shop_name"     => "require",
         "shop_contact"  => "require",
         "shop_mobile"   => "require",
@@ -20,7 +20,7 @@ class ShopValidate extends Validate
 
 
     protected $message = [
-        "agent_id.require"      => "账户ID不能为空",
+        "shop_id.require"      => "账户ID不能为空",
         "shop_name.require"     => "请输入店铺名称",
         "shop_contact.require"  => "请输入联系人",
         "shop_mobile.require"   => "请输入联系电话",

binární
public/uploads/card/326527213815227-pay.jpg