diff --git a/src/application/admin/controller/credit/CategoryController.php b/src/application/admin/controller/credit/CategoryController.php index b0fb9ce4..aae30a78 100644 --- a/src/application/admin/controller/credit/CategoryController.php +++ b/src/application/admin/controller/credit/CategoryController.php @@ -10,9 +10,9 @@ namespace app\admin\controller\credit; use app\admin\controller\BaseController; -use app\admin\validate\GoodsCategoryValidate; -use app\common\facade\GoodsCategoryFacade; -use app\common\model\GoodsCategoryModel; +use modules\credit\validate\GoodsCategoryValidate; +use modules\credit\facade\GoodsCategoryFacade; +use modules\credit\model\GoodsCategoryModel; use Overtrue\Pinyin\Pinyin; use think\Db; diff --git a/src/application/admin/controller/credit/GoodsController.php b/src/application/admin/controller/credit/GoodsController.php index 927d05df..66f0959a 100644 --- a/src/application/admin/controller/credit/GoodsController.php +++ b/src/application/admin/controller/credit/GoodsController.php @@ -10,10 +10,10 @@ namespace app\admin\controller\credit; use app\admin\controller\BaseController; -use app\common\model\GoodsModel; -use app\admin\validate\GoodsValidate; +use modules\credit\model\GoodsModel; +use modules\credit\validate\GoodsValidate; use app\admin\validate\ImagesValidate; -use app\common\facade\GoodsCategoryFacade; +use modules\credit\facade\GoodsCategoryFacade; use think\Db; class GoodsController extends BaseController @@ -83,7 +83,7 @@ public function add($cid = 0) if ($model['id']) { //delete_image($delete_images); - user_log($this->mid, 'addgoods', 1, '添加商品 ' . $model->id, 'manager'); + user_log($this->mid, 'add-credit-goods', 1, '添加商品 ' . $model->id, 'manager'); $this->success("添加成功", url('credit.goods/index')); } else { delete_image($data['image']); @@ -135,7 +135,7 @@ public function edit($id) if ($model->allowField(true)->save($data)) { //delete_image($delete_images); - user_log($this->mid, 'updategoods', 1, '修改商品 ' . $id, 'manager'); + user_log($this->mid, 'update-credit-goods', 1, '修改商品 ' . $id, 'manager'); $this->success("编辑成功", url('credit.goods/index')); } else { delete_image($data['image']); @@ -166,7 +166,7 @@ public function delete($id) if ($result) { Db::name('goodsImages')->where('goods_id', 'in', idArr($id))->delete(); - user_log($this->mid, 'deletegoods', 1, '删除商品 ' . $id, 'manager'); + user_log($this->mid, 'delete-credit-goods', 1, '删除商品 ' . $id, 'manager'); $this->success("删除成功", url('credit.goods/index')); } else { $this->error("删除失败"); @@ -181,7 +181,7 @@ public function push($id, $type = 0) user_log($this->mid, 'pushgoods', 1, '上架商品 ' . $id, 'manager'); $this->success("上架成功", url('credit.goods/index')); } elseif ($result && $data['status'] === 0) { - user_log($this->mid, 'cancelgoods', 1, '下架商品 ' . $id, 'manager'); + user_log($this->mid, 'cancel-credit-goods', 1, '下架商品 ' . $id, 'manager'); $this->success("下架成功", url('credit.goods/index')); } else { $this->error("操作失败"); diff --git a/src/application/admin/controller/credit/OrderController.php b/src/application/admin/controller/credit/OrderController.php index 6238ce2c..6fb9dd3b 100644 --- a/src/application/admin/controller/credit/OrderController.php +++ b/src/application/admin/controller/credit/OrderController.php @@ -3,7 +3,7 @@ namespace app\admin\controller\credit; use app\admin\controller\BaseController; -use app\common\model\CreditOrderModel; +use modules\credit\model\CreditOrderModel; use app\common\model\PayOrderModel; use shirne\excel\Excel; use PhpOffice\PhpSpreadsheet\Cell\DataType; @@ -138,7 +138,7 @@ public function setcancel($id) $this->error('订单不可取消'); } $order->updateStatus(['status' => -1]); - user_log($this->mid, 'cancelcreditorder', 1, '取消积分订单 ' . $id, 'manager'); + user_log($this->mid, 'cancel-credit-order', 1, '取消积分订单 ' . $id, 'manager'); $this->success('操作成功'); } public function setpayed($id) @@ -164,7 +164,7 @@ public function setpayed($id) $paytype = 'offline'; } $order->updateStatus(['status' => 1, 'pay_type' => $paytype]); - user_log($this->mid, 'creditorderpay', 1, '积分订单支付 ' . $id, 'manager'); + user_log($this->mid, 'credit-order-pay', 1, '积分订单支付 ' . $id, 'manager'); $this->success('操作成功'); } public function setdelivery($id) @@ -191,7 +191,7 @@ public function setdelivery($id) 'express_no' => $express_no, 'express_code' => $express_code ]); - user_log($this->mid, 'creditorderdelivery', 1, '积分订单发货 ' . $id, 'manager'); + user_log($this->mid, 'credit-order-delivery', 1, '积分订单发货 ' . $id, 'manager'); $this->success('操作成功'); } public function setreceive($id) @@ -211,7 +211,7 @@ public function setreceive($id) $this->error('订单已完成'); } $order->updateStatus(['status' => 3]); - user_log($this->mid, 'creditorderconfirm', 1, '积分订单确认 ' . $id, 'manager'); + user_log($this->mid, 'credit-order-confirm', 1, '积分订单确认 ' . $id, 'manager'); $this->success('操作成功'); } @@ -232,7 +232,7 @@ public function setcomplete($id) $this->error('订单已完成'); } $order->updateStatus(['status' => 4]); - user_log($this->mid, 'creditordercomplete', 1, '积分订单完成 ' . $id, 'manager'); + user_log($this->mid, 'credit-order-complete', 1, '积分订单完成 ' . $id, 'manager'); $this->success('操作成功'); } @@ -267,7 +267,7 @@ public function reprice($id, $price) ); $order->save($data); - user_log($this->mid, 'repricecreditorder', 1, '积分订单改价 ' . $id . ' ' . $price, 'manager'); + user_log($this->mid, 'reprice-credit-order', 1, '积分订单改价 ' . $id . ' ' . $price, 'manager'); $this->success('操作成功'); } @@ -325,7 +325,7 @@ public function delete($id) $model = Db::name('creditOrder'); $result = $model->whereIn("order_id", idArr($id))->useSoftDelete('delete_time', time())->delete(); if ($result) { - user_log($this->mid, 'deleteorder', 1, '删除订单 ' . $id, 'manager'); + user_log($this->mid, 'delete-credit-order', 1, '删除订单 ' . $id, 'manager'); $this->success("删除成功", url('credit.order/index')); } else { $this->error("删除失败"); diff --git a/src/application/admin/controller/credit/PromotionController.php b/src/application/admin/controller/credit/PromotionController.php index 94b32112..1284622e 100644 --- a/src/application/admin/controller/credit/PromotionController.php +++ b/src/application/admin/controller/credit/PromotionController.php @@ -16,7 +16,7 @@ public function index() $data = $this->request->post(); $result = save_setting($data, 'credit'); - user_log($this->mid, 'creditconfig', 1, '修改积分商城配置', 'manager'); + user_log($this->mid, 'credit-config', 1, '修改积分商城配置', 'manager'); $this->success('配置已更新', url('credit.promotion/index')); } $this->assign('setting', $setting['credit']); diff --git a/src/application/api/controller/GoodsController.php b/src/application/api/controller/credit/GoodsController.php similarity index 95% rename from src/application/api/controller/GoodsController.php rename to src/application/api/controller/credit/GoodsController.php index 99a2c346..15848593 100644 --- a/src/application/api/controller/GoodsController.php +++ b/src/application/api/controller/credit/GoodsController.php @@ -1,9 +1,10 @@