hrjy 3 年之前
父節點
當前提交
19fd63277c

+ 8 - 8
app/admin/controller/auction/Auction.php

@@ -77,11 +77,11 @@ class Auction extends AuthController
         ]);
         $time = explode('-', $data['time']);
 
-        $data['add_time'] = $time[0];
-        $data['end_time'] = $time[1];
+        $data['add_time'] = trim($time[0]);
+        $data['end_time'] = trim($time[1]);
         $rtime = explode('-', $data['rtime']);
-        $data['radd_time'] = $rtime[0];
-        $data['rend_time'] = $rtime[1];
+        $data['radd_time'] = trim($rtime[0]);
+        $data['rend_time'] = trim($rtime[1]);
 
         if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('预约时间选择错误');
         if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('进场时间选择错误');
@@ -162,11 +162,11 @@ class Auction extends AuthController
             'anticipate'
         ]);
         $time = explode('-', $data['time']);
-        $data['add_time'] = $time[0];
-        $data['end_time'] = $time[1];
+        $data['add_time'] = trim($time[0]);
+        $data['end_time'] = trim($time[1]);
         $rtime = explode('-', $data['rtime']);
-        $data['radd_time'] = $rtime[0];
-        $data['rend_time'] = $rtime[1];
+        $data['radd_time'] = trim($rtime[0]);
+        $data['rend_time'] = trim($rtime[1]);
 
         if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('预约时间选择错误');
         if (strtotime($time[0]) > strtotime( $time[1])) Json::fail('进场时间选择错误');

+ 1 - 1
app/admin/model/auction/Auction.php

@@ -31,7 +31,7 @@ class Auction extends BaseModel
     {
         $model = self::alias('a')
             ->field('a.*, u.nickname as name')
-            ->order('a.id', 'desc')
+            ->order('a.sort DESC,a.id DESC')
             ->leftJoin('user u', 'a.uid = u.uid');
 
         $model->where(['a.delete_time' => 0]);

+ 1 - 1
app/admin/model/auction/AuctionOrder.php

@@ -43,7 +43,7 @@ class AuctionOrder extends BaseModel
 
         if (trim($where['store_name']) != '') $model->where('a.id|u.account|u.nickname|a.order_id', 'like', '%'.$where['store_name'].'%');
         if (trim($where['auction_id']) != '') $model->where('a.auction_id', $where['auction_id']);
-        if (trim($where['data']) != '') $model = self::getModelTime($where, $model,  'create_time');
+        if (trim($where['data']) != '') $model = self::getModelTime($where, $model,  'a.create_time');
 
         if ($where['page'] && $where['limit']){
             $model->page($where['page'], $where['limit']);

+ 1 - 1
app/admin/model/auction/AuctionProduct.php

@@ -32,7 +32,7 @@ class AuctionProduct extends BaseModel
 
         $model = self::alias('a')
             ->field('a.*,u.nickname, au.nickname as au_name')
-            ->order('a.id', 'desc')
+            ->order('a.sort DESC,a.id DESC')
             ->leftJoin('auction au', 'a.auction_id = au.id')
             ->leftJoin('user u', 'a.uid = u.uid');
 

+ 1 - 0
app/admin/view/auction/auction/index.php

@@ -113,6 +113,7 @@
             {field: 'rend_time', title: '入场结束', templet: '#rend_time',  align: 'center'},
             {field: 'frequency', title: '场次', templet: '#frequency', align: 'center'},
             {field: 'b_count', title: '今日预约人数', templet: '#frequency', align: 'center'},
+            {field: 'sort', title: '排序', templet: '#sort', align: 'center'},
             {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
         ];
     });

+ 2 - 2
app/admin/view/auction/auction_order/index.php

@@ -155,8 +155,8 @@
             {type: 'checkbox'},
             {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
             {field: 'order_id', title: '订单号', templet: '#order_id',  align: 'center'},
-            {field: 'account', title: '账号', templet: '#account',  align: 'center'},
-            {field: 'nickname', title: '呢称', templet: '#nickname',  align: 'center'},
+            {field: 'account', title: '购买用户账号', templet: '#account',  align: 'center'},
+            {field: 'nickname', title: '购买用户呢称', templet: '#nickname',  align: 'center'},
             {field: 'name', title: '商品', templet: '#name',  align: 'center'},
             {field: 'price', title: '购买价格', templet: '#price',  align: 'center', style : 'color: #DC143C;'},
             {field: 'image', title: '图片', templet: '#image',  align: 'center'},

+ 1 - 0
app/admin/view/auction/auction_product/index.php

@@ -122,6 +122,7 @@
             {field: 'is_show', title: '状态', templet: '#is_show', align: 'center'},
             {field: 'rise', title: '涨幅%', templet: '#rise', align: 'center'},
             {field: 'deduct', title: '扣除%', templet: '#deduct', align: 'center'},
+            {field: 'sort', title: '排序', templet: '#sort', align: 'center'},
             {field: 'create_time', title: '创建时间', templet: '#create_time', align: 'center'},
             {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
         ];

+ 41 - 0
app/api/controller/auction/AuctionController.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace app\api\controller\auction;
+
+
+use app\Request;
+use Monolog\Handler\Curl\Util;
+use think\facade\Cache;
+use crmeb\services\{
+    CacheService,
+    ExpressService,
+    SystemConfigService,
+    UtilService
+};
+use crmeb\repositories\OrderRepository;
+
+
+class AuctionController
+{
+    /**
+     * 场馆列表
+     * @param Request $request
+     * @return mixed
+     */
+    public function list(Request $request)
+    {
+        $data = UtilService::getMore([
+            [['page', 'd'], 0],
+            [['limit', 'd'], 0],
+        ], $request);
+
+        $auctionModel = new \app\models\auction\Auction();
+
+        return app('json')->successful($auctionModel->list($data));
+
+    }
+
+
+
+
+}

+ 43 - 0
app/models/auction/Auction.php

@@ -0,0 +1,43 @@
+<?php
+
+namespace app\models\auction;
+
+use app\models\store\StoreProduct;
+use crmeb\services\SystemConfigService;
+use think\facade\Db;
+use crmeb\traits\ModelTrait;
+use crmeb\basic\BaseModel;
+
+/**
+ * TODO 场馆model
+ * Class Article
+ * @package app\models\article
+ */
+class Auction extends BaseModel
+{
+    /**
+     * 数据表主键
+     * @var string
+     */
+    protected $pk = 'id';
+
+    /**
+     * 模型名称
+     * @var string
+     */
+    protected $name = 'auction';
+
+    use ModelTrait;
+
+
+    public function list($data)
+    {
+        $model = self::where([['delete_time', '=', 0], ['status' ,'=', '1']]);
+        $model->page($data['page'], $data['limit']);
+        $model->order('id DESC, sort DESC');
+        $list = $model->select()->toArray();
+
+        return $list;
+    }
+
+}

+ 2 - 0
route/api/route.php

@@ -229,6 +229,8 @@ Route::group(function () {
     Route::get('pink', 'PublicController/pink')->name('pinkData');
 
 
+    Route::get('auction_list', 'auction.auctionController/list')->name('auction');//场馆数据
+
 })->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, false);
 
 

+ 2 - 1
runtime/admin/temp/5a82649edd1b40af6f202faef65620f4.php

@@ -1,4 +1,4 @@
-<?php /*a:5:{s:66:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\index.php";i:1648091039;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<?php /*a:5:{s:66:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction\index.php";i:1648111792;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
 <!DOCTYPE html>
 <html lang="zh-CN">
 <head>
@@ -188,6 +188,7 @@
             {field: 'rend_time', title: '入场结束', templet: '#rend_time',  align: 'center'},
             {field: 'frequency', title: '场次', templet: '#frequency', align: 'center'},
             {field: 'b_count', title: '今日预约人数', templet: '#frequency', align: 'center'},
+            {field: 'sort', title: '排序', templet: '#sort', align: 'center'},
             {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
         ];
     });

+ 3 - 3
runtime/admin/temp/a5e290369d4af2c431b37f2d99f61762.php

@@ -1,4 +1,4 @@
-<?php /*a:5:{s:72:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_order\index.php";i:1648109753;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<?php /*a:5:{s:72:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_order\index.php";i:1648110152;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
 <!DOCTYPE html>
 <html lang="zh-CN">
 <head>
@@ -230,8 +230,8 @@
             {type: 'checkbox'},
             {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
             {field: 'order_id', title: '订单号', templet: '#order_id',  align: 'center'},
-            {field: 'account', title: '账号', templet: '#account',  align: 'center'},
-            {field: 'nickname', title: '呢称', templet: '#nickname',  align: 'center'},
+            {field: 'account', title: '购买用户账号', templet: '#account',  align: 'center'},
+            {field: 'nickname', title: '购买用户呢称', templet: '#nickname',  align: 'center'},
             {field: 'name', title: '商品', templet: '#name',  align: 'center'},
             {field: 'price', title: '购买价格', templet: '#price',  align: 'center', style : 'color: #DC143C;'},
             {field: 'image', title: '图片', templet: '#image',  align: 'center'},

+ 2 - 1
runtime/admin/temp/c70ace87bc52a5d3e58f590c6f66d0d1.php

@@ -1,4 +1,4 @@
-<?php /*a:5:{s:74:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_product\index.php";i:1648102506;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
+<?php /*a:5:{s:74:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_product\index.php";i:1648111825;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
 <!DOCTYPE html>
 <html lang="zh-CN">
 <head>
@@ -197,6 +197,7 @@
             {field: 'is_show', title: '状态', templet: '#is_show', align: 'center'},
             {field: 'rise', title: '涨幅%', templet: '#rise', align: 'center'},
             {field: 'deduct', title: '扣除%', templet: '#deduct', align: 'center'},
+            {field: 'sort', title: '排序', templet: '#sort', align: 'center'},
             {field: 'create_time', title: '创建时间', templet: '#create_time', align: 'center'},
             {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
         ];

+ 14 - 0
runtime/log/202203/24.log

@@ -48,3 +48,17 @@
 [2022-03-24T16:20:15+08:00][error] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'create_time' in where clause is ambiguous[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
 [2022-03-24T16:20:16+08:00][error] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'create_time' in where clause is ambiguous[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
 [2022-03-24T16:20:19+08:00][error] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'create_time' in where clause is ambiguous[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
+[2022-03-24T16:21:14+08:00][error] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'create_time' in where clause is ambiguous[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
+[2022-03-24T16:21:18+08:00][error] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'create_time' in where clause is ambiguous[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
+[2022-03-24T16:21:21+08:00][error] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'create_time' in where clause is ambiguous[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\PDOConnection.php:713]
+[2022-03-24T16:21:40+08:00][error] [8]未定义数组索引: a.page[D:\phpstudy_pro\WWW\CRMEB\app\admin\model\auction\AuctionOrder.php:48]
+[2022-03-24T17:01:36+08:00][error] [0]Class app\api\controller\auction\Request does not exist[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:442]
+[2022-03-24T17:02:27+08:00][error] [0]Class app\api\controller\auction\Request does not exist[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:442]
+[2022-03-24T17:03:23+08:00][error] [0]Class app\api\controller\auction\Request does not exist[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:442]
+[2022-03-24T17:03:25+08:00][error] [0]Class app\api\controller\auction\Request does not exist[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:442]
+[2022-03-24T17:03:25+08:00][error] [0]Class app\api\controller\auction\Request does not exist[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\framework\src\think\Container.php:442]
+[2022-03-24T17:04:03+08:00][error] [10500]查询表达式错误:array (
+  'status' => '1',
+)[D:\phpstudy_pro\WWW\CRMEB\vendor\topthink\think-orm\src\db\Builder.php:359]
+[2022-03-24T17:05:43+08:00][error] [0]Argument 2 passed to crmeb\utils\Json::success() must be of the type array or null, object given, called in D:\phpstudy_pro\WWW\CRMEB\crmeb\utils\Json.php on line 41[D:\phpstudy_pro\WWW\CRMEB\crmeb\utils\Json.php:29]
+[2022-03-24T17:06:03+08:00][error] [0]Argument 2 passed to crmeb\utils\Json::success() must be of the type array or null, string given, called in D:\phpstudy_pro\WWW\CRMEB\crmeb\utils\Json.php on line 41[D:\phpstudy_pro\WWW\CRMEB\crmeb\utils\Json.php:29]

+ 1 - 0
vendor/dh2y/think-qrcode/src/phpqrcode/75_product_detail_wap.jpg-errors.txt

@@ -0,0 +1 @@
+2022-03-24 16:53:07: gzuncompress() has been disabled for security reasons2022-03-24 16:53:12: gzuncompress() has been disabled for security reasons2022-03-24 16:58:06: gzuncompress() has been disabled for security reasons