mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
调整数据模块
This commit is contained in:
parent
da60075e98
commit
1924ed9401
@ -74,7 +74,7 @@ class Config extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员服务协议
|
||||
* 用户服务协议
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
@ -84,7 +84,7 @@ class Config extends Controller
|
||||
public function agreement()
|
||||
{
|
||||
$this->skey = 'agreement';
|
||||
$this->title = '会员服务协议';
|
||||
$this->title = '用户服务协议';
|
||||
$this->__sysdata('content');
|
||||
}
|
||||
|
||||
|
@ -45,11 +45,11 @@ class ShopOrder extends Controller
|
||||
// 发货信息搜索
|
||||
$db = $this->_query('ShopOrderSend')->like('address_name#truck_address_name,address_phone#truck_address_phone,address_province|address_city|address_area|address_content#truck_address_content')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("order_no in {$db->field('order_no')->buildSql()}");
|
||||
// 会员搜索查询
|
||||
$db = $this->_query('DataMember')->like('phone#member_phone,nickname#member_nickname')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("mid in {$db->field('id')->buildSql()}");
|
||||
// 用户搜索查询
|
||||
$db = $this->_query('DataUser')->like('phone#member_phone,nickname#member_nickname')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("uid in {$db->field('id')->buildSql()}");
|
||||
// 推荐人搜索查询
|
||||
$db = $this->_query('DataMember')->like('phone#from_phone,nickname#from_nickname')->db();
|
||||
$db = $this->_query('DataUser')->like('phone#from_phone,nickname#from_nickname')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("from in {$db->field('id')->buildSql()}");
|
||||
// 列表选项卡
|
||||
if (is_numeric($this->type = trim(input('type', 'ta'), 't'))) $query->where(['status' => $this->type]);
|
||||
|
@ -38,9 +38,9 @@ class ShopOrderSend extends Controller
|
||||
$query = $this->_query($this->table)->order('id desc');
|
||||
$query->dateBetween('address_datetime,send_datetime')->equal('status')->like('send_number#truck_number');
|
||||
$query->like('address_phone,address_name,address_province|address_city|address_area|address_content#address_content');
|
||||
// 会员搜索查询
|
||||
$db = $this->_query('DataMember')->like('phone#member_phone,nickname#member_nickname')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("mid in {$db->fieldRaw('id')->buildSql()}");
|
||||
// 用户搜索查询
|
||||
$db = $this->_query('DataUser')->like('phone#member_phone,nickname#member_nickname')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("uid in {$db->fieldRaw('id')->buildSql()}");
|
||||
// 列表选项卡
|
||||
if (is_numeric($this->type = trim(input('type', 'ta'), 't'))) {
|
||||
$query->where(['status' => $this->type]);
|
||||
@ -60,9 +60,9 @@ class ShopOrderSend extends Controller
|
||||
*/
|
||||
protected function _index_page_filter(array &$data)
|
||||
{
|
||||
$mids = array_unique(array_column($data, 'mid'));
|
||||
$members = $this->app->db->name('DataMember')->whereIn('id', $mids)->column('*', 'id');
|
||||
foreach ($data as &$vo) $vo['member'] = $members[$vo['mid']] ?? [];
|
||||
$mids = array_unique(array_column($data, 'uid'));
|
||||
$members = $this->app->db->name('DataUser')->whereIn('id', $mids)->column('*', 'id');
|
||||
foreach ($data as &$vo) $vo['member'] = $members[$vo['uid']] ?? [];
|
||||
}
|
||||
|
||||
}
|
@ -5,20 +5,20 @@ namespace app\data\controller;
|
||||
use think\admin\Controller;
|
||||
|
||||
/**
|
||||
* 会员用户管理
|
||||
* Class Member
|
||||
* 普通用户管理
|
||||
* Class User
|
||||
* @package app\data\controller
|
||||
*/
|
||||
class Member extends Controller
|
||||
class User extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
private $table = 'DataMember';
|
||||
private $table = 'DataUser';
|
||||
|
||||
/**
|
||||
* 会员用户管理
|
||||
* 普通用户管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
@ -27,7 +27,7 @@ class Member extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '会员用户管理';
|
||||
$this->title = '普通用户管理';
|
||||
$query = $this->_query($this->table);
|
||||
$query->like('phone,username|nickname#username');
|
||||
$query->whereRaw('nickname != "" or username != ""');
|
||||
@ -35,7 +35,7 @@ class Member extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员状态
|
||||
* 修改用户状态
|
||||
* @auth true
|
||||
* @throws \think\db\exception\DbException
|
||||
*/
|
46
app/data/controller/UserMessage.php
Normal file
46
app/data/controller/UserMessage.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace app\data\controller;
|
||||
|
||||
use think\admin\Controller;
|
||||
|
||||
/**
|
||||
* 短信发送管理
|
||||
* Class UserMessage
|
||||
* @package app\data\controller
|
||||
*/
|
||||
class UserMessage extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'DataUserMessage';
|
||||
|
||||
/**
|
||||
* 短信发送管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '短信发送管理';
|
||||
$query = $this->_query($this->table);
|
||||
$query->equal('status')->like('phone,content');
|
||||
$query->dateBetween('create_at')->order('id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除短信记录
|
||||
* @auth true
|
||||
* @throws \think\db\exception\DbException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
}
|
@ -14,48 +14,36 @@ use think\exception\HttpResponseException;
|
||||
abstract class Auth extends Controller
|
||||
{
|
||||
/**
|
||||
* 当前会员MID
|
||||
* 当前用户UID
|
||||
* @var int
|
||||
*/
|
||||
protected $mid;
|
||||
protected $uid;
|
||||
|
||||
/**
|
||||
* 接口授权令牌
|
||||
* @var string
|
||||
*/
|
||||
protected $token;
|
||||
|
||||
/**
|
||||
* 当前会员数据
|
||||
* 当前用户数据
|
||||
* @var array
|
||||
*/
|
||||
protected $member;
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* 控制器初始化
|
||||
*/
|
||||
protected function initialize()
|
||||
{
|
||||
$this->token = $this->request->request('token', '');
|
||||
if (empty($this->token)) {
|
||||
$this->token = $this->request->header('token', '');
|
||||
}
|
||||
if (empty($this->token)) {
|
||||
$this->error('请求令牌不能为空!');
|
||||
}
|
||||
$this->member = $this->getMember();
|
||||
$this->mid = $this->member['id'];
|
||||
$this->user = $this->getUser();
|
||||
$this->uid = $this->user['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员数据
|
||||
* 获取用户数据
|
||||
* @return array|void
|
||||
*/
|
||||
protected function getMember()
|
||||
protected function getUser()
|
||||
{
|
||||
try {
|
||||
$map = ['token' => $this->token];
|
||||
return UserService::instance()->get($map);
|
||||
$this->token = input('token') ?: $this->request->header('token');
|
||||
if (empty($this->token)) $this->error('接口请求认证令牌不能为空!');
|
||||
return UserService::instance()->get(['token' => $this->token]);
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $exception) {
|
||||
|
@ -7,7 +7,7 @@ use app\data\service\UserService;
|
||||
use think\admin\Controller;
|
||||
|
||||
/**
|
||||
* 会员登录注册接口
|
||||
* 用户登录注册接口
|
||||
* Class Login
|
||||
* @package app\data\controller\api
|
||||
*/
|
||||
@ -17,10 +17,10 @@ class Login extends Controller
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'DataMember';
|
||||
protected $table = 'DataUser';
|
||||
|
||||
/**
|
||||
* 会员登录接口
|
||||
* 用户登录接口
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
@ -36,7 +36,7 @@ class Login extends Controller
|
||||
$map = ['deleted' => 0, 'phone' => $data['phone']];
|
||||
$user = $this->app->db->name($this->table)->where($map)->find();
|
||||
if (empty($user)) $this->error('该手机号还没有注册哦!');
|
||||
if (empty($user['status'])) $this->error('该会员账号状态异常!');
|
||||
if (empty($user['status'])) $this->error('该用户账号状态异常!');
|
||||
if (md5($data['password']) === $user['password']) {
|
||||
$this->success('手机登录成功!', UserService::instance()->get($map, true));
|
||||
} else {
|
||||
@ -45,7 +45,7 @@ class Login extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员统一注册入口
|
||||
* 用户统一注册入口
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
@ -73,7 +73,7 @@ class Login extends Controller
|
||||
}
|
||||
$data['password'] = md5($data['password']);
|
||||
$user = UserService::instance()->save($map, $data, true);
|
||||
empty($user) ? $this->success('会员注册成功!', $user) : $this->error('手机注册失败!');
|
||||
empty($user) ? $this->success('用户注册成功!', $user) : $this->error('手机注册失败!');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,8 +37,8 @@ class News extends Controller
|
||||
$this->app->db->name('DataNewsItem')->where(['code' => $code])->update([
|
||||
'num_read' => $this->app->db->raw('`num_read`+1'),
|
||||
]);
|
||||
if (($mid = input('mid', 0)) > 0) {
|
||||
$data = ['mid' => $mid, 'code' => $code, 'type' => 3];
|
||||
if (($mid = input('uid', 0)) > 0) {
|
||||
$data = ['uid' => $mid, 'code' => $code, 'type' => 3];
|
||||
$this->app->db->name('DataNewsXCollect')->where($data)->delete();
|
||||
$this->app->db->name('DataNewsXCollect')->insert($data);
|
||||
}
|
||||
@ -46,7 +46,7 @@ class News extends Controller
|
||||
$query = $this->_query('DataNewsItem')->like('name,mark')->equal('id,code');
|
||||
$query->where(['deleted' => 0, 'status' => 1])->withoutField('sort,status,deleted');
|
||||
$result = $query->order('sort desc,id desc')->page(true, false, false, 15);
|
||||
NewsService::instance()->buildListState($result['list'], input('mid', 0));
|
||||
NewsService::instance()->buildListState($result['list'], input('uid', 0));
|
||||
$this->success('获取文章内容列表', $result);
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ class Notify extends Controller
|
||||
'payment_remark' => '微信在线支付',
|
||||
'payment_datetime' => date('Y-m-d H:i:s'),
|
||||
]);
|
||||
// 调用会员升级机制
|
||||
// 调用用户升级机制
|
||||
return OrderService::instance()->syncAmount($order['order_no']);
|
||||
}
|
||||
}
|
@ -49,7 +49,7 @@ class Wechat extends Controller
|
||||
*/
|
||||
protected $fansInfo;
|
||||
/**
|
||||
* 会员用户数据
|
||||
* 用户用户数据
|
||||
* @var array
|
||||
*/
|
||||
protected $userInfo;
|
||||
@ -76,7 +76,7 @@ class Wechat extends Controller
|
||||
$this->openid = $user['openid'];
|
||||
$this->config = $wechat->getWebJssdkSign($this->source);
|
||||
$this->fansInfo = $user['fansinfo'] ?? [];
|
||||
// 会员注册并登录生成接口令牌
|
||||
// 用户注册并登录生成接口令牌
|
||||
$data = $this->fansInfo;
|
||||
$data['openid2'] = $data['openid'];
|
||||
$data['base_sex'] = ['未知', '男', '女'][$data['sex']] ?? '未知';
|
||||
|
@ -6,7 +6,7 @@ use app\data\controller\api\Auth;
|
||||
use think\admin\extend\CodeExtend;
|
||||
|
||||
/**
|
||||
* 会员收货地址管理
|
||||
* 用户收货地址管理
|
||||
* Class Address
|
||||
* @package app\data\controller\api\auth
|
||||
*/
|
||||
@ -16,7 +16,7 @@ class Address extends Auth
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
private $table = 'DataMemberAddress';
|
||||
private $table = 'DataUserAddress';
|
||||
|
||||
/**
|
||||
* 添加收货地址
|
||||
@ -25,7 +25,7 @@ class Address extends Auth
|
||||
public function set()
|
||||
{
|
||||
$data = $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'code.default' => '',
|
||||
'type.default' => 0,
|
||||
'type.in:0,1' => '地址状态不在范围!',
|
||||
@ -47,14 +47,14 @@ class Address extends Auth
|
||||
$this->error('添加收货地址失败!');
|
||||
}
|
||||
} else {
|
||||
$map = ['mid' => $this->mid, 'code' => $data['code']];
|
||||
$map = ['uid' => $this->uid, 'code' => $data['code']];
|
||||
$address = $this->app->db->name($this->table)->where($map)->find();
|
||||
if (empty($address)) $this->error('修改收货地址不存在!');
|
||||
$this->app->db->name($this->table)->where($map)->update($data);
|
||||
}
|
||||
// 去除其它默认选项
|
||||
if (isset($data['type']) && $data['type'] > 0) {
|
||||
$map = [['mid', '=', $this->mid], ['code', '<>', $data['code']]];
|
||||
$map = [['uid', '=', $this->uid], ['code', '<>', $data['code']]];
|
||||
$this->app->db->name($this->table)->where($map)->update(['type' => 0]);
|
||||
}
|
||||
$this->success('添加收货地址成功!', $this->_getAddress($data['code']));
|
||||
@ -69,7 +69,7 @@ class Address extends Auth
|
||||
public function get()
|
||||
{
|
||||
$query = $this->_query($this->table)->withoutField('deleted');
|
||||
$query->equal('code')->where(['mid' => $this->mid, 'deleted' => 0]);
|
||||
$query->equal('code')->where(['uid' => $this->uid, 'deleted' => 0]);
|
||||
$result = $query->order('type desc,id desc')->page(false, false, false, 15);
|
||||
$this->success('获取收货地址数据!', $result);
|
||||
}
|
||||
@ -81,13 +81,13 @@ class Address extends Auth
|
||||
public function state()
|
||||
{
|
||||
$data = $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'type.in:0,1' => '地址状态不在范围!',
|
||||
'type.require' => '地址状态不能为空!',
|
||||
'code.require' => '地址编号不能为空!',
|
||||
]);
|
||||
// 检查地址是否存在
|
||||
$map = ['mid' => $data['mid'], 'code' => $data['code']];
|
||||
$map = ['uid' => $data['uid'], 'code' => $data['code']];
|
||||
if ($this->app->db->name($this->table)->where($map)->count() < 1) {
|
||||
$this->error('修改的地址不存在!');
|
||||
}
|
||||
@ -96,7 +96,7 @@ class Address extends Auth
|
||||
$this->app->db->name($this->table)->where($map)->update(['type' => $data['type']]);
|
||||
// 去除其它默认选项
|
||||
if ($data['type'] > 0) {
|
||||
$map = [['mid', '=', $this->mid], ['code', '<>', $data['code']]];
|
||||
$map = [['uid', '=', $this->uid], ['code', '<>', $data['code']]];
|
||||
$this->app->db->name($this->table)->where($map)->update(['type' => 0]);
|
||||
}
|
||||
$this->success('默认设置成功!', $this->_getAddress($data['code']));
|
||||
@ -109,7 +109,7 @@ class Address extends Auth
|
||||
public function remove()
|
||||
{
|
||||
$map = $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'code.require' => '地址编号不能为空!',
|
||||
]);
|
||||
$address = $this->app->db->name($this->table)->where($map)->find();
|
||||
@ -131,7 +131,7 @@ class Address extends Auth
|
||||
*/
|
||||
private function _getAddress(string $code)
|
||||
{
|
||||
$map = ['code' => $code, 'mid' => $this->mid, 'deleted' => 0];
|
||||
$map = ['code' => $code, 'uid' => $this->uid, 'deleted' => 0];
|
||||
return $this->app->db->name($this->table)->withoutField('deleted')->where($map)->find();
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ use think\admin\Storage;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
/**
|
||||
* 会员资料管理
|
||||
* 用户资料管理
|
||||
* Class Center
|
||||
* @package app\data\controller\api\auth
|
||||
*/
|
||||
@ -18,10 +18,10 @@ class Center extends Auth
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
private $table = 'DataMember';
|
||||
private $table = 'DataUser';
|
||||
|
||||
/**
|
||||
* 更新会员资料
|
||||
* 更新用户资料
|
||||
* @throws \think\db\exception\DbException
|
||||
*/
|
||||
public function set()
|
||||
@ -39,27 +39,27 @@ class Center extends Auth
|
||||
if ($vo === '') unset($data[$key]);
|
||||
}
|
||||
if (empty($data)) $this->error('没有修改的数据!');
|
||||
if ($this->app->db->name($this->table)->where(['id' => $this->mid])->update($data) !== false) {
|
||||
$this->success('更新资料成功!', $this->getMember());
|
||||
if ($this->app->db->name($this->table)->where(['id' => $this->uid])->update($data) !== false) {
|
||||
$this->success('更新资料成功!', $this->getUser());
|
||||
} else {
|
||||
$this->error('更新资料失败!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员资料
|
||||
* 获取用户资料
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$this->success('获取会员资料', $this->getMember());
|
||||
$this->success('获取用户资料', $this->getUser());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员数据统计
|
||||
* 获取用户数据统计
|
||||
*/
|
||||
public function total()
|
||||
{
|
||||
$this->success('获取会员统计!', UserService::instance()->total($this->mid));
|
||||
$this->success('获取用户统计!', UserService::instance()->total($this->uid));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -84,7 +84,7 @@ class Center extends Auth
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定会员邀请人
|
||||
* 绑定用户邀请人
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
@ -93,16 +93,16 @@ class Center extends Auth
|
||||
public function bindFrom()
|
||||
{
|
||||
$data = $this->_vali(['from.require' => '邀请人不能为空']);
|
||||
if ($data['from'] == $this->mid) {
|
||||
$this->error('邀请人不能是自己哦', UserService::instance()->total($this->mid));
|
||||
if ($data['from'] == $this->uid) {
|
||||
$this->error('邀请人不能是自己哦', UserService::instance()->total($this->uid));
|
||||
}
|
||||
$from = $this->app->db->name($this->table)->where(['id' => $data['from']])->find();
|
||||
if (empty($from)) $this->error('邀请人状态异常', UserService::instance()->get($this->mid));
|
||||
if ($this->member['from'] > 0) $this->error('您已经绑定了邀请人', UserService::instance()->total($this->mid));
|
||||
if ($this->app->db->name($this->table)->where(['id' => $this->mid])->update($data) !== false) {
|
||||
$this->success('绑定邀请人成功!', UserService::instance()->total($this->mid));
|
||||
if (empty($from)) $this->error('邀请人状态异常', UserService::instance()->get($this->uid));
|
||||
if ($this->user['from'] > 0) $this->error('您已经绑定了邀请人', UserService::instance()->total($this->uid));
|
||||
if ($this->app->db->name($this->table)->where(['id' => $this->uid])->update($data) !== false) {
|
||||
$this->success('绑定邀请人成功!', UserService::instance()->total($this->uid));
|
||||
} else {
|
||||
$this->error('绑定邀请人失败!', UserService::instance()->total($this->mid));
|
||||
$this->error('绑定邀请人失败!', UserService::instance()->total($this->uid));
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ class Center extends Auth
|
||||
public function getFrom()
|
||||
{
|
||||
$query = $this->_query($this->table);
|
||||
$query->where(['from' => $this->mid])->field('id,from,username,nickname,headimg,create_at');
|
||||
$query->where(['from' => $this->uid])->field('id,from,username,nickname,headimg,create_at');
|
||||
$this->success('获取我邀请的朋友', $query->order('id desc')->page(true, false, false, 15));
|
||||
}
|
||||
}
|
@ -13,13 +13,13 @@ use app\data\service\NewsService;
|
||||
class News extends Auth
|
||||
{
|
||||
/**
|
||||
* 会员评论内容
|
||||
* 用户评论内容
|
||||
* @throws \think\db\exception\DbException
|
||||
*/
|
||||
public function addComment()
|
||||
{
|
||||
$data = $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'code.require' => '文章不能为空!',
|
||||
'content.require' => '内容不能为空!',
|
||||
]);
|
||||
@ -39,7 +39,7 @@ class News extends Auth
|
||||
*/
|
||||
public function getComment()
|
||||
{
|
||||
$map = $this->_vali(['mid.value' => $this->mid, 'code.require' => '文章不能为空!']);
|
||||
$map = $this->_vali(['uid.value' => $this->uid, 'code.require' => '文章不能为空!']);
|
||||
$result = $this->_query('DataNewsXComment')->where($map)->order('id desc')->page(true, false);
|
||||
if (count($result['list']) > 0) {
|
||||
NewsService::instance()->buildListByMinAndCode($result);
|
||||
@ -54,7 +54,7 @@ class News extends Auth
|
||||
public function delComment()
|
||||
{
|
||||
$map = $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'id.require' => '评论ID不能为空!',
|
||||
'code.require' => '文章CODE不能为空!',
|
||||
]);
|
||||
@ -99,12 +99,12 @@ class News extends Auth
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员收藏的资讯
|
||||
* 获取用户收藏的资讯
|
||||
* @throws \think\db\exception\DbException
|
||||
*/
|
||||
public function getCollect()
|
||||
{
|
||||
$map = ['mid' => $this->mid, 'type' => 1];
|
||||
$map = ['uid' => $this->uid, 'type' => 1];
|
||||
$query = $this->_query('DataNewsXCollect')->where($map);
|
||||
$result = $query->order('id desc')->page(true, false, false, 15);
|
||||
if (count($result['list']) > 0) {
|
||||
@ -147,19 +147,19 @@ class News extends Auth
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员收藏的资讯
|
||||
* 获取用户收藏的资讯
|
||||
* @throws \think\db\exception\DbException
|
||||
*/
|
||||
public function getLike()
|
||||
{
|
||||
$query = $this->_query('DataNewsXCollect')->order('id desc');
|
||||
$result = $query->where(['mid' => $this->mid, 'type' => 2])->page(true, false, false, 15);
|
||||
$result = $query->where(['uid' => $this->uid, 'type' => 2])->page(true, false, false, 15);
|
||||
NewsService::instance()->buildListByMinAndCode($result['list']);
|
||||
$this->success('获取点赞记录成功!', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员的浏览历史
|
||||
* 获取用户的浏览历史
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
@ -167,7 +167,7 @@ class News extends Auth
|
||||
public function getHistory()
|
||||
{
|
||||
$query = $this->_query('DataNewsXCollect')->order('id desc');
|
||||
$result = $query->where(['mid' => $this->mid, 'type' => 3])->page(true, false, false, 15);
|
||||
$result = $query->where(['uid' => $this->uid, 'type' => 3])->page(true, false, false, 15);
|
||||
NewsService::instance()->buildListByMinAndCode($result['list']);
|
||||
$this->success('获取浏览历史成功!', $result);
|
||||
}
|
||||
@ -180,7 +180,7 @@ class News extends Auth
|
||||
private function _getCollectWhere(int $type = 1): array
|
||||
{
|
||||
return $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'type.value' => $type,
|
||||
'code.require' => '编号不能为空!',
|
||||
]);
|
||||
|
@ -11,7 +11,7 @@ use think\admin\extend\CodeExtend;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
/**
|
||||
* 会员订单数据接口
|
||||
* 用户订单数据接口
|
||||
* Class Order
|
||||
* @package app\data\controller\api\auth
|
||||
*/
|
||||
@ -23,7 +23,7 @@ class Order extends Auth
|
||||
protected function initialize()
|
||||
{
|
||||
parent::initialize();
|
||||
if (empty($this->member['status'])) {
|
||||
if (empty($this->user['status'])) {
|
||||
$this->error('账户已被冻结,不能操作订单数据哦!');
|
||||
}
|
||||
}
|
||||
@ -36,7 +36,7 @@ class Order extends Auth
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$map = [['mid', '=', $this->mid]];
|
||||
$map = [['uid', '=', $this->uid]];
|
||||
if (!$this->request->has('order_no', 'param', true)) {
|
||||
$map[] = ['status', 'in', [0, 2, 3, 4, 5]];
|
||||
}
|
||||
@ -47,7 +47,7 @@ class Order extends Auth
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员创建订单
|
||||
* 用户创建订单
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
@ -59,10 +59,10 @@ class Order extends Auth
|
||||
if (empty($rules)) $this->error('商品规则不能为空!');
|
||||
// 订单数据
|
||||
[$codes, $items] = [[], []];
|
||||
$order = ['mid' => $this->mid, 'from' => input('from_mid', '0'), 'status' => 1];
|
||||
$order = ['uid' => $this->uid, 'from' => input('from_mid', '0'), 'status' => 1];
|
||||
$order['order_no'] = CodeExtend::uniqidDate(18, 'N');
|
||||
// 推荐人处理
|
||||
if ($order['from'] == $this->mid) {
|
||||
if ($order['from'] == $this->uid) {
|
||||
$order['from'] = 0;
|
||||
}
|
||||
if ($order['from'] > 0) {
|
||||
@ -85,7 +85,7 @@ class Order extends Auth
|
||||
}
|
||||
// 订单详情处理
|
||||
$items[] = [
|
||||
'mid' => $order['mid'],
|
||||
'uid' => $order['uid'],
|
||||
'order_no' => $order['order_no'],
|
||||
// 商品字段
|
||||
'goods_name' => $goodsInfo['name'],
|
||||
@ -136,12 +136,12 @@ class Order extends Auth
|
||||
'code.require' => '地址编号不能为空!',
|
||||
'order_no.require' => '订单单号不能为空!',
|
||||
]);
|
||||
// 会员收货地址
|
||||
$map = ['mid' => $this->mid, 'code' => $data['code'], 'deleted' => 0];
|
||||
$addr = $this->app->db->name('DataMemberAddress')->where($map)->find();
|
||||
if (empty($addr)) $this->error('会员收货地址异常!');
|
||||
// 用户收货地址
|
||||
$map = ['uid' => $this->uid, 'code' => $data['code'], 'deleted' => 0];
|
||||
$addr = $this->app->db->name('DataUserAddress')->where($map)->find();
|
||||
if (empty($addr)) $this->error('用户收货地址异常!');
|
||||
// 订单状态检查
|
||||
$map = ['mid' => $this->mid, 'order_no' => $data['order_no']];
|
||||
$map = ['uid' => $this->uid, 'order_no' => $data['order_no']];
|
||||
$order = $this->app->db->name('ShopOrder')->where($map)->whereIn('status', [1, 2])->find();
|
||||
$tCount = $this->app->db->name('ShopOrderItem')->where($map)->sum('truck_count');
|
||||
if (empty($order)) $this->error('不能修改收货地址哦!');
|
||||
@ -151,7 +151,7 @@ class Order extends Auth
|
||||
[$amount, $tCount, $tCode, $remark] = TruckService::instance()->amount($tCode, $addr['province'], $addr['city'], $tCount);
|
||||
// 创建订单发货信息
|
||||
$express = [
|
||||
'mid' => $this->mid, 'status' => 1,
|
||||
'uid' => $this->uid, 'status' => 1,
|
||||
'template_code' => $tCode, 'template_count' => $tCount,
|
||||
'template_remark' => $remark, 'template_amount' => $amount,
|
||||
];
|
||||
@ -166,7 +166,7 @@ class Order extends Auth
|
||||
$express['address_datetime'] = date('Y-m-d H:i:s');
|
||||
data_save('ShopOrderSend', $express, 'order_no');
|
||||
// 更新订单状态,刷新订单金额
|
||||
$map = ['mid' => $this->mid, 'order_no' => $data['order_no']];
|
||||
$map = ['uid' => $this->uid, 'order_no' => $data['order_no']];
|
||||
$update = ['status' => 2, 'amount_express' => $express['template_amount']];
|
||||
$update['amount_total'] = $order['amount_goods'] + $amount - $order['amount_reduct'] - $order['amount_discount'];
|
||||
if ($this->app->db->name('ShopOrder')->where($map)->update($update) !== false) {
|
||||
@ -210,7 +210,7 @@ class Order extends Auth
|
||||
try {
|
||||
return WechatService::WePayOrder()->create([
|
||||
'body' => '商城订单支付',
|
||||
'openid' => $this->member['openid'],
|
||||
'openid' => $this->user['openid'],
|
||||
'out_trade_no' => $code,
|
||||
'total_fee' => $amount * 100,
|
||||
'trade_type' => 'JSAPI',
|
||||
@ -232,7 +232,7 @@ class Order extends Auth
|
||||
public function cancel()
|
||||
{
|
||||
$map = $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'order_no.require' => '订单号不能为空!',
|
||||
]);
|
||||
$order = $this->app->db->name('ShopOrder')->where($map)->find();
|
||||
@ -241,7 +241,7 @@ class Order extends Auth
|
||||
$result = $this->app->db->name('ShopOrder')->where($map)->update([
|
||||
'status' => 0,
|
||||
'cancel_status' => 1,
|
||||
'cancel_remark' => '会员主动取消订单!',
|
||||
'cancel_remark' => '用户主动取消订单!',
|
||||
'cancel_datetime' => date('Y-m-d H:i:s'),
|
||||
]);
|
||||
if ($result !== false && OrderService::instance()->syncStock($order['order_no'])) {
|
||||
@ -263,7 +263,7 @@ class Order extends Auth
|
||||
public function confirm()
|
||||
{
|
||||
$map = $this->_vali([
|
||||
'mid.value' => $this->mid,
|
||||
'uid.value' => $this->uid,
|
||||
'order_no.require' => '订单号不能为空!',
|
||||
]);
|
||||
$order = $this->app->db->name('ShopOrder')->where($map)->find();
|
||||
@ -288,7 +288,7 @@ class Order extends Auth
|
||||
*/
|
||||
public function total()
|
||||
{
|
||||
$map = ['mid' => $this->mid, 'deleted' => 0];
|
||||
$map = ['uid' => $this->uid, 'deleted' => 0];
|
||||
$data = ['t0' => 0, 't1' => 0, 't2' => 0, 't3' => 0, 't4' => 0, 't5' => 0];
|
||||
$query = $this->app->db->name('ShopOrder')->fieldRaw('status,count(1) count');
|
||||
$query->where($map)->group('status')->select()->each(function ($item) use (&$data) {
|
||||
|
@ -11,132 +11,12 @@
|
||||
Target Server Version : 50562
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 24/11/2020 15:32:49
|
||||
Date: 24/11/2020 15:59:13
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_member
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_member`;
|
||||
CREATE TABLE `data_member` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`from` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '邀请者MID',
|
||||
`token` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '授权TOKEN令牌',
|
||||
`tokenv` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '授权TOKEN验证',
|
||||
`openid1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '小程序OPENID',
|
||||
`openid2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '服务号OPENID',
|
||||
`unionid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号UnionID',
|
||||
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员手机',
|
||||
`headimg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员头像',
|
||||
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员姓名',
|
||||
`nickname` varchar(99) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员昵称',
|
||||
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录密码',
|
||||
`region_province` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在省份',
|
||||
`region_city` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在城市',
|
||||
`region_area` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在区域',
|
||||
`base_age` bigint(20) NULL DEFAULT 0 COMMENT '会员年龄',
|
||||
`base_sex` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员性别',
|
||||
`base_height` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员身高',
|
||||
`base_weight` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员体重',
|
||||
`base_birthday` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会员生日',
|
||||
`coin_total` bigint(20) NULL DEFAULT 0 COMMENT '金币数量',
|
||||
`coin_used` bigint(20) NULL DEFAULT 0 COMMENT '金币已用',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '会员状态(1正常,0已拉黑)',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_member_token`(`token`) USING BTREE,
|
||||
INDEX `idx_data_member_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_member_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_data_member_openid1`(`openid1`) USING BTREE,
|
||||
INDEX `idx_data_member_openid2`(`openid2`) USING BTREE,
|
||||
INDEX `idx_data_member_unionid`(`unionid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-会员' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_member
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_member_address
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_member_address`;
|
||||
CREATE TABLE `data_member_address` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员MID',
|
||||
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '地址类型(0普通,1默认)',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址编号',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货姓名',
|
||||
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货手机',
|
||||
`province` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-省份',
|
||||
`city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-城市',
|
||||
`area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-区域',
|
||||
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-详情',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_member_address_mid`(`mid`) USING BTREE,
|
||||
INDEX `idx_data_member_address_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_member_address_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_member_address_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-会员-地址' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_member_address
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_member_coin_item
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_member_coin_item`;
|
||||
CREATE TABLE `data_member_coin_item` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员ID',
|
||||
`code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录编号',
|
||||
`type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录类型',
|
||||
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录名称',
|
||||
`number` bigint(20) NULL DEFAULT 0 COMMENT '奖励数量',
|
||||
`date` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录日期',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_mid`(`mid`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_name`(`name`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_date`(`date`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_code`(`code`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据-会员-金币-获得' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_member_coin_item
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_member_coin_used
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_member_coin_used`;
|
||||
CREATE TABLE `data_member_coin_used` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员ID',
|
||||
`from` bigint(20) NULL DEFAULT 0 COMMENT '来自MID',
|
||||
`type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录类型',
|
||||
`target` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '目标ID',
|
||||
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录名称',
|
||||
`number` bigint(20) NULL DEFAULT 0 COMMENT '奖励数量',
|
||||
`date` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录日期',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_used_mid`(`mid`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_used_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_member_coin_used_name`(`name`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据-会员-金币-消费' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_member_coin_used
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_news_item
|
||||
-- ----------------------------
|
||||
@ -194,15 +74,15 @@ CREATE TABLE `data_news_mark` (
|
||||
DROP TABLE IF EXISTS `data_news_x_collect`;
|
||||
CREATE TABLE `data_news_x_collect` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员MID',
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户UID',
|
||||
`type` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '记录类型(1收藏,2点赞,3历史)',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章编号',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_mid`(`mid`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_mid`(`uid`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_code`(`code`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-文章-会员-数据' ROW_FORMAT = Compact;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-文章-标记' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_news_x_collect
|
||||
@ -214,19 +94,164 @@ CREATE TABLE `data_news_x_collect` (
|
||||
DROP TABLE IF EXISTS `data_news_x_comment`;
|
||||
CREATE TABLE `data_news_x_comment` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员MID',
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户UID',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章编号',
|
||||
`content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '评论内容',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_news_x_comment_mid`(`mid`) USING BTREE,
|
||||
INDEX `idx_data_news_x_comment_mid`(`uid`) USING BTREE,
|
||||
INDEX `idx_data_news_x_comment_code`(`code`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-文章-会员-评论' ROW_FORMAT = COMPACT;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-文章-评论' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_news_x_comment
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_user`;
|
||||
CREATE TABLE `data_user` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`from` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '邀请者UID',
|
||||
`token` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '授权TOKEN令牌',
|
||||
`tokenv` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '授权TOKEN验证',
|
||||
`openid1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '小程序OPENID',
|
||||
`openid2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '服务号OPENID',
|
||||
`unionid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号UnionID',
|
||||
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户手机',
|
||||
`headimg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户头像',
|
||||
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户姓名',
|
||||
`nickname` varchar(99) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户昵称',
|
||||
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录密码',
|
||||
`region_province` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在省份',
|
||||
`region_city` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在城市',
|
||||
`region_area` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在区域',
|
||||
`base_age` bigint(20) NULL DEFAULT 0 COMMENT '用户年龄',
|
||||
`base_sex` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户性别',
|
||||
`base_height` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户身高',
|
||||
`base_weight` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户体重',
|
||||
`base_birthday` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户生日',
|
||||
`coin_total` bigint(20) NULL DEFAULT 0 COMMENT '金币数量',
|
||||
`coin_used` bigint(20) NULL DEFAULT 0 COMMENT '金币已用',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '用户状态(1正常,0已拉黑)',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_token`(`token`) USING BTREE,
|
||||
INDEX `idx_data_user_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_user_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_data_user_openid1`(`openid1`) USING BTREE,
|
||||
INDEX `idx_data_user_openid2`(`openid2`) USING BTREE,
|
||||
INDEX `idx_data_user_unionid`(`unionid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_user
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_address
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_user_address`;
|
||||
CREATE TABLE `data_user_address` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户UID',
|
||||
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '地址类型(0普通,1默认)',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址编号',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货姓名',
|
||||
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货手机',
|
||||
`province` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-省份',
|
||||
`city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-城市',
|
||||
`area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-区域',
|
||||
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-详情',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_address_mid`(`uid`) USING BTREE,
|
||||
INDEX `idx_data_user_address_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_address_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_user_address_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-地址' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_user_address
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_coin_item
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_user_coin_item`;
|
||||
CREATE TABLE `data_user_coin_item` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户UID',
|
||||
`code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录编号',
|
||||
`type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录类型',
|
||||
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录名称',
|
||||
`number` bigint(20) NULL DEFAULT 0 COMMENT '奖励数量',
|
||||
`date` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录日期',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_mid`(`uid`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_name`(`name`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_date`(`date`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_code`(`code`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据-用户-金币-获得' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_user_coin_item
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_coin_used
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_user_coin_used`;
|
||||
CREATE TABLE `data_user_coin_used` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户UID',
|
||||
`from` bigint(20) NULL DEFAULT 0 COMMENT '来自UID',
|
||||
`type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录类型',
|
||||
`target` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '目标ID',
|
||||
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录名称',
|
||||
`number` bigint(20) NULL DEFAULT 0 COMMENT '奖励数量',
|
||||
`date` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '记录日期',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_used_mid`(`uid`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_used_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_coin_used_name`(`name`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据-用户-金币-消费' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_user_coin_used
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_message
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_user_message`;
|
||||
CREATE TABLE `data_user_message` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`type` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '短信类型',
|
||||
`msgid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '消息编号',
|
||||
`phone` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '目标手机',
|
||||
`region` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '国家编号',
|
||||
`result` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '返回结果',
|
||||
`content` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '短信内容',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '短信状态(0失败,1成功)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_message_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_message_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_user_message_phone`(`phone`) USING BTREE,
|
||||
INDEX `idx_data_user_message_msgid`(`msgid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统-用户-短信' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data_user_message
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_goods
|
||||
-- ----------------------------
|
||||
@ -364,8 +389,8 @@ CREATE TABLE `shop_goods_stock` (
|
||||
DROP TABLE IF EXISTS `shop_order`;
|
||||
CREATE TABLE `shop_order` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员编号',
|
||||
`from` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '推荐会员',
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户编号',
|
||||
`from` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '推荐用户',
|
||||
`order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单编号',
|
||||
`amount_total` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '支付总金额',
|
||||
`amount_goods` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品总金额',
|
||||
@ -385,7 +410,7 @@ CREATE TABLE `shop_order` (
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_order_mid`(`mid`) USING BTREE,
|
||||
INDEX `idx_shop_order_mid`(`uid`) USING BTREE,
|
||||
INDEX `idx_shop_order_from`(`from`) USING BTREE,
|
||||
INDEX `idx_shop_order_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_order_deleted`(`deleted`) USING BTREE,
|
||||
@ -404,7 +429,7 @@ CREATE TABLE `shop_order` (
|
||||
DROP TABLE IF EXISTS `shop_order_item`;
|
||||
CREATE TABLE `shop_order_item` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员编号',
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户编号',
|
||||
`order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单单号',
|
||||
`goods_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品名称',
|
||||
`goods_cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品图片',
|
||||
@ -440,7 +465,7 @@ CREATE TABLE `shop_order_item` (
|
||||
DROP TABLE IF EXISTS `shop_order_send`;
|
||||
CREATE TABLE `shop_order_send` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员编号',
|
||||
`uid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户编号',
|
||||
`order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单订单',
|
||||
`address_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送地址编号',
|
||||
`address_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送收货人姓名',
|
||||
@ -463,7 +488,7 @@ CREATE TABLE `shop_order_send` (
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_mid`(`mid`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_mid`(`uid`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_order_no`(`order_no`) USING BTREE
|
||||
|
@ -45,7 +45,7 @@ class MessageService extends Service
|
||||
public function send(string $phone, string $content): array
|
||||
{
|
||||
[$state, $message, $record] = $this->_request('v2/sendSms', ['mobile' => $phone, 'content' => $content]);
|
||||
$this->app->db->name('DataMemberMessage')->insert([
|
||||
$this->app->db->name('DataUserMessage')->insert([
|
||||
'phone' => $phone, 'content' => $content, 'result' => $message, 'status' => $state ? 1 : 0,
|
||||
]);
|
||||
return [$state, $message, $record];
|
||||
|
@ -43,12 +43,12 @@ class NewsService extends Service
|
||||
$items = $this->app->db->name('DataNewsItem')->whereIn('code', $codes)->column($colls, 'code');
|
||||
$marks = $this->app->db->name('DataNewsMark')->where(['status' => 1])->column('name');
|
||||
foreach ($items as &$vo) $vo['mark'] = str2arr($vo['mark'] ?: '', ',', $marks);
|
||||
/*! 绑定会员数据 */
|
||||
$mids = array_unique(array_column($list, 'mid'));
|
||||
/*! 绑定用户数据 */
|
||||
$mids = array_unique(array_column($list, 'uid'));
|
||||
$colls = 'id,phone,nickname,username,headimg,status';
|
||||
$users = $this->app->db->name('DataMember')->whereIn('id', $mids)->column($colls, 'id');
|
||||
$users = $this->app->db->name('DataUser')->whereIn('id', $mids)->column($colls, 'id');
|
||||
foreach ($list as &$vo) {
|
||||
$vo['member'] = $users[$vo['mid']] ?? [];
|
||||
$vo['member'] = $users[$vo['uid']] ?? [];
|
||||
$vo['record'] = $items[$vo['code']] ?? [];
|
||||
}
|
||||
}
|
||||
@ -58,7 +58,7 @@ class NewsService extends Service
|
||||
/**
|
||||
* 获取列表状态
|
||||
* @param array $list 数据列表
|
||||
* @param integer $mid 会员MID
|
||||
* @param integer $mid 用户UID
|
||||
* @return array
|
||||
*/
|
||||
public function buildListState(array &$list, int $mid = 0): array
|
||||
@ -66,7 +66,7 @@ class NewsService extends Service
|
||||
if (count($list) > 0) {
|
||||
[$code2, $code1, $marks] = [[], [], []];
|
||||
if ($mid > 0) {
|
||||
$map = [['mid', '=', $mid], ['code', 'in', array_unique(array_column($list, 'code'))]];
|
||||
$map = [['uid', '=', $mid], ['code', 'in', array_unique(array_column($list, 'code'))]];
|
||||
$marks = $this->app->db->name('DataNewsMark')->where(['status' => 1])->column('name');
|
||||
$code1 = $this->app->db->name('DataNewsXCollect')->where($map)->where(['type' => 1])->column('code');
|
||||
$code2 = $this->app->db->name('DataNewsXCollect')->where($map)->where(['type' => 2])->column('code');
|
||||
|
@ -57,9 +57,9 @@ class OrderService extends Service
|
||||
*/
|
||||
public function buildItemData(array &$data = []): array
|
||||
{
|
||||
// 关联会员数据
|
||||
$mids = array_unique(array_merge(array_column($data, 'mid'), array_column($data, 'from')));
|
||||
$members = $this->app->db->name('DataMember')->whereIn('id', $mids)->column('*', 'id');
|
||||
// 关联用户数据
|
||||
$mids = array_unique(array_merge(array_column($data, 'uid'), array_column($data, 'from')));
|
||||
$members = $this->app->db->name('DataUser')->whereIn('id', $mids)->column('*', 'id');
|
||||
foreach ($members as &$user) {
|
||||
unset($user['token'], $user['tokenv'], $user['openid1'], $user['openid2']);
|
||||
unset($user['unionid'], $user['password'], $user['status'], $user['deleted']);
|
||||
@ -67,13 +67,13 @@ class OrderService extends Service
|
||||
// 关联发货信息
|
||||
$nobs = array_unique(array_column($data, 'order_no'));
|
||||
$trucks = $this->app->db->name('ShopOrderSend')->whereIn('order_no', $nobs)->column('*', 'order_no');
|
||||
foreach ($trucks as &$item) unset($item['id'], $item['mid'], $item['status'], $item['deleted'], $item['create_at']);
|
||||
foreach ($trucks as &$item) unset($item['id'], $item['uid'], $item['status'], $item['deleted'], $item['create_at']);
|
||||
// 关联订单商品
|
||||
$query = $this->app->db->name('ShopOrderItem')->where(['status' => 1, 'deleted' => 0]);
|
||||
$items = $query->withoutField('id,mid,status,deleted,create_at')->whereIn('order_no', $nobs)->select()->toArray();
|
||||
$items = $query->withoutField('id,uid,status,deleted,create_at')->whereIn('order_no', $nobs)->select()->toArray();
|
||||
foreach ($data as &$vo) {
|
||||
$vo['sales'] = 0;
|
||||
$vo['member'] = $members[$vo['mid']] ?? [];
|
||||
$vo['member'] = $members[$vo['uid']] ?? [];
|
||||
$vo['fromer'] = $members[$vo['from']] ?? [];
|
||||
$vo['truck'] = $trucks[$vo['order_no']] ?? [];
|
||||
$vo['items'] = [];
|
||||
|
@ -5,7 +5,7 @@ namespace app\data\service;
|
||||
use think\admin\Service;
|
||||
|
||||
/**
|
||||
* 会员数据接口服务
|
||||
* 用户数据接口服务
|
||||
* Class UserService
|
||||
* @package app\store\service
|
||||
*/
|
||||
@ -15,10 +15,10 @@ class UserService extends Service
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'DataMember';
|
||||
protected $table = 'DataUser';
|
||||
|
||||
/**
|
||||
* 获取会员资料
|
||||
* 获取用户资料
|
||||
* @param mixed $map 查询条件
|
||||
* @param boolean $force 刷新令牌
|
||||
* @return array
|
||||
@ -43,7 +43,7 @@ class UserService extends Service
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新会员用户参数
|
||||
* 更新用户用户参数
|
||||
* @param array $map 查询条件
|
||||
* @param array $data 更新数据
|
||||
* @param boolean $force 强刷令牌
|
||||
@ -73,8 +73,8 @@ class UserService extends Service
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员数据统计
|
||||
* @param int $mid 会员MID
|
||||
* 获取用户数据统计
|
||||
* @param int $mid 用户UID
|
||||
* @return array
|
||||
*/
|
||||
public function total(int $mid): array
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{block name="content"}
|
||||
<div class="layui-badge nowrap think-bg-red padding-5 padding-left-10 font-s15 layui-anim layui-anim-upbit">
|
||||
注意:短信接口配置的参数不能随意修改,会影响到会员注册发送短信通知功能,若有需要调整请联系客服!
|
||||
注意:短信接口配置的参数不能随意修改,会影响到用户注册发送短信通知功能,若有需要调整请联系客服!
|
||||
</div>
|
||||
<div class="think-box-shadow">
|
||||
<form style="width:800px" onsubmit="return false;" data-auto="true" action="{$request->url()}" method="post" class='layui-form layui-card shadow-none' autocomplete="off">
|
||||
@ -40,9 +40,9 @@
|
||||
</label>
|
||||
|
||||
<label class="layui-form-item block relative">
|
||||
<span class="color-green font-w7 margin-right-10">会员注册通知模板</span><span class="nowrap color-desc">RegisterTemplate</span>
|
||||
<span class="color-green font-w7 margin-right-10">用户注册通知模板</span><span class="nowrap color-desc">RegisterTemplate</span>
|
||||
<textarea class="layui-textarea" name="zt.tplcode_register">{:sysconf('zt.tplcode_register')}</textarea>
|
||||
<span class="help-block">会员注册短信模板,验证码变量使用 {code} 代替</span>
|
||||
<span class="help-block">用户注册短信模板,验证码变量使用 {code} 代替</span>
|
||||
</label>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
|
@ -12,7 +12,7 @@
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow table-block">
|
||||
{empty name='list'}
|
||||
<blockquote class="layui-elem-quote">没 有 记 录 哦!</blockquote>
|
||||
<blockquote class="notdata">没有记录哦!</blockquote>
|
||||
{else}
|
||||
<table class="layui-table" lay-skin="line">
|
||||
<thead>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th>会员信息</th>
|
||||
<th>用户信息</th>
|
||||
<th>订单信息</th>
|
||||
<th>发货信息</th>
|
||||
<th>商品信息</th>
|
||||
@ -36,15 +36,15 @@
|
||||
<div>
|
||||
<div class="headimg" data-tips-image data-lazy-src="{$vo.fromer.headimg|default='__ROOT__/static/theme/img/headimg.png'}"></div>
|
||||
<div class="inline-block sub-span-blue">
|
||||
推荐会员:{$vo.fromer.nickname|default='--'}<br>
|
||||
推荐用户:{$vo.fromer.nickname|default='--'}<br>
|
||||
推荐手机:<span>{$vo.fromer.phone|default='--'}</span><br>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="headimg" data-tips-image data-lazy-src="{$vo.member.headimg|default='__ROOT__/static/theme/img/headimg.png'}"></div>
|
||||
<div class="inline-block sub-span-blue">
|
||||
会员昵称:{$vo.member.nickname|default='--'}<br>
|
||||
会员手机:<span>{$vo.member.phone|default='--'}</span><br>
|
||||
用户昵称:{$vo.member.nickname|default='--'}<br>
|
||||
用户手机:<span>{$vo.member.phone|default='--'}</span><br>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -2,27 +2,27 @@
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员手机</label>
|
||||
<label class="layui-form-label">用户手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="member_phone" value="{:input('member_phone')}" placeholder="请输入会员手机" class="layui-input">
|
||||
<input name="member_phone" value="{:input('member_phone')}" placeholder="请输入用户手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员昵称</label>
|
||||
<label class="layui-form-label">用户昵称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="member_nickname" value="{:input('member_nickname')}" placeholder="请输入会员昵称" class="layui-input">
|
||||
<input name="member_nickname" value="{:input('member_nickname')}" placeholder="请输入用户昵称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">推荐手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="from_phone" value="{:input('from_phone')}" placeholder="请输入会员手机" class="layui-input">
|
||||
<input name="from_phone" value="{:input('from_phone')}" placeholder="请输入用户手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">推荐昵称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="from_nickname" value="{:input('from_nickname')}" placeholder="请输入会员昵称" class="layui-input">
|
||||
<input name="from_nickname" value="{:input('from_nickname')}" placeholder="请输入用户昵称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
@ -118,8 +118,8 @@
|
||||
item.payment_datetime || '',
|
||||
];
|
||||
});
|
||||
data.unshift(['订单单号', '会员手机', '会员姓名', '支付单号', '支付状态', '支付金额', '支付时间']);
|
||||
data.unshift(['订单单号', '用户手机', '用户姓名', '支付单号', '支付状态', '支付金额', '支付时间']);
|
||||
return data;
|
||||
}, '会员订单记录');
|
||||
}, '用户订单记录');
|
||||
});
|
||||
</script>
|
@ -19,7 +19,7 @@
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th>会员信息</th>
|
||||
<th>用户信息</th>
|
||||
<th>收货信息</th>
|
||||
<th>发货状态</th>
|
||||
<th></th>
|
||||
@ -35,8 +35,8 @@
|
||||
<td class="nowrap relative">
|
||||
<div class="headimg" style="width:56px;height:56px" data-tips-image data-lazy-src="{$vo.member.headimg|default='__ROOT__/static/theme/img/headimg.png'}"></div>
|
||||
<div class="inline-block sub-span-blue">
|
||||
会员昵称:<span>{$vo.member.nickname|default='--'}</span><br>
|
||||
会员手机:<span>{$vo.member.phone|default='--'}</span><br>
|
||||
用户昵称:<span>{$vo.member.nickname|default='--'}</span><br>
|
||||
用户手机:<span>{$vo.member.phone|default='--'}</span><br>
|
||||
订单单号:<span>{$vo.order_no|default='--'}</span><br>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -2,15 +2,15 @@
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员手机</label>
|
||||
<label class="layui-form-label">用户手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="member_phone" value="{:input('member_phone')}" placeholder="请输入会员手机" class="layui-input">
|
||||
<input name="member_phone" value="{:input('member_phone')}" placeholder="请输入用户手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员昵称</label>
|
||||
<label class="layui-form-label">用户昵称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="member_nickname" value="{:input('member_nickname')}" placeholder="请输入会员昵称" class="layui-input">
|
||||
<input name="member_nickname" value="{:input('member_nickname')}" placeholder="请输入用户昵称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
@ -92,7 +92,7 @@
|
||||
];
|
||||
});
|
||||
data.unshift([
|
||||
'订单单号', '会员手机', '会员姓名', '收货人姓名', '收货人手机', '配送省份', '配送城市',
|
||||
'订单单号', '用户手机', '用户姓名', '收货人姓名', '收货人手机', '配送省份', '配送城市',
|
||||
'配送区域', '配送详细地址', '提交时间', '快递公司', '配送单号', '发货时间'
|
||||
]);
|
||||
return data;
|
||||
|
@ -19,7 +19,7 @@
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th style="width:360px">会员信息</th>
|
||||
<th style="width:360px">用户信息</th>
|
||||
<th style="width:360px">订单信息</th>
|
||||
<th>发货信息</th>
|
||||
<th>商品信息</th>
|
||||
@ -36,15 +36,15 @@
|
||||
<div>
|
||||
<img data-tips-image style="width:35px;height:35px" src="{$vo.from_member.headimg|default='__ROOT__/static/theme/img/headimg.png'}" class="margin-right-5" alt="img">
|
||||
<div class="inline-block text-middle sub-span-blue">
|
||||
推荐会员:{$vo.from_member.nickname|default='--'}<br>
|
||||
推荐用户:{$vo.from_member.nickname|default='--'}<br>
|
||||
推荐手机:<span>{$vo.from_member.phone|default='--'}</span>{notempty name='vo.from_member.vip_level'} [ <b class="color-red">VIP{$vo.from_member.vip_level}</b> ] <b class="color-red">{$vo.from_member.vip_title}</b>{/notempty}<br>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<img data-tips-image style="width:35px;height:35px" src="{$vo.member.headimg|default='__ROOT__/static/theme/img/headimg.png'}" class="margin-right-5" alt="img">
|
||||
<div class="inline-block text-middle sub-span-blue">
|
||||
会员昵称:{$vo.member.nickname|default='--'}<br>
|
||||
会员手机:<span>{$vo.member.phone|default='--'}</span>{notempty name='vo.member.vip_level'} [ <b class="color-red">VIP{$vo.member.vip_level}</b> ] <b class="color-red">{$vo.member.vip_title}</b>{/notempty}<br>
|
||||
用户昵称:{$vo.member.nickname|default='--'}<br>
|
||||
用户手机:<span>{$vo.member.phone|default='--'}</span>{notempty name='vo.member.vip_level'} [ <b class="color-red">VIP{$vo.member.vip_level}</b> ] <b class="color-red">{$vo.member.vip_title}</b>{/notempty}<br>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -2,27 +2,27 @@
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员手机</label>
|
||||
<label class="layui-form-label">用户手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="member_phone" value="{:input('member_phone')}" placeholder="请输入会员手机" class="layui-input">
|
||||
<input name="member_phone" value="{:input('member_phone')}" placeholder="请输入用户手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员昵称</label>
|
||||
<label class="layui-form-label">用户昵称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="member_nickname" value="{:input('member_nickname')}" placeholder="请输入会员昵称" class="layui-input">
|
||||
<input name="member_nickname" value="{:input('member_nickname')}" placeholder="请输入用户昵称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">推荐手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="agent_phone" value="{:input('agent_phone')}" placeholder="请输入会员手机" class="layui-input">
|
||||
<input name="agent_phone" value="{:input('agent_phone')}" placeholder="请输入用户手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">推荐昵称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="agent_nickname" value="{:input('agent_nickname')}" placeholder="请输入会员昵称" class="layui-input">
|
||||
<input name="agent_nickname" value="{:input('agent_nickname')}" placeholder="请输入用户昵称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow table-block">
|
||||
{include file='member/index_search'}
|
||||
{include file='user/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
@ -2,9 +2,9 @@
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员手机</label>
|
||||
<label class="layui-form-label">用户手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="phone" value="{:input('phone')}" placeholder="请输入会员手机" class="layui-input">
|
||||
<input name="phone" value="{:input('phone')}" placeholder="请输入用户手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
@ -17,7 +17,7 @@
|
||||
<label class="layui-form-label">使用状态</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="status">
|
||||
{foreach [''=>'-- 全部 --','0'=>'已冻结的会员','1'=>'已激活的会员'] as $k=>$v}
|
||||
{foreach [''=>'-- 全部 --','0'=>'已冻结的用户','1'=>'已激活的用户'] as $k=>$v}
|
||||
{if $k.'' eq input('status')}
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
{else}
|
56
app/data/view/user_message/index.html
Normal file
56
app/data/view/user_message/index.html
Normal file
@ -0,0 +1,56 @@
|
||||
{extend name="../../admin/view/main"}
|
||||
|
||||
{block name="button"}
|
||||
<!--{if auth("remove")}-->
|
||||
<button data-action='{:url("remove")}' data-rule="id#{key}" data-confirm="确实要删除这些记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除记录</button>
|
||||
<!--{/if}-->
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='user_message/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label>
|
||||
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
||||
</label>
|
||||
</th>
|
||||
<th class='text-left nowrap'>目标手机</th>
|
||||
<th class='text-left nowrap'>短信内容</th>
|
||||
<th class='text-left nowrap'>执行结果</th>
|
||||
<th class='text-left nowrap'>发送时间</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<label>
|
||||
<input class="list-check-box" value='{$vo.id}' type='checkbox'>
|
||||
</label>
|
||||
</td>
|
||||
<td>{$vo.phone|default=''}</td>
|
||||
<td>{$vo.content|default=''}</td>
|
||||
<td>
|
||||
{if $vo.status eq 0}<b class="color-red margin-right-5">失败</b>{/if}
|
||||
{if $vo.status eq 1}<b class="color-green margin-right-5">成功</b>{/if}
|
||||
{$vo.result|default=''}
|
||||
</td>
|
||||
<td>{$vo.create_at|default=''}<br></td>
|
||||
<td>
|
||||
<!--{if auth("remove")}-->
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
|
||||
<!--{/if}-->
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
40
app/data/view/user_message/index_search.html
Normal file
40
app/data/view/user_message/index_search.html
Normal file
@ -0,0 +1,40 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">目标手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="phone" value="{:input('phone')}" placeholder="请输入目标手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">短信内容</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="content" value="{:input('content')}" placeholder="请输入短信内容" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">发送状态</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="status">
|
||||
{foreach [''=>'-- 全部 --','0'=>'已发送失败的短信','1'=>'已发送成功的短信'] as $k=>$v}
|
||||
{if $k.'' eq input('status')}
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
{else}
|
||||
<option value="{$k}">{$v}</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">发送时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="create_at" value="{:input('create_at','')}" placeholder="请选择发送时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
3
vendor/composer/autoload_classmap.php
vendored
3
vendor/composer/autoload_classmap.php
vendored
@ -200,7 +200,7 @@ return array(
|
||||
'app\\admin\\controller\\api\\Update' => $baseDir . '/app/admin/controller/api/Update.php',
|
||||
'app\\admin\\controller\\api\\Upload' => $baseDir . '/app/admin/controller/api/Upload.php',
|
||||
'app\\data\\controller\\Config' => $baseDir . '/app/data/controller/Config.php',
|
||||
'app\\data\\controller\\Member' => $baseDir . '/app/data/controller/Member.php',
|
||||
'app\\data\\controller\\Message' => $baseDir . '/app/data/controller/Message.php',
|
||||
'app\\data\\controller\\NewsItem' => $baseDir . '/app/data/controller/NewsItem.php',
|
||||
'app\\data\\controller\\NewsMark' => $baseDir . '/app/data/controller/NewsMark.php',
|
||||
'app\\data\\controller\\ShopGoods' => $baseDir . '/app/data/controller/ShopGoods.php',
|
||||
@ -214,6 +214,7 @@ return array(
|
||||
'app\\data\\controller\\StoreItem' => $baseDir . '/app/data/controller/StoreItem.php',
|
||||
'app\\data\\controller\\StoreUsed' => $baseDir . '/app/data/controller/StoreUsed.php',
|
||||
'app\\data\\controller\\StoreUser' => $baseDir . '/app/data/controller/StoreUser.php',
|
||||
'app\\data\\controller\\User' => $baseDir . '/app/data/controller/User.php',
|
||||
'app\\data\\controller\\api\\Auth' => $baseDir . '/app/data/controller/api/Auth.php',
|
||||
'app\\data\\controller\\api\\Data' => $baseDir . '/app/data/controller/api/Data.php',
|
||||
'app\\data\\controller\\api\\Goods' => $baseDir . '/app/data/controller/api/Goods.php',
|
||||
|
3
vendor/composer/autoload_static.php
vendored
3
vendor/composer/autoload_static.php
vendored
@ -328,7 +328,7 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
|
||||
'app\\admin\\controller\\api\\Update' => __DIR__ . '/../..' . '/app/admin/controller/api/Update.php',
|
||||
'app\\admin\\controller\\api\\Upload' => __DIR__ . '/../..' . '/app/admin/controller/api/Upload.php',
|
||||
'app\\data\\controller\\Config' => __DIR__ . '/../..' . '/app/data/controller/Config.php',
|
||||
'app\\data\\controller\\Member' => __DIR__ . '/../..' . '/app/data/controller/Member.php',
|
||||
'app\\data\\controller\\Message' => __DIR__ . '/../..' . '/app/data/controller/Message.php',
|
||||
'app\\data\\controller\\NewsItem' => __DIR__ . '/../..' . '/app/data/controller/NewsItem.php',
|
||||
'app\\data\\controller\\NewsMark' => __DIR__ . '/../..' . '/app/data/controller/NewsMark.php',
|
||||
'app\\data\\controller\\ShopGoods' => __DIR__ . '/../..' . '/app/data/controller/ShopGoods.php',
|
||||
@ -342,6 +342,7 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
|
||||
'app\\data\\controller\\StoreItem' => __DIR__ . '/../..' . '/app/data/controller/StoreItem.php',
|
||||
'app\\data\\controller\\StoreUsed' => __DIR__ . '/../..' . '/app/data/controller/StoreUsed.php',
|
||||
'app\\data\\controller\\StoreUser' => __DIR__ . '/../..' . '/app/data/controller/StoreUser.php',
|
||||
'app\\data\\controller\\User' => __DIR__ . '/../..' . '/app/data/controller/User.php',
|
||||
'app\\data\\controller\\api\\Auth' => __DIR__ . '/../..' . '/app/data/controller/api/Auth.php',
|
||||
'app\\data\\controller\\api\\Data' => __DIR__ . '/../..' . '/app/data/controller/api/Data.php',
|
||||
'app\\data\\controller\\api\\Goods' => __DIR__ . '/../..' . '/app/data/controller/api/Goods.php',
|
||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -937,12 +937,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||
"reference": "a4bd4d43c1d3c682eaba68cb289d6f6b7109cc65"
|
||||
"reference": "5b98a7ea56e25ca1887ab4f8ec74c715f3500aa7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a4bd4d43c1d3c682eaba68cb289d6f6b7109cc65",
|
||||
"reference": "a4bd4d43c1d3c682eaba68cb289d6f6b7109cc65",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/5b98a7ea56e25ca1887ab4f8ec74c715f3500aa7",
|
||||
"reference": "5b98a7ea56e25ca1887ab4f8ec74c715f3500aa7",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -959,7 +959,7 @@
|
||||
"ext-mbstring": "*",
|
||||
"topthink/framework": "^6.0"
|
||||
},
|
||||
"time": "2020-11-23T04:50:12+00:00",
|
||||
"time": "2020-11-23T06:25:57+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"think": {
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-11-23 12:57:55
|
||||
// This file is automatically generated at:2020-11-24 16:08:08
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
@ -41,7 +41,7 @@ class Library extends Service
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
const VERSION = '6.0.20';
|
||||
const VERSION = '6.0.21';
|
||||
|
||||
/**
|
||||
* 启动服务
|
||||
|
Loading…
x
Reference in New Issue
Block a user