初始版本

This commit is contained in:
贾祥聪
2025-08-19 14:16:51 +08:00
commit f937a1f9b9
4373 changed files with 359728 additions and 0 deletions

View File

@@ -0,0 +1,553 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
/**
* 权限
*/
return [
// 首页
'index' => [
//控制台
'index' => [
'page_path' => '/workbench',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['workbench/index'],
],
]
],
// 服务管理
'service' => [
//服务列表
'lists' => [
'page_path' => '/service/lists',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['goods.goods/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'goods.goods/add',
'goods.goods/edit',
'goods.goods/detail',
'goods.goods/del',
],
],
],
//服务分类
'category' => [
'page_path' => '/service/category',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['goods.goods_category/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'goods.goods_category/add',
'goods.goods_category/edit',
'goods.goods_category/detail',
'goods.goods_category/del',
],
],
],
//服务单位
'unit' => [
'page_path' => '/service/unit',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['goods.goods_unit/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'goods.goods_unit/add',
'goods.goods_unit/edit',
'goods.goods_unit/detail',
'goods.goods_unit/del',
],
],
],
//服务评价
'comment' => [
'page_path' => '/service/evaluate',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['goods.goods_comment/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'goods.goods_comment/detail',
'goods.goods_comment/del',
'goods.goods_comment/reply',
],
],
],
],
// 用户管理
'user' => [
// 用户列表
'lists' => [
'page_path' => '/user/index',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['user.user/lists'],
],
],
// 用户详情
'lists' => [
'page_path' => '/user/detail',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['user.user/detail'],
],
]
],
// 师傅管理
'staff' => [
// 师傅列表
'lists' => [
'page_path' => '/master_worker/index',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['staff.staff/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'staff.staff/add',
'staff.staff/edit',
'staff.staff/detail',
'staff.staff/del',
],
],
]
],
// 订单管理
'order' => [
// 订单列表
'lists' => [
'page_path' => '/order/index',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['order.order/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'order.order/del',
'order.order/remark',
'order.order/cancel',
'order.order/detail',
'order.order/verification',
],
]
],
// 预约时间段
'subscribe' => [
'page_path' => '/order/subscribe',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['order.order_time/lists', 'order.order_time/getTime'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'order.order_time/add',
'order.order_time/edit',
'order.order_time/detail',
'order.order_time/del',
],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'order.order_time/setTime'
],
],
]
],
// 装修管理
'decorate' => [
// 首页装修
'index' => [
'page_path' => '/decorate/index',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['decorate.menu/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'decorate.menu/status',
'decorate.menu/del',
'decorate.menu/edit',
'decorate.menu/detail',
'decorate.menu/shopPage',
'goods.goods_category/lists'
],
]
],
// 底部导航
'navigation' => [
'page_path' => '/decorate/tabbar',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['decorate.navigation/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'decorate.navigation/detail',
'decorate.navigation/edit'
],
]
],
// 广告管理
'ad' => [
'page_path' => '/decorate/advertise',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['ad.ad_position/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'ad.ad/status',
'ad.ad/del',
'ad.ad/add',
'ad.ad/edit',
'ad.ad/detail'
],
]
]
],
// 应用管理 消息通知
'notice' => [
// 通知设置
'notice_setting' => [
'page_path' => '/notification/index',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['notice.notice/settingLists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'notice.notice/detail',
'notice.notice/set',
],
]
],
// 短信通知
'massage_setting' => [
'page_path' => '/sms/index',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['notice.sms_config/getConfig'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'notice.sms_config/detail',
'notice.sms_config/setConfig',
],
]
],
],
//渠道
'channel' => [
//微信公众号设置
'oasetting' => [
'page_path' => '/channel/mp_wechat/index',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['channel.official_account_setting/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['channel.official_account_setting/setConfig'],
],
],
//微信菜单设置
'oamenu' => [
'page_path' => '/channel/mp_wechat/menu',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['channel.official_account_menu/detail'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'channel.official_account_menu/saveAndPublish',
'channel.official_account_menu/save'
],
],
],
//关注回复
'oafollowreply' => [
'page_path' => ['channel/mp_wechat/reply/follow_reply','/channel/mp_wechat/reply/keyword_reply','/channel/mp_wechat/reply/default_reply'],
'view' => [
'button_auth' => ['view'],
'action_auth' => ['channel.official_account_reply/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'channel.official_account_reply/add',
'channel.official_account_reply/edit',
'channel.official_account_reply/status',
'channel.official_account_reply/detail',
'channel.official_account_reply/del',
]
],
],
//小程序设置
'mpsetting' => [
'page_path' => '/channel/wechat_app',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['channel.mnp_settings/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['channel.mnp_settings/setConfig'],
],
],
//APP设置
'appsetting' => [
'page_path' => '/channel/app_store',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['channel.app_setting/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['channel.app_setting/setConfig'],
],
],
//H5设置
'h5setting' => [
'page_path' => '/channel/h5_store',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['channel.h5_setting/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['channel.h5_setting/setConfig'],
],
],
//pc商城-渠道设置
'wechat_platform' => [
'page_path' => '/wechat/wechat_platform',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['channel.open_setting/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['channel.open_setting/setConfig'],
],
],
],
// 权限管理
'auth' => [
//管理员
'permissions' => [
'page_path' => '/permission/admin',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['auth.admin/lists', 'auth.role/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'auth.admin/add',
'auth.admin/edit',
'auth.admin/detail',
'auth.admin/del',
],
],
],
//角色
'role' => [
'page_path' => '/permission/role',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['auth.role/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'auth.role/add',
'auth.role/edit',
'auth.role/detail',
'auth.role/del',
'config/getMenu',
],
],
],
],
// 系统设置
'setting' => [
// 网站信息
'website' => [
'page_path' => '/setting/website/information',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.web.websetting/getwebsite'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.web.websetting/setwebsite'],
],
],
//备案信息
'record' => [
'page_path' => '/setting/website/filing',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.web.websetting/getcopyright'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.web.websetting/setcopyright'],
],
],
// 协议/政策
'protocol' => [
'page_path' => '/setting/website/protocol',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.web.web_setting/getAgreement'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.web.web_setting/setAgreement'],
],
],
// 交易设置
'order' => [
'page_path' => '/setting/order',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.transaction_settings/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.transaction_settings/setConfig'],
],
],
// 客服设置
'service' => [
'page_path' => '/setting/service',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.customer_service/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.customer_service/setConfig'],
],
],
// 支付配置
'pay_config' => [
'page_path' => '/setting/payment_config',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.pay.pay_config/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'setting.pay.pay_config/detail',
'setting.pay.pay_config/edit'
],
],
],
// 支付方式
'pay_way' => [
'page_path' => '/setting/payment_way',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.pay.pay_way/getPayWay'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.pay.pay_way/setPayWay'],
],
],
// 用户设置
'user' => [
'page_path' => '/setting/user',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.user.user/getConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.user.user/setConfig'],
],
],
// 登录注册
'register' => [
'page_path' => '/setting/user/login',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.user.user/getRegisterConfig'],
],
'save' => [
'button_auth' => ['auth_all'],
'action_auth' => ['setting.user.user/setRegisterConfig'],
],
],
//系统环境
'environment' => [
'page_path' => '/setting/system/environment',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['setting.system.system/info'],
],
],
// 定时任务
'task' => [
'page_path' => '/setting/task',
'view' => [
'button_auth' => ['view'],
'action_auth' => ['crontab.crontab/lists'],
],
'manage' => [
'button_auth' => ['auth_all'],
'action_auth' => [
'crontab.crontab/add',
'crontab.crontab/detail',
'crontab.crontab/edit',
'crontab.crontab/del',
'crontab.crontab/expression'
],
],
],
],
];

View File

@@ -0,0 +1,624 @@
<?php
/**
* name:菜单、权限名称
* type类型1-菜单2-权限
* sons:子级菜单
* ----auth_key权限key(必须唯一)
*/
return [
// 首页-工作台
[
'name' => '工作台',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'index/index.view'
]
],
],
// 服务管理
[
'name' => '服务管理',
'type' => 1,
'sons' => [
[
'name' => '服务列表',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'service/lists.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'service/lists.manage'
],
],
],
[
'name' => '服务分类',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'service/category.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'service/category.manage'
],
],
],
[
'name' => '服务单位',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'service/unit.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'service/unit.manage'
],
],
],
[
'name' => '服务评价',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'service/comment.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'service/comment.manage'
],
],
],
],
],
// 用户管理
[
'name' => '用户管理',
'type' => 1,
'sons' => [
[
'name' => '用户列表',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'user/lists.view'
],
],
],
[
'name' => '用户详情',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'user/detail.view'
],
],
],
],
],
// 师傅管理
[
'name' => '师傅管理',
'type' => 1,
'sons' => [
[
'name' => '师傅列表',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'user/lists.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'user/lists.manage'
],
],
],
],
],
// 订单管理
[
'name' => '订单管理',
'type' => 1,
'sons' => [
[
'name' => '订单列表',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'user/lists.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'user/lists.manage'
],
],
],
[
'name' => '预约时间段',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'user/subscribe.view'
],[
'name' => '保存',
'type' => 2,
'auth_key' => 'user/subscribe.save'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'user/subscribe.manage'
],
],
],
],
],
// 装修管理
[
'name' => '装修管理',
'type' => 1,
'sons' => [
[
'name' => '首页装修',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'decorate/index.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'decorate/index.manage'
],
],
],
[
'name' => '底部导航栏',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'decorate/navigation.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'decorate/navigation.manage'
],
],
],
[
'name' => '广告管理',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'decorate/ad.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'decorate/ad.manage'
],
],
],
],
],
// 应用管理
[
'name' => '消息通知',
'type' => 1,
'sons' => [
[
'name' => '通知设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'notice/notice_setting.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'notice/notice_setting.manage'
],
],
],
[
'name' => '短信设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'notice/massage_setting.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'notice/massage_setting.manage'
],
],
]
],
],
//渠道
[
'name' => '渠道',
'type' => 1,
'sons'=>[
[
'name' => '微信公众号-渠道设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'channel/oasetting.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'channel/oasetting.save'
],
],
],
[
'name' => '微信公众号-菜单管理',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'channel/oamenu.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'channel/oamenu.save'
],
],
],
[
'name' => '微信公众号-关注回复、关键词回复、默认回复',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'channel/oafollowreply.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'channel/oafollowreply.manage'
],
],
],
[
'name' => '小程序-设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'channel/mpsetting.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'channel/mpsetting.save'
],
],
],
[
'name' => 'APP-设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'channel/appsetting.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'channel/appsetting.save'
],
],
],
[
'name' => 'H5-设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'channel/h5setting.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'channel/h5setting.save'
],
],
],
[
'name' => '微信开放平台',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'channel/wechat_platform.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'channel/wechat_platform.save'
],
],
]
]
],
// 权限管理
[
'name' => '权限管理',
'type' => 1,
'sons' => [
[
'name' => '管理员',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'auth/permissions.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'auth/permissions.manage'
],
],
],
[
'name' => '角色',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'auth/role.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'auth/role.manage'
],
]
],
],
],
// 系统设置
[
'name' => '系统设置',
'type' => 1,
'sons' => [
[
'name' => '网站信息',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/website.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/website.save'
],
],
],
[
'name' => '备案信息',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/record.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/record.save'
],
],
],
[
'name' => '政策/协议',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/protocol.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/protocol.save'
],
],
],
[
'name' => '交易设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/order.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/order.save'
],
],
],
[
'name' => '客服设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/service.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/service.save'
],
],
],
[
'name' => '支付配置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/pay_config.view'
],
[
'name' => '管理',
'type' => 2,
'auth_key' => 'setting/pay_config.manage'
],
],
],
[
'name' => '支付方式',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/pay_way.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/pay_way.save'
],
],
],
[
'name' => '用户设置',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/user.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/user.save'
],
],
],
[
'name' => '登录注册',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/register.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/register.save'
],
],
],
[
'name' => '系统环境',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/environment.view'
],
],
],
[
'name' => '定时任务',
'type' => 1,
'sons' => [
[
'name' => '查看',
'type' => 2,
'auth_key' => 'setting/task.view'
],
[
'name' => '保存',
'type' => 2,
'auth_key' => 'setting/task.manage'
],
],
],
],
]
];

View File

@@ -0,0 +1,33 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
return [
'middleware' => [
//初始化
app\adminapi\http\middleware\InitMiddleware::class,
//登录验证
app\adminapi\http\middleware\LoginMiddleware::class,
//权限认证
app\adminapi\http\middleware\AuthMiddleware::class,
// 演示模式 - 禁止提交数据
app\adminapi\http\middleware\CheckDemoMiddleware::class,
// 演示模式 - 不返回敏感数据
app\adminapi\http\middleware\EncryDemoDataMiddleware::class,
],
];

View File

@@ -0,0 +1,45 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\adminapi\controller;
use think\App;
use app\common\controller\BaseLikeAdminController;
/**
* 管理元控制器基类
* Class BaseAdminController
* @package app\adminapi\controller
*/
class BaseAdminController extends BaseLikeAdminController
{
protected int $adminId = 0;
protected array $adminInfo = [];
public function initialize()
{
if (isset($this->request->adminInfo) && $this->request->adminInfo) {
$this->adminInfo = $this->request->adminInfo;
$this->adminId = $this->request->adminInfo['admin_id'];
}
}
}

View File

@@ -0,0 +1,72 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller;
use app\adminapi\logic\auth\AuthLogic;
use app\adminapi\logic\ConfigLogic;
/**
* 配置控制器
* Class ConfigController
* @package app\adminapi\controller
*/
class ConfigController extends BaseAdminController
{
public array $notNeedLogin = ['getConfig'];
/**
* @notes 基础配置
* @return \think\response\Json
* @author 段誉
* @date 2021/12/31 11:01
*/
public function getConfig()
{
$data = ConfigLogic::getConfig();
return $this->data($data);
}
/**
* @notes 正版检测
* @return \think\response\Json
* @author ljj
* @date 2023/5/16 11:49 上午
*/
public function checkLegal()
{
$data = ConfigLogic::checkLegal();
return $this->data($data);
}
/**
* @notes 检测新版本
* @return \think\response\Json
* @author ljj
* @date 2023/5/25 7:02 下午
*/
public function checkVersion()
{
$data = ConfigLogic::checkVersion();
return $this->data($data);
}
}

View File

@@ -0,0 +1,137 @@
<?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;
use app\adminapi\lists\file\FileCateLists;
use app\adminapi\lists\file\FileLists;
use app\adminapi\logic\FileLogic;
use app\adminapi\validate\FileValidate;
use think\response\Json;
/**文件管理
* Class FileController
* @package app\adminapi\controller
*/
class FileController extends BaseAdminController
{
/**
* @notes 文件列表
* @return Json
* @author 段誉
* @date 2021/12/29 14:30
*/
public function lists()
{
return $this->dataLists(new FileLists());
}
/**
* @notes 文件移动成功
* @return Json
* @author 段誉
* @date 2021/12/29 14:30
*/
public function move()
{
$params = (new FileValidate())->post()->goCheck('move');
FileLogic::move($params);
return $this->success('移动成功', [], 1, 1);
}
/**
* @notes 重命名文件
* @return Json
* @author 段誉
* @date 2021/12/29 14:31
*/
public function rename()
{
$params = (new FileValidate())->post()->goCheck('rename');
FileLogic::rename($params);
return $this->success('重命名成功', [], 1, 1);
}
/**
* @notes 删除文件
* @return Json
* @author 段誉
* @date 2021/12/29 14:31
*/
public function delete()
{
$params = (new FileValidate())->post()->goCheck('delete');
FileLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 分类列表
* @return Json
* @author 段誉
* @date 2021/12/29 14:31
*/
public function listCate()
{
return $this->dataLists(new FileCateLists());
}
/**
* @notes 添加文件分类
* @return Json
* @author 段誉
* @date 2021/12/29 14:31
*/
public function addCate()
{
$params = (new FileValidate())->post()->goCheck('addCate');
FileLogic::addCate($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑文件分类
* @return Json
* @author 段誉
* @date 2021/12/29 14:31
*/
public function editCate()
{
$params = (new FileValidate())->post()->goCheck('editCate');
FileLogic::editCate($params);
return $this->success('编辑成功', [], 1, 1);
}
/**
* @notes 删除文件分类
* @return Json
* @author 段誉
* @date 2021/12/29 14:32
*/
public function delCate()
{
$params = (new FileValidate())->post()->goCheck('id');
FileLogic::delCate($params);
return $this->success('删除成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,64 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller;
use app\adminapi\logic\LoginLogic;
use app\adminapi\validate\LoginValidate;
/**
* 管理员登录控制器
* Class LoginController
* @package app\adminapi\controller
*/
class LoginController extends BaseAdminController
{
public array $notNeedLogin = ['account', 'logout'];
/**
* @notes 账号登录
* @date 2021/6/30 17:01
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 令狐冲
*/
public function account()
{
$params = (new LoginValidate())->post()->goCheck();
return $this->data((new LoginLogic())->login($params));
}
/**
* @notes 退出登录
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 令狐冲
* @date 2021/7/8 00:36
*/
public function logout()
{
//退出登录情况特殊只有成功的情况也不需要token验证
(new LoginLogic())->logout($this->adminInfo);
return $this->success();
}
}

View File

@@ -0,0 +1,41 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller;
use app\common\logic\RegionLogic;
class RegionController extends BaseAdminController
{
/**
* @notes 地区
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/4/6 10:51 上午
*/
public function region()
{
$result = (new RegionLogic())->region();
return $this->success('获取成功',$result);
}
}

View File

@@ -0,0 +1,68 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller;
use app\common\service\UploadService;
use Exception;
use think\response\Json;
/**
* 上传文件
* Class UploadController
* @package app\adminapi\controller
*/
class UploadController extends BaseAdminController
{
/**
* @notes 上传图片
* @return Json
* @author 段誉
* @date 2021/12/29 16:27
*/
public function image()
{
try {
$cid = $this->request->post('cid', 0);
$result = UploadService::image($cid);
return $this->success('上传成功', $result);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
/**
* @notes 上传视频
* @return Json
* @author 段誉
* @date 2021/12/29 16:27
*/
public function video()
{
try {
$cid = $this->request->post('cid', 0);
$result = UploadService::video($cid);
return $this->success('上传成功', $result);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
}

View File

@@ -0,0 +1,43 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller;
use app\adminapi\logic\WorkbenchLogic;
/**
* 工作台
* Class WorkbenchCotroller
* @package app\adminapi\controller
*/
class WorkbenchController extends BaseAdminController
{
/**
* @notes 工作台
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 17:01
*/
public function index()
{
$result = WorkbenchLogic::index();
return $this->data($result);
}
}

View File

@@ -0,0 +1,105 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\ad;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\ad\AdLists;
use app\adminapi\logic\ad\AdLogic;
use app\adminapi\validate\ad\AdValidate;
class AdController extends BaseAdminController
{
/**
* @notes 广告列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 6:41 下午
*/
public function lists()
{
return $this->dataLists(new AdLists());
}
/**
* @notes 添加广告
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 7:00 下午
*/
public function add()
{
$params = (new AdValidate())->post()->goCheck('add');
(new AdLogic())->add($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 查看广告详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 10:14 上午
*/
public function detail()
{
$params = (new AdValidate())->get()->goCheck('detail');
$result = (new AdLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑广告
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 10:24 上午
*/
public function edit()
{
$params = (new AdValidate())->post()->goCheck('edit');
(new AdLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除广告
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 10:32 上午
*/
public function del()
{
$params = (new AdValidate())->post()->goCheck('del');
(new AdLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 修改广告状态
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 10:39 上午
*/
public function status()
{
$params = (new AdValidate())->post()->goCheck('status');
(new AdLogic())->status($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,105 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\ad;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\ad\AdPositionLists;
use app\adminapi\logic\ad\AdPositionLogic;
use app\adminapi\validate\ad\AdPositionValidate;
class AdPositionController extends BaseAdminController
{
/**
* @notes 查看广告位列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 4:50 下午
*/
public function lists()
{
return $this->dataLists(new AdPositionLists());
}
/**
* @notes 添加广告位
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 5:05 下午
*/
public function add()
{
$params = (new AdPositionValidate())->post()->goCheck('add');
(new AdPositionLogic())->add($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 查看广告位详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 5:09 下午
*/
public function detail()
{
$params = (new AdPositionValidate())->get()->goCheck('detail');
$result = (new AdPositionLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑广告位
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 5:13 下午
*/
public function edit()
{
$params = (new AdPositionValidate())->post()->goCheck('edit');
(new AdPositionLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除广告位
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 5:28 下午
*/
public function del()
{
$params = (new AdPositionValidate())->post()->goCheck('del');
(new AdPositionLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 修改广告位状态
* @return \think\response\Json
* @author ljj
* @date 2022/2/14 5:32 下午
*/
public function status()
{
$params = (new AdPositionValidate())->post()->goCheck('status');
(new AdPositionLogic())->status($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,131 @@
<?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\auth;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\auth\AdminLists;
use app\adminapi\validate\auth\AdminValidate;
use app\adminapi\logic\auth\AdminLogic;
use app\adminapi\validate\auth\editSelfValidate;
/**
* 管理员控制器
* Class AdminController
* @package app\adminapi\controller\auth
*/
class AdminController extends BaseAdminController
{
/**
* @notes 查看管理员列表
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 9:55
*/
public function lists()
{
return $this->dataLists(new AdminLists());
}
/**
* @notes 添加管理员
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 10:21
*/
public function add()
{
$params = (new AdminValidate())->post()->goCheck('add');
AdminLogic::add($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑管理员
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 11:03
*/
public function edit()
{
$params = (new AdminValidate())->post()->goCheck('edit');
$result = AdminLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(AdminLogic::getError());
}
/**
* @notes 删除管理员
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 11:03
*/
public function delete()
{
$params = (new AdminValidate())->post()->goCheck('delete');
$result = AdminLogic::delete($params);
if (true === $result) {
return $this->success('删除成功', [], 1, 1);
}
return $this->fail(AdminLogic::getError());
}
/**
* @notes 查看管理员详情
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 11:07
*/
public function detail()
{
$params = (new AdminValidate())->goCheck('detail');
$result = AdminLogic::detail($params);
return $this->data($result);
}
/**
* @notes 获取当前管理员信息
* @return \think\response\Json
* @author 段誉
* @date 2021/12/31 10:53
*/
public function mySelf()
{
$result = AdminLogic::detail(['id' => $this->adminId], 'auth');
return $this->data($result);
}
/**
* @notes 编辑超级管理员信息
* @return \think\response\Json
* @author 段誉
* @date 2022/4/8 17:54
*/
public function editSelf()
{
$params = (new editSelfValidate())->post()->goCheck('', ['admin_id' => $this->adminId]);
$result = AdminLogic::editSelf($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,127 @@
<?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\auth;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\auth\MenuLists;
use app\adminapi\logic\auth\MenuLogic;
use app\adminapi\validate\auth\MenuValidate;
/**
* 系统菜单权限
* Class MenuController
* @package app\adminapi\controller\setting\system
*/
class MenuController extends BaseAdminController
{
/**
* @notes 获取菜单路由
* @return \think\response\Json
* @author 段誉
* @date 2022/6/29 17:41
*/
public function route()
{
$result = MenuLogic::getMenuByAdminId($this->adminId);
return $this->data($result);
}
/**
* @notes 获取菜单列表
* @return \think\response\Json
* @author 段誉
* @date 2022/6/29 17:23
*/
public function lists()
{
return $this->dataLists(new MenuLists());
}
/**
* @notes 菜单详情
* @return \think\response\Json
* @author 段誉
* @date 2022/6/30 10:07
*/
public function detail()
{
$params = (new MenuValidate())->goCheck('detail');
return $this->data(MenuLogic::detail($params));
}
/**
* @notes 添加菜单
* @return \think\response\Json
* @author 段誉
* @date 2022/6/30 10:07
*/
public function add()
{
$params = (new MenuValidate())->post()->goCheck('add');
MenuLogic::add($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 编辑菜单
* @return \think\response\Json
* @author 段誉
* @date 2022/6/30 10:07
*/
public function edit()
{
$params = (new MenuValidate())->post()->goCheck('edit');
MenuLogic::edit($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 删除菜单
* @return \think\response\Json
* @author 段誉
* @date 2022/6/30 10:07
*/
public function delete()
{
$params = (new MenuValidate())->post()->goCheck('delete');
MenuLogic::delete($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 更新状态
* @return \think\response\Json
* @author 段誉
* @date 2022/7/6 17:04
*/
public function updateStatus()
{
$params = (new MenuValidate())->post()->goCheck('status');
MenuLogic::updateStatus($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,109 @@
<?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\auth;
use app\adminapi\{
logic\auth\RoleLogic,
lists\auth\RoleLists,
validate\auth\RoleValidate,
controller\BaseAdminController
};
/**
* 角色控制器
* Class RoleController
* @package app\adminapi\controller\auth
*/
class RoleController extends BaseAdminController
{
/**
* @notes 查看角色列表
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 11:49
*/
public function lists()
{
return $this->dataLists(new RoleLists());
}
/**
* @notes 添加权限
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 11:49
*/
public function add()
{
$params = (new RoleValidate())->post()->goCheck('add');
$res = RoleLogic::add($params);
if (true === $res) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(RoleLogic::getError());
}
/**
* @notes 编辑角色
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 14:18
*/
public function edit()
{
$params = (new RoleValidate())->post()->goCheck('edit');
$res = RoleLogic::edit($params);
if (true === $res) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(RoleLogic::getError());
}
/**
* @notes 删除角色
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 14:18
*/
public function delete()
{
$params = (new RoleValidate())->post()->goCheck('del');
(new RoleLogic)->delete($params['id']);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 查看角色详情
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2021/12/29 14:18
*/
public function detail()
{
$params = (new RoleValidate())->goCheck('detail');
$detail = (new RoleLogic)->detail($params['id']);
return $this->data($detail);
}
}

View File

@@ -0,0 +1,53 @@
<?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\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\channel\AppSettingLogic;
/**
* APP设置控制器
* Class AppSettingController
* @package app\adminapi\controller\settings\app
*/
class AppSettingController extends BaseAdminController
{
/**
* @notes 获取App设置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:24
*/
public function getConfig()
{
$result = AppSettingLogic::getConfig();
return $this->data($result);
}
/**
* @notes App设置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:25
*/
public function setConfig()
{
$params = $this->request->post();
AppSettingLogic::setConfig($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,57 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\channel\H5SettingLogic;
use app\adminapi\validate\channel\H5SettingValidate;
/**
* H5设置控制器
* Class HFiveSettingController
* @package app\adminapi\controller\settings\h5
*/
class H5SettingController extends BaseAdminController
{
/**
* @notes 获取H5设置
* @return \think\response\Json
* @author ljj
* @date 2022/9/23 9:38 上午
*/
public function getConfig()
{
$result = H5SettingLogic::getConfig();
return $this->data($result);
}
/**
* @notes H5设置
* @return \think\response\Json
* @author ljj
* @date 2022/9/23 10:02 上午
*/
public function setConfig()
{
$params = (new H5SettingValidate())->post()->goCheck();
H5SettingLogic::setConfig($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,105 @@
<?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\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\channel\MnpSettingsLogic;
use app\adminapi\validate\channel\MnpSettingsValidate;
/**
* 小程序设置
* Class MnpSettingsController
* @package app\adminapi\controller\channel
*/
class MnpSettingsController extends BaseAdminController
{
/**
* @notes 获取小程序配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 9:38 上午
*/
public function getConfig()
{
$result = (new MnpSettingsLogic())->getConfig();
return $this->data($result);
}
/**
* @notes 设置小程序配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 9:51 上午
*/
public function setConfig()
{
$params = (new MnpSettingsValidate())->post()->goCheck();
(new MnpSettingsLogic())->setConfig($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 获取小程序配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 9:38 上午
*/
public function getCoachConfig()
{
$result = (new MnpSettingsLogic())->getCoachConfig();
return $this->data($result);
}
/**
* @notes 设置小程序配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 9:51 上午
*/
public function setCoachConfig()
{
$params = (new MnpSettingsValidate())->post()->goCheck();
(new MnpSettingsLogic())->setCoachConfig($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 获取小程序配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 9:38 上午
*/
public function getShopConfig()
{
$result = (new MnpSettingsLogic())->getShopConfig();
return $this->data($result);
}
/**
* @notes 设置小程序配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 9:51 上午
*/
public function setShopConfig()
{
$params = (new MnpSettingsValidate())->post()->goCheck();
(new MnpSettingsLogic())->setShopConfig($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,74 @@
<?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\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\channel\OfficialAccountMenuLogic;
/**
* 微信公众号菜单控制器
* Class OfficialAccountMenuController
* @package app\adminapi\controller\channel
*/
class OfficialAccountMenuController extends BaseAdminController
{
/**
* @notes 保存菜单
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:41
*/
public function save()
{
$params = $this->request->post();
$result = OfficialAccountMenuLogic::save($params);
if(false === $result) {
return $this->fail(OfficialAccountMenuLogic::getError());
}
return $this->success('保存成功',[],1,1);
}
/**
* @notes 保存发布菜单
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:42
*/
public function saveAndPublish()
{
$params = $this->request->post();
$result = OfficialAccountMenuLogic::saveAndPublish($params);
if($result) {
return $this->success('保存并发布成功',[],1,1);
}
return $this->fail(OfficialAccountMenuLogic::getError());
}
/**
* @notes 查看菜单详情
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:42
*/
public function detail()
{
$result = OfficialAccountMenuLogic::detail();
return $this->data($result);
}
}

View File

@@ -0,0 +1,145 @@
<?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\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\channel\OfficialAccountReplyLists;
use app\adminapi\logic\channel\OfficialAccountReplyLogic;
use app\adminapi\validate\channel\OfficialAccountReplyValidate;
/**
* 微信公众号回复控制器
* Class OfficialAccountReplyController
* @package app\adminapi\controller\channel
*/
class OfficialAccountReplyController extends BaseAdminController
{
public array $notNeedLogin = ['index'];
/**
* @notes 查看回复列表(关注/关键词/默认)
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:58
*/
public function lists()
{
return $this->dataLists(new OfficialAccountReplyLists());
}
/**
* @notes 添加回复(关注/关键词/默认)
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:58
*/
public function add()
{
$params = (new OfficialAccountReplyValidate())->post()->goCheck('add');
$result = OfficialAccountReplyLogic::add($params);
if ($result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OfficialAccountReplyLogic::getError());
}
/**
* @notes 查看回复详情
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:58
*/
public function detail()
{
$params = (new OfficialAccountReplyValidate())->goCheck('detail');
$result = OfficialAccountReplyLogic::detail($params);
return $this->data($result);
}
/**
* @notes 编辑回复(关注/关键词/默认)
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:58
*/
public function edit()
{
$params = (new OfficialAccountReplyValidate())->post()->goCheck('edit');
$result = OfficialAccountReplyLogic::edit($params);
if ($result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OfficialAccountReplyLogic::getError());
}
/**
* @notes 删除回复(关注/关键词/默认)
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:59
*/
public function delete()
{
$params = (new OfficialAccountReplyValidate())->post()->goCheck('delete');
OfficialAccountReplyLogic::delete($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 更新排序
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:59
*/
public function sort()
{
$params = (new OfficialAccountReplyValidate())->post()->goCheck('sort');
OfficialAccountReplyLogic::sort($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 更新状态
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:59
*/
public function status()
{
$params = (new OfficialAccountReplyValidate())->post()->goCheck('status');
OfficialAccountReplyLogic::status($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 微信公众号回调
* @throws \ReflectionException
* @author 段誉
* @date 2022/3/29 10:59
*/
public function index()
{
OfficialAccountReplyLogic::index();
}
}

View File

@@ -0,0 +1,52 @@
<?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\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\channel\OfficialAccountSettingLogic;
use app\adminapi\validate\channel\OfficialAccountSettingValidate;
/**
* 公众号设置
* Class OfficialAccountSettingController
* @package app\adminapi\controller\channel
*/
class OfficialAccountSettingController extends BaseAdminController
{
/**
* @notes 获取公众号配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 10:09 上午
*/
public function getConfig()
{
$result = (new OfficialAccountSettingLogic())->getConfig();
return $this->data($result);
}
/**
* @notes 设置公众号配置
* @return \think\response\Json
* @author ljj
* @date 2022/2/16 10:09 上午
*/
public function setConfig()
{
$params = (new OfficialAccountSettingValidate())->post()->goCheck();
(new OfficialAccountSettingLogic())->setConfig($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,53 @@
<?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\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\channel\OpenSettingLogic;
/**
* 微信开放平台
* Class AppSettingController
* @package app\adminapi\controller\settings\app
*/
class OpenSettingController extends BaseAdminController
{
/**
* @notes 获取微信开放平台设置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:03
*/
public function getConfig()
{
$result = OpenSettingLogic::getConfig();
return $this->data($result);
}
/**
* @notes 微信开放平台设置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:03
*/
public function setConfig()
{
$params = $this->request->post();
OpenSettingLogic::setConfig($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,54 @@
<?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\channel;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\channel\WebPageSettingLogic;
use app\adminapi\validate\channel\WebPageSettingValidate;
/**
* H5设置控制器
* Class HFiveSettingController
* @package app\adminapi\controller\settings\h5
*/
class WebPageSettingController extends BaseAdminController
{
/**
* @notes 获取H5设置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:36
*/
public function getConfig()
{
$result = WebPageSettingLogic::getConfig();
return $this->data($result);
}
/**
* @notes H5设置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 10:36
*/
public function setConfig()
{
$params = (new WebPageSettingValidate())->post()->goCheck();
WebPageSettingLogic::setConfig($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,218 @@
<?php
namespace app\adminapi\controller\coach;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\coach\CoachApplyLists;
use app\adminapi\lists\coach\UpdateCoachLists;
use app\adminapi\logic\coach\CoachLogic;
use app\adminapi\validate\coach\AdjustWalletValidate;
use app\adminapi\validate\coach\CoachAuditValidate;
use app\adminapi\validate\coach\CoachValidate;
/**
* 技师控制器类
* Class CoachController
* @package app\adminapi\controller\coach
*/
class CoachController extends BaseAdminController
{
/**
* @notes 技师端账号列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/20 17:32
*/
public function coachUserLists()
{
$lists = (new CoachLogic())->coachUserLists();
return $this->success('',$lists);
}
/**
* @notes 技能列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/20 17:45
*/
public function skillLists()
{
$lists = (new CoachLogic())->skillLists();
return $this->success('',$lists);
}
/**
* @notes 数据列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/21 18:13
*/
public function otherLists()
{
$dataLists = (new CoachLogic())->otherLists();
return $this->success('',$dataLists);
}
/**
* @notes 技师列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/20 17:33
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 申请列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/26 17:46
*/
public function applyLists()
{
return $this->dataLists((new CoachApplyLists()));
}
/**
* @notes 资料更新列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/28 10:23
*/
public function updateCoachLists()
{
return $this->dataLists((new UpdateCoachLists()));
}
/**
* @notes 添加技师
* @return \think\response\Json
* @author cjhao
* @date 2024/8/21 14:20
*/
public function add()
{
$params = (new CoachValidate())->post()->goCheck('add');
$result = (new CoachLogic())->add($params);
if(true === $result){
return $this->success('添加成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 更新资料详情
* @return \think\response\Json
* @author cjhao
* @date 2024/8/28 11:04
*/
public function updateDetail()
{
$params = (new CoachValidate())->goCheck('id');
$result = (new CoachLogic())->updateDetail($params['id']);
return $this->success('',$result);
}
/**
* @notes 详情
* @return \think\response\Json
* @author cjhao
* @date 2024/8/21 15:29
*/
public function detail()
{
$params = (new CoachValidate())->goCheck('id');
$result = (new CoachLogic())->detail($params['id']);
return $this->success('',$result);
}
/**
* @notes 编辑
* @return \think\response\Json
* @author cjhao
* @date 2024/8/21 15:48
*/
public function edit()
{
$params = (new CoachValidate())->post()->goCheck();
$result = (new CoachLogic())->edit($params);
if(true === $result){
return $this->success('编辑成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 调整余额
* @return \think\response\Json
* @throws \Exception
* @author cjhao
* @date 2024/8/23 13:51
*/
public function adjustMoney()
{
$params = (new AdjustWalletValidate())->post()->goCheck();
$params['admin_id'] = $this->adminId;
$result = (new CoachLogic())->adjustMoney($params);
if(true === $result){
return $this->success('调整成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 调整保证金
* @return \think\response\Json
* @author cjhao
* @date 2024/8/23 15:05
*/
public function adjustDeposit()
{
$params = (new AdjustWalletValidate())->post()->goCheck();
$params['admin_id'] = $this->adminId;
$result = (new CoachLogic())->adjustDeposit($params);
if(true === $result){
return $this->success('调整成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 技师审核
* @return \think\response\Json
* @author cjhao
* @date 2024/8/23 18:43
*/
public function coachAudit()
{
$params = (new CoachAuditValidate())->post()->goCheck();
$params['admin_id'] = $this->adminId;
$result = (new CoachLogic())->coachAudit($params);
if(true === $result){
return $this->success('审核成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 技师审核
* @return \think\response\Json
* @author cjhao
* @date 2024/8/28 11:30
*/
public function updateAudit()
{
$params = (new CoachAuditValidate())->post()->goCheck();
$params['admin_id'] = $this->adminId;
$result = (new CoachLogic())->updateAudit($params);
if(true === $result){
return $this->success('审核成功',[],1,1);
}
return $this->fail($result);
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace app\adminapi\controller\coach;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\coach\DepositPackageLogic;
use app\adminapi\validate\coach\DepositPackageValidate;
/**
* 保证金套餐控制器类
* Class DepositPackageController
* @package app\adminapi\controller\coach
*/
class DepositPackageController extends BaseAdminController
{
/**
* @notes 查看列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 3:52 下午
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 添加服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:03 下午
*/
public function add()
{
$params = (new DepositPackageValidate())->post()->goCheck('add');
(new DepositPackageLogic())->add($params);
return $this->success('操作成功', [],1,1);
}
/**
* @notes 查看服务分类详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:21 下午
*/
public function detail()
{
$params = (new DepositPackageValidate())->get()->goCheck('id');
$result = (new DepositPackageLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:26 下午
*/
public function edit()
{
$params = (new DepositPackageValidate())->post()->goCheck();
(new DepositPackageLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:34 下午
*/
public function del()
{
$params = (new DepositPackageValidate())->post()->goCheck('id');
(new DepositPackageLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\coach;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\coach\SKillLogic;
use app\adminapi\validate\coach\SkillValidate;
/**
* 技能控制器类
* Class SkillController
* @package app\adminapi\controller\coach
*/
class SkillController extends BaseAdminController
{
/**
* @notes 查看服务分类列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 3:52 下午
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 添加服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:03 下午
*/
public function add()
{
$params = (new SkillValidate())->post()->goCheck('add');
(new SKillLogic())->add($params);
return $this->success('操作成功', [],1,1);
}
/**
* @notes 查看服务分类详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:21 下午
*/
public function detail()
{
$params = (new SkillValidate())->get()->goCheck('id');
$result = (new SKillLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:26 下午
*/
public function edit()
{
$params = (new SkillValidate())->post()->goCheck();
(new SKillLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:34 下午
*/
public function del()
{
$params = (new SkillValidate())->post()->goCheck('id');
(new SKillLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 修改服务分类状态
* @return \think\response\Json
* @author ljj
* @date 2022/2/10 10:57 上午
*/
public function status()
{
$params = (new SkillValidate())->post()->goCheck('id');
(new SKillLogic())->status($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,133 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\crontab;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\crontab\CrontabLogic;
use app\adminapi\validate\crontab\CrontabValidate;
/**
* 定时任务控制器
* Class CrontabController
* @package app\adminapi\controller\crontab
*/
class CrontabController extends BaseAdminController
{
/**
* @notes 定时任务列表
* @return \think\response\Json
* @author Tab
* @date 2021/8/17 10:48
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 添加定时任务
* @return \think\response\Json
* @author Tab
* @date 2021/8/17 11:44
*/
public function add()
{
$params = (new CrontabValidate())->post()->goCheck('add');
$result = CrontabLogic::add($params);
if($result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(CrontabLogic::getError());
}
/**
* @notes 查看定时任务详情
* @return \think\response\Json
* @author Tab
* @date 2021/8/17 11:54
*/
public function detail()
{
$params = (new CrontabValidate())->goCheck('detail');
$result = CrontabLogic::detail($params);
return $this->data($result);
}
/**
* @notes 编辑定时任务
* @return \think\response\Json
* @author Tab
* @date 2021/8/17 12:00
*/
public function edit()
{
$params = (new CrontabValidate())->post()->goCheck('edit');
$result = CrontabLogic::edit($params);
if($result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(CrontabLogic::getError());
}
/**
* @notes 删除定时任务
* @return \think\response\Json
* @author Tab
* @date 2021/8/17 14:09
*/
public function delete()
{
$params = (new CrontabValidate())->post()->goCheck('delete');
$result = CrontabLogic::delete($params);
if($result) {
return $this->success('删除成功', [], 1, 1);
}
return $this->fail('删除失败');
}
/**
* @notes 操作定时任务
* @return \think\response\Json
* @author Tab
* @date 2021/8/17 15:06
*/
public function operate()
{
$params = (new CrontabValidate())->post()->goCheck('operate');
$result = CrontabLogic::operate($params);
if($result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(CrontabLogic::getError());
}
/**
* @notes 获取规则执行时间
* @return \think\response\Json
* @author Tab
* @date 2021/8/17 15:31
*/
public function expression()
{
$params = (new CrontabValidate())->goCheck('expression');
$result = CrontabLogic::expression($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,47 @@
<?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\decorate;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\decorate\DecorateDataLogic;
/**
* 装修-数据
* Class DataController
* @package app\adminapi\controller\decorate
*/
class DataController extends BaseAdminController
{
/**
* @notes 文章列表
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/9/22 16:50
*/
public function article()
{
$limit = $this->request->get('limit/d', 10);
$result = DecorateDataLogic::getArticleLists($limit);
return $this->success('获取成功', $result);
}
}

View File

@@ -0,0 +1,62 @@
<?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\decorate;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\decorate\DecoratePageLogic;
use app\adminapi\validate\decorate\DecoratePageValidate;
/**
* 装修页面
* Class DecoratePageController
* @package app\adminapi\controller\decorate
*/
class PageController extends BaseAdminController
{
/**
* @notes 获取装修修页面详情
* @return \think\response\Json
* @author 段誉
* @date 2022/9/14 18:43
*/
public function detail()
{
$type = $this->request->get('type/d');
$source = $this->request->get('source/d');
$result = DecoratePageLogic::getDetail($type,$source);
return $this->success('获取成功', $result);
}
/**
* @notes 保存装修配置
* @return \think\response\Json
* @author 段誉
* @date 2022/9/15 9:57
*/
public function save()
{
$params = (new DecoratePageValidate())->post()->goCheck();
$result = DecoratePageLogic::save($params);
if (false === $result) {
return $this->fail(DecoratePageLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,62 @@
<?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\decorate;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\decorate\DecoratePageLogic;
use app\adminapi\logic\decorate\DecorateStyleLogic;
use app\adminapi\validate\decorate\DecorateStyleValidate;
/**
* 装修页面
* Class DecorateStyleController
* @package app\adminapi\controller\decorate
*/
class StyleController extends BaseAdminController
{
/**
* @notes 获取装修修页面详情
* @return \think\response\Json
* @author 段誉
* @date 2022/9/14 18:43
*/
public function detail()
{
$source = $this->request->get('source/d');
$result = DecorateStyleLogic::getDetail($source);
return $this->success('获取成功', $result);
}
/**
* @notes 保存装修配置
* @return \think\response\Json
* @author 段誉
* @date 2022/9/15 9:57
*/
public function save()
{
$params = (new DecorateStyleValidate())->post()->goCheck();
$result = DecorateStyleLogic::save($params);
if (false === $result) {
return $this->fail(DecoratePageLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,59 @@
<?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\decorate;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\decorate\DecorateTabbarLogic;
/**
* 装修-底部导航
* Class DecorateTabbarController
* @package app\adminapi\controller\decorate
*/
class TabbarController extends BaseAdminController
{
/**
* @notes 底部导航详情
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/9/7 16:39
*/
public function detail()
{
$source = $this->request->get('source',1);
$data = DecorateTabbarLogic::detail($source);
return $this->success('', $data);
}
/**
* @notes 底部导航保存
* @return \think\response\Json
* @author 段誉
* @date 2022/9/6 9:58
*/
public function save()
{
$params = $this->request->post();
DecorateTabbarLogic::save($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,118 @@
<?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\dept;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\dept\DeptLogic;
use app\adminapi\validate\dept\DeptValidate;
/**
* 部门管理控制器
* Class DeptController
* @package app\adminapi\controller\dept
*/
class DeptController extends BaseAdminController
{
/**
* @notes 部门列表
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:07
*/
public function lists()
{
$params = $this->request->get();
$result = DeptLogic::lists($params);
return $this->success('',$result);
}
/**
* @notes 上级部门
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/5/26 18:36
*/
public function leaderDept()
{
$result = DeptLogic::leaderDept();
return $this->success('',$result);
}
/**
* @notes 添加部门
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:40
*/
public function add()
{
$params = (new DeptValidate())->post()->goCheck('add');
DeptLogic::add($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑部门
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:41
*/
public function edit()
{
$params = (new DeptValidate())->post()->goCheck('edit');
$result = DeptLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(DeptLogic::getError());
}
/**
* @notes 删除部门
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:41
*/
public function delete()
{
$params = (new DeptValidate())->post()->goCheck('delete');
DeptLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取部门详情
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:41
*/
public function detail()
{
$params = (new DeptValidate())->goCheck('detail');
$result = DeptLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,103 @@
<?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\dept;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\dept\JobsLists;
use app\adminapi\logic\dept\JobsLogic;
use app\adminapi\validate\dept\JobsValidate;
/**
* 岗位管理控制器
* Class JobsController
* @package app\adminapi\controller\dept
*/
class JobsController extends BaseAdminController
{
/**
* @notes 岗位列表
* @return \think\response\Json
* @author 段誉
* @date 2022/5/26 10:00
*/
public function lists()
{
return $this->dataLists(new JobsLists());
}
/**
* @notes 添加岗位
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:40
*/
public function add()
{
$params = (new JobsValidate())->post()->goCheck('add');
JobsLogic::add($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑岗位
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:41
*/
public function edit()
{
$params = (new JobsValidate())->post()->goCheck('edit');
$result = JobsLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(JobsLogic::getError());
}
/**
* @notes 删除岗位
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:41
*/
public function delete()
{
$params = (new JobsValidate())->post()->goCheck('delete');
JobsLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取岗位详情
* @return \think\response\Json
* @author 段誉
* @date 2022/5/25 18:41
*/
public function detail()
{
$params = (new JobsValidate())->goCheck('detail');
$result = JobsLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,58 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\AccountLogLists;
use app\common\enum\accountLog\AccountLogEnum;
use app\common\enum\accountLog\CoachAccountLogEnum;
class AccountLogController extends BaseAdminController
{
/**
* @notes 账户流水记录列表
* @return \think\response\Json
* @author ljj
* @date 2022/12/2 5:30 下午
*/
public function lists()
{
return $this->dataLists(new AccountLogLists());
}
/**
* @notes 变动类型列表
* @return array|\think\response\Json
* @author ljj
* @date 2022/5/31 5:06 下午
*/
public function changeTypeLists()
{
$params = $this->request->get('change_object',AccountLogEnum::MONEY);
if ($params == AccountLogEnum::MONEY) {
return $this->data(AccountLogEnum::getChangeTypeDesc(true,true));
}
// if ($params == AccountLogEnum::DEPOSIT) {
// return $this->data(AccountLogEnum::getDepositTypeDesc());
// }
return [];
}
}

View File

@@ -0,0 +1,38 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\finance\CenterLogic;
class CenterController extends BaseAdminController
{
/**
* @notes 财务中心
* @return \think\response\Json
* @author ljj
* @date 2022/9/9 6:27 下午
*/
public function center()
{
$result = (new CenterLogic())->center();
return $this->success('',$result);
}
}

View File

@@ -0,0 +1,60 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\AccountLogLists;
use app\adminapi\lists\finance\CoachAccountLogLists;
use app\common\enum\accountLog\AccountLogEnum;
use app\common\enum\accountLog\CoachAccountLogEnum;
class CoachAccountLogController extends BaseAdminController
{
/**
* @notes 账户流水记录列表
* @return \think\response\Json
* @author ljj
* @date 2022/12/2 5:30 下午
*/
public function lists()
{
return $this->dataLists(new CoachAccountLogLists());
}
/**
* @notes 变动类型列表
* @return array|\think\response\Json
* @author ljj
* @date 2022/5/31 5:06 下午
*/
public function changeTypeLists()
{
$params = $this->request->get('type',CoachAccountLogEnum::MONEY);
if ($params == CoachAccountLogEnum::MONEY) {
return $this->data(CoachAccountLogEnum::getCommissionTypeDesc());
}
if ($params == CoachAccountLogEnum::DEPOSIT) {
return $this->data(CoachAccountLogEnum::getDepositTypeDesc());
}
return [];
}
}

View File

@@ -0,0 +1,37 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\RechargeLists;
class RechargeController extends BaseAdminController
{
/**
* @notes 充值明细列表
* @return \think\response\Json
* @author ljj
* @date 2022/12/2 6:29 下午
*/
public function lists()
{
return $this->dataLists(new RechargeLists());
}
}

View File

@@ -0,0 +1,61 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\AccountLogLists;
use app\adminapi\lists\finance\CoachAccountLogLists;
use app\adminapi\lists\finance\ShopAccountLogLists;
use app\common\enum\accountLog\AccountLogEnum;
use app\common\enum\accountLog\ShopAccountLogEnum;
class ShopAccountLogController extends BaseAdminController
{
/**
* @notes 账户流水记录列表
* @return \think\response\Json
* @author ljj
* @date 2022/12/2 5:30 下午
*/
public function lists()
{
return $this->dataLists(new ShopAccountLogLists());
}
/**
* @notes 变动类型列表
* @return array|\think\response\Json
* @author ljj
* @date 2022/5/31 5:06 下午
*/
public function changeTypeLists()
{
$params = $this->request->get('type',ShopAccountLogEnum::MONEY);
if ($params == ShopAccountLogEnum::MONEY) {
return $this->data(ShopAccountLogEnum::getCommissionTypeDesc());
}
if ($params == ShopAccountLogEnum::DEPOSIT) {
return $this->data(ShopAccountLogEnum::getDepositTypeDesc());
}
return [];
}
}

View File

@@ -0,0 +1,66 @@
<?php
namespace app\adminapi\controller\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\WithdrawLists;
use app\adminapi\logic\finance\WithdrawLogic;
/**
* 提现控制器类
* Class WithdrawController
* @package app\adminapi\controller\finance
*/
class WithdrawController extends BaseAdminController
{
public function lists(){
return $this->dataLists(new WithdrawLists());
}
/**
* @notes 详情
* @return \think\response\Json
* @author cjhao
* @date 2024/10/31 16:27
*/
public function detail()
{
$id = $this->request->get('id');
$detail = (new WithdrawLogic())->detail($id);
return $this->success('',$detail);
}
/**
* @notes 审核
* @return \think\response\Json
* @author cjhao
* @date 2024/10/31 16:35
*/
public function audit()
{
$params = $this->request->post();
$result = (new WithdrawLogic())->audit($params);
if(true === $result){
return $this->success('操作成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 转账
* @return \think\response\Json
* @author cjhao
* @date 2024/10/31 17:46
*/
public function transfer()
{
$params = $this->request->post();
$result = (new WithdrawLogic())->transfer($params);
if(true === $result){
return $this->success('操作成功',[],1,1);
}
return $this->fail($result);
}
}

View File

@@ -0,0 +1,126 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\goods;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\goods\GoodsCategoryLists;
use app\adminapi\logic\goods\GoodsCategoryLogic;
use app\adminapi\validate\goods\GoodsCategoryValidate;
class GoodsCategoryController extends BaseAdminController
{
/**
* @notes 查看服务分类列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 3:52 下午
*/
public function lists()
{
return $this->dataLists(new GoodsCategoryLists());
}
/**
* @notes 通用分类列表
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/8 6:10 下午
*/
public function commonLists()
{
$is_son = $this->request->get('is_son',0);
$result = (new GoodsCategoryLogic())->commonLists($is_son);
return $this->success('获取成功',$result);
}
/**
* @notes 添加服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:03 下午
*/
public function add()
{
$params = (new GoodsCategoryValidate())->post()->goCheck('add');
(new GoodsCategoryLogic())->add($params);
return $this->success('操作成功', [],1,1);
}
/**
* @notes 查看服务分类详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:21 下午
*/
public function detail()
{
$params = (new GoodsCategoryValidate())->get()->goCheck('detail');
$result = (new GoodsCategoryLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:26 下午
*/
public function edit()
{
$params = (new GoodsCategoryValidate())->post()->goCheck('edit');
(new GoodsCategoryLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:34 下午
*/
public function del()
{
$params = (new GoodsCategoryValidate())->post()->goCheck('del');
(new GoodsCategoryLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 修改服务分类状态
* @return \think\response\Json
* @author ljj
* @date 2022/2/10 10:57 上午
*/
public function status()
{
$params = (new GoodsCategoryValidate())->post()->goCheck('status');
(new GoodsCategoryLogic())->status($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,80 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\goods;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\goods\GoodsCommentLists;
use app\adminapi\logic\goods\GoodsCommentLogic;
use app\adminapi\validate\goods\GoodsCommentValidate;
class GoodsCommentController extends BaseAdminController
{
/**
* @notes 查看服务评价列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 6:44 下午
*/
public function lists()
{
return $this->dataLists(new GoodsCommentLists());
}
/**
* @notes 服务评价回复
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 7:03 下午
*/
public function reply()
{
$params = (new GoodsCommentValidate())->post()->goCheck('reply');
(new GoodsCommentLogic())->reply($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 回复详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/10 9:40 上午
*/
public function detail()
{
$params = (new GoodsCommentValidate())->get()->goCheck('detail');
$result = (new GoodsCommentLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 删除服务评价
* @return \think\response\Json
* @author ljj
* @date 2022/2/10 9:42 上午
*/
public function del()
{
$params = (new GoodsCommentValidate())->post()->goCheck('del');
(new GoodsCommentLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,157 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\goods;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\goods\GoodsLists;
use app\adminapi\logic\goods\GoodsLogic;
use app\adminapi\validate\goods\GoodsValidate;
class GoodsController extends BaseAdminController
{
/**
* @notes 分类列表
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author cjhao
* @date 2024/8/19 15:55
*/
public function categoryLists()
{
$lists = (new GoodsLogic())->categoryLists();
return $this->success('',$lists);
}
/**
* @notes 城市列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/19 15:55
*/
public function cityLists()
{
$lists = (new GoodsLogic())->cityLists();
return $this->success('',$lists);
}
/**
* @notes 技能列表
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author cjhao
* @date 2024/8/19 16:12
*/
public function skillLists()
{
$lists = (new GoodsLogic())->skillLists();
return $this->success('',$lists);
}
/**
* @notes 查看服务列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 11:39 上午
*/
public function lists()
{
return $this->dataLists(new GoodsLists());
}
/**
* @notes 添加服务
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 3:29 下午
*/
public function add()
{
$params = (new GoodsValidate())->post()->goCheck('add');
$result = (new GoodsLogic())->add($params);
if (true !== $result) {
return $this->fail($result);
}
return $this->success('操作成功',[],1,1);
}
/**
* @notes 查看服务详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 3:52 下午
*/
public function detail()
{
$params = (new GoodsValidate())->get()->goCheck('detail');
$result = (new GoodsLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑服务
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 4:06 下午
*/
public function edit()
{
$params = (new GoodsValidate())->post()->goCheck('edit');
$result = (new GoodsLogic())->edit($params);
if (true !== $result) {
return $this->fail($result);
}
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除服务
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 4:13 下午
*/
public function del()
{
$params = (new GoodsValidate())->post()->goCheck('del');
$result = (new GoodsLogic())->del($params['ids']);
if (true !== $result) {
return $this->fail($result);
}
return $this->success('操作成功',[],1,1);
}
/**
* @notes 修改服务状态
* @return \think\response\Json
* @author ljj
* @date 2022/2/9 4:55 下午
*/
public function status()
{
$params = (new GoodsValidate())->post()->goCheck('status');
(new GoodsLogic)->status($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,54 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\marketing;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\marketing\RechargeLogic;
use app\adminapi\validate\marketing\RechargeValidate;
class RechargeController extends BaseAdminController
{
/**
* @notes 设置充值设置
* @return \think\response\Json
* @author ljj
* @date 2022/11/17 4:43 下午
*/
public function setSettings()
{
$params = (new RechargeValidate())->post()->goCheck('setSettings');
(new RechargeLogic())->setSettings($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 获取充值设置
* @return \think\response\Json
* @author ljj
* @date 2022/11/17 4:46 下午
*/
public function getSettings()
{
$result = (new RechargeLogic())->getSettings();
return $this->success('',$result);
}
}

View File

@@ -0,0 +1,70 @@
<?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\notice;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\notice\NoticeSettingLists;
use app\adminapi\logic\notice\NoticeLogic;
use app\adminapi\validate\notice\NoticeValidate;
/**
* 通知控制器
* Class NoticeController
* @package app\adminapi\controller\notice
*/
class NoticeController extends BaseAdminController
{
/**
* @notes 查看通知设置列表
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:18
*/
public function settingLists()
{
return $this->dataLists(new NoticeSettingLists());
}
/**
* @notes 查看通知设置详情
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:18
*/
public function detail()
{
$params = (new NoticeValidate())->goCheck('detail');
$result = NoticeLogic::detail($params);
return $this->data($result);
}
/**
* @notes 通知设置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:18
*/
public function set()
{
$params = $this->request->post();
$result = NoticeLogic::set($params);
if ($result) {
return $this->success('设置成功',[],1,1);
}
return $this->fail(NoticeLogic::getError());
}
}

View File

@@ -0,0 +1,69 @@
<?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\notice;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\notice\SmsConfigLogic;
use app\adminapi\validate\notice\SmsConfigValidate;
/**
* 短信配置控制器
* Class SmsConfigController
* @package app\adminapi\controller\notice
*/
class SmsConfigController extends BaseAdminController
{
/**
* @notes 获取短信配置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:36
*/
public function getConfig()
{
$result = SmsConfigLogic::getConfig();
return $this->data($result);
}
/**
* @notes 短信配置
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:36
*/
public function setConfig()
{
$params = (new SmsConfigValidate())->post()->goCheck('setConfig');
SmsConfigLogic::setConfig($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 查看短信配置详情
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 11:36
*/
public function detail()
{
$params = (new SmsConfigValidate())->goCheck('detail');
$result = SmsConfigLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,315 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\order;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\order\OrderLists;
use app\adminapi\logic\order\OrderLogic;
use app\adminapi\validate\order\OrderValidate;
use app\common\service\generator\core\ValidateGenerator;
class OrderController extends BaseAdminController
{
/**
* @notes 查看订单列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 11:39 上午
*/
public function lists()
{
return $this->dataLists(new OrderLists());
}
/**
* @notes 订单详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 3:01 下午
*/
public function detail()
{
$params = (new OrderValidate())->get()->goCheck('detail');
$result = (new OrderLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 子订单列表
* @return \think\response\Json
* @author cjhao
* @date 2024/11/4 18:33
*/
public function subOrderLists()
{
$params = (new OrderValidate())->get()->goCheck('detail');
$result = (new OrderLogic())->subOrderLists($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 获取订单退款信息
* @return \think\response\Json
* @author cjhao
* @date 2024/11/21 11:38
*/
public function getRefundInfo()
{
$params = $this->request->post();
$result = (new OrderLogic())->getRefundInfo($params);
if(is_array($result)){
return $this->success('获取成功',$result);
}
return $this->fail($result);
}
/**
* @notes 取消订单
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 4:10 下午
*/
public function cancel()
{
$params = (new OrderValidate())->post()->goCheck('cancel');
$params['admin_id'] = $this->adminId;
$result = (new OrderLogic())->cancel($params);
if (true !== $result) {
return $this->fail($result);
}
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除订单
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 4:27 下午
*/
public function del()
{
$params = (new OrderValidate())->post()->goCheck('del');
(new OrderLogic())->del($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 商家备注
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 4:48 下午
*/
public function remark()
{
$params = (new OrderValidate())->post()->goCheck('remark');
(new OrderLogic())->remark($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 商家备注详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 4:56 下午
*/
public function remarkDetail()
{
$params = (new OrderValidate())->get()->goCheck('remarkDetail');
$result = (new OrderLogic())->remarkDetail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 核销订单
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 5:03 下午
*/
public function verification()
{
$params = (new OrderValidate())->post()->goCheck('verification');
$params['admin_id'] = $this->adminId;
$result = (new OrderLogic())->verification($params);
if (true !== $result) {
return $this->fail($result);
}
return $this->success('操作成功',[],1,1);
}
/**
* @notes 接单操作
* @return \think\response\Json
* @author cjhao
* @date 2024/9/13 17:23
*/
public function take()
{
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->take($params);
if (true === $result) {
return $this->success('接单成功', [], 1, 1);
}
return $this->fail(OrderLogic::getError());
}
/**
* @notes 出发操作
* @return \think\response\Json
* @author cjhao
* @date 2024/9/13 17:24
*/
public function depart()
{
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->depart($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OrderLogic::getError());
}
/**
* @notes 达到操作
* @return \think\response\Json
* @author cjhao
* @date 2024/9/13 17:24
*/
public function arrive()
{
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->arrive($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OrderLogic::getError());
}
/**
* @notes 服务开始
* @return \think\response\Json
* @author cjhao
* @date 2024/9/14 14:47
*/
public function startServer()
{
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->startServer($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OrderLogic::getError());
}
/**
* @notes 服务完成
* @return \think\response\Json
* @author cjhao
* @date 2024/9/14 14:53
*/
public function finishServer()
{
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->finishServer($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OrderLogic::getError());
}
/**
* @notes 订单退款
* @return \think\response\Json
* @author cjhao
* @date 2024/9/27 23:55
*/
public function refund()
{
$params = $this->request->post();
$params['admin_id'] = $this->adminId;
// $params = (new OrderValidate())->post()->goCheck('cancel',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->refund($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OrderLogic::getError());
}
/**
* @notes 技师列表
* @return \think\response\Json
* @author cjhao
* @date 2024/9/29 10:25
*/
public function coachLists()
{
$params = (new OrderValidate())->get()->goCheck('selectCoach',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->coachLists($params);
if (false !== $result) {
return $this->success('', $result);
}
return $this->fail(OrderLogic::getError());
}
/**
* @notes 指派技师
* @return \think\response\Json
* @author cjhao
* @date 2024/10/10 23:05
*/
public function dispatchCoach()
{
$params = (new OrderValidate())->post()->goCheck('dispatchCoach',['admin_id'=>$this->adminId]);
$result = (new OrderLogic())->dispatchCoach($params);
if (false !== $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OrderLogic::getError());
}
// public function
/**
* @notes 获取订单的结算状态
* @return \think\response\Json
* @author cjhao
* @date 2025/4/18 16:26
*/
public function getOrderSettle()
{
$params = (new OrderValidate())->get()->goCheck('settle');
$result = (new OrderLogic())->getOrderSettle($params);
return $this->success('', $result);
}
}

View File

@@ -0,0 +1,69 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\order;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\order\OrderRefundLists;
use app\adminapi\lists\order\OrderRefundLogLists;
use app\adminapi\logic\order\OrderRefundLogic;
use app\adminapi\validate\order\OrderRefundValidate;
class OrderRefundController extends BaseAdminController
{
/**
* @notes 订单退款列表
* @return \think\response\Json
* @author ljj
* @date 2022/9/9 4:53 下午
*/
public function lists()
{
return $this->dataLists(new OrderRefundLists());
}
/**
* @notes 退款日志列表
* @return \think\response\Json
* @author ljj
* @date 2022/9/9 5:53 下午
*/
public function logLists()
{
return $this->dataLists(new OrderRefundLogLists());
}
/**
* @notes 重新退款
* @return \think\response\Json
* @author ljj
* @date 2022/9/9 6:19 下午
*/
public function reRefund()
{
$params = (new OrderRefundValidate())->post()->goCheck('reRefund');
$params['admin_id'] = $this->adminId;
$result = (new OrderRefundLogic())->reRefund($params);
if (true !== $result) {
return $this->fail($result);
}
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,130 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\order;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\order\OrderTimeLists;
use app\adminapi\logic\order\OrderTimeLogic;
use app\adminapi\validate\order\OrderTimeValidate;
class OrderTimeController extends BaseAdminController
{
/**
* @notes 查看预约时间段列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 5:55 下午
*/
public function lists()
{
return $this->dataLists(new OrderTimeLists());
}
/**
* @notes 设置可预约天数
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 6:08 下午
*/
public function setTime()
{
$params = (new OrderTimeValidate())->post()->goCheck('setTime');
(new OrderTimeLogic())->setTime($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 获取可预约天数
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 6:13 下午
*/
public function getTime()
{
$result = (new OrderTimeLogic())->getTime();
return $this->success('获取成功',$result);
}
/**
* @notes 添加预约时间段
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 6:25 下午
*/
public function add()
{
$params = (new OrderTimeValidate())->post()->goCheck('add');
(new OrderTimeLogic())->add($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 查看时间段详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 6:40 下午
*/
public function detail()
{
$params = (new OrderTimeValidate())->get()->goCheck('detail');
$result = (new OrderTimeLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑时间段
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 6:41 下午
*/
public function edit()
{
$params = (new OrderTimeValidate())->post()->goCheck('edit');
(new OrderTimeLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除时间段
* @return \think\response\Json
* @author ljj
* @date 2022/2/11 6:45 下午
*/
public function del()
{
$params = (new OrderTimeValidate())->post()->goCheck('del');
(new OrderTimeLogic())->del($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 修改排序
* @return \think\response\Json
* @author ljj
* @date 2022/11/28 18:20
*/
public function sort()
{
$params = (new OrderTimeValidate())->post()->goCheck('sort');
(new OrderTimeLogic())->sort($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,56 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\AdminLogic;
use app\adminapi\validate\setting\AdminValidate;
class AdminController extends BaseAdminController
{
/**
* @notes 获取个人资料
* @return \think\response\Json
* @author ljj
* @date 2022/4/18 2:36 下午
*/
public function getAdmin()
{
$result = AdminLogic::getAdmin($this->adminId);
return $this->data($result);
}
/**
* @notes 设置个人资料
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/4/18 2:58 下午
*/
public function setAdmin()
{
$params = (new AdminValidate())->post()->goCheck('setAdmin',['admin_id'=>$this->adminId]);
AdminLogic::setAdmin($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,42 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\BaseLogic;
/**
* 获取基础配置
* Class BaseController
* @package app\adminapi\controller\setting
*/
class BaseController extends BaseAdminController
{
/**
* @notes 获取基础配置
* @return \think\response\Json
* @author cjhao
* @date 2024/11/1 13:20
*/
public function getConfig()
{
$data = (new BaseLogic())->getConfig();
return $this->success('',$data);
}
/**
* @notes 设置配置
* @return \think\response\Json
* @author cjhao
* @date 2024/11/1 13:21
*/
public function setConfig()
{
$params = $this->request->post();
(new BaseLogic())->setConfig($params);
return $this->success('设置成功',[],1,1);
}
}

View File

@@ -0,0 +1,124 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\CityLogic;
use app\adminapi\validate\setting\CityValidate;
/**
* 城市设置控制器类
* Class CityController
* @package app\adminapi\controller\setting
*/
class CityController extends BaseAdminController
{
/**
* @notes 查看服务分类列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 3:52 下午
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 获取省市城市列表
* @return \think\response\Json
* @author cjhao
* @date 2024/10/6 16:51
*/
public function getCityLists()
{
$result = (new CityLogic())->getCityLists();
return $this->success('',$result);
}
/**
* @notes 获取省市区城市列表
* @return \think\response\Json
* @author cjhao
* @date 2024/10/6 16:51
*/
public function getRegionLists()
{
$result = (new CityLogic())->getRegionLists();
return $this->success('',$result);
}
/**
* @notes 添加服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:03 下午
*/
public function add()
{
$params = (new CityValidate())->post()->goCheck('add');
(new CityLogic())->add($params);
return $this->success('操作成功', [],1,1);
}
/**
* @notes 查看服务分类详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:21 下午
*/
public function detail()
{
$params = (new CityValidate())->get()->goCheck('id');
$result = (new CityLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:26 下午
*/
public function edit()
{
$params = (new CityValidate())->post()->goCheck();
(new CityLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:34 下午
*/
public function del()
{
$params = (new CityValidate())->post()->goCheck('id');
(new CityLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,52 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\CustomerServiceLogic;
class CustomerServiceController extends BaseAdminController
{
/**
* @notes 获取客服设置
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 12:05 下午
*/
public function getConfig()
{
$result = CustomerServiceLogic::getConfig();
return $this->data($result);
}
/**
* @notes 设置客服设置
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 12:11 下午
*/
public function setConfig()
{
$params = $this->request->post();
CustomerServiceLogic::setConfig($params);
return $this->success('设置成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,56 @@
<?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\logic\setting\HotSearchLogic;
/**
* 热门搜索设置
* Class HotSearchController
* @package app\adminapi\controller\setting
*/
class HotSearchController extends BaseAdminController
{
/**
* @notes 获取热门搜索
* @return \think\response\Json
* @author 段誉
* @date 2022/9/5 19:00
*/
public function getConfig()
{
$result = HotSearchLogic::getConfig();
return $this->data($result);
}
/**
* @notes 设置热门搜索
* @return \think\response\Json
* @author 段誉
* @date 2022/9/5 19:00
*/
public function setConfig()
{
$params = $this->request->post();
$result = HotSearchLogic::setConfig($params);
if (false === $result) {
return $this->fail(HotSearchLogic::getError() ?: '系统错误');
}
return $this->success('设置成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,107 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\MapKeyLists;
use app\adminapi\logic\setting\MapKeyLogic;
use app\adminapi\validate\setting\MapKeyValidate;
class MapKeyController extends BaseAdminController
{
/**
* @notes 地图key列表
* @return \think\response\Json
* @author ljj
* @date 2024/11/5 下午1:55
*/
public function lists()
{
return $this->dataLists(new MapKeyLists());
}
/**
* @notes 公共列表
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2024/11/5 下午1:57
*/
public function commonLists()
{
$result = (new MapKeyLogic())->commonLists();
return $this->success('获取成功',$result);
}
/**
* @notes 新增key
* @return \think\response\Json
* @author ljj
* @date 2024/11/5 下午2:05
*/
public function add()
{
$params = (new MapKeyValidate())->post()->goCheck('add');
(new MapKeyLogic())->add($params);
return $this->success('操作成功', [],1,1);
}
/**
* @notes 详情
* @return \think\response\Json
* @author ljj
* @date 2024/11/5 下午2:07
*/
public function detail()
{
$params = (new MapKeyValidate())->get()->goCheck('detail');
$result = (new MapKeyLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑
* @return \think\response\Json
* @author ljj
* @date 2024/11/5 下午2:21
*/
public function edit()
{
$params = (new MapKeyValidate())->post()->goCheck('edit');
(new MapKeyLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除
* @return \think\response\Json
* @author ljj
* @date 2024/11/5 下午2:21
*/
public function del()
{
$params = (new MapKeyValidate())->post()->goCheck('del');
(new MapKeyLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,86 @@
<?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\logic\setting\StorageLogic;
use app\adminapi\validate\setting\StorageValidate;
use think\response\Json;
/**
* 存储设置控制器
* Class StorageController
* @package app\adminapi\controller\settings\shop
*/
class StorageController extends BaseAdminController
{
/**
* @notes 获取存储引擎列表
* @return Json
* @author 段誉
* @date 2022/4/20 16:13
*/
public function lists()
{
return $this->success('获取成功', StorageLogic::lists());
}
/**
* @notes 存储配置信息
* @return Json
* @author 段誉
* @date 2022/4/20 16:19
*/
public function detail()
{
$param = (new StorageValidate())->get()->goCheck('detail');
return $this->success('获取成功', StorageLogic::detail($param));
}
/**
* @notes 设置存储参数
* @return Json
* @author 段誉
* @date 2022/4/20 16:19
*/
public function setup()
{
$params = (new StorageValidate())->post()->goCheck('setup');
$result = StorageLogic::setup($params);
if (true === $result) {
return $this->success('配置成功', [], 1, 1);
}
return $this->success($result, [], 1, 1);
}
/**
* @notes 切换存储引擎
* @return Json
* @author 段誉
* @date 2022/4/20 16:19
*/
public function change()
{
$params = (new StorageValidate())->post()->goCheck('change');
StorageLogic::change($params);
return $this->success('切换成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\TextLogic;
use app\adminapi\validate\setting\TextValidate;
class TextController extends BaseAdminController
{
/**
* @notes 列表
* @return \think\response\Json
* @author cjhao
* @date 2024/11/1 10:17
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 添加
* @return \think\response\Json
* @author cjhao
* @date 2024/11/1 10:17
*/
public function add()
{
$params = (new TextValidate())->post()->goCheck('add');
(new TextLogic())->add($params);
return $this->success('添加成功',[],1,1);
}
/**
* @notes 编辑
* @return \think\response\Json
* @author cjhao
* @date 2024/11/1 10:19
*/
public function edit()
{
$params = (new TextValidate())->post()->goCheck();
(new TextLogic())->edit($params);
return $this->success('编辑成功',[],1,1);
}
/**
* @notes 删除
* @return \think\response\Json
* @author cjhao
* @date 2024/11/1 10:21
*/
public function del()
{
$params = (new TextValidate())->post()->goCheck('id');
$result = (new TextLogic())->del($params['id']);
if(true === $result){
return $this->success('删除成功',[],1,1);
}
return $this->fail($result);
}
}

View File

@@ -0,0 +1,53 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\TransactionSettingsLogic;
use app\adminapi\validate\setting\TransactionSettingsValidate;
class TransactionSettingsController extends BaseAdminController
{
/**
* @notes 获取交易设置
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 11:40 上午
*/
public function getConfig()
{
$result = TransactionSettingsLogic::getConfig();
return $this->data($result);
}
/**
* @notes 设置交易设置
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 11:50 上午
*/
public function setConfig()
{
$params = (new TransactionSettingsValidate())->post()->goCheck('setConfig');
TransactionSettingsLogic::setConfig($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,99 @@
<?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\dict;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\dict\DictDataLists;
use app\adminapi\logic\setting\dict\DictDataLogic;
use app\adminapi\validate\dict\DictDataValidate;
/**
* 字典数据
* Class DictDataController
* @package app\adminapi\controller\dictionary
*/
class DictDataController extends BaseAdminController
{
/**
* @notes 获取字典数据列表
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:35
*/
public function lists()
{
return $this->dataLists(new DictDataLists());
}
/**
* @notes 添加字典数据
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 17:13
*/
public function add()
{
$params = (new DictDataValidate())->post()->goCheck('add');
DictDataLogic::save($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑字典数据
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 17:13
*/
public function edit()
{
$params = (new DictDataValidate())->post()->goCheck('edit');
DictDataLogic::save($params);
return $this->success('编辑成功', [], 1, 1);
}
/**
* @notes 删除字典数据
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 17:13
*/
public function delete()
{
$params = (new DictDataValidate())->post()->goCheck('id');
DictDataLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取字典详情
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 17:14
*/
public function detail()
{
$params = (new DictDataValidate())->goCheck('id');
$result = DictDataLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,99 @@
<?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\dict;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\dict\DictTypeLists;
use app\adminapi\logic\setting\dict\DictTypeLogic;
use app\adminapi\validate\dict\DictTypeValidate;
/**
* 字典类型
* Class DictTypeController
* @package app\adminapi\controller\dict
*/
class DictTypeController extends BaseAdminController
{
/**
* @notes 获取字典类型列表
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 15:50
*/
public function lists()
{
return $this->dataLists(new DictTypeLists());
}
/**
* @notes 添加字典类型
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:24
*/
public function add()
{
$params = (new DictTypeValidate())->post()->goCheck('add');
DictTypeLogic::add($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑字典类型
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:25
*/
public function edit()
{
$params = (new DictTypeValidate())->post()->goCheck('edit');
DictTypeLogic::edit($params);
return $this->success('编辑成功', [], 1, 1);
}
/**
* @notes 删除字典类型
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:25
*/
public function delete()
{
$params = (new DictTypeValidate())->post()->goCheck('delete');
DictTypeLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取字典详情
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:25
*/
public function detail()
{
$params = (new DictTypeValidate())->goCheck('detail');
$result = DictTypeLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,72 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\pay;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\pay\PayConfigLogic;
use app\adminapi\validate\setting\PayConfigValidate;
class PayConfigController extends BaseAdminController
{
/**
* @notes 查看支付配置列表
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/15 6:03 下午
*/
public function lists()
{
$result = (new PayConfigLogic())->lists();
return $this->success('获取成功',$result);
}
/**
* @notes 编辑支付配置
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/15 6:13 下午
*/
public function edit()
{
$params = (new PayConfigValidate())->post()->goCheck('edit');
(new PayConfigLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 支付配置详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 6:28 下午
*/
public function detail()
{
$id = $this->request->get('id');
$result = (new PayConfigLogic())->detail($id);
return $this->success('获取成功',$result);
}
}

View File

@@ -0,0 +1,59 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\pay;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\pay\PayWayLogic;
class PayWayController extends BaseAdminController
{
/**
* @notes 获取支付方式
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/15 6:52 下午
*/
public function getPayWay()
{
$result = (new PayWayLogic())->getPayWay();
return $this->success('获取成功',$result);
}
/**
* @notes 设置支付方式
* @return \think\response\Json
* @throws \Exception
* @author ljj
* @date 2022/2/15 7:02 下午
*/
public function setPayWay()
{
$params = $this->request->post();
$result = (new PayWayLogic())->setPayWay($params);
if (true !== $result) {
return $this->fail($result);
}
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,39 @@
<?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\system;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\system\CacheLogic;
/**
* 系统缓存
* Class CacheController
* @package app\adminapi\controller\settings\system
*/
class CacheController extends BaseAdminController
{
/**
* @notes 清除系统缓存
* @return \think\response\Json
* @author 段誉
* @date 2022/4/8 16:34
*/
public function clear()
{
CacheLogic::clear();
return $this->success('清除成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,38 @@
<?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\system;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\system\LogLists;
/**
* 系统日志
* Class LogController
* @package app\adminapi\controller\setting\system
*/
class LogController extends BaseAdminController
{
/**
* @notes 查看系统日志列表
* @return \think\response\Json
* @author ljj
* @date 2021/8/3 4:25 下午
*/
public function lists()
{
return $this->dataLists(new LogLists());
}
}

View File

@@ -0,0 +1,70 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\system;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\system\SystemLogic;
/**
* 系统维护
* Class SystemController
* @package app\adminapi\controller\setting\system
*/
class SystemController extends BaseAdminController
{
/**
* @notes 获取系统环境信息
* @return \think\response\Json
* @author 段誉
* @date 2021/12/28 18:36
*/
public function info()
{
$result = SystemLogic::getInfo();
return $this->data($result);
}
/**
* @notes 通用设置
* @return \think\response\Json
* @author cjhao
* @date 2024/8/27 16:32
*/
public function getGeneralSetting()
{
$result = SystemLogic::getGeneralSetting();
return $this->data($result);
}
/**
* @notes 通用设置
* @return \think\response\Json
* @author cjhao
* @date 2024/8/27 16:32
*/
public function setGeneralSetting()
{
$params = $this->request->post();
SystemLogic::setGeneralSetting($params);
return $this->success('设置成功',[],1,1);
}
}

View File

@@ -0,0 +1,85 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\system;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\system\UpgradeLists;
use app\adminapi\logic\setting\system\UpgradeLogic;
use app\adminapi\validate\setting\upgrade\downloadPkgValidate;
use app\adminapi\validate\setting\upgrade\UpgradeValidate;
/**
* 系统更新
* Class UpgradeController
* @package app\adminapi\controller\settings\system
*/
class UpgradeController extends BaseAdminController
{
/**
* @notes 查看系统更新列表
* @return \think\response\Json
* @author 段誉
* @date 2021/8/14 17:17
*/
public function lists()
{
return $this->dataLists(new UpgradeLists());
}
/**
* @notes 执行系统更新
* @return \think\response\Json
* @author 段誉
* @date 2021/8/14 16:51
*/
public function upgrade()
{
$params = (new UpgradeValidate())->post()->goCheck();
$params['update_type'] = 1;//一键更新类型
if (true === UpgradeLogic::upgrade($params)) {
return $this->success('更新成功', [], 1, 1);
}
return $this->fail('更新失败:'. UpgradeLogic::getError());
}
/**
* @notes 下载更新包
* @return \think\response\Json
* @author 段誉
* @date 2021/10/8 14:23
*/
public function downloadPkg()
{
$params = (new downloadPkgValidate())->post()->goCheck();
$result = UpgradeLogic::getPkgLine($params);
if (false === $result) {
return $this->fail(UpgradeLogic::getError());
}
return $this->success('', $result);
}
}

View File

@@ -0,0 +1,111 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\user;
use app\adminapi\{
controller\BaseAdminController,
logic\setting\user\UserLogic,
validate\setting\UserConfigValidate
};
/**
* 设置-用户设置控制器
* Class UserController
* @package app\adminapi\controller\config
*/
class UserController extends BaseAdminController
{
/**
* @notes 获取用户设置
* @return \think\response\Json
* @author cjhao
* @date 2021/7/27 17:29
*/
public function getConfig()
{
$result = (new UserLogic())->getConfig();
return $this->data($result);
}
/**
* @notes 设置用户设置
* @return \think\response\Json
* @author cjhao
* @date 2021/7/27 17:59
*/
public function setConfig()
{
$params = (new UserConfigValidate())->post()->goCheck('user');
(new UserLogic())->setConfig($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 获取注册配置
* @return \think\response\Json
* @author cjhao
* @date 2021/9/14 17:11
*/
public function getRegisterConfig()
{
$result = (new UserLogic())->getRegisterConfig();
return $this->data($result);
}
/**
* @notes 设置注册配置
* @return \think\response\Json
* @author cjhao
* @date 2021/9/14 17:29
*/
public function setRegisterConfig()
{
$params = (new UserConfigValidate())->post()->goCheck('register');
(new UserLogic())->setRegisterConfig($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 获取提现配置
* @return \think\response\Json
* @author cjhao
* @date 2024/8/27 17:56
*/
public function getWithdrawConfig()
{
$result = (new UserLogic())->getWithdrawConfig();
return $this->data($result);
}
/**
* @notes 设置提现配置
* @return \think\response\Json
* @author cjhao
* @date 2024/8/27 17:56
*/
public function setWithdrawConfig()
{
$params = $this->request->post();
(new UserLogic())->setWithdrawConfig($params);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,143 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\web;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\web\WebSettingLogic;
use app\adminapi\validate\setting\WebSettingValidate;
/**
* 网站设置
* Class WebSettingController
* @package app\adminapi\controller\setting
*/
class WebSettingController extends BaseAdminController
{
/**
* @notes 获取网站信息
* @return \think\response\Json
* @author 段誉
* @date 2021/12/28 15:44
*/
public function getWebsite()
{
$result = WebSettingLogic::getWebsiteInfo();
return $this->data($result);
}
/**
* @notes 设置网站信息
* @return \think\response\Json
* @author 段誉
* @date 2021/12/28 15:45
*/
public function setWebsite()
{
$params = (new WebSettingValidate())->post()->goCheck('website');
WebSettingLogic::setWebsiteInfo($params);
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 获取备案信息
* @return \think\response\Json
* @author 段誉
* @date 2021/12/28 16:10
*/
public function getCopyright()
{
$result = WebSettingLogic::getCopyright();
return $this->data($result);
}
/**
* @notes 设置备案信息
* @return \think\response\Json
* @author 段誉
* @date 2021/12/28 16:10
*/
public function setCopyright()
{
$params = $this->request->post();
$result = WebSettingLogic::setCopyright($params);
if (false === $result) {
return $this->fail(WebSettingLogic::getError() ?: '操作失败');
}
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 设置政策协议
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 11:00 上午
*/
public function setAgreement()
{
$params = $this->request->post();
WebSettingLogic::setAgreement($params);
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 获取政策协议
* @return \think\response\Json
* @author ljj
* @date 2022/2/15 11:16 上午
*/
public function getAgreement()
{
$result = WebSettingLogic::getAgreement();
return $this->data($result);
}
/**
* @notes 设置地图钥匙
* @return \think\response\Json
* @author ljj
* @date 2022/3/10 5:12 下午
*/
public function setMapKey()
{
$params = $this->request->post();
WebSettingLogic::setMapKey($params);
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 获取地图钥匙
* @return \think\response\Json
* @author ljj
* @date 2022/3/10 5:12 下午
*/
public function getMapKey()
{
$result = WebSettingLogic::getMapKey();
return $this->data($result);
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace app\adminapi\controller\shop;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\shop\DepositPackageLogic;
use app\adminapi\validate\shop\DepositPackageValidate;
/**
* 保证金套餐控制器类
* Class DepositPackageController
* @package app\adminapi\controller\coach
*/
class DepositPackageController extends BaseAdminController
{
/**
* @notes 查看列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 3:52 下午
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 添加服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:03 下午
*/
public function add()
{
$params = (new DepositPackageValidate())->post()->goCheck('add');
(new DepositPackageLogic())->add($params);
return $this->success('操作成功', [],1,1);
}
/**
* @notes 查看服务分类详情
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 5:21 下午
*/
public function detail()
{
$params = (new DepositPackageValidate())->get()->goCheck('id');
$result = (new DepositPackageLogic())->detail($params['id']);
return $this->success('获取成功',$result);
}
/**
* @notes 编辑服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:26 下午
*/
public function edit()
{
$params = (new DepositPackageValidate())->post()->goCheck();
(new DepositPackageLogic())->edit($params);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 删除服务分类
* @return \think\response\Json
* @author ljj
* @date 2022/2/8 6:34 下午
*/
public function del()
{
$params = (new DepositPackageValidate())->post()->goCheck('id');
(new DepositPackageLogic())->del($params['id']);
return $this->success('操作成功',[],1,1);
}
}

View File

@@ -0,0 +1,68 @@
<?php
namespace app\adminapi\controller\shop;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\shop\GoodsLogic;
use app\adminapi\validate\shop\GoodsValidate;
/**
* 商家项目控制器类
* Class GoodsController
* @package app\adminapi\controller\shop
*/
class GoodsController extends BaseAdminController
{
/**
* @notes 列表
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 12:11
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 详情
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 13:15
*/
public function detail()
{
$params = (new GoodsValidate())->goCheck('id');
$result = (new GoodsLogic())->detail($params['id']);
return $this->success('',$result);
}
/**
* @notes 上下架
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 13:04
*/
public function status()
{
$params = (new GoodsValidate())->post()->goCheck('id');
(new GoodsLogic())->status($params['id']);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 审核
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 13:24
*/
public function audit()
{
$params = (new GoodsValidate())->post()->goCheck();
$result = (new GoodsLogic())->audit($params);
if(true === $result){
return $this->success('审核成功',[],1,1);
}
return $this->fail(GoodsLogic::getError(),[],1,1);
}
}

View File

@@ -0,0 +1,181 @@
<?php
namespace app\adminapi\controller\shop;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\shop\ShopApplyLists;
use app\adminapi\lists\shop\UpdateShopLists;
use app\adminapi\logic\shop\ShopLogic;
use app\adminapi\validate\shop\AdjustWalletValidate;
use app\adminapi\validate\shop\ShopAuditValidate;
use app\adminapi\validate\shop\ShopValidate;
/**
* 店铺控制器类
* Class ShopController
* @package app\adminapi\controller\shop
*/
class ShopController extends BaseAdminController
{
public function lists()
{
return $this->dataLists();
}
/**
* @notes 申请列表
* @return \think\response\Json
* @author cjhao
* @date 2024/8/26 17:46
*/
public function applyLists()
{
return $this->dataLists((new ShopApplyLists()));
}
/**
* @notes 店铺审核
* @return \think\response\Json
* @author cjhao
* @date 2024/10/7 00:41
*/
public function shopAudit()
{
$params = (new ShopValidate())->post()->goCheck('id');
$params['admin_id'] = $this->adminId;
$result = (new Shoplogic())->shopAudit($params);
if(true === $result){
return $this->success('审核成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 添加门店
* @return \think\response\Json
* @author cjhao
* @date 2024/10/2 19:11
*/
public function add()
{
$params = (new ShopValidate())->post()->goCheck('add');
$result = (new ShopLogic())->add($params);
if(true === $result){
return $this->success('添加成功');
}
return $this->fail($result);
}
/**
* @notes 编辑门店
* @return \think\response\Json
* @author cjhao
* @date 2024/10/3 15:01
*/
public function edit()
{
$params = (new ShopValidate())->post()->goCheck();
$result = (new ShopLogic())->edit($params);
if(true === $result){
return $this->success('编辑成功');
}
return $this->fail($result);
}
/**
* @notes 详情
* @return \think\response\Json
* @throws \Exception
* @author cjhao
* @date 2024/10/3 23:21
*/
public function detail()
{
$params = (new ShopValidate())->goCheck('id');
$result = (new ShopLogic())->detail($params['id']);
return $this->success('',$result);
}
/**
* @notes 调整余额
* @return \think\response\Json
* @throws \Exception
* @author cjhao
* @date 2024/8/23 13:51
*/
public function adjustMoney()
{
$params = (new AdjustWalletValidate())->post()->goCheck();
$params['admin_id'] = $this->adminId;
$result = (new ShopLogic())->adjustMoney($params);
if(true === $result){
return $this->success('调整成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 调整余额
* @return \think\response\Json
* @throws \Exception
* @author cjhao
* @date 2024/8/23 13:51
*/
public function adjustDeposit()
{
$params = (new AdjustWalletValidate())->post()->goCheck();
$params['admin_id'] = $this->adminId;
$result = (new ShopLogic())->adjustDeposit($params);
if(true === $result){
return $this->success('调整成功',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 审核列表
* @return \think\response\Json
* @author cjhao
* @date 2024/10/7 01:19
*/
public function updateShopLists()
{
return $this->dataLists((new UpdateShopLists()));
}
/**
* @notes 更新资料详情
* @return \think\response\Json
* @author cjhao
* @date 2024/8/28 11:04
*/
public function updateDetail()
{
$params = (new ShopValidate())->goCheck('id');
$result = (new ShopLogic())->updateDetail($params['id']);
return $this->success('',$result);
}
/**
* @notes 更新资料审核
* @return \think\response\Json
* @author cjhao
* @date 2024/10/7 14:54
*/
public function updateAudit()
{
$params = (new ShopAuditValidate())->post()->goCheck();
$params['admin_id'] = $this->adminId;
$result = (new ShopLogic())->updateAudit($params);
if(true === $result){
return $this->success('审核成功',[],1,1);
}
return $this->fail($result);
}
}

View File

@@ -0,0 +1,191 @@
<?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\tools;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\tools\DataTableLists;
use app\adminapi\lists\tools\GenerateTableLists;
use app\adminapi\logic\tools\GeneratorLogic;
use app\adminapi\validate\tools\EditTableValidate;
use app\adminapi\validate\tools\GenerateTableValidate;
/**
* 代码生成器控制器
* Class GeneratorController
* @package app\adminapi\controller\article
*/
class GeneratorController extends BaseAdminController
{
public array $notNeedLogin = ['download'];
/**
* @notes 获取数据库中所有数据表信息
* @return \think\response\Json
* @author 段誉
* @date 2022/6/14 10:57
*/
public function dataTable()
{
return $this->dataLists(new DataTableLists());
}
/**
* @notes 获取已选择的数据表
* @return \think\response\Json
* @author 段誉
* @date 2022/6/14 10:57
*/
public function generateTable()
{
return $this->dataLists(new GenerateTableLists());
}
/**
* @notes 选择数据表
* @return \think\response\Json
* @author 段誉
* @date 2022/6/15 10:09
*/
public function selectTable()
{
$params = (new GenerateTableValidate())->post()->goCheck('select');
$result = GeneratorLogic::selectTable($params, $this->adminId);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(GeneratorLogic::getError());
}
/**
* @notes 生成代码
* @return \think\response\Json
* @author 段誉
* @date 2022/6/23 19:08
*/
public function generate()
{
$params = (new GenerateTableValidate())->post()->goCheck('id');
$result = GeneratorLogic::generate($params);
if (false === $result) {
return $this->fail(GeneratorLogic::getError());
}
return $this->success('操作成功', $result, 1, 1);
}
/**
* @notes 下载文件
* @return \think\response\File|\think\response\Json
* @author 段誉
* @date 2022/6/24 9:51
*/
public function download()
{
$params = (new GenerateTableValidate())->goCheck('download');
$result = GeneratorLogic::download($params['file']);
if (false === $result) {
return $this->fail(GeneratorLogic::getError() ?: '下载失败');
}
return download($result, 'likeadmin-curd.zip');
}
/**
* @notes 预览代码
* @return \think\response\Json
* @author 段誉
* @date 2022/6/23 19:07
*/
public function preview()
{
$params = (new GenerateTableValidate())->post()->goCheck('id');
$result = GeneratorLogic::preview($params);
if (false === $result) {
return $this->fail(GeneratorLogic::getError());
}
return $this->data($result);
}
/**
* @notes 同步字段
* @return \think\response\Json
* @author 段誉
* @date 2022/6/17 15:22
*/
public function syncColumn()
{
$params = (new GenerateTableValidate())->post()->goCheck('id');
$result = GeneratorLogic::syncColumn($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(GeneratorLogic::getError());
}
/**
* @notes 编辑表信息
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 10:44
*/
public function edit()
{
$params = (new EditTableValidate())->post()->goCheck();
$result = GeneratorLogic::editTable($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(GeneratorLogic::getError());
}
/**
* @notes 获取已选择的数据表详情
* @return \think\response\Json
* @author 段誉
* @date 2022/6/15 19:00
*/
public function detail()
{
$params = (new GenerateTableValidate())->goCheck('id');
$result = GeneratorLogic::getTableDetail($params);
return $this->success('', $result);
}
/**
* @notes 删除已选择的数据表信息
* @return \think\response\Json
* @author 段誉
* @date 2022/6/15 19:00
*/
public function delete()
{
$params = (new GenerateTableValidate())->post()->goCheck('id');
$result = GeneratorLogic::deleteTable($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(GeneratorLogic::getError());
}
}

View File

@@ -0,0 +1,82 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserLists;
use app\adminapi\logic\user\UserLogic;
use app\adminapi\validate\user\UserValidate;
class UserController extends BaseAdminController
{
/**
* @notes 查看用户列表
* @return \think\response\Json
* @author ljj
* @date 2022/2/7 6:53 下午
*/
public function lists()
{
return $this->dataLists(new UserLists());
}
/**
* @notes 用户详情
* @return \think\response\Json
* @author ljj
* @date 2022/4/21 2:29 下午
*/
public function detail()
{
$id = $this->request->get('id');
$result = UserLogic::detail($id);
return $this->success('',$result);
}
/**
* @notes 修改用户信息
* @return \think\response\Json
* @author ljj
* @date 2022/5/24 10:18 上午
*/
public function editInfo()
{
$params = (new UserValidate())->post()->goCheck('editInfo');
(new UserLogic)->editInfo($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 调整余额
* @return \think\response\Json
* @author ljj
* @date 2023/4/12 11:59 上午
*/
public function adjustBalance()
{
$params = (new UserValidate())->post()->goCheck('adjustBalance');
$result = (new UserLogic)->adjustUserWallet($params);
if(true !== $result){
return $this->fail($result);
}
return $this->success('操作成功', [], 1, 1);
}
}

23
server/app/adminapi/event.php Executable file
View File

@@ -0,0 +1,23 @@
<?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
// +----------------------------------------------------------------------
return [
'listen' => [
'AppInit' => [],
'HttpRun' => [],
'HttpEnd' => ['app\adminapi\listener\OperationLog'],
'LogLevel' => [],
'LogWrite' => [],
]
];

View File

@@ -0,0 +1,89 @@
<?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
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\adminapi\http\middleware;
use app\common\{
cache\AdminAuthCache,
service\JsonService
};
use think\helper\Str;
/**
* 权限验证中间件
* Class AuthMiddleware
* @package app\adminapi\http\middleware
*/
class AuthMiddleware
{
/**
* @notes 权限验证
* @param $request
* @param \Closure $next
* @return mixed
* @author 令狐冲
* @date 2021/7/2 19:29
*/
public function handle($request, \Closure $next)
{
//不登录访问,无需权限验证
if ($request->controllerObject->isNotNeedLogin()) {
return $next($request);
}
//系统默认超级管理员,无需权限验证
if (1 === $request->adminInfo['root']) {
return $next($request);
}
$adminAuthCache = new AdminAuthCache($request->adminInfo['admin_id']);
// 当前访问路径
$accessUri = strtolower($request->controller() . '/' . $request->action());
// 全部路由
$allUri = $this->formatUrl($adminAuthCache->getAllUri());
// 判断该当前访问的uri是否存在不存在无需验证
if (!in_array($accessUri, $allUri)) {
return $next($request);
}
// 当前管理员拥有的路由权限
$AdminUris = $adminAuthCache->getAdminUri() ?? [];
$AdminUris = $this->formatUrl($AdminUris);
if (in_array($accessUri, $AdminUris)) {
return $next($request);
}
return JsonService::fail('权限不足,无法访问或操作');
}
/**
* @notes 格式化URL
* @param array $data
* @return array|string[]
* @author 段誉
* @date 2022/7/7 15:39
*/
public function formatUrl(array $data)
{
return array_map(function ($item) {
return strtolower(Str::camel($item));
}, $data);
}
}

View File

@@ -0,0 +1,50 @@
<?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
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\adminapi\http\middleware;
use app\common\service\JsonService;
/**
* 校验演示环境
* Class CheckDemoMiddleware
* @package app\adminapi\http\middleware
*/
class CheckDemoMiddleware
{
// 允许post的接口
protected $ablePost = [
'login/account',
'login/logout',
];
public function handle($request, \Closure $next)
{
if ($request->method() != 'POST') {
return $next($request);
}
$accessUri = strtolower($request->controller() . '/' . $request->action());
if (!in_array($accessUri, $this->ablePost) && env('project.demo_env')) {
return JsonService::fail('演示环境不支持修改数据,请下载源码本地部署体验');
}
return $next($request);
}
}

View File

@@ -0,0 +1,116 @@
<?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
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\adminapi\http\middleware;
/**
* 演示环境数据加密
* Class DemoDataMiddleware
* @package app\adminapi\http\middleware
*/
class EncryDemoDataMiddleware
{
// 需要过滤的接口
protected $needCheck = [
// 存储配置
'setting.storage/detail',
// 短信配置
'notice.smsConfig/detail',
// 公众号配置
'channel.official_account_setting/getConfig',
// 小程序配置
'channel.mnp_settings/getConfig',
// 开放平台配置
'channel.open_setting/getConfig',
// 支付配置
'setting.pay.pay_config/detail',
// 地图配置
'setting.web.web_setting/getMapKey',
];
// 必须过滤字段
protected $needCheckParams = [
'app_id',
'app_secret',
'original_id',
];
// 可以排除字段
protected $excludeParams = [
'name',
'icon',
'image',
'qr_code',
'pay_way_desc',
];
public function handle($request, \Closure $next)
{
$response = $next($request);
// 非需校验的接口 或者 未开启演示模式
$accessUri = strtolower($request->controller() . '/' . $request->action());
if (!in_array($accessUri, lower_uri($this->needCheck)) || !env('project.demo_env')) {
return $response;
}
// 非json数据
if (!method_exists($response, 'header') || !in_array('application/json; charset=utf-8', $response->getHeader())) {
return $response;
}
$data = $response->getData();
if (!is_array($data) || empty($data)) {
return $response;
}
foreach ($data['data'] as $key => $item) {
// 排除部分字段,如图片等
if (in_array($key, $this->excludeParams)) {
continue;
}
if (in_array($key, $this->needCheckParams)) {
$data['data'][$key] = '******';
continue;
}
if (is_string($item)) {
$data['data'][$key] = '******';
}
if (isset($data['data'][$key]->apiclient_cert)) {
$data['data'][$key]->apiclient_cert = '******';
}
if (isset($data['data'][$key]->apiclient_key)) {
$data['data'][$key]->apiclient_key = '******';
}
if (isset($data['data'][$key]->mch_id)) {
$data['data'][$key]->mch_id = '******';
}
if (isset($data['data'][$key]->pay_sign_key)) {
$data['data'][$key]->pay_sign_key = '******';
}
}
return $response->data($data);
}
}

View File

@@ -0,0 +1,63 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\adminapi\http\middleware;
use app\adminapi\controller\BaseAdminController;
use app\common\exception\ControllerExtendException;
use app\common\service\JsonService;
use think\exception\ClassNotFoundException;
use think\exception\HttpException;
/**
* 初始化验证中间件
* Class InitMiddleware
* @package app\adminapi\http\middleware
*/
class InitMiddleware
{
/**
* @notes 初始化
* @param $request
* @param \Closure $next
* @return mixed
* @author 令狐冲
* @date 2021/7/2 19:29
*/
public function handle($request, \Closure $next)
{
//获取控制器
try {
$controller = str_replace('.', '\\', $request->controller());
$controller = '\\app\\adminapi\\controller\\' . $controller . 'Controller';
$controllerClass = invoke($controller);
if (($controllerClass instanceof BaseAdminController) === false) {
throw new ControllerExtendException($controller, '404');
}
} catch (ClassNotFoundException $e) {
throw new HttpException(404, 'controller not exists:' . $e->getClass());
}
//创建控制器对象
$request->controllerObject = invoke($controller);
return $next($request);
}
}

View File

@@ -0,0 +1,83 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\adminapi\http\middleware;
use app\common\cache\AdminTokenCache;
use app\adminapi\service\AdminTokenService;
use app\common\service\JsonService;
use think\facade\Config;
/**
* 登录中间件
* Class LoginMiddleware
* @package app\adminapi\http\middleware
*/
class LoginMiddleware
{
/**
* @notes 登录验证
* @param $request
* @param \Closure $next
* @return mixed|\think\response\Json
* @author 令狐冲
* @date 2021/7/1 17:33
*/
public function handle($request, \Closure $next)
{
$token = $request->header('token');
//判断接口是否免登录
$isNotNeedLogin = $request->controllerObject->isNotNeedLogin();
//不直接判断$isNotNeedLogin结果使不需要登录的接口通过为了兼容某些接口可以登录或不登录访问
if (empty($token) && !$isNotNeedLogin) {
//没有token并且该地址需要登录才能访问
return JsonService::fail('请求参数缺token', [], 0, 0);
}
$adminInfo = (new AdminTokenCache())->getAdminInfo($token);
if (empty($adminInfo) && !$isNotNeedLogin) {
//token过期无效并且该地址需要登录才能访问
return JsonService::fail('登录超时,请重新登录', [], -1);
}
//token临近过期自动续期
if ($adminInfo) {
//获取临近过期自动续期时长
$beExpireDuration = Config::get('project.admin_token.be_expire_duration');
//token续期
if (time() > ($adminInfo['expire_time'] - $beExpireDuration)) {
$result = AdminTokenService::overtimeToken($token);
//续期失败(数据表被删除导致)
if (empty($result)) {
return JsonService::fail('登录过期', [], -1);
}
}
}
//给request赋值用于控制器
$request->adminInfo = $adminInfo;
$request->adminId = $adminInfo['admin_id'] ?? 0;
return $next($request);
}
}

View File

@@ -0,0 +1,77 @@
<?php
namespace app\adminapi\listener;
use ReflectionClass;
use think\Exception;
class OperationLog
{
/**
* @notes 管理员操作日志
* @param $response
* @return bool|void
* @throws \ReflectionException
* @author 段誉
* @date 2022/4/8 17:09
*/
public function handle($response)
{
$request = request();
//需要登录的接口,无效访问时不记录
if (!$request->controllerObject->isNotNeedLogin() && empty($request->adminInfo)) {
return;
}
//不记录日志操作
if (strtolower(str_replace('.', '\\', $request->controller())) === 'setting\system\log') {
return;
}
//获取操作注解
$notes = '';
try {
$re = new ReflectionClass($request->controllerObject);
$doc = $re->getMethod($request->action())->getDocComment();
if (empty($doc)) {
throw new Exception('请给控制器方法注释');
}
preg_match('/\s(\w+)/u', $re->getMethod($request->action())->getDocComment(), $values);
$notes = $values[0];
} catch (Exception $e) {
$notes = $notes ?: '无法获取操作名称,请给控制器方法注释';
}
$params = $request->param();
//过滤密码参数
if (isset($params['password'])) {
$params['password'] = "******";
}
//过滤密钥参数
if(isset($params['app_secret'])){
$params['app_secret'] = "******";
}
//导出数据操作进行记录
if (isset($params['export']) && $params['export'] == 2) {
$notes .= '-数据导出';
}
//记录日志
$systemLog = new \app\common\model\OperationLog();
$systemLog->admin_id = $request->adminInfo['admin_id'] ?? 0;
$systemLog->admin_name = $request->adminInfo['name'] ?? '';
$systemLog->action = $notes;
$systemLog->account = $request->adminInfo['account'] ?? '';
$systemLog->url = $request->url(true);
$systemLog->type = $request->isGet() ? 'GET' : 'POST';
$systemLog->params = json_encode($params, true);
$systemLog->ip = $request->ip();
$systemLog->result = $response->getContent();
return $systemLog->save();
}
}

View File

@@ -0,0 +1,44 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists;
use app\common\lists\BaseDataLists;
/**
* 管理员模块数据列表基类
* Class BaseAdminDataLists
* @package app\adminapi\lists
*/
abstract class BaseAdminDataLists extends BaseDataLists
{
protected array $adminInfo;
protected int $adminId;
public function __construct()
{
parent::__construct();
$this->adminInfo = $this->request->adminInfo;
$this->adminId = $this->request->adminId;
}
}

View File

@@ -0,0 +1,75 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\lists\ad;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsSearchInterface;
use app\common\model\ad\Ad;
class AdLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 搜索条件
* @return \string[][]
* @author ljj
* @date 2022/2/14 5:53 下午
*/
public function setSearch(): array
{
return [
'%like%' => ['name'],
'=' => ['status','pid']
];
}
/**
* @notes 广告列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/14 6:02 下午
*/
public function lists(): array
{
$lists = (new Ad())->field('id,name,pid,image,link_type,link_address,sort,status')
->order(['sort'=>'desc','id'=>'desc'])
->append(['link_address_desc','ap_name'])
->where($this->searchWhere)
->limit($this->limitOffset,$this->limitLength)
->select()
->toArray();
return $lists;
}
/**
* @notes 广告总数
* @return int
* @author ljj
* @date 2022/2/14 6:03 下午
*/
public function count(): int
{
return (new Ad())->where($this->searchWhere)->count();
}
}

View File

@@ -0,0 +1,75 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\lists\ad;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsSearchInterface;
use app\common\model\ad\AdPosition;
class AdPositionLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 搜索条件
* @return \string[][]
* @author ljj
* @date 2022/2/14 4:32 下午
*/
public function setSearch(): array
{
return [
'%like%' => ['name'],
'=' => ['attr'],
];
}
/**
* @notes 广告位列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/14 4:35 下午
*/
public function lists(): array
{
$lists = (new AdPosition())->field('id,name,attr,status,create_time')
->order('id','desc')
->append(['attr_desc'])
->where($this->searchWhere)
->limit($this->limitOffset,$this->limitLength)
->select()
->toArray();
return $lists;
}
/**
* @notes 广告位总数
* @return int
* @author ljj
* @date 2022/2/14 4:36 下午
*/
public function count(): int
{
return (new AdPosition())->where($this->searchWhere)->count();
}
}

View File

@@ -0,0 +1,158 @@
<?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\auth;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExtendInterface;
use app\common\lists\ListsSearchInterface;
use app\common\lists\ListsSortInterface;
use app\common\model\auth\Admin;
use app\common\model\auth\SystemRole;
use app\common\model\dept\Dept;
/**
* 管理员列表
* Class AdminLists
* @package app\adminapi\lists\auth
*/
class AdminLists extends BaseAdminDataLists implements ListsExtendInterface, ListsSearchInterface, ListsSortInterface
{
/**
* @notes 设置导出字段
* @return string[]
* @author 段誉
* @date 2021/12/29 10:08
*/
public function setExcelFields(): array
{
return [
'account' => '账号',
'name' => '名称',
'role_name' => '角色',
'create_time' => '创建时间',
'login_time' => '最后登录时间',
'login_ip' => '最后登录IP',
'disable_desc' => '状态',
];
}
/**
* @notes 设置导出文件名
* @return string
* @author 段誉
* @date 2021/12/29 10:08
*/
public function setFileName(): string
{
return '管理员列表';
}
/**
* @notes 设置搜索条件
* @return \string[][]
* @author 段誉
* @date 2021/12/29 10:07
*/
public function setSearch(): array
{
return [
'%like%' => ['name', 'account'],
'=' => ['role_id']
];
}
/**
* @notes 设置支持排序字段
* @return string[]
* @author 段誉
* @date 2021/12/29 10:07
* @remark 格式: ['前端传过来的字段名' => '数据库中的字段名'];
*/
public function setSortFields(): array
{
return ['create_time' => 'create_time', 'id' => 'id'];
}
/**
* @notes 设置默认排序
* @return string[]
* @author 段誉
* @date 2021/12/29 10:06
*/
public function setDefaultOrder(): array
{
return ['id' => 'desc'];
}
/**
* @notes 获取管理列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2021/12/29 10:05
*/
public function lists(): array
{
$field = [
'id', 'name', 'account', 'role_id', 'create_time', 'disable', 'root',
'login_time', 'login_ip', 'multipoint_login', 'avatar', 'dept_id'
];
$adminLists = Admin::with(['dept'])->field($field)
->where($this->searchWhere)
->append(['disable_desc'])
->limit($this->limitOffset, $this->limitLength)
->order($this->sortOrder)
->select()
->toArray();
//获取角色数组('角色id'=>'角色名称')
$roleLists = SystemRole::column('name', 'id');
//管理员列表增加角色名称
foreach ($adminLists as $k => $v) {
$adminLists[$k]['role_name'] = $roleLists[$v['role_id']] ?? '';
if ($v['root'] == 1) {
$adminLists[$k]['role_name'] = '系统管理员';
}
$adminLists[$k]['dept_name'] = empty($v['dept_name']) ? '-' : $v['dept_name'];
}
return $adminLists;
}
/**
* @notes 获取数量
* @return int
* @author 令狐冲
* @date 2021/7/13 00:52
*/
public function count(): int
{
return Admin::where($this->searchWhere)->count();
}
public function extend()
{
return [];
}
}

View File

@@ -0,0 +1,59 @@
<?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\auth;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\SystemMenu;
/**
* 菜单列表
* Class MenuLists
* @package app\adminapi\lists\auth
*/
class MenuLists extends BaseAdminDataLists
{
/**
* @notes 获取菜单列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/6/29 16:41
*/
public function lists(): array
{
$lists = SystemMenu::limit($this->limitOffset, $this->limitLength)
->order(['sort' => 'desc', 'id' => 'asc'])
->select()
->toArray();
return linear_to_tree($lists, 'children');
}
/**
* @notes 获取菜单数量
* @return int
* @author 段誉
* @date 2022/6/29 16:41
*/
public function count(): int
{
return SystemMenu::count();
}
}

View File

@@ -0,0 +1,95 @@
<?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\auth;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\auth\SystemRole;
/**
* 角色列表
* Class RoleLists
* @package app\adminapi\lists\auth
*/
class RoleLists extends BaseAdminDataLists
{
/**
* @notes 导出字段
* @return string[]
* @author Tab
* @date 2021/9/22 18:52
*/
public function setExcelFields(): array
{
return [
'name' => '角色名称',
'desc' => '备注',
'create_time' => '创建时间'
];
}
/**
* @notes 导出表名
* @return string
* @author Tab
* @date 2021/9/22 18:52
*/
public function setFileName(): string
{
return '角色表';
}
/**
* @notes 角色列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author cjhao
* @date 2021/8/25 18:00
*/
public function lists(): array
{
$lists = SystemRole::with(['role_menu_index'])
->field('id,name,desc,sort,create_time')
->limit($this->limitOffset, $this->limitLength)
->order(['sort' => 'desc', 'id' => 'desc'])
->select()
->toArray();
$roleCountList = Admin::group('role_id')->column('count(id)', 'role_id');
foreach ($lists as $key => $role) {
//使用角色的人数
$lists[$key]['num'] = $roleCountList[$role['id']] ?? 0;
$menuId = array_column($role['role_menu_index'], 'menu_id');
$lists[$key]['menu_id'] = $menuId;
unset($lists[$key]['role_menu_index']);
}
return $lists;
}
/**
* @notes 总记录数
* @return int
* @author Tab
* @date 2021/7/13 11:26
*/
public function count(): int
{
return SystemRole::count();
}
}

View File

@@ -0,0 +1,80 @@
<?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\channel;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsSearchInterface;
use app\common\model\channel\OfficialAccountReply;
/**
* 微信公众号回复列表
* Class OfficialAccountLists
* @package app\adminapi\lists
*/
class OfficialAccountReplyLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索
* @return \string[][]
* @author 段誉
* @date 2022/3/30 15:02
*/
public function setSearch(): array
{
return [
'=' => ['reply_type']
];
}
/**
* @notes 回复列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/3/30 15:02
*/
public function lists(): array
{
$field = 'id,name,keyword,matching_type,content,content_type,status,sort';
$field .= ',matching_type as matching_type_desc,content_type as content_type_desc,status as status_desc';
$lists = OfficialAccountReply::field($field)
->where($this->searchWhere)
->order(['sort' => 'desc', 'id' => 'desc'])
->limit($this->limitOffset, $this->limitLength)
->select()
->toArray();
return $lists;
}
/**
* @notes 回复记录数
* @return int
* @author 段誉
* @date 2022/3/30 15:02
*/
public function count(): int
{
$count = OfficialAccountReply::where($this->searchWhere)->count();
return $count;
}
}

View File

@@ -0,0 +1,113 @@
<?php
namespace app\adminapi\lists\coach;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\enum\coach\CoachEnum;
use app\common\lists\ListsExtendInterface;
use app\common\model\coach\Coach;
use app\common\model\coach\CoachGoodsIndex;
use app\common\model\skill\Skill;
class CoachApplyLists extends BaseAdminDataLists implements ListsExtendInterface
{
public function setWhere()
{
$where = [];
if(isset($this->params['keyword']) && $this->params['keyword']){
$where[] = ['name|mobile','like',$this->params['keyword']];
}
if(isset($this->params['coach_keyword']) && $this->params['coach_keyword']){
$where[] = ['sn|account','like',$this->params['coach_keyword']];
}
if(isset($this->params['work_status']) && '' != $this->params['work_status']){
$where[] = ['work_status','=',$this->params['work_status']];
}
if(isset($this->params['server_status']) && '' != $this->params['server_status']){
$where[] = ['server_status','=',$this->params['server_status']];
}
if(isset($this->params['skill_id']) && '' != $this->params['skill_id']){
$skillIds = Skill::alias('S')
->join('coach_skill_index CSI','S.id = CSI.skill_id')
->column('CSI.coach_id');
$where[] = ['C.id','in',$skillIds];
}
if(isset($this->params['start_time']) && $this->params['start_time']){
$where[] = ['C.create_time','>=',$this->params['start_time']];
}
if(isset($this->params['end_time']) && $this->params['end_time']){
$where[] = ['C.create_time','<=',$this->params['end_time']];
}
if(isset($this->params['type']) && '' != $this->params['type']){
$where[] = ['audit_status','=',$this->params['type']];
}
return $where;
}
public function lists(): array
{
$lists = Coach::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->field('UC.sn,C.mobile,C.audit_status,C.skill_id,C.province_id,C.city_id,C.region_id,C.id,C.name,C.work_photo,C.deposit,C.work_status,C.create_time,C.money')
->append(['skill_desc','region_desc','audit_status_desc'])
->where($this->setWhere())
->order('C.id desc')
->limit($this->limitOffset, $this->limitLength)
->select()->toArray();
$goodsCountLists = CoachGoodsIndex::group('coach_id')->column('count(goods_id) as count','coach_id');
foreach ($lists as $key => $list){
$lists[$key]['goods_count'] = $goodsCountLists[$list['id']] ?? 0;
}
return $lists;
}
/**
* @notes 统计人数
* @return int
* @author cjhao
* @date 2024/8/21 17:53
*/
public function count(): int
{
return Coach::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($this->setWhere())
->count();
}
public function extend()
{
$whereLists = $this->setWhere();
foreach ($whereLists as $key => $where){
if(isset($where['audit_status'])){
unset($whereLists[$key]);
}
}
$whereLists = array_values($whereLists);
$allCount = Coach::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($whereLists)
->count();
$waitCount = Coach::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($whereLists)
->where(['audit_status'=>CoachEnum::AUDIT_STATUS_WAIT])
->count();
$passCount = Coach::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($whereLists)
->where(['audit_status'=>CoachEnum::AUDIT_STATUS_PASS])
->count();
$refuseCount = Coach::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($whereLists)
->where(['audit_status'=>CoachEnum::AUDIT_STATUS_REFUSE])
->count();
return [
'all_count' => $allCount,
'wait_count' => $waitCount,
'pass_count' => $passCount,
'refuse_count' => $refuseCount,
];
}
}

View File

@@ -0,0 +1,145 @@
<?php
namespace app\adminapi\lists\coach;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\enum\coach\CoachEnum;
use app\common\enum\OrderEnum;
use app\common\model\coach\Coach;
use app\common\model\deposit\DepositPackage;
use app\common\model\order\Order;
use app\common\model\skill\Skill;
class CoachLists extends BaseAdminDataLists
{
public function setWhere()
{
$where = [];
$auditStatus = $this->params['audit_status'] ?? CoachEnum::AUDIT_STATUS_PASS;
if($auditStatus){
$where[] = ['audit_status','=',$auditStatus];
}
if(isset($this->params['staff_info']) && $this->params['staff_info']){
$where[] = ['C.sn|name|mobile','like',$this->params['staff_info']];
}
// if(isset($this->params['coach_keyword']) && $this->params['coach_keyword']){
// $where[] = ['C.sn|account','like',$this->params['coach_keyword']];
// }
if(isset($this->params['skill_id']) && '' != $this->params['skill_id']){
$where[] = ['skill_id','=',$this->params['skill_id']];
}
if(isset($this->params['city_id']) && $this->params['city_id']){
$where[] = ['city_id','=',$this->params['city_id']];
}
if(isset($this->params['work_status']) && '' != $this->params['work_status']){
$where[] = ['work_status','=',$this->params['work_status']];
}
if(isset($this->params['status']) && '' != $this->params['status']){
$where[] = ['server_status','=',$this->params['status']];
}
if(isset($this->params['start_time']) && $this->params['start_time']){
$where[] = ['C.create_time','>=',strtotime($this->params['start_time'])];
}
if(isset($this->params['end_time']) && $this->params['end_time']){
$where[] = ['C.create_time','<=',strtotime($this->params['end_time'])];
}
return $where;
}
// public function lists(): array
// {
// $lists = Coach::alias('C')
// ->join('coach_user UC','UC.id = C.coach_user_id')
// ->field('UC.sn,C.id,C.province_id,C.city_id,C.region_id,C.mobile,C.name,C.work_photo,C.server_status,C.deposit,C.work_status,C.create_time,C.money')
// ->append(['work_status_desc','server_status_desc','province_name','city_name','region_name'])
// ->order('id desc')
// ->where($this->setWhere())
// ->limit($this->limitOffset, $this->limitLength)
// ->select()->toArray();
// $coachIds = array_column($lists,'id');
// $depositLists = DepositPackage::where(['type'=>1])->column('order_limit,money');
// $orderLists = Order::where(['coach_id'=>$coachIds])
// ->where('order_status','>',OrderEnum::ORDER_STATUS_WAIT_RECEIVING)
// ->field('count(id) as num,coach_id')
// ->select()->toArray();
// $orderLists = array_column($orderLists,null,'coach_id');
// foreach ($lists as $key => $coach){
// $depositPackage = [];
// foreach ($depositLists as $deposit){
// if($coach['deposit'] >= $deposit['money']){
// $depositPackage = $deposit;
// break;
// }
// }
// $lists[$key]['work_info'] = [
// 'take_order' => $depositPackage['order_limit'] ?? 0,
// 'total_order' => $orderLists[$coach['id']]['num'] ?? 0,
// ];
// }
// return $lists;
// }
public function lists(): array
{
$lists = Coach::alias('C')
->join('coach_user UC', 'UC.id = C.coach_user_id')
->field('UC.sn,C.id,C.province_id,C.city_id,C.region_id,C.mobile,C.name,C.work_photo,C.server_status,C.deposit,C.work_status,C.create_time,C.money')
->append(['work_status_desc','server_status_desc','province_name','city_name','region_name'])
->order('id desc')
->where($this->setWhere())
->limit($this->limitOffset, $this->limitLength)
->select()
->toArray();
$coachIds = array_column($lists, 'id');
// 获取保证金套餐
$depositLists = DepositPackage::where(['type' => 1])
->column('order_limit,money');
// 修复后的订单统计查询
$orderLists = [];
if (!empty($coachIds)) {
$orderLists = Order::where('coach_id', 'in', $coachIds)
->where('order_status', '>', OrderEnum::ORDER_STATUS_WAIT_RECEIVING)
->field('coach_id, count(id) as num')
->group('coach_id') // 按教练分组统计
->select()
->toArray();
}
// 转换为以 coach_id 为键的数组
$orderLists = array_column($orderLists, null, 'coach_id');
foreach ($lists as $key => $coach) {
$depositPackage = [];
// 匹配保证金套餐
foreach ($depositLists as $deposit) {
if ($coach['deposit'] >= $deposit['money']) {
$depositPackage = $deposit;
break;
}
}
$lists[$key]['work_info'] = [
'take_order' => $depositPackage['order_limit'] ?? 0,
'total_order' => $orderLists[$coach['id']]['num'] ?? 0,
];
}
return $lists;
}
/**
* @notes 统计人数
* @return int
* @author cjhao
* @date 2024/8/21 17:53
*/
public function count(): int
{
return Coach::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($this->setWhere())
->count();
}
}

View File

@@ -0,0 +1,60 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\lists\coach;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\deposit\DepositPackage;
class DepositPackageLists extends BaseAdminDataLists
{
/**
* @notes 列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/8 3:51 下午
*/
public function lists(): array
{
$lists = (new DepositPackage())
->order(['id'=>'desc'])
->where(['type'=>1])
->withoutField('update_time,delete_time')
->select()
->toArray();
return $lists;
}
/**
* @notes 服务分类数量
* @return int
* @author ljj
* @date 2022/2/8 3:51 下午
*/
public function count(): int
{
return (new DepositPackage())->count();
}
}

View File

@@ -0,0 +1,62 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\lists\coach;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\goods\GoodsCategory;
use app\common\model\skill\Skill;
class SkillLists extends BaseAdminDataLists
{
/**
* @notes 列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/8 3:51 下午
*/
public function lists(): array
{
$lists = (new Skill())
->order(['id'=>'desc'])
->withoutField('update_time,delete_time')
->withCount(['coach','goods'])
->limit($this->limitOffset, $this->limitLength)
->select()
->toArray();
return $lists;
}
/**
* @notes 服务分类数量
* @return int
* @author ljj
* @date 2022/2/8 3:51 下午
*/
public function count(): int
{
return (new Skill())->count();
}
}

View File

@@ -0,0 +1,103 @@
<?php
namespace app\adminapi\lists\coach;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\enum\coach\CoachEnum;
use app\common\lists\ListsExtendInterface;
use app\common\model\coach\Coach;
use app\common\model\coach\CoachGoodsIndex;
use app\common\model\coach\CoachUpdate;
use app\common\model\skill\Skill;
class UpdateCoachLists extends BaseAdminDataLists implements ListsExtendInterface
{
public function setWhere()
{
$where = [];
if(isset($this->params['keyword']) && $this->params['keyword']){
$where[] = ['name|mobile','like',$this->params['keyword']];
}
if(isset($this->params['coach_keyword']) && $this->params['coach_keyword']){
$where[] = ['sn|account','like',$this->params['coach_keyword']];
}
if(isset($this->params['work_status']) && '' != $this->params['work_status']){
$where[] = ['work_status','=',$this->params['work_status']];
}
if(isset($this->params['server_status']) && '' != $this->params['server_status']){
$where[] = ['server_status','=',$this->params['server_status']];
}
if(isset($this->params['skill_id']) && '' != $this->params['skill_id']){
$skillIds = Skill::alias('S')
->join('coach_skill_index CSI','S.id = CSI.skill_id')
->column('CSI.coach_id');
$where[] = ['C.id','in',$skillIds];
}
if(isset($this->params['start_time']) && $this->params['start_time']){
$where[] = ['C.create_time','>=',$this->params['start_time']];
}
if(isset($this->params['end_time']) && $this->params['end_time']){
$where[] = ['C.create_time','<=',$this->params['end_time']];
}
return $where;
}
public function lists(): array
{
$lists = CoachUpdate::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->field('UC.sn,C.mobile,C.audit_status,C.skill_id,C.province_id,C.city_id,C.region_id,C.id,C.name,C.audit_remark,C.work_photo,C.goods_ids,C.create_time')
->append(['skill_desc','region_desc','audit_status_desc'])
->order('id desc')
->where($this->setWhere())
->limit($this->limitOffset, $this->limitLength)
->select()->toArray();
foreach ($lists as $key => $list){
$lists[$key]['goods_count'] = count($list['goods_ids']);
}
return $lists;
}
/**
* @notes 统计人数
* @return int
* @author cjhao
* @date 2024/8/21 17:53
*/
public function count(): int
{
return CoachUpdate::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($this->setWhere())
->count();
}
public function extend()
{
$allCount = CoachUpdate::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($this->setWhere())
->count();
$waitCount = CoachUpdate::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($this->setWhere())
->where(['audit_status'=>CoachEnum::AUDIT_STATUS_WAIT])
->count();
$passCount = CoachUpdate::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($this->setWhere())
->where(['audit_status'=>CoachEnum::AUDIT_STATUS_PASS])
->count();
$refuseCount = CoachUpdate::alias('C')
->join('coach_user UC','UC.id = C.coach_user_id')
->where($this->setWhere())
->where(['audit_status'=>CoachEnum::AUDIT_STATUS_REFUSE])
->count();
return [
'all_count' => $allCount,
'wait_count' => $waitCount,
'pass_count' => $passCount,
'refuse_count' => $refuseCount,
];
}
}

View File

@@ -0,0 +1,65 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists\crontab;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\Crontab;
/**
* 定时任务列表
* Class CrontabLists
* @package app\adminapi\lists\crontab
*/
class CrontabLists extends BaseAdminDataLists
{
/**
* @notes 定时任务列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author Tab
* @date 2021/8/17 11:05
*/
public function lists(): array
{
$field = 'id,name,type,type as type_desc,command,params,expression,status,status as status_desc,error,last_time,time,max_time';
$lists = Crontab::field($field)
->limit($this->limitOffset, $this->limitLength)
->order('id', 'desc')
->select()
->toArray();
return $lists;
}
/**
* @notes 定时任务数量
* @return int
* @author Tab
* @date 2021/8/17 11:06
*/
public function count(): int
{
$count = Crontab::count();
return $count;
}
}

View File

@@ -0,0 +1,64 @@
<?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\decorate;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\enum\MenuEnum;
use app\common\model\decorate\Menu;
/**
* 菜单列表
* Class MenuLists
* @package app\adminapi\lists\decorate
*/
class MenuLists extends BaseAdminDataLists
{
/**
* @notes 菜单列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/14 11:29 上午
*/
public function lists(): array
{
$lists = (new Menu())->field('id,name,image,link_type,link_address,sort,status')
->order(['sort'=>'asc','id'=>'desc'])
->append(['link_address_desc','status_desc'])
->limit($this->limitOffset, $this->limitLength)
->select()
->toArray();
foreach ($lists as &$list) {
$list['link_address_desc'] = MenuEnum::getLinkDesc($list['link_type']).':'.$list['link_address_desc'];
}
return $lists;
}
/**
* @notes 菜单总数
* @return int
* @author ljj
* @date 2022/2/14 11:29 上午
*/
public function count(): int
{
return (new Menu())->count();
}
}

View File

@@ -0,0 +1,52 @@
<?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\decorate;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\decorate\Navigation;
/**
* 底部导航列表
* Class NavigationLists
* @package app\adminapi\lists\decorate
*/
class NavigationLists extends BaseAdminDataLists
{
/**
* @notes 底部导航列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author ljj
* @date 2022/2/14 10:12 上午
*/
public function lists(): array
{
return (new Navigation())->select()->toArray();
}
/**
* @notes 底部导航总数
* @return int
* @author ljj
* @date 2022/2/14 10:13 上午
*/
public function count(): int
{
return (new Navigation())->count();
}
}

View File

@@ -0,0 +1,74 @@
<?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\dept;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsSearchInterface;
use app\common\model\dept\Jobs;
/**
* 岗位列表
* Class JobsLists
* @package app\adminapi\lists\dept
*/
class JobsLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author 段誉
* @date 2022/5/26 9:46
*/
public function setSearch(): array
{
return [
'%like%' => ['name'],
'=' => ['code', 'status']
];
}
/**
* @notes 获取管理列表
* @return array
* @author heshihu
* @date 2022/2/21 17:11
*/
public function lists(): array
{
$lists = Jobs::where($this->searchWhere)
->append(['status_desc'])
->limit($this->limitOffset, $this->limitLength)
->order(['sort' => 'desc', 'id' => 'desc'])
->select()
->toArray();
return $lists;
}
/**
* @notes 获取数量
* @return int
* @author 段誉
* @date 2022/5/26 9:48
*/
public function count(): int
{
return Jobs::where($this->searchWhere)->count();
}
}

View File

@@ -0,0 +1,73 @@
<?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\file;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsSearchInterface;
use app\common\model\file\FileCate;
/**
* 文件分类列表
* Class FileCateLists
* @package app\adminapi\lists\file
*/
class FileCateLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 文件分类搜素条件
* @return \string[][]
* @author 段誉
* @date 2021/12/29 14:24
*/
public function setSearch(): array
{
return [
'=' => ['type']
];
}
/**
* @notes 获取文件分类列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2021/12/29 14:24
*/
public function lists(): array
{
$lists = (new FileCate())->field(['id,pid,type,name'])
->where($this->searchWhere)
->select()->toArray();
return linear_to_tree($lists, 'children');
}
/**
* @notes 获取文件分类数量
* @return int
* @author 段誉
* @date 2021/12/29 14:24
*/
public function count(): int
{
return (new FileCate())->where($this->searchWhere)->count();
}
}

View File

@@ -0,0 +1,86 @@
<?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\file;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\enum\FileEnum;
use app\common\lists\ListsSearchInterface;
use app\common\model\file\File;
use app\common\service\FileService;
/**
* 文件列表
* Class FileLists
* @package app\adminapi\lists\file
*/
class FileLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 文件搜索条件
* @return \string[][]
* @author 段誉
* @date 2021/12/29 14:27
*/
public function setSearch(): array
{
return [
'=' => ['type', 'cid'],
'%like%' => ['name']
];
}
/**
* @notes 获取文件列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2021/12/29 14:27
*/
public function lists(): array
{
$lists = (new File())->field(['id,cid,type,name,uri,create_time'])
->order('id', 'desc')
->where($this->searchWhere)
->where('source', FileEnum::SOURCE_ADMIN)
->limit($this->limitOffset, $this->limitLength)
->select()
->toArray();
foreach ($lists as &$item) {
$item['url'] = $item['uri'];
$item['uri'] = FileService::getFileUrl($item['uri']);
}
return $lists;
}
/**
* @notes 获取文件数量
* @return int
* @author 段誉
* @date 2021/12/29 14:29
*/
public function count(): int
{
return (new File())->where($this->searchWhere)
->where('source', FileEnum::SOURCE_ADMIN)
->count();
}
}

View File

@@ -0,0 +1,135 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\lists\finance;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\enum\accountLog\AccountLogEnum;
use app\common\lists\ListsExcelInterface;
use app\common\model\accountLog\AccountLog;
use app\common\service\FileService;
class AccountLogLists extends BaseAdminDataLists implements ListsExcelInterface
{
/**
* @notes 搜索条件
* @return array
* @author ljj
* @date 2022/12/2 5:30 下午
*/
public function where()
{
$where = [];
if (isset($this->params['change_object']) && $this->params['change_object'] != '') {
$where[] = ['al.change_object','=',$this->params['change_object']];
}else {
$where[] = ['al.change_object','=',AccountLogEnum::MONEY];
}
if (isset($this->params['user_info']) && $this->params['user_info'] != '') {
$where[] = ['u.sn|u.mobile|u.nickname|u.account','like','%'.$this->params['user_info'].'%'];
}
if (isset($this->params['change_type']) && $this->params['change_type'] != '') {
$where[] = ['al.change_type','=',$this->params['change_type']];
}
// 开始时间
if(isset($this->params['start_time']) && $this->params['start_time'] != '') {
$where[] = ['al.create_time', '>=', strtotime($this->params['start_time'])];
}
// 结束时间
if(isset($this->params['end_time']) && $this->params['end_time'] != '') {
$where[] = ['al.create_time', '<=', strtotime($this->params['end_time'])];
}
if (isset($this->params['order_sn']) && $this->params['order_sn'] != '') {
$where[] = ['al.association_sn','=',$this->params['order_sn']];
}
return $where;
}
/**
* @notes 账户流水记录列表
* @return array
* @author ljj
* @date 2022/12/2 5:32 下午
*/
public function lists(): array
{
$lists = AccountLog::alias('al')
->join('user u', 'u.id = al.user_id')
->field('al.id,u.sn as user_sn,u.avatar,u.nickname,u.mobile,al.change_amount,al.left_amount,al.action,al.change_type,al.association_sn,al.create_time')
->append(['change_type_desc'])
->where(self::where())
->limit($this->limitOffset,$this->limitLength)
->order('al.id','desc')
->select()
->toArray();
foreach ($lists as &$list) {
$list['avatar'] = empty($list['avatar']) ? '' : FileService::getFileUrl($list['avatar']);
}
return $lists;
}
/**
* @notes 账户流水记录数量
* @return int
* @author ljj
* @date 2022/12/2 5:32 下午
*/
public function count(): int
{
return AccountLog::alias('al')
->join('user u', 'u.id = al.user_id')
->where(self::where())
->count();
}
/**
* @notes 导出字段
* @return string[]
* @author ljj
* @date 2023/4/12 2:40 下午
*/
public function setExcelFields(): array
{
return [
// '数据库字段名(支持别名) => 'Excel表字段名'
'user_sn' => '用户编号',
'nickname' => '用户昵称',
'change_amount' => '变动金额',
'left_amount' => '剩余金额',
'change_type_desc' => '变动类型',
'association_sn' => '来源单号',
'create_time' => '记录时间',
];
}
/**
* @notes 导出表名
* @return string
* @author ljj
* @date 2023/4/12 2:40 下午
*/
public function setFileName(): string
{
return '账户流水记录列表';
}
}

View File

@@ -0,0 +1,128 @@
<?php
// +----------------------------------------------------------------------
// | likeshop开源商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用未经许可不能去除前后端官方版权标识
// | likeshop系列产品收费版本务必购买商业授权购买去版权授权后方可去除前后端官方版权标识
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | likeshop团队版权所有并拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshop.cn.team
// +----------------------------------------------------------------------
namespace app\adminapi\lists\finance;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\enum\accountLog\CoachAccountLogEnum;
use app\common\lists\ListsExcelInterface;
use app\common\model\accountLog\AccountLog;
use app\common\model\accountLog\CoachAccountLog;
class CoachAccountLogLists extends BaseAdminDataLists implements ListsExcelInterface
{
/**
* @notes 搜索条件
* @return array
* @author ljj
* @date 2022/12/2 5:30 下午
*/
public function where()
{
$where = [];
$changeObject = $this->params['change_object'] ?? CoachAccountLogEnum::MONEY;
$where[] = ['AL.change_object','=',$changeObject];
if (isset($this->params['user_info']) && $this->params['user_info'] != '') {
$where[] = ['C.sn|C.mobile|C.name','like','%'.$this->params['user_info'].'%'];
}
if (isset($this->params['change_type']) && $this->params['change_type'] != '') {
$where[] = ['AL.change_type','=',$this->params['change_type']];
}
// 开始时间
if(isset($this->params['start_time']) && $this->params['start_time'] != '') {
$where[] = ['AL.create_time', '>=', strtotime($this->params['start_time'])];
}
// 结束时间
if(isset($this->params['end_time']) && $this->params['end_time'] != '') {
$where[] = ['AL.create_time', '<=', strtotime($this->params['end_time'])];
}
if (isset($this->params['order_sn']) && $this->params['order_sn'] != '') {
$where[] = ['AL.association_sn','=',$this->params['order_sn']];
}
return $where;
}
/**
* @notes 账户流水记录列表
* @return array
* @author ljj
* @date 2022/12/2 5:32 下午
*/
public function lists(): array
{
$lists = CoachAccountLog::alias('AL')
->join('coach C', 'C.id = AL.coach_id')
->field('AL.id,C.sn as user_sn,C.name,C.mobile,AL.change_amount,AL.left_amount,AL.action,AL.change_type,AL.association_sn,AL.create_time')
->append(['change_type_desc'])
->where(self::where())
->limit($this->limitOffset,$this->limitLength)
->order('AL.id','desc')
->select()
->toArray();
return $lists;
}
/**
* @notes 账户流水记录数量
* @return int
* @author ljj
* @date 2022/12/2 5:32 下午
*/
public function count(): int
{
return CoachAccountLog::alias('AL')
->join('coach C', 'C.id = AL.coach_id')
->where(self::where())
->count();
}
/**
* @notes 导出字段
* @return string[]
* @author ljj
* @date 2023/4/12 2:40 下午
*/
public function setExcelFields(): array
{
return [
// '数据库字段名(支持别名) => 'Excel表字段名'
'user_sn' => '用户编号',
'nickname' => '用户昵称',
'change_amount' => '变动金额',
'left_amount' => '剩余金额',
'change_type_desc' => '变动类型',
'association_sn' => '来源单号',
'create_time' => '记录时间',
];
}
/**
* @notes 导出表名
* @return string
* @author ljj
* @date 2023/4/12 2:40 下午
*/
public function setFileName(): string
{
return '账户流水记录列表';
}
}

View File

@@ -0,0 +1,131 @@
<?php
// +----------------------------------------------------------------------
// | likeshop100%开源免费商用商城系统
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | 商业版本务必购买商业授权,以免引起法律纠纷
// | 禁止对系统程序代码以任何目的,任何形式的再发布
// | gitee下载https://gitee.com/likeshop_gitee
// | github下载https://github.com/likeshop-github
// | 访问官网https://www.likeshop.cn
// | 访问社区https://home.likeshop.cn
// | 访问手册http://doc.likeshop.cn
// | 微信公众号likeshop技术社区
// | likeshop团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeshopTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists\finance;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\RechargeOrder;
use app\common\service\FileService;
class RechargeLists extends BaseAdminDataLists implements ListsExcelInterface
{
/**
* @notes 搜索条件
* @return array
* @author ljj
* @date 2022/12/2 5:30 下午
*/
public function where()
{
$where = [];
if (isset($this->params['sn']) && $this->params['sn'] != '') {
$where[] = ['ro.sn','=',$this->params['sn']];
}
if (isset($this->params['user_info']) && $this->params['user_info'] != '') {
$where[] = ['u.sn|u.mobile|u.nickname|u.account','like','%'.$this->params['user_info'].'%'];
}
if (isset($this->params['pay_way']) && $this->params['pay_way'] != '') {
$where[] = ['ro.pay_way','=',$this->params['pay_way']];
}
if (isset($this->params['pay_status']) && $this->params['pay_status'] != '') {
$where[] = ['ro.pay_status','=',$this->params['pay_status']];
}
// 开始时间
if(isset($this->params['start_time']) && $this->params['start_time'] != '') {
$where[] = ['ro.create_time', '>=', strtotime($this->params['start_time'])];
}
// 结束时间
if(isset($this->params['end_time']) && $this->params['end_time'] != '') {
$where[] = ['ro.create_time', '<=', strtotime($this->params['end_time'])];
}
return $where;
}
/**
* @notes 充值明细列表
* @return array
* @author ljj
* @date 2022/12/2 6:43 下午
*/
public function lists(): array
{
$lists = RechargeOrder::alias('ro')
->join('user u', 'u.id = ro.user_id')
->field('ro.id,u.avatar,u.nickname,ro.sn,ro.order_amount,ro.pay_way,ro.pay_status,ro.pay_time,ro.create_time')
->append(['pay_way_desc','pay_status_desc'])
->where(self::where())
->limit($this->limitOffset,$this->limitLength)
->order('ro.id','desc')
->select()
->toArray();
foreach ($lists as &$list) {
$list['avatar'] = empty($list['avatar']) ? '' : FileService::getFileUrl($list['avatar']);
}
return $lists;
}
/**
* @notes 充值明细数量
* @return int
* @author ljj
* @date 2022/12/2 6:43 下午
*/
public function count(): int
{
return RechargeOrder::alias('ro')
->join('user u', 'u.id = ro.user_id')
->where(self::where())
->count();
}
/**
* @notes 导出字段
* @return string[]
* @author ljj
* @date 2023/4/12 2:40 下午
*/
public function setExcelFields(): array
{
return [
// '数据库字段名(支持别名) => 'Excel表字段名'
'nickname' => '用户昵称',
'sn' => '充值单号',
'order_amount' => '充值金额',
'pay_way_desc' => '支付方式',
'pay_status_desc' => '支付状态',
'pay_time' => '支付时间',
'create_time' => '提交时间',
];
}
/**
* @notes 导出表名
* @return string
* @author ljj
* @date 2023/4/12 2:40 下午
*/
public function setFileName(): string
{
return '充值明细列表';
}
}

Some files were not shown because too many files have changed in this diff Show More