Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

林海涛 1 год назад
Родитель
Сommit
561a47ebff
27 измененных файлов с 1392 добавлено и 103 удалено
  1. 108 0
      app/adminapi/controller/setting/PostageRegionController.php
  2. 108 0
      app/adminapi/controller/user/UserAddressController.php
  3. 77 0
      app/adminapi/lists/setting/PostageRegionLists.php
  4. 77 0
      app/adminapi/lists/user/UserAddressLists.php
  5. 124 0
      app/adminapi/logic/setting/PostageRegionLogic.php
  6. 120 0
      app/adminapi/logic/user/UserAddressLogic.php
  7. 94 0
      app/adminapi/validate/setting/PostageRegionValidate.php
  8. 110 0
      app/adminapi/validate/user/UserAddressValidate.php
  9. 19 0
      app/api/controller/GoodsReviewsController.php
  10. 24 0
      app/api/controller/RegionController.php
  11. 81 0
      app/api/controller/UserAddressController.php
  12. 1 1
      app/api/controller/UserController.php
  13. 1 1
      app/api/lists/GoodsReviewsLists.php
  14. 5 5
      app/api/lists/recharge/ServiceOrderLists.php
  15. 55 0
      app/api/logic/GoodsReviewsLogic.php
  16. 27 0
      app/api/logic/RegionLogic.php
  17. 4 88
      app/api/logic/ServiceOrderLogic.php
  18. 117 0
      app/api/logic/UserAddressLogic.php
  19. 45 0
      app/api/validate/GoodsReviewsValidate.php
  20. 5 1
      app/api/validate/ServiceOrderValidate.php
  21. 99 0
      app/api/validate/UserAddressValidate.php
  22. 23 2
      app/common/logic/PayNotifyLogic.php
  23. 0 1
      app/common/logic/PaymentLogic.php
  24. 0 4
      app/common/model/reviews/GoodsReviews.php
  25. 34 0
      app/common/model/setting/PostageRegion.php
  26. 34 0
      app/common/model/user/UserAddress.php
  27. BIN
      public/resource/image/adminapi/default/default_avatar.png

+ 108 - 0
app/adminapi/controller/setting/PostageRegionController.php

@@ -0,0 +1,108 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+
+namespace app\adminapi\controller\setting;
+
+
+use app\adminapi\controller\BaseAdminController;
+use app\adminapi\lists\setting\PostageRegionLists;
+use app\adminapi\logic\setting\PostageRegionLogic;
+use app\adminapi\validate\setting\PostageRegionValidate;
+
+
+/**
+ * PostageRegion控制器
+ * Class PostageRegionController
+ * @package app\adminapi\controller\setting
+ */
+class PostageRegionController extends BaseAdminController
+{
+
+
+    /**
+     * @notes 获取列表
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function lists()
+    {
+        return $this->dataLists(new PostageRegionLists());
+    }
+
+
+    /**
+     * @notes 添加
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function add()
+    {
+        $params = (new PostageRegionValidate())->post()->goCheck('add');
+        $result = PostageRegionLogic::add($params);
+        if (true === $result) {
+            return $this->success('添加成功', [], 1, 1);
+        }
+        return $this->fail(PostageRegionLogic::getError());
+    }
+
+
+    /**
+     * @notes 编辑
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function edit()
+    {
+        $params = (new PostageRegionValidate())->post()->goCheck('edit');
+        $result = PostageRegionLogic::edit($params);
+        if (true === $result) {
+            return $this->success('编辑成功', [], 1, 1);
+        }
+        return $this->fail(PostageRegionLogic::getError());
+    }
+
+
+    /**
+     * @notes 删除
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function delete()
+    {
+        $params = (new PostageRegionValidate())->post()->goCheck('delete');
+        PostageRegionLogic::delete($params);
+        return $this->success('删除成功', [], 1, 1);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function detail()
+    {
+        $params = (new PostageRegionValidate())->goCheck('detail');
+        $result = PostageRegionLogic::detail($params);
+        return $this->data($result);
+    }
+
+
+}

+ 108 - 0
app/adminapi/controller/user/UserAddressController.php

@@ -0,0 +1,108 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+
+namespace app\adminapi\controller\user;
+
+
+use app\adminapi\controller\BaseAdminController;
+use app\adminapi\lists\user\UserAddressLists;
+use app\adminapi\logic\user\UserAddressLogic;
+use app\adminapi\validate\user\UserAddressValidate;
+
+
+/**
+ * UserAddress控制器
+ * Class UserAddressController
+ * @package app\adminapi\controller\user
+ */
+class UserAddressController extends BaseAdminController
+{
+
+
+    /**
+     * @notes 获取列表
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function lists()
+    {
+        return $this->dataLists(new UserAddressLists());
+    }
+
+
+    /**
+     * @notes 添加
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function add()
+    {
+        $params = (new UserAddressValidate())->post()->goCheck('add');
+        $result = UserAddressLogic::add($params);
+        if (true === $result) {
+            return $this->success('添加成功', [], 1, 1);
+        }
+        return $this->fail(UserAddressLogic::getError());
+    }
+
+
+    /**
+     * @notes 编辑
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function edit()
+    {
+        $params = (new UserAddressValidate())->post()->goCheck('edit');
+        $result = UserAddressLogic::edit($params);
+        if (true === $result) {
+            return $this->success('编辑成功', [], 1, 1);
+        }
+        return $this->fail(UserAddressLogic::getError());
+    }
+
+
+    /**
+     * @notes 删除
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function delete()
+    {
+        $params = (new UserAddressValidate())->post()->goCheck('delete');
+        UserAddressLogic::delete($params);
+        return $this->success('删除成功', [], 1, 1);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function detail()
+    {
+        $params = (new UserAddressValidate())->goCheck('detail');
+        $result = UserAddressLogic::detail($params);
+        return $this->data($result);
+    }
+
+
+}

+ 77 - 0
app/adminapi/lists/setting/PostageRegionLists.php

@@ -0,0 +1,77 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\lists\setting;
+
+
+use app\adminapi\lists\BaseAdminDataLists;
+use app\common\model\setting\PostageRegion;
+use app\common\lists\ListsSearchInterface;
+
+
+/**
+ * PostageRegion列表
+ * Class PostageRegionLists
+ * @package app\adminapi\listssetting
+ */
+class PostageRegionLists extends BaseAdminDataLists implements ListsSearchInterface
+{
+
+
+    /**
+     * @notes 设置搜索条件
+     * @return \string[][]
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function setSearch(): array
+    {
+        return [
+            '=' => ['id', 'pid', 'short', 'name', 'level', 'pinyin', 'code', 'status', 'lng', 'sorts'],

+        ];
+    }
+
+
+    /**
+     * @notes 获取列表
+     * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function lists(): array
+    {
+        return PostageRegion::where($this->searchWhere)
+            ->field(['id', 'pid', 'short', 'name', 'level', 'pinyin', 'code', 'status', 'lng', 'lat', 'sorts'])
+            ->limit($this->limitOffset, $this->limitLength)
+            ->order(['id' => 'desc'])
+            ->select()
+            ->toArray();
+    }
+
+
+    /**
+     * @notes 获取数量
+     * @return int
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function count(): int
+    {
+        return PostageRegion::where($this->searchWhere)->count();
+    }
+
+}

+ 77 - 0
app/adminapi/lists/user/UserAddressLists.php

@@ -0,0 +1,77 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\lists\user;
+
+
+use app\adminapi\lists\BaseAdminDataLists;
+use app\common\model\user\UserAddress;
+use app\common\lists\ListsSearchInterface;
+
+
+/**
+ * UserAddress列表
+ * Class UserAddressLists
+ * @package app\adminapi\listsuser
+ */
+class UserAddressLists extends BaseAdminDataLists implements ListsSearchInterface
+{
+
+
+    /**
+     * @notes 设置搜索条件
+     * @return \string[][]
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function setSearch(): array
+    {
+        return [
+            '=' => ['user_id', 'province_id', 'city_id', 'city_json', 'address', 'house_number', 'contact_number', 'contact_people', 'create_time', 'update_time'],

+        ];
+    }
+
+
+    /**
+     * @notes 获取列表
+     * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function lists(): array
+    {
+        return UserAddress::where($this->searchWhere)
+            ->field(['id', 'user_id', 'province_id', 'city_id', 'ip_city', 'city_json', 'address', 'house_number', 'contact_number', 'contact_people', 'create_time', 'update_time'])
+            ->limit($this->limitOffset, $this->limitLength)
+            ->order(['id' => 'desc'])
+            ->select()
+            ->toArray();
+    }
+
+
+    /**
+     * @notes 获取数量
+     * @return int
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function count(): int
+    {
+        return UserAddress::where($this->searchWhere)->count();
+    }
+
+}

+ 124 - 0
app/adminapi/logic/setting/PostageRegionLogic.php

@@ -0,0 +1,124 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\logic\setting;
+
+
+use app\common\model\setting\PostageRegion;
+use app\common\logic\BaseLogic;
+use think\facade\Db;
+
+
+/**
+ * PostageRegion逻辑
+ * Class PostageRegionLogic
+ * @package app\adminapi\logic\setting
+ */
+class PostageRegionLogic extends BaseLogic
+{
+
+
+    /**
+     * @notes 添加
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function add(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            PostageRegion::create([
+                'pid' => $params['pid'],
+                'short' => $params['short'],
+                'name' => $params['name'],
+                'level' => $params['level'],
+                'pinyin' => $params['pinyin'],
+                'code' => $params['code'],
+                'status' => $params['status'],
+                'lng' => $params['lng'],
+                'lat' => $params['lat'],
+                'sorts' => $params['sorts'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 编辑
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function edit(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            PostageRegion::where('id', $params['id'])->update([
+                'pid' => $params['pid'],
+                'short' => $params['short'],
+                'name' => $params['name'],
+                'level' => $params['level'],
+                'pinyin' => $params['pinyin'],
+                'code' => $params['code'],
+                'status' => $params['status'],
+                'lng' => $params['lng'],
+                'lat' => $params['lat'],
+                'sorts' => $params['sorts'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 删除
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function delete(array $params): bool
+    {
+        return PostageRegion::destroy($params['id']);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @param $params
+     * @return array
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function detail($params): array
+    {
+        return PostageRegion::findOrEmpty($params['id'])->toArray();
+    }
+}

+ 120 - 0
app/adminapi/logic/user/UserAddressLogic.php

@@ -0,0 +1,120 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\logic\user;
+
+
+use app\common\model\user\UserAddress;
+use app\common\logic\BaseLogic;
+use think\facade\Db;
+
+
+/**
+ * UserAddress逻辑
+ * Class UserAddressLogic
+ * @package app\adminapi\logic\user
+ */
+class UserAddressLogic extends BaseLogic
+{
+
+
+    /**
+     * @notes 添加
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function add(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            UserAddress::create([
+                'user_id' => $params['user_id'],
+                'province_id' => $params['province_id'],
+                'city_id' => $params['city_id'],
+                'city_json' => $params['city_json'],
+                'address' => $params['address'],
+                'house_number' => $params['house_number'],
+                'contact_number' => $params['contact_number'],
+                'contact_people' => $params['contact_people'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 编辑
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function edit(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            UserAddress::where('id', $params['id'])->update([
+                'user_id' => $params['user_id'],
+                'province_id' => $params['province_id'],
+                'city_id' => $params['city_id'],
+                'city_json' => $params['city_json'],
+                'address' => $params['address'],
+                'house_number' => $params['house_number'],
+                'contact_number' => $params['contact_number'],
+                'contact_people' => $params['contact_people'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 删除
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function delete(array $params): bool
+    {
+        return UserAddress::destroy($params['id']);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @param $params
+     * @return array
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function detail($params): array
+    {
+        return UserAddress::findOrEmpty($params['id'])->toArray();
+    }
+}

+ 94 - 0
app/adminapi/validate/setting/PostageRegionValidate.php

@@ -0,0 +1,94 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\validate\setting;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * PostageRegion验证器
+ * Class PostageRegionValidate
+ * @package app\adminapi\validate\setting
+ */
+class PostageRegionValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'id' => 'require',

+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'id' => 'id',

+    ];
+
+
+    /**
+     * @notes 添加场景
+     * @return PostageRegionValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneAdd()
+    {
+        return $this->remove('id', true);
+    }
+
+
+    /**
+     * @notes 编辑场景
+     * @return PostageRegionValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneEdit()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 删除场景
+     * @return PostageRegionValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneDelete()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 详情场景
+     * @return PostageRegionValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneDetail()
+    {
+        return $this->only(['id']);
+    }
+
+}

+ 110 - 0
app/adminapi/validate/user/UserAddressValidate.php

@@ -0,0 +1,110 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\validate\user;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * UserAddress验证器
+ * Class UserAddressValidate
+ * @package app\adminapi\validate\user
+ */
+class UserAddressValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'id' => 'require',
+        'user_id' => 'require',
+        'province_id' => 'require',
+        'city_id' => 'require',
+        'city_json' => 'require',
+        'address' => 'require',
+        'house_number' => 'require',
+        'contact_number' => 'require',
+        'contact_people' => 'require',

+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'id' => 'id',
+        'user_id' => '用户ID',
+        'province_id' => '省份ID',
+        'city_id' => '城市ID',
+        'city_json' => '省市名称',
+        'address' => '具体地址',
+        'house_number' => '门牌号',
+        'contact_number' => '联系号码',
+        'contact_people' => '联系人',

+    ];
+
+
+    /**
+     * @notes 添加场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneAdd()
+    {
+        return $this->only(['user_id','province_id','city_id','city_json','address','house_number','contact_number','contact_people']);
+    }
+
+
+    /**
+     * @notes 编辑场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneEdit()
+    {
+        return $this->only(['id','user_id','province_id','city_id','city_json','address','house_number','contact_number','contact_people']);
+    }
+
+
+    /**
+     * @notes 删除场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneDelete()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 详情场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneDetail()
+    {
+        return $this->only(['id']);
+    }
+
+}

+ 19 - 0
app/api/controller/GoodsReviewsController.php

@@ -2,6 +2,8 @@
 namespace app\api\controller;
 
 use app\api\lists\GoodsReviewsLists;
+use app\api\logic\GoodsReviewsLogic;
+use app\api\validate\GoodsReviewsValidate;
 
 /**
  * 商品评论控制器
@@ -16,4 +18,21 @@ class GoodsReviewsController extends BaseApiController
     {
         return $this->dataLists(new GoodsReviewsLists());
     }
+
+    /**
+     * 去评论
+     * @return \think\response\Json
+     */
+    public function review()
+    {
+        $params = (new GoodsReviewsValidate())->post()->goCheck('add', [
+            'user_id' => $this->userId,
+            'user_info' => $this->userInfo
+        ]);
+        $result = GoodsReviewsLogic::add($params);
+        if (false === $result) {
+            return $this->fail(GoodsReviewsLogic::getError());
+        }
+        return $this->success('评论成功', [], 1, 1);
+    }
 }

+ 24 - 0
app/api/controller/RegionController.php

@@ -0,0 +1,24 @@
+<?php
+namespace app\api\controller;
+
+use app\api\logic\RegionLogic;
+
+/**
+ * index
+ * Class IndexController
+ * @package app\api\controller
+ */
+class RegionController extends BaseApiController
+{
+    public array $notNeedLogin = ['index'];
+
+    /**
+     * 获取省市区
+     * @return \think\response\Json
+     */
+    public function index()
+    {
+        $result = RegionLogic::getRegionList();
+        return $this->data($result);
+    }
+}

+ 81 - 0
app/api/controller/UserAddressController.php

@@ -0,0 +1,81 @@
+<?php
+namespace app\api\controller;
+
+use app\api\logic\UserAddressLogic;
+use app\api\validate\UserAddressValidate;
+
+/**
+ * 用户地址控制器
+ * Class UserAddressController
+ * @package app\api\controller
+ */
+class UserAddressController extends BaseApiController
+{
+    public function addressList()
+    {
+        $result = UserAddressLogic::getAddressList($this->userId);
+        return $this->data($result);
+    }
+    /**
+     * @notes 添加
+     * @return \think\response\Json
+     */
+    public function add()
+    {
+        $params = (new UserAddressValidate())->post()->goCheck('add',[
+            'user_id'=>$this->userId
+        ]);
+        $result = UserAddressLogic::add($params);
+        if (true === $result) {
+            return $this->success('添加成功', [], 1, 1);
+        }
+        return $this->fail(UserAddressLogic::getError());
+    }
+
+
+    /**
+     * @notes 编辑
+     * @return \think\response\Json
+     */
+    public function edit()
+    {
+        $params = (new UserAddressValidate())->post()->goCheck('edit',[
+            'user_id'=>$this->userId
+        ]);
+        $result = UserAddressLogic::edit($params);
+        if (true === $result) {
+            return $this->success('编辑成功', [], 1, 1);
+        }
+        return $this->fail(UserAddressLogic::getError());
+    }
+
+
+    /**
+     * @notes 删除
+     * @return \think\response\Json
+     */
+    public function delete()
+    {
+        $params = (new UserAddressValidate())->post()->goCheck('delete',[
+            'user_id'=>$this->userId
+        ]);
+        UserAddressLogic::delete($params);
+        return $this->success('删除成功', [], 1, 1);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function detail()
+    {
+        $params = (new UserAddressValidate())->goCheck('detail',[
+            'user_id'=>$this->userId
+        ]);
+        $result = UserAddressLogic::detail($params);
+        return $this->data($result);
+    }
+}

+ 1 - 1
app/api/controller/UserController.php

@@ -14,6 +14,7 @@
 namespace app\api\controller;
 
 
+use app\api\logic\UserAddressLogic;
 use app\api\logic\UserLogic;
 use app\api\validate\PasswordValidate;
 use app\api\validate\SetUserInfoValidate;
@@ -143,5 +144,4 @@ class UserController extends BaseApiController
         }
         return $this->fail(UserLogic::getError());
     }
-
 }

+ 1 - 1
app/api/lists/GoodsReviewsLists.php

@@ -49,7 +49,7 @@ class GoodsReviewsLists extends BaseApiDataLists implements ListsSearchInterface
         $lists = GoodsReviews::where($this->searchWhere)
             ->where($this->queryWhere())
             ->limit($this->limitOffset, $this->limitLength)
-            ->field(['id','rating','comment','review_image','create_time'])
+            ->field(['id','nickname','avatar','rating','comment','review_image','create_time'])
             ->order('create_time desc')
             ->select()
             ->toArray();

+ 5 - 5
app/api/lists/recharge/ServiceOrderLists.php

@@ -27,17 +27,17 @@ use app\common\model\works\ServiceWork;
 class ServiceOrderLists extends BaseApiDataLists
 {
     protected $count = 0;
-
     public function queryWhere()
     {
         $where = [];
         if (isset($this->params['service_status'])) {
-            $work_ids = ServiceWork::where(['user_id' => $this->userId])->where(function ($query) {
-                if($this->params['service_status'] != 'all'){
-                    $query->where(['service_status' => $this->params['service_status']]);
+            $service_status = $this->params['service_status'];
+            $work_ids = ServiceWork::where(['user_id' => $this->userId])->where(function ($query) use($service_status) {
+                if($service_status != 'all'){
+                    $query->where(['service_status' => $service_status]);
                 }
             })->column('id');
-            $where['work_id'] = ['in', $work_ids];
+            $where['work_id'] = ['in', !empty($work_ids)?implode(',',$work_ids):5];
         }
         return $where;
     }

+ 55 - 0
app/api/logic/GoodsReviewsLogic.php

@@ -0,0 +1,55 @@
+<?php
+namespace app\api\logic;
+
+use app\common\logic\BaseLogic;
+use app\common\model\goods\Goods;
+use app\common\model\orders\RechargeOrder;
+use app\common\model\recharge\OrderGoods;
+use app\common\model\reviews\GoodsReviews;
+use app\common\model\works\ServiceWork;
+use think\Exception;
+use think\facade\Db;
+
+/**
+ * 服务商品评论逻辑处理
+ * Class GoodsReviewsLogic
+ * @package app\api\logic
+ */
+class GoodsReviewsLogic extends BaseLogic
+{
+    /**
+     * @param $params
+     * @return bool
+     */
+    public static function add($params)
+    {
+        Db::startTrans();
+        try {
+            $order = RechargeOrder::findOrEmpty($params['order_id'])->toArray();
+            $goods_id = OrderGoods::whereIn('sn', RechargeOrder::where('work_id',$order['work_id'])->column('sn'))->value('goods_id');
+            $work = ServiceWork::findOrEmpty($order['work_id'])->toArray();
+            if($work['work_status']==8){
+                throw new Exception('订单已评价');
+            }
+            if($work['work_status']!=7){
+                throw new Exception('订单无法评价');
+            }
+            GoodsReviews::create([
+                'goods_id'=>$goods_id,
+                'goods_category_id'=>$work['goods_category_id'],
+                'user_id'=>$params['user_id'],
+                'nickname'=>$params['user_info']['nickname'],
+                'avatar'=>$params['user_info']['avatar'],
+                'rating'=>$params['rating'],
+                'comment'=>$params['comment'],
+                'review_image'=>$params['review_image'],
+            ]);
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+}

+ 27 - 0
app/api/logic/RegionLogic.php

@@ -0,0 +1,27 @@
+<?php
+namespace app\api\logic;
+use app\common\logic\BaseLogic;
+use app\common\model\article\Article;
+use app\common\model\decorate\DecoratePage;
+use app\common\model\decorate\DecorateTabbar;
+use app\common\model\setting\PostageRegion;
+use app\common\service\ConfigService;
+use app\common\service\FileService;
+
+/**
+ * index
+ * Class RegionLogic
+ * @package app\api\logic
+ */
+class RegionLogic extends BaseLogic
+{
+    /**
+     * 获取城市列表
+     * @return array
+     */
+    public static function getRegionList()
+    {
+        $result = PostageRegion::cache(true,86400)->field('id,name,pid')->order('sorts asc,id asc')->select()->toArray();
+        return $result;
+    }
+}

+ 4 - 88
app/api/logic/ServiceOrderLogic.php

@@ -7,11 +7,8 @@ use app\common\enum\PayEnum;
 use app\common\enum\WorkEnum;
 use app\common\logic\BaseLogic;
 use app\common\model\dict\DictData;
-use app\common\model\effective\EffectiveCategory;
-use app\common\model\effective\EffectiveRules;
 use app\common\model\goods\Goods;
 use app\common\model\master_worker\MasterWorker;
-use app\common\model\orders\OrderEffectiveLog;
 use app\common\model\orders\RechargeOrder;
 use app\common\model\performance\PerformanceRules;
 use app\common\model\recharge\OrderGoods;
@@ -61,8 +58,8 @@ class ServiceOrderLogic extends BaseLogic
             //生成服务工单
             $work_data = [
                 'work_sn' => generate_sn(ServiceWork::class, 'work_sn'),
-                'real_name' => !empty($params['user_info']['real_name'])?$params['user_info']['real_name']:$params['user_info']['nickname'],
-                'mobile' => $params['user_info']['mobile'],
+                'real_name' => $params['contact_people'],
+                'mobile' => $params['contact_number'],
                 'address' => $params['address'],
                 'title' => $goods->goods_name . '*' . $goods->goods_number.$goods->good_unit,
                 'category_type' => $goods['category_type'],
@@ -326,6 +323,7 @@ class ServiceOrderLogic extends BaseLogic
 
     public static function queryEffective($params)
     {
+        Db::startTrans();
         try {
             $work_id = \app\common\model\recharge\RechargeOrder::where([
                 'order_type' => 0,
@@ -335,91 +333,9 @@ class ServiceOrderLogic extends BaseLogic
             if(empty($work_id)){
                 throw new Exception('订单不存在');
             }
-            //查询工单下所有已完结的订单
-            $orders = RechargeOrder::with('orderGoods')->where(['sn'=>$params['sn'],
-                'user_id'=>$params['user_id'],
-                'pay_status'=>1])->select()->toArray();
-            //查询订单领取的保修卡
-             $logs = OrderEffectiveLog::where(['sn'=>$params['sn'],'user_id'=>$params['user_id']])->select();
-             $data = [];
-             $queryData = [];
-             foreach($orders as $oV){
-                foreach($oV['orderGoods'] as $v){
-                    if($logs->where('sn',$oV['sn'])->where('goods_id',$v['goods_id'])->count() > 0){
-                        $logData = $logs->where('sn',$oV['sn'])->where('goods_id',$v['goods_id'])->toArray();
-                        foreach($logData as $k =>$lV){
-                            $logData[$k]['end_effective_time'] = date("Y-m-d H:i:s",$lV['end_effective_time']);
-                            $logData[$k]['is_receive'] = 1;
-                        }
-                        $data = array_merge($data,$logData);
-                        continue;
-                    }
-                    $queryData[] = ['work_id'=>$oV['work_id'],'sn' =>$oV['sn'],'goods_id' => $v['goods_id'],'goods_category_id' => $v['goods_category_id'],'pay_time'=>$oV['pay_time'] ?? $oV['update_time']];
-                }
-             }
-             $categoryIds = array_column($queryData,'goods_category_id');
-             if(!empty($categoryIds)){
-                 $effectiveRule = EffectiveCategory::with('effectiveRule')->whereIn('goods_category_id',$categoryIds)->select();
-                 foreach($queryData as $v){
-                     if(!$effectiveRule->where('goods_category_id',$v['goods_category_id'])->isEmpty()){
-                         $val = $v ;
-                         $result = $effectiveRule->where('goods_category_id',$v['goods_category_id'])->toArray()[0];
-                         $val = $val+[
-                             'id' => 0,
-                             'effective_id'=>$result['effectiveRule']['id'],
-                             'user_id'=>$params['user_id'],
-                             'effective_unit'=>$result['effectiveRule']['effective_unit'],
-                             'effective_num'=>$result['effectiveRule']['effective_num'],
-                             'remark'=>$result['effectiveRule']['remark'],
-                             'is_receive' => 0,
-                             'end_effective_time'=>  date("Y-m-d H:i:s",EffectiveRules::formatEndEffectiveTime($val['pay_time'],$result['effectiveRule']['effective_num'],$result['effectiveRule']['effective_unit'])),
-                             'create_time'=> date("Y-m-d H:i:s",time()),
-                             'update_time'=>  date("Y-m-d H:i:s",time()),
-                         ];
-                         $data[] = $val;
-                     }
-                 }
-             }
-             return $data;
-        }catch(\Exception $e){
-            self::setError($e->getMessage());
-            return false;
-        }
-    }
-
-    public static function  receiveEffective($params)
-    {
-        try{
-            $orderGoods = OrderGoods::where(['sn'=>$params['sn'],'goods_id' => $params['goods_id']])->findOrEmpty();
-            if($orderGoods->isEmpty()){
-                throw new  \Exception('订单不存在');
-            }
-            $log = OrderEffectiveLog::where(['sn'=>$params['sn'],'user_id'=>$params['user_id'],'goods_id' =>$params['goods_id'] ])->findOrEmpty();
-            if($log->isEmpty()){
-                $orderInfo = \app\common\model\recharge\RechargeOrder::where([
-                    'order_type' => 0,
-                    'user_id' => $params['user_id'],
-                    'sn'=>$params['sn'],
-                    'pay_status'=>1
-                ])->findOrEmpty();
-                if(empty($orderInfo)){
-                    throw new Exception('订单不存在');
-                }
-                $effective =  EffectiveCategory::with('effectiveRule')->where('goods_category_id',$orderGoods->goods_category_id)->findOrEmpty();
-                OrderEffectiveLog::create([
-                    'effective_id' => $effective->effectiveRule->id,
-                    'sn' => $params['sn'],
-                    'user_id' => $params['user_id'],
-                    'work_id' => $orderInfo->work_id,
-                    'goods_id' => $orderGoods->goods_id,
-                    'effective_unit' => $effective->effectiveRule->effective_unit,
-                    'effective_num' => $effective->effectiveRule->effective_num,
-                    'remark' => $effective->effectiveRule->remark,
-                    'end_effective_time' => EffectiveRules::formatEndEffectiveTime($orderInfo->pay_time?? $orderInfo->update_time ,$effective->effectiveRule->effective_num,$effective->effectiveRule->effective_unit),
-                ]);
-            }
             return true;
         }catch(\Exception $e){
+            Db::rollback();
             self::setError($e->getMessage());
             return false;
         }

+ 117 - 0
app/api/logic/UserAddressLogic.php

@@ -0,0 +1,117 @@
+<?php
+namespace app\api\logic;
+use app\common\logic\BaseLogic;
+use app\common\model\article\Article;
+use app\common\model\decorate\DecoratePage;
+use app\common\model\decorate\DecorateTabbar;
+use app\common\model\setting\PostageRegion;
+use app\common\model\user\UserAddress;
+use app\common\service\ConfigService;
+use app\common\service\FileService;
+use think\facade\Db;
+
+/**
+ * UserAddressLogic
+ * Class UserAddressLogic
+ * @package app\api\logic
+ */
+class UserAddressLogic extends BaseLogic
+{
+    /**
+     * 获取用户地址列表
+     * @return array
+     */
+    public static function getAddressList($user_id)
+    {
+        return UserAddress::where('user_id',$user_id)->select()->toArray();
+    }
+
+    /**
+     * @notes 添加
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function add(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            UserAddress::create([
+                'user_id' => $params['user_id'],
+                'province_id' => $params['province_id'],
+                'city_id' => $params['city_id'],
+                'city_json' => $params['city_json'],
+                'address' => $params['address'],
+                'house_number' => $params['house_number'],
+                'contact_number' => $params['contact_number'],
+                'contact_people' => $params['contact_people'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 编辑
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function edit(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            UserAddress::where(['id'=> $params['id'],'user_id'=>$params['user_id']])->update([
+                'user_id' => $params['user_id'],
+                'province_id' => $params['province_id'],
+                'city_id' => $params['city_id'],
+                'city_json' => $params['city_json'],
+                'address' => $params['address'],
+                'house_number' => $params['house_number'],
+                'contact_number' => $params['contact_number'],
+                'contact_people' => $params['contact_people'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 删除
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function delete(array $params): bool
+    {
+        return UserAddress::where(['id'=> $params['id'],'user_id'=>$params['user_id']])->delete();
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @param $params
+     * @return array
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public static function detail($params): array
+    {
+        return UserAddress::where(['id'=> $params['id'],'user_id'=>$params['user_id']])->findOrEmpty()->toArray();
+    }
+}

+ 45 - 0
app/api/validate/GoodsReviewsValidate.php

@@ -0,0 +1,45 @@
+<?php
+namespace app\api\validate;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * GoodsReviews验证器
+ * Class GoodsReviewsValidate
+ * @package app\api\validate
+ */
+class GoodsReviewsValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'order_id' => 'require',
+        'rating' => 'require',
+        'comment'=>'require',
+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'order_id' => '参数错误',
+        'rating' => '星级',
+        'comment' => '评论内容',
+    ];
+
+    /**
+     * @notes 添加场景
+     * @return GoodsValidate
+     */
+    public function sceneAdd()
+    {
+        return $this->only(['order_id','rating','comment']);
+    }
+}

+ 5 - 1
app/api/validate/ServiceOrderValidate.php

@@ -19,6 +19,8 @@ class ServiceOrderValidate extends BaseValidate
         'appointment_time' => 'require|dateFormat:Y-m-d H:i:s',
         'pay_way' => 'require',
         'goods_id' => 'require',
+        'contact_number' => 'require',
+        'contact_people' => 'require'
     ];
 
 
@@ -29,12 +31,14 @@ class ServiceOrderValidate extends BaseValidate
         'appointment_time.dateFormat' => '预约上门时间格式错误',
         'pay_way.require' => '请选择支付方式',
         'goods_id.require' => '订单商品不存在',
+        'contact_number.require' => '联系电话不存在',
+        'contact_people.require' => '联系人不存在',
     ];
 
 
     public function sceneAdd()
     {
-        return $this->only(['address','appointment_time','pay_way','goods_id']);
+        return $this->only(['address','appointment_time','pay_way','goods_id','contact_number','contact_people']);
     }
 
     public function sceneDetail()

+ 99 - 0
app/api/validate/UserAddressValidate.php

@@ -0,0 +1,99 @@
+<?php
+namespace app\api\validate;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * UserAddress验证器
+ * Class UserAddressValidate
+ * @package app\api\validate\user
+ */
+class UserAddressValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'id' => 'require',
+        'user_id' => 'require',
+        'province_id' => 'require',
+        'city_id' => 'require',
+        'city_json' => 'require',
+        'address' => 'require',
+        'house_number' => 'require',
+        'contact_number' => 'require',
+        'contact_people' => 'require',
+
+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'id' => 'id',
+        'user_id' => '用户ID',
+        'province_id' => '省份ID',
+        'city_id' => '城市ID',
+        'city_json' => '省市名称',
+        'address' => '具体地址',
+        'house_number' => '门牌号',
+        'contact_number' => '联系号码',
+        'contact_people' => '联系人',
+
+    ];
+
+
+    /**
+     * @notes 添加场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneAdd()
+    {
+        return $this->only(['user_id','province_id','city_id','city_json','address','house_number','contact_number','contact_people']);
+    }
+
+
+    /**
+     * @notes 编辑场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneEdit()
+    {
+        return $this->only(['id','user_id','province_id','city_id','city_json','address','house_number','contact_number','contact_people']);
+    }
+
+
+    /**
+     * @notes 删除场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneDelete()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 详情场景
+     * @return UserAddressValidate
+     * @author likeadmin
+     * @date 2024/07/18 13:51
+     */
+    public function sceneDetail()
+    {
+        return $this->only(['id']);
+    }
+
+}

+ 23 - 2
app/common/logic/PayNotifyLogic.php

@@ -16,8 +16,10 @@ namespace app\common\logic;
 
 use app\common\enum\PayEnum;
 use app\common\enum\user\AccountLogEnum;
+use app\common\enum\WorkEnum;
 use app\common\model\recharge\RechargeOrder;
 use app\common\model\user\User;
+use app\common\model\works\ServiceWork;
 use think\facade\Db;
 use think\facade\Log;
 
@@ -55,8 +57,6 @@ class PayNotifyLogic extends BaseLogic
      * @notes 充值回调
      * @param $orderSn
      * @param array $extra
-     * @author 段誉
-     * @date 2023/2/27 15:28
      */
     public static function recharge($orderSn, array $extra = [])
     {
@@ -84,5 +84,26 @@ class PayNotifyLogic extends BaseLogic
         $order->save();
     }
 
+    /**
+     * @notes 服务回调
+     * @param $orderSn
+     * @param array $extra
+     */
+    public static function goods($orderSn, array $extra = [])
+    {
+        $order = RechargeOrder::where('sn', $orderSn)->findOrEmpty();
+        // 更新充值订单状态
+        $order->transaction_id = $extra['transaction_id'] ?? '';
+        $order->pay_status = PayEnum::ISPAID;
+        $order->pay_time = time();
+        $order->save();
+
+        $work = ServiceWork::findOrEmpty($order->work_id);
+        $work->work_pay_status = WorkEnum::IS_PAY_STATUS;
+        $work->work_total = $order->order_amount;
+        $work->work_amount = $order->order_amount;
+        $work->save();
+    }
+
 
 }

+ 0 - 1
app/common/logic/PaymentLogic.php

@@ -174,7 +174,6 @@ class PaymentLogic extends BaseLogic
         if ($payWay == PayEnum::WECHAT_PAY) {
             $paySn = self::formatOrderSn($order['sn'], $terminal);
         }
-
         //更新支付方式
         switch ($from) {
             case 'recharge':

+ 0 - 4
app/common/model/reviews/GoodsReviews.php

@@ -26,9 +26,5 @@ use app\common\model\BaseModel;
  */
 class GoodsReviews extends BaseModel
 {
-    
     protected $name = 'goods_reviews';
-    
-
-    
 }

+ 34 - 0
app/common/model/setting/PostageRegion.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\common\model\setting;
+
+
+use app\common\model\BaseModel;
+
+
+
+/**
+ * PostageRegion模型
+ * Class PostageRegion
+ * @package app\common\model\setting
+ */
+class PostageRegion extends BaseModel
+{
+    
+    protected $name = 'postage_region';
+    
+
+    
+}

+ 34 - 0
app/common/model/user/UserAddress.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\common\model\user;
+
+
+use app\common\model\BaseModel;
+
+
+
+/**
+ * UserAddress模型
+ * Class UserAddress
+ * @package app\common\model\user
+ */
+class UserAddress extends BaseModel
+{
+    
+    protected $name = 'user_address';
+    
+
+    
+}

BIN
public/resource/image/adminapi/default/default_avatar.png