优化提交
This commit is contained in:
parent
839555dd0f
commit
813cfd5cfd
@ -77,7 +77,7 @@ class Dashboard extends Backend
|
||||
|
||||
$this->assignconfig('column', array_keys($userlist));
|
||||
$this->assignconfig('userdata', array_values($userlist));
|
||||
|
||||
$this->getAuthMsg();
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,8 @@ class Third extends Backend
|
||||
public function index()
|
||||
{
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","user_id","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -61,6 +61,10 @@ class Admin extends Backend
|
||||
|
||||
$this->view->assign('groupdata', $groupdata);
|
||||
$this->assignconfig("admin", ['id' => $this->auth->id]);
|
||||
$this->getCity();
|
||||
|
||||
$this->view->assign("addressCityListJson", json_encode($this->model->getAddressCityList(), JSON_UNESCAPED_UNICODE));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,10 @@
|
||||
|
||||
namespace app\admin\controller\dyqc;
|
||||
|
||||
use app\admin\model\Admin;
|
||||
use app\common\controller\Backend;
|
||||
use fast\Tree;
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* 店铺管理
|
||||
@ -18,6 +21,7 @@ class ManystoreShop extends Backend
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
@ -68,4 +72,158 @@ class ManystoreShop extends Backend
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Selectpage的实现方法
|
||||
*
|
||||
* 当前方法只是一个比较通用的搜索匹配,请按需重载此方法来编写自己的搜索逻辑,$where按自己的需求写即可
|
||||
* 这里示例了所有的参数,所以比较复杂,实现上自己实现只需简单的几行即可
|
||||
*
|
||||
*/
|
||||
protected function selectpage()
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['trim', 'strip_tags', 'htmlspecialchars']);
|
||||
|
||||
//搜索关键词,客户端输入以空格分开,这里接收为数组
|
||||
$word = (array)$this->request->request("q_word/a");
|
||||
//当前页
|
||||
$page = $this->request->request("pageNumber");
|
||||
//分页大小
|
||||
$pagesize = $this->request->request("pageSize");
|
||||
//搜索条件
|
||||
$andor = $this->request->request("andOr", "and", "strtoupper");
|
||||
//排序方式
|
||||
$orderby = (array)$this->request->request("orderBy/a");
|
||||
//显示的字段
|
||||
$field = $this->request->request("showField");
|
||||
//主键
|
||||
$primarykey = $this->request->request("keyField");
|
||||
//主键值
|
||||
$primaryvalue = $this->request->request("keyValue");
|
||||
//搜索字段
|
||||
$searchfield = (array)$this->request->request("searchField/a");
|
||||
//自定义搜索条件
|
||||
$custom = (array)$this->request->request("custom/a");
|
||||
//是否返回树形结构
|
||||
$istree = $this->request->request("isTree", 0);
|
||||
$ishtml = $this->request->request("isHtml", 0);
|
||||
if ($istree) {
|
||||
$word = [];
|
||||
$pagesize = 999999;
|
||||
}
|
||||
$order = [];
|
||||
foreach ($orderby as $k => $v) {
|
||||
$order[$v[0]] = $v[1];
|
||||
}
|
||||
$field = $field ? $field : 'name';
|
||||
|
||||
//如果有primaryvalue,说明当前是初始化传值
|
||||
if ($primaryvalue !== null) {
|
||||
$where = [$primarykey => ['in', $primaryvalue]];
|
||||
$pagesize = 999999;
|
||||
} else {
|
||||
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
|
||||
$logic = $andor == 'AND' ? '&' : '|';
|
||||
$searchfield = is_array($searchfield) ? implode($logic, $searchfield) : $searchfield;
|
||||
$searchfield = str_replace(',', $logic, $searchfield);
|
||||
$word = array_filter(array_unique($word));
|
||||
if (count($word) == 1) {
|
||||
$query->where($searchfield, "like", "%" . reset($word) . "%");
|
||||
} else {
|
||||
$query->where(function ($query) use ($word, $searchfield) {
|
||||
foreach ($word as $index => $item) {
|
||||
$query->whereOr(function ($query) use ($item, $searchfield) {
|
||||
$query->where($searchfield, "like", "%{$item}%");
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if ($custom && is_array($custom)) {
|
||||
foreach ($custom as $k => $v) {
|
||||
if (is_array($v) && 2 == count($v)) {
|
||||
$query->where($k, trim($v[0]), $v[1]);
|
||||
} else {
|
||||
$query->where($k, '=', $v);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds)) {
|
||||
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
}
|
||||
|
||||
$shopIds = Admin::getHaveShopId($this->auth->id);
|
||||
if(is_array($shopIds)){
|
||||
$this->model->where('id',"in",$shopIds);
|
||||
}
|
||||
|
||||
|
||||
$list = [];
|
||||
$total = $this->model->where($where)->count();
|
||||
if ($total > 0) {
|
||||
|
||||
$shopIds = Admin::getHaveShopId($this->auth->id);
|
||||
if(is_array($shopIds)){
|
||||
$this->model->where('id',"in",$shopIds);
|
||||
}
|
||||
|
||||
|
||||
if (is_array($adminIds)) {
|
||||
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
}
|
||||
|
||||
$fields = is_array($this->selectpageFields) ? $this->selectpageFields : ($this->selectpageFields && $this->selectpageFields != '*' ? explode(',', $this->selectpageFields) : []);
|
||||
|
||||
//如果有primaryvalue,说明当前是初始化传值,按照选择顺序排序
|
||||
if ($primaryvalue !== null && preg_match("/^[a-z0-9_\-]+$/i", $primarykey)) {
|
||||
$primaryvalue = array_unique(is_array($primaryvalue) ? $primaryvalue : explode(',', $primaryvalue));
|
||||
//修复自定义data-primary-key为字符串内容时,给排序字段添加上引号
|
||||
$primaryvalue = array_map(function ($value) {
|
||||
return '\'' . $value . '\'';
|
||||
}, $primaryvalue);
|
||||
|
||||
$primaryvalue = implode(',', $primaryvalue);
|
||||
|
||||
$this->model->orderRaw("FIELD(`{$primarykey}`, {$primaryvalue})");
|
||||
} else {
|
||||
$this->model->order($order);
|
||||
}
|
||||
|
||||
$datalist = $this->model->where($where)
|
||||
->page($page, $pagesize)
|
||||
->select();
|
||||
|
||||
foreach ($datalist as $index => $item) {
|
||||
unset($item['password'], $item['salt']);
|
||||
if ($this->selectpageFields == '*') {
|
||||
$result = [
|
||||
$primarykey => $item[$primarykey] ?? '',
|
||||
$field => $item[$field] ?? '',
|
||||
];
|
||||
} else {
|
||||
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
|
||||
}
|
||||
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
|
||||
$list[] = $result;
|
||||
}
|
||||
if ($istree && !$primaryvalue) {
|
||||
$tree = Tree::instance();
|
||||
$tree->init(collection($list)->toArray(), 'pid');
|
||||
$list = $tree->getTreeList($tree->getTreeArray(0), $field);
|
||||
if (!$ishtml) {
|
||||
foreach ($list as &$item) {
|
||||
$item = str_replace(' ', ' ', $item);
|
||||
}
|
||||
unset($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
|
||||
return json(['list' => $list, 'total' => $total]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\admin\controller\manystore;
|
||||
|
||||
use app\admin\model\Admin;
|
||||
use app\admin\model\school\classes\ClassesLib;
|
||||
use app\admin\model\school\classes\Teacher;
|
||||
use app\admin\model\school\classes\Verification;
|
||||
@ -53,17 +54,20 @@ class Index extends Backend
|
||||
protected $success_auth = false;
|
||||
protected $error_auth = false;
|
||||
|
||||
protected $qSwitch = true;
|
||||
protected $qFields = ["user_id"];
|
||||
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
|
||||
$this->model = new Manystore();
|
||||
$this->shopModel = new ManystoreShop();
|
||||
parent::_initialize();
|
||||
$this->view->assign("statusList", $this->shopModel->getStatusList());
|
||||
$this->view->assign("typeList", $this->shopModel->getTypeList());
|
||||
$this->view->assign("shop_backend_url", config("site.shop_backend_url"));
|
||||
$this->getCity();
|
||||
$this->getAuthMsg();
|
||||
|
||||
}
|
||||
|
||||
@ -123,6 +127,8 @@ class Index extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","nickname","shop.tel","shop.desc","shop.legal_entity","shop.name","shop.address","shop.address_detail","shop.address_city"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -276,6 +282,23 @@ class Index extends Backend
|
||||
$params["avatar"] = $user["avatar"] ?:"/assets/img/avatar.png";
|
||||
|
||||
|
||||
//判断省市区编码是否在授权列表内
|
||||
["provinces" =>$provinces,"citys"=> $citys, "districts"=>$districts,"address_citys"=>$address_citys] = Admin::getHaveCity($this->auth->id);
|
||||
$province = $shop["province"];
|
||||
$city = $shop["city"];
|
||||
$district = $shop["district"];
|
||||
if(is_array($address_citys))$address_citys = implode(",",$address_citys);
|
||||
|
||||
if(is_array($provinces)){
|
||||
if(!in_array($province,$provinces))throw new \Exception("您选择的省份不在您的授权范围({$address_citys})内");
|
||||
}
|
||||
if(is_array($citys)){
|
||||
if(!in_array($city,$citys))throw new \Exception("您选择的城市不在您的授权范围({$address_citys})内");
|
||||
}
|
||||
if(is_array($districts)){
|
||||
if(!in_array($district,$districts))throw new \Exception("您选择的区县不在您的授权范围({$address_citys})内");
|
||||
}
|
||||
|
||||
|
||||
//独立地点需传定位信息
|
||||
// if(empty($params["address_city"])
|
||||
@ -500,7 +523,7 @@ class Index extends Backend
|
||||
db()->commit();
|
||||
}catch (\Exception $e){
|
||||
db()->rollback();
|
||||
$this->error($e->getMessage().$e->getFile().$e->getLine());
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ class UserAuth extends Backend
|
||||
parent::_initialize();
|
||||
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->getAuthMsg();
|
||||
}
|
||||
|
||||
|
||||
@ -56,6 +57,7 @@ class UserAuth extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","user_id","shop.name","user.nickname","user.realname","user.mobile"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -46,6 +46,8 @@ class Message extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","title","desc","messageevent.name","messageevent.event","messageevent.selfmail_title","messageevent.selfmail_template_text", "to_id","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -17,6 +17,7 @@ class MessageConfig extends Backend
|
||||
* @var \app\admin\model\school\MessageConfig
|
||||
*/
|
||||
protected $model = null;
|
||||
protected $searchFields = ["id","name","event","selfmail_title","selfmail_template_text"];
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ class SearchCity extends Backend
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\school\SearchCity;
|
||||
|
||||
$this->getCity();
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,6 +43,8 @@ class Blacklist extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","user_id","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -17,6 +17,7 @@ class Cate extends Backend
|
||||
* @var \app\admin\model\school\classes\Cate
|
||||
*/
|
||||
protected $model = null;
|
||||
protected $searchFields = ["id","name"];
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
|
@ -60,10 +60,12 @@ class ClassesLib extends Backend
|
||||
|
||||
$this->view->assign("classesTypeList", $this->model->getClassesTypeList());
|
||||
$this->view->assign("classesTypeListJson", json_encode($this->model->getClassesTypeList(), JSON_UNESCAPED_UNICODE));
|
||||
$this->view->assign("classes_number_only_one", config("site.classes_number_only_one"));
|
||||
|
||||
|
||||
$this->view->assign("specStatusList", (new \app\admin\model\school\classes\ClassesSpec)->getStatusList());
|
||||
$this->getCity();
|
||||
$this->getAuthMsg();
|
||||
}
|
||||
|
||||
|
||||
@ -82,6 +84,7 @@ class ClassesLib extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","title","address","address_detail","address_city","user.nickname","user.realname","user.mobile","shop.name"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -89,11 +92,33 @@ class ClassesLib extends Backend
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
list($where, $sort, $order, $offset, $limit, $page, $alias, $bind, $excludearray) = $this->buildparams(null, null, ["has_expire"]);
|
||||
|
||||
if (isset($excludearray['has_expire']['value']) && $excludearray['has_expire']['value']) {
|
||||
$has_expire = $excludearray['has_expire']['value'];
|
||||
$as = (new \app\common\model\school\classes\ClassesLib())->getWithAlisaName();
|
||||
switch ($has_expire) {
|
||||
case '1': //查过期
|
||||
$expireWhere = [
|
||||
$as . '.end_time', '<=', time(),
|
||||
];
|
||||
break;
|
||||
case '2': //查未过期
|
||||
$expireWhere = [
|
||||
$as . '.end_time', '>', time(),
|
||||
];
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
} else {
|
||||
$expireWhere = [[]];
|
||||
}
|
||||
|
||||
$list = $this->model
|
||||
->with(['manystore', 'shop', 'user', 'admin'])
|
||||
->where($where)
|
||||
->where(...$expireWhere)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
@ -188,6 +213,7 @@ class ClassesLib extends Backend
|
||||
if($row[$k]!=$params[$k]){
|
||||
//当修改参数不在允许修改的字段中
|
||||
if(!in_array($k,$this->no_auth_fields)){
|
||||
// var_dump($row[$k],$params[$k]);
|
||||
|
||||
$this->have_auth = true;break;
|
||||
|
||||
@ -469,6 +495,8 @@ class ClassesLib extends Backend
|
||||
}
|
||||
|
||||
$this->update_check($params,$row);
|
||||
|
||||
|
||||
$spec = $params["spec"] ?? [];
|
||||
|
||||
// var_dump($spec);
|
||||
@ -492,6 +520,7 @@ class ClassesLib extends Backend
|
||||
//删除规格
|
||||
foreach ($delete_spec_ids as $k=>$delete_spec){
|
||||
|
||||
|
||||
(new \app\common\model\school\classes\ClassesSpec)->updateCheck($delete_spec["id"]);
|
||||
|
||||
$delete_spec->delete();
|
||||
|
@ -59,6 +59,8 @@ class ClassesSpec extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","name","lib.title"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -56,6 +56,8 @@ class Evaluate extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","message_text","user_id","classesorder.order_no","classesorder.pay_no","lib.title","teacher.name","shop.name","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -17,6 +17,7 @@ class Label extends Backend
|
||||
* @var \app\admin\model\school\classes\Label
|
||||
*/
|
||||
protected $model = null;
|
||||
protected $searchFields = ["id","name"];
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\admin\controller\school\classes;
|
||||
|
||||
use app\admin\model\Admin;
|
||||
use app\common\controller\Backend;
|
||||
use app\common\model\manystore\UserAuth;
|
||||
use app\common\model\User;
|
||||
@ -43,6 +44,7 @@ class Teacher extends Backend
|
||||
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->view->assign("recommendList", $this->model->getRecommendList());
|
||||
$this->getAuthMsg();
|
||||
}
|
||||
|
||||
|
||||
@ -61,6 +63,8 @@ class Teacher extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","name","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -93,145 +97,6 @@ class Teacher extends Backend
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Selectpage的实现方法
|
||||
*
|
||||
* 当前方法只是一个比较通用的搜索匹配,请按需重载此方法来编写自己的搜索逻辑,$where按自己的需求写即可
|
||||
* 这里示例了所有的参数,所以比较复杂,实现上自己实现只需简单的几行即可
|
||||
*
|
||||
*/
|
||||
protected function selectpage()
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['trim', 'strip_tags', 'htmlspecialchars']);
|
||||
|
||||
//搜索关键词,客户端输入以空格分开,这里接收为数组
|
||||
$word = (array)$this->request->request("q_word/a");
|
||||
//当前页
|
||||
$page = $this->request->request("pageNumber");
|
||||
//分页大小
|
||||
$pagesize = $this->request->request("pageSize");
|
||||
//搜索条件
|
||||
$andor = $this->request->request("andOr", "and", "strtoupper");
|
||||
//排序方式
|
||||
$orderby = (array)$this->request->request("orderBy/a");
|
||||
//显示的字段
|
||||
$field = $this->request->request("showField");
|
||||
//主键
|
||||
$primarykey = $this->request->request("keyField");
|
||||
//主键值
|
||||
$primaryvalue = $this->request->request("keyValue");
|
||||
//搜索字段
|
||||
$searchfield = (array)$this->request->request("searchField/a");
|
||||
//自定义搜索条件
|
||||
$custom = (array)$this->request->request("custom/a");
|
||||
//是否返回树形结构
|
||||
$istree = $this->request->request("isTree", 0);
|
||||
$ishtml = $this->request->request("isHtml", 0);
|
||||
if ($istree) {
|
||||
$word = [];
|
||||
$pagesize = 999999;
|
||||
}
|
||||
$order = [];
|
||||
foreach ($orderby as $k => $v) {
|
||||
$order[$v[0]] = $v[1];
|
||||
}
|
||||
$field = $field ? $field : 'name';
|
||||
|
||||
//如果有primaryvalue,说明当前是初始化传值
|
||||
if ($primaryvalue !== null) {
|
||||
$where = [$primarykey => ['in', $primaryvalue]];
|
||||
$pagesize = 999999;
|
||||
} else {
|
||||
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
|
||||
$logic = $andor == 'AND' ? '&' : '|';
|
||||
$searchfield = is_array($searchfield) ? implode($logic, $searchfield) : $searchfield;
|
||||
$searchfield = str_replace(',', $logic, $searchfield);
|
||||
$word = array_filter(array_unique($word));
|
||||
if (count($word) == 1) {
|
||||
$query->where($searchfield, "like", "%" . reset($word) . "%");
|
||||
} else {
|
||||
$query->where(function ($query) use ($word, $searchfield) {
|
||||
foreach ($word as $index => $item) {
|
||||
$query->whereOr(function ($query) use ($item, $searchfield) {
|
||||
$query->where($searchfield, "like", "%{$item}%");
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if ($custom && is_array($custom)) {
|
||||
foreach ($custom as $k => $v) {
|
||||
if (is_array($v) && 2 == count($v)) {
|
||||
$query->where($k, trim($v[0]), $v[1]);
|
||||
} else {
|
||||
$query->where($k, '=', $v);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds)) {
|
||||
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
}
|
||||
$list = [];
|
||||
$total = $this->model->where($where)->count();
|
||||
if ($total > 0) {
|
||||
if (is_array($adminIds)) {
|
||||
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
}
|
||||
|
||||
$fields = is_array($this->selectpageFields) ? $this->selectpageFields : ($this->selectpageFields && $this->selectpageFields != '*' ? explode(',', $this->selectpageFields) : []);
|
||||
|
||||
//如果有primaryvalue,说明当前是初始化传值,按照选择顺序排序
|
||||
if ($primaryvalue !== null && preg_match("/^[a-z0-9_\-]+$/i", $primarykey)) {
|
||||
$primaryvalue = array_unique(is_array($primaryvalue) ? $primaryvalue : explode(',', $primaryvalue));
|
||||
//修复自定义data-primary-key为字符串内容时,给排序字段添加上引号
|
||||
$primaryvalue = array_map(function ($value) {
|
||||
return '\'' . $value . '\'';
|
||||
}, $primaryvalue);
|
||||
|
||||
$primaryvalue = implode(',', $primaryvalue);
|
||||
|
||||
$this->model->orderRaw("FIELD(`{$primarykey}`, {$primaryvalue})");
|
||||
} else {
|
||||
$this->model->order($order);
|
||||
}
|
||||
|
||||
$datalist = $this->model->where($where)
|
||||
->page($page, $pagesize)
|
||||
->select();
|
||||
|
||||
foreach ($datalist as $index => $item) {
|
||||
unset($item['password'], $item['salt']);
|
||||
if ($this->selectpageFields == '*') {
|
||||
$result = [
|
||||
$primarykey => $item[$primarykey] ?? '',
|
||||
$field => $item[$field] ?? '',
|
||||
|
||||
];
|
||||
} else {
|
||||
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
|
||||
}
|
||||
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
|
||||
$list[] = $result;
|
||||
}
|
||||
if ($istree && !$primaryvalue) {
|
||||
$tree = Tree::instance();
|
||||
$tree->init(collection($list)->toArray(), 'pid');
|
||||
$list = $tree->getTreeList($tree->getTreeArray(0), $field);
|
||||
if (!$ishtml) {
|
||||
foreach ($list as &$item) {
|
||||
$item = str_replace(' ', ' ', $item);
|
||||
}
|
||||
unset($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
|
||||
return json(['list' => $list, 'total' => $total]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected function updateCheck($id,$params=[],$row=null){
|
||||
|
@ -17,6 +17,7 @@ class Type extends Backend
|
||||
* @var \app\admin\model\school\classes\Type
|
||||
*/
|
||||
protected $model = null;
|
||||
protected $searchFields = ["id","name"];
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
|
@ -37,6 +37,7 @@ class Verification extends Backend
|
||||
parent::_initialize();
|
||||
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->getAuthMsg();
|
||||
}
|
||||
|
||||
|
||||
@ -55,6 +56,7 @@ class Verification extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","shop.name","user.nickname","user.realname","user.mobile"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -52,6 +52,7 @@ class VirtualUser extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","nickname","lib.title"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -83,9 +84,6 @@ class VirtualUser extends Backend
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
@ -34,6 +34,7 @@ class Order extends Backend
|
||||
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->view->assign("authStatusList", $this->model->getAuthStatusList());
|
||||
$this->getAuthMsg();
|
||||
}
|
||||
|
||||
|
||||
@ -52,6 +53,9 @@ class Order extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","order_no","classesorder.order_no","classesorder.pay_no","user_id","spec.name","detail.title","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -27,6 +27,7 @@ class Order extends Backend
|
||||
$this->view->assign("beforeStatusList", $this->model->getBeforeStatusList());
|
||||
$this->view->assign("serverStatusList", $this->model->getServerStatusList());
|
||||
$this->view->assign("resultStatusList", $this->model->getResultStatusList());
|
||||
$this->getAuthMsg();
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +46,8 @@ class Order extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","order_no","pay_no","user_id","code","shop.name","detail.title","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -121,9 +124,20 @@ class Order extends Backend
|
||||
$classes_order = $params["id"];
|
||||
$reason = $params["reason"];
|
||||
|
||||
|
||||
$model = (new \app\common\model\school\classes\order\ServiceOrder());
|
||||
$remark = "总后台管理员帮忙下售后单";
|
||||
$model->afterSales($classes_order,$reason,$remark,'admin',$this->auth->id,true);
|
||||
$order = $model->afterSales($classes_order,$reason,$remark,'admin',$this->auth->id,true);
|
||||
|
||||
$price = $params["price"];
|
||||
$status = "yes";
|
||||
$reject_reason = "";
|
||||
$reject_images = "";
|
||||
$model = (new \app\common\model\school\classes\order\ServiceOrder());
|
||||
$model->shopConfirmation($order["order_no"],$status,$price,$reject_reason,$reject_images,0,true,'admin',$this->auth->id,true);
|
||||
|
||||
|
||||
|
||||
}catch (\Exception $e){
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
@ -134,9 +148,9 @@ class Order extends Backend
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
|
||||
$order_info = \app\common\model\school\classes\order\ServiceOrder::getCost("43246634123432564",$ids,"",[],true);
|
||||
// $row = $this->model->get($param['ids']);
|
||||
$this->view->assign('row', $row);
|
||||
$this->view->assign('row',array_merge($row->toArray(),$order_info));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ class ServiceOrder extends Backend
|
||||
$this->view->assign("salesTypeList", $this->model->getSalesTypeList());
|
||||
$this->view->assign("platformList", $this->model->getPlatformList());
|
||||
$this->view->assign("payTypeList", $this->model->getPayTypeList());
|
||||
$this->getAuthMsg();
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +46,9 @@ class ServiceOrder extends Backend
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
|
||||
$this->searchFields = ["id","order_no","classesorder.order_no","classesorder.pay_no","user_id","shop.name","detail.title","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -36,6 +36,8 @@ class User extends Backend
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
$this->searchFields = ["id","nickname","realname","mobile"];
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
|
@ -11,4 +11,5 @@ return [
|
||||
'Username must be 3 to 30 characters' => '用户名只能由3-30位数字、字母、下划线组合',
|
||||
'Please input correct password' => '密码长度必须在6-30位之间,不能包含空格',
|
||||
'Password must be 6 to 30 characters' => '密码长度必须在6-30位之间,不能包含空格',
|
||||
'Area_json' => '限定区域',
|
||||
];
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'Shop_id' => '机构shopid',
|
||||
'User_id' => '授权用户',
|
||||
'User_id' => '授权前台用户',
|
||||
'Status' => '授权状态',
|
||||
'Status 0' => '待确认',
|
||||
'Set status to 0'=> '设为待确认',
|
||||
@ -13,11 +13,11 @@ return [
|
||||
'Auth_time' => '授权确认时间',
|
||||
'Createtime' => '发起时间',
|
||||
'Update_time' => '修改时间',
|
||||
'Shop.name' => '店铺名称',
|
||||
'User.nickname' => '昵称',
|
||||
'User.avatar' => '头像',
|
||||
'Shop.name' => '机构名称',
|
||||
'User.nickname' => '授权前台用户昵称',
|
||||
'User.avatar' => '授权前台用户头像',
|
||||
'Add' => '添加用户授权申请',
|
||||
'Delete'=>'取消授权',
|
||||
'Del'=>'取消授权',
|
||||
'User.mobile'=>'用户手机号',
|
||||
'User.mobile'=>'授权前台用户手机号',
|
||||
];
|
||||
|
@ -2,11 +2,15 @@
|
||||
|
||||
return [
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构id',
|
||||
'User_id' => '主讲师用户id',
|
||||
'Shop_id' => '机构',
|
||||
'User_id' => '主讲师用户',
|
||||
'Classes_cate_ids' => '标签',
|
||||
'Classes_label_ids' => '热门',
|
||||
|
||||
'Has_expire' => '是否过期',
|
||||
'Has_expire 1' => '往期课程',
|
||||
'Has_expire 2' => '进行中课程',
|
||||
|
||||
'Start_time' => '开始时间',
|
||||
'End_time' => '结束时间',
|
||||
|
||||
@ -15,22 +19,22 @@ return [
|
||||
'Add_type 1' => '机构',
|
||||
'Add_type 2' => '总后台',
|
||||
'Add_id' => '添加人id',
|
||||
'Title' => '标题',
|
||||
'Headimage' => '头图',
|
||||
'Images' => '轮播图',
|
||||
'Type' => '地点类型',
|
||||
'Title' => '课程名称',
|
||||
'Headimage' => '课程头图',
|
||||
'Images' => '课程轮播图',
|
||||
'Type' => '课程地点类型',
|
||||
'Type out' => '户外',
|
||||
'Type in' => '室内',
|
||||
'Classes_num' => '核销次数',
|
||||
'Address_type' => '地址类型',
|
||||
'Address_type 1' => '按机构',
|
||||
'Address_type 2' => '独立位置',
|
||||
'Address_type 1' => '机构内授课',
|
||||
'Address_type 2' => '特定位置授课',
|
||||
'Address_city' => '城市选择',
|
||||
'Province' => '省编号',
|
||||
'City' => '市编号',
|
||||
'District' => '县区编号',
|
||||
'Address' => '店铺地址',
|
||||
'Address_detail' => '店铺详细地址',
|
||||
'Address' => '地址',
|
||||
'Address_detail' => '详细地址',
|
||||
'Longitude' => '经度',
|
||||
'Latitude' => '纬度',
|
||||
'Classes_date_text' => '上课日期',
|
||||
@ -73,19 +77,19 @@ return [
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Shop.name' => '店铺名称',
|
||||
'Shop.image' => '封面图',
|
||||
'Shop.address_city' => '城市选择',
|
||||
'Shop.province' => '省编号',
|
||||
'Shop.city' => '市编号',
|
||||
'Shop.district' => '县区编号',
|
||||
'Shop.name' => '机构名称',
|
||||
'Shop.image' => '机构封面图',
|
||||
'Shop.address_city' => '机构城市选择',
|
||||
'Shop.province' => '机构省编号',
|
||||
'Shop.city' => '机构市编号',
|
||||
'Shop.district' => '机构县区编号',
|
||||
'Shop.address' => '机构地址',
|
||||
'Shop.address_detail' => '机构详细地址',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Admin.nickname' => '昵称',
|
||||
'User.nickname' => '讲师用户昵称',
|
||||
'User.realname' => '讲师用户真实姓名',
|
||||
'User.mobile' => '讲师用户手机号',
|
||||
'User.avatar' => '讲师用户头像',
|
||||
'Admin.nickname' => '管理员昵称',
|
||||
'Limit_num' => '总限定人数',
|
||||
'Sign_num' => '总已报名人数',
|
||||
'Verification_num' => '总已核销人数',
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'Classes_lib_id' => '课程id',
|
||||
'Name' => '规格名',
|
||||
'Name' => '每节课名',
|
||||
'Time' => '课时开始结束时间',
|
||||
'Start_time' => '开始时间',
|
||||
'End_time' => '结束时间',
|
||||
@ -18,6 +18,6 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Lib.title' => '标题',
|
||||
'Lib.headimage' => '头图'
|
||||
'Lib.title' => '课程名称',
|
||||
'Lib.headimage' => '课程头图'
|
||||
];
|
||||
|
@ -5,10 +5,10 @@ return [
|
||||
'Classes_lib_id' => '课程id',
|
||||
'Weigh' => '权重',
|
||||
'Createtime' => '创建时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Lib.title' => '标题',
|
||||
'Lib.headimage' => '头图'
|
||||
'User.nickname' => '收藏人昵称',
|
||||
'User.realname' => '收藏人真实姓名',
|
||||
'User.mobile' => '收藏人手机号',
|
||||
'User.avatar' => '收藏人头像',
|
||||
'Lib.title' => '课程名称',
|
||||
'Lib.headimage' => '课程头图'
|
||||
];
|
||||
|
@ -6,7 +6,7 @@ return [
|
||||
'Classes_lib_id' => '课程',
|
||||
'Classes_order_id' => '课程订单',
|
||||
'Manystore_id' => '机构账号',
|
||||
'Shop_id' => '机构店铺',
|
||||
'Shop_id' => '机构',
|
||||
'Teacher_id' => '老师',
|
||||
'Image' => '评价人头像',
|
||||
'Nickname' => '评价人昵称',
|
||||
@ -26,16 +26,16 @@ return [
|
||||
'Weigh' => '权重',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Lib.title' => '标题',
|
||||
'Lib.headimage' => '头图',
|
||||
'Order.order_no' => '订单号',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Shop.name' => '店铺名称',
|
||||
'Shop.logo' => '品牌LOGO',
|
||||
'User.nickname' => '评价人昵称',
|
||||
'User.realname' => '评价人真实姓名',
|
||||
'User.mobile' => '评价人手机号',
|
||||
'User.avatar' => '评价人头像',
|
||||
'Lib.title' => '课程名称',
|
||||
'Lib.headimage' => '课程头图',
|
||||
'Order.order_no' => '课程单号',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Shop.name' => '机构名称',
|
||||
'Shop.logo' => '机构LOGO',
|
||||
'Teacher.name' => '教师名',
|
||||
'Teacher.head_image' => '教师头像'
|
||||
];
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '预约单号',
|
||||
|
||||
'Edit'=>'修改用户预约的课时',
|
||||
'Add'=>'帮用户预约课时',
|
||||
@ -20,7 +20,7 @@ return [
|
||||
'User_id' => '下单人id',
|
||||
'Classes_order_detail_id' => '订单课程id',
|
||||
'Classes_lib_id' => '课程id',
|
||||
'Name' => '课程规格名',
|
||||
'Name' => '本节课名',
|
||||
'Start_time' => '开始时间',
|
||||
'End_time' => '结束时间',
|
||||
'Limit_num' => '本课时限定人数(0不限制)',
|
||||
@ -42,13 +42,13 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Order.order_no' => '订单号',
|
||||
'Spec.name' => '规格名',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Detail.title' => '标题',
|
||||
'Detail.headimage' => '头图',
|
||||
'Lib.title' => '标题'
|
||||
'Order.order_no' => '课程单号',
|
||||
'Spec.name' => '本节课名',
|
||||
'User.nickname' => '预约用户昵称',
|
||||
'User.realname' => '预约用户真实姓名',
|
||||
'User.mobile' => '预约用户手机号',
|
||||
'User.avatar' => '预约用户头像',
|
||||
'Detail.title' => '课程名称',
|
||||
'Detail.headimage' => '课程头图',
|
||||
'Lib.title' => '课程名称'
|
||||
];
|
||||
|
@ -13,5 +13,5 @@ return [
|
||||
'Set status to 3' => '设为已完成',
|
||||
'Log_text' => '记录内容',
|
||||
'Createtime' => '创建时间',
|
||||
'Order.order_no' => '订单号'
|
||||
'Order.order_no' => '课程单号'
|
||||
];
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '课程单号',
|
||||
'Edit'=>'订单详情',
|
||||
'Pay_no' => '微信支付单号',
|
||||
'User_id' => '下单人id',
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构店铺id',
|
||||
'Shop_id' => '机构id',
|
||||
'Code' => '核销码',
|
||||
'Codeimage' => '核销二维码图片',
|
||||
'Codeoneimage' => '核销一维码图片',
|
||||
@ -62,24 +62,24 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystore.avatar' => '头像',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Shop.name' => '店铺名称',
|
||||
'Shop.image' => '封面图',
|
||||
'Shop.address_city' => '城市选择',
|
||||
'Shop.province' => '省编号',
|
||||
'Shop.city' => '市编号',
|
||||
'Shop.district' => '县区编号',
|
||||
'Shop.address' => '店铺地址',
|
||||
'Shop.address_detail' => '店铺详细地址',
|
||||
'Lib.title' => '标题',
|
||||
'Lib.headimage' => '头图',
|
||||
'Detail.title' => '标题',
|
||||
'Detail.headimage' => '头图',
|
||||
'Admin.nickname' => '昵称',
|
||||
'Admin.avatar' => '头像'
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystore.avatar' => '机构账号头像',
|
||||
'User.nickname' => '下单人昵称',
|
||||
'User.realname' => '下单人真实姓名',
|
||||
'User.mobile' => '下单人手机号',
|
||||
'User.avatar' => '下单人头像',
|
||||
'Shop.name' => '机构名称',
|
||||
'Shop.image' => '机构封面图',
|
||||
'Shop.address_city' => '机构城市选择',
|
||||
'Shop.province' => '机构省编号',
|
||||
'Shop.city' => '机构市编号',
|
||||
'Shop.district' => '机构县区编号',
|
||||
'Shop.address' => '机构地址',
|
||||
'Shop.address_detail' => '机构详细地址',
|
||||
'Lib.title' => '课程名称',
|
||||
'Lib.headimage' => '课程头图',
|
||||
'Detail.title' => '课程名称',
|
||||
'Detail.headimage' => '课程头图',
|
||||
'Admin.nickname' => '管理员昵称',
|
||||
'Admin.avatar' => '管理员头像'
|
||||
];
|
||||
|
@ -3,7 +3,7 @@
|
||||
return [
|
||||
'Classes_order_id' => '课程订单id',
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构店铺id',
|
||||
'Shop_id' => '机构id',
|
||||
'User_id' => '主讲师用户id',
|
||||
'Classes_cate_ids' => '标签',
|
||||
'Classes_label_ids' => '热门',
|
||||
@ -12,13 +12,13 @@ return [
|
||||
'Add_type 1' => '机构',
|
||||
'Add_type 2' => '总后台',
|
||||
'Add_id' => '添加人id',
|
||||
'Title' => '标题',
|
||||
'Headimage' => '头图',
|
||||
'Images' => '轮播图',
|
||||
'Title' => '课程名称',
|
||||
'Headimage' => '课程头图',
|
||||
'Images' => '课程轮播图',
|
||||
'Type' => '地点类型',
|
||||
'Type out' => '户外',
|
||||
'Type in' => '室内',
|
||||
'Classes_num' => '课时数',
|
||||
'Classes_num' => '核销数',
|
||||
'Address_type' => '地址类型',
|
||||
'Address_type 1' => '按机构',
|
||||
'Address_type 2' => '独立位置',
|
||||
@ -26,8 +26,8 @@ return [
|
||||
'Province' => '省编号',
|
||||
'City' => '市编号',
|
||||
'District' => '县区编号',
|
||||
'Address' => '店铺地址',
|
||||
'Address_detail' => '店铺详细地址',
|
||||
'Address' => '地址',
|
||||
'Address_detail' => '详细地址',
|
||||
'Longitude' => '经度',
|
||||
'Latitude' => '纬度',
|
||||
'Classes_date_text' => '上课日期',
|
||||
@ -46,19 +46,19 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Order.order_no' => '订单号',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystore.avatar' => '头像',
|
||||
'Shop.name' => '店铺名称',
|
||||
'Shop.image' => '封面图',
|
||||
'Shop.address_city' => '城市选择',
|
||||
'Shop.province' => '省编号',
|
||||
'Shop.city' => '市编号',
|
||||
'Shop.district' => '县区编号',
|
||||
'Shop.address' => '店铺地址',
|
||||
'Shop.address_detail' => '店铺详细地址',
|
||||
'Order.order_no' => '课程单号',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystore.avatar' => '机构账号头像',
|
||||
'Shop.name' => '机构名称',
|
||||
'Shop.image' => '机构封面图',
|
||||
'Shop.address_city' => '机构城市选择',
|
||||
'Shop.province' => '机构省编号',
|
||||
'Shop.city' => '机构市编号',
|
||||
'Shop.district' => '机构县区编号',
|
||||
'Shop.address' => '机构地址',
|
||||
'Shop.address_detail' => '机构详细地址',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像'
|
||||
'User.realname' => '下单人真实姓名',
|
||||
'User.mobile' => '下单人手机号',
|
||||
'User.avatar' => '下单人头像'
|
||||
];
|
||||
|
@ -53,17 +53,17 @@ return [
|
||||
'Checkouttime' => '结单时间',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Order.order_no' => '订单号',
|
||||
'Order.order_no' => '课程订单号',
|
||||
'Order.pay_no' => '微信支付单号',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Detail.title' => '标题',
|
||||
'Detail.headimage' => '头图',
|
||||
'Lib.title' => '标题',
|
||||
'Lib.headimage' => '头图',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Shop.name' => '店铺名称',
|
||||
'Shop.logo' => '品牌LOGO'
|
||||
'User.nickname' => '售后用户昵称',
|
||||
'User.realname' => '售后用户真实姓名',
|
||||
'User.mobile' => '售后用户手机号',
|
||||
'User.avatar' => '售后用户头像',
|
||||
'Detail.title' => '课程名称',
|
||||
'Detail.headimage' => '课程头图',
|
||||
'Lib.title' => '课程标题',
|
||||
'Lib.headimage' => '课程头图',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Shop.name' => '机构名称',
|
||||
'Shop.logo' => '机构LOGO'
|
||||
];
|
||||
|
@ -34,13 +34,12 @@ return [
|
||||
'Oper_type' => '记录人类型',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Order.order_no' => '售后单号',
|
||||
'Order.order_no' => '订单号',
|
||||
'Order.order_no' => '课程订单号',
|
||||
'Order.pay_no' => '微信支付单号',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Detail.title' => '标题',
|
||||
'Admin.nickname' => '昵称'
|
||||
'User.nickname' => '售后用户昵称',
|
||||
'User.realname' => '售后用户真实姓名',
|
||||
'User.mobile' => '售后用户手机号',
|
||||
'User.avatar' => '售后用户头像',
|
||||
'Detail.title' => '课程标题',
|
||||
'Admin.nickname' => '管理员昵称'
|
||||
];
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
return [
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构店铺id',
|
||||
'User_id' => '教师前台用户id',
|
||||
'Shop_id' => '机构',
|
||||
'User_id' => '教师前台用户',
|
||||
'Name' => '教师名',
|
||||
'Head_image' => '教师头像',
|
||||
'Content' => '教师简介',
|
||||
@ -18,19 +18,19 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.avatar' => '头像',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Shop.name' => '店铺名称',
|
||||
'Shop.logo' => '品牌LOGO',
|
||||
'Shop.image' => '封面图',
|
||||
'Shop.address_city' => '城市选择',
|
||||
'Shop.province' => '省编号',
|
||||
'Shop.city' => '市编号',
|
||||
'Shop.district' => '县区编号',
|
||||
'Shop.address' => '店铺地址',
|
||||
'Shop.address_detail' => '店铺详细地址',
|
||||
'User.nickname' => '绑定的前台用户昵称',
|
||||
'User.realname' => '绑定的前台用户真实姓名',
|
||||
'User.avatar' => '绑定的前台用户头像',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Shop.name' => '机构名称',
|
||||
'Shop.logo' => '机构LOGO',
|
||||
'Shop.image' => '机构封面图',
|
||||
'Shop.address_city' => '机构城市选择',
|
||||
'Shop.province' => '机构省编号',
|
||||
'Shop.city' => '机构市编号',
|
||||
'Shop.district' => '机构县区编号',
|
||||
'Shop.address' => '机构地址',
|
||||
'Shop.address_detail' => '机构详细地址',
|
||||
'Recommend' => '平台首页推荐',
|
||||
'Recommend 0' => '否',
|
||||
'Recommend 1' => '是',
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
return [
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构店铺id',
|
||||
'User_id' => '用户id',
|
||||
'Classes_lib_ids' => '平台可核销的课程ids',
|
||||
'Shop_id' => '机构',
|
||||
'User_id' => '核销员前台用户',
|
||||
'Classes_lib_ids' => '平台可核销的课程',
|
||||
'Status' => '状态',
|
||||
'Status 1' => '开启',
|
||||
'Set status to 1' => '设为开启',
|
||||
@ -12,18 +12,18 @@ return [
|
||||
'Set status to 2' => '设为关闭',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystore.avatar' => '头像',
|
||||
'Shop.name' => '店铺名称',
|
||||
'Shop.image' => '封面图',
|
||||
'Shop.address_city' => '城市选择',
|
||||
'Shop.province' => '省编号',
|
||||
'Shop.city' => '市编号',
|
||||
'Shop.district' => '县区编号',
|
||||
'Shop.address' => '店铺地址',
|
||||
'Shop.address_detail' => '店铺详细地址',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像'
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystore.avatar' => '机构账号头像',
|
||||
'Shop.name' => '机构名称',
|
||||
'Shop.image' => '机构封面图',
|
||||
'Shop.address_city' => '机构城市选择',
|
||||
'Shop.province' => '机构省编号',
|
||||
'Shop.city' => '机构市编号',
|
||||
'Shop.district' => '机构县区编号',
|
||||
'Shop.address' => '机构地址',
|
||||
'Shop.address_detail' => '机构详细地址',
|
||||
'User.nickname' => '核销员前台用户昵称',
|
||||
'User.realname' => '核销员前台用户真实姓名',
|
||||
'User.mobile' => '核销员前台用户手机号',
|
||||
'User.avatar' => '核销员前台用户头像'
|
||||
];
|
||||
|
@ -11,6 +11,6 @@ return [
|
||||
'Havetype' => '已报名',
|
||||
'Havetype 1' => '是',
|
||||
'Havetype 0' => '否',
|
||||
'Lib.title' => '标题',
|
||||
'Lib.headimage' => '头图'
|
||||
'Lib.title' => '课程名称',
|
||||
'Lib.headimage' => '课程头图'
|
||||
];
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\admin\model\school\SearchCity;
|
||||
use app\common\model\dyqc\ManystoreShop;
|
||||
use think\Model;
|
||||
use think\Session;
|
||||
|
||||
@ -29,4 +31,68 @@ class Admin extends Model
|
||||
});
|
||||
}
|
||||
|
||||
public function getAddressCityList(){
|
||||
return SearchCity::column("address_city","id");
|
||||
}
|
||||
|
||||
|
||||
public static function getHaveShopId($adminId){
|
||||
$admin = self::get($adminId);
|
||||
if(!$admin)throw new \Exception("管理员不存在");
|
||||
$area_json = $admin->area_json;
|
||||
$shop_id = "*";
|
||||
if($area_json){
|
||||
$shop_id = [];
|
||||
$searchCity = SearchCity::where("id","in",$area_json)->select();
|
||||
foreach ($searchCity as $item){
|
||||
$province = $item->province;
|
||||
$city = $item->city;
|
||||
$district = $item->district;
|
||||
//查询在该区域的店铺id
|
||||
$manystoreShop = new ManystoreShop;
|
||||
if($province)$manystoreShop = $manystoreShop->where("province",$province);
|
||||
if($city)$manystoreShop = $manystoreShop->where("city",$city);
|
||||
if($district)$manystoreShop = $manystoreShop->where("district",$district);
|
||||
$shop_id = array_merge($shop_id,$manystoreShop->column("id"));
|
||||
}
|
||||
}
|
||||
return $shop_id;
|
||||
}
|
||||
|
||||
public static function getHaveCity($adminId){
|
||||
$admin = self::get($adminId);
|
||||
if(!$admin)throw new \Exception("管理员不存在");
|
||||
$area_json = $admin->area_json;
|
||||
$provinces = $citys = $districts = $address_citys = [];
|
||||
if($area_json){
|
||||
$searchCity = SearchCity::where("id","in",$area_json)->select();
|
||||
foreach ($searchCity as $item){
|
||||
$address_citys[] = $item->address_city;
|
||||
$province = $item->province;
|
||||
if($province)$provinces[] = $province;
|
||||
$city = $item->city;
|
||||
if($city)$citys[] = $city;
|
||||
$district = $item->district;
|
||||
if($district)$districts[] = $district;
|
||||
}
|
||||
}
|
||||
if(!$provinces)$provinces="*";
|
||||
if(!$citys)$citys="*";
|
||||
if(!$districts)$districts="*";
|
||||
if(!$address_citys)$address_citys="*";
|
||||
return compact("provinces","citys","districts","address_citys");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function checkAuthMsg($adminId){
|
||||
["provinces" =>$provinces,"citys"=> $citys, "districts"=>$districts,"address_citys"=>$address_citys] = self::getHaveCity($adminId);
|
||||
if(is_array($address_citys))$address_citys = implode(",",$address_citys);
|
||||
//必要信息已完善
|
||||
return '<div class="alert alert-success-light">
|
||||
<b >您当前的区域管理权限为:<span style="color: red"> '.$address_citys.' </span>(能管理该区域下的机构信息,如果是*则不限制)</b></div>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -38,8 +38,30 @@ class ClassesLib extends Model
|
||||
'selfhot_text',
|
||||
'classes_cate_title',
|
||||
'classes_label_title',
|
||||
'has_expire',
|
||||
];
|
||||
|
||||
public function getHasExpireList()
|
||||
{
|
||||
return ['1' => __('Has_expire 1'), '2' => __('Has_expire 2')];
|
||||
}
|
||||
|
||||
|
||||
public function getHasExpireAttr($value, $data)
|
||||
{
|
||||
$end_time = (isset($data['end_time']) ? $data['end_time'] : '');
|
||||
if(!$end_time) return '2';
|
||||
|
||||
if( $end_time < time()) {
|
||||
return '1';
|
||||
}else{
|
||||
return '2';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getClassesCateTitleAttr($value, $data)
|
||||
{
|
||||
$classes_cate_ids = (isset($data['classes_cate_ids']) ? $data['classes_cate_ids'] : '');
|
||||
|
@ -42,6 +42,28 @@
|
||||
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Area_json')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-area_json" data-source="school/search_city/index" data-field="address_city" data-multiple="true" class="form-control selectpage" name="row[area_json]" type="text" value="">
|
||||
|
||||
<span style="color: red">
|
||||
(没找到{:__('Area_json')}则点击按钮创建{:__('Area_json')}后重新下拉框选{:__('Area_json')} (不填为不限制))
|
||||
<a href="javascript:;" data-url="school/search_city/index" class="btn btn-success btn-changeuser {:$auth->check('school/search_city/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group hidden layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
@ -48,6 +48,23 @@
|
||||
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Area_json')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-area_json" data-source="school/search_city/index" data-field="address_city" data-multiple="true" class="form-control selectpage" name="row[area_json]" type="text" value="{$row.area_json|htmlentities}">
|
||||
|
||||
<span style="color: red">
|
||||
(没找到{:__('Area_json')}则点击按钮创建{:__('Area_json')}后重新下拉框选{:__('Area_json')} (不填为不限制))
|
||||
<a href="javascript:;" data-url="school/search_city/index" class="btn btn-success btn-changeuser {:$auth->check('school/search_city/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group hidden layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
@ -19,3 +19,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var addressCityListJson = {$addressCityListJson};
|
||||
</script>
|
||||
|
@ -63,9 +63,9 @@
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<!-- Home tab content -->
|
||||
<div class="tab-pane" id="control-sidebar-home-tab">
|
||||
<h4 class="control-sidebar-heading">{:__('Home')}</h4>
|
||||
</div>
|
||||
<!-- <div class="tab-pane" id="control-sidebar-home-tab">-->
|
||||
<!-- <h4 class="control-sidebar-heading">{:__('Home')}</h4>-->
|
||||
<!-- </div>-->
|
||||
<!-- /.tab-pane -->
|
||||
<!-- Settings tab content -->
|
||||
<div class="tab-pane" id="control-sidebar-settings-tab">
|
||||
|
@ -24,9 +24,9 @@
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li class="hidden-xs">
|
||||
<a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> {:__('Home')}</a>
|
||||
</li>
|
||||
<!-- <li class="hidden-xs">-->
|
||||
<!-- <a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> {:__('Home')}</a>-->
|
||||
<!-- </li>-->
|
||||
|
||||
<!-- 清除缓存 -->
|
||||
<li class="hidden-xs">
|
||||
@ -83,9 +83,9 @@
|
||||
</li>
|
||||
<li class="user-body">
|
||||
<div class="visible-xs">
|
||||
<div class="pull-left">
|
||||
<a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> {:__('Home')}</a>
|
||||
</div>
|
||||
<!-- <div class="pull-left">-->
|
||||
<!-- <a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> {:__('Home')}</a>-->
|
||||
<!-- </div>-->
|
||||
<div class="pull-right">
|
||||
<a href="javascript:;" data-type="all" class="wipecache"><i class="fa fa-trash fa-fw"></i> {:__('Wipe all cache')}</a>
|
||||
</div>
|
||||
|
@ -170,7 +170,7 @@
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
|
||||
{$check_auth_msg}
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-xs-6">
|
||||
<div class="sm-st clearfix">
|
||||
|
@ -38,7 +38,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="mobile" data-format-item="{id} - {nickname} - {mobile}" class="form-control selectpage" name="row[user_id]" type="text" value="">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="mobile" data-format-item="{id} - {nickname} - {mobile}" class="form-control selectpage" name="row[user_id]" type="text" value="{$q_user_id}">
|
||||
<span style="color: red">
|
||||
|
||||
(没找到用户则点击按钮创建用户后重新下拉框选用户)
|
||||
@ -161,7 +161,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-address_detail" class="form-control" name="shop[address_detail]" type="text" value="" placeholder="请输入{:__('Address_detail')}">
|
||||
<input id="c-address_detail" data-rule="required" class="form-control" name="shop[address_detail]" type="text" value="" placeholder="请输入{:__('Address_detail')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -176,7 +176,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-address_detail" class="form-control" name="shop[address_detail]" type="text" value="{$shop.address_detail}" placeholder="请输入{:__('Address_detail')}">
|
||||
<input id="c-address_detail" data-rule="required" class="form-control" name="shop[address_detail]" type="text" value="{$shop.address_detail}" placeholder="请输入{:__('Address_detail')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -13,6 +13,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh,add')}
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('manystore/user_auth/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
<span style="color: red">
|
||||
(没找到类型则点击按钮创建类型后重新下拉框选类型)
|
||||
<a href="javascript:;" data-url="school/classes/type/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/type/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" data-url="school/classes/type/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/type/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
<span style="color: red">
|
||||
(没找到{:__('Classes_cate_ids')}则点击按钮创建{:__('Classes_cate_ids')}后重新下拉框选{:__('Classes_cate_ids')})
|
||||
<a href="javascript:;" data-url="school/classes/cate/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/cate/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" data-url="school/classes/cate/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/cate/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<span style="color: red">
|
||||
(没找到{:__('Classes_label_ids')}则点击按钮创建{:__('Classes_label_ids')}后重新下拉框选{:__('Classes_label_ids')})
|
||||
<a href="javascript:;" data-url="school/classes/label/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/label/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" data-url="school/classes/label/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/label/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_num')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-classes_num" class="form-control" data-rule="required" name="row[classes_num]" type="number">
|
||||
<input id="c-classes_num" {$classes_number_only_one ? 'disabled' : ''} class="form-control" data-rule="required" name="row[classes_num]" type="number" value="1">
|
||||
<span style="color: red">(填写几节意味着客户购买课程后能预约上课核销几次,即购买本课程的课程节数)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
<span style="color: red">
|
||||
(没找到类型则点击按钮创建类型后重新下拉框选类型)
|
||||
<a href="javascript:;" data-url="school/classes/type/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/type/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" data-url="school/classes/type/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/type/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
|
||||
<span style="color: red">
|
||||
(没找到{:__('Classes_cate_ids')}则点击按钮创建{:__('Classes_cate_ids')}后重新下拉框选{:__('Classes_cate_ids')})
|
||||
<a href="javascript:;" data-url="school/classes/cate/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/cate/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" data-url="school/classes/cate/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/cate/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
@ -115,7 +115,7 @@
|
||||
|
||||
<span style="color: red">
|
||||
(没找到{:__('Classes_label_ids')}则点击按钮创建{:__('Classes_label_ids')}后重新下拉框选{:__('Classes_label_ids')})
|
||||
<a href="javascript:;" data-url="school/classes/label/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/label/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" data-url="school/classes/label/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/label/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
@ -15,6 +15,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
|
||||
|
@ -11,6 +11,16 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div id="status_yes" >
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('同意退款金额')}(默认损耗后额度):</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.order_data.auto_recommend_price >0 ? $row.order_data.auto_recommend_price : $row.order_data.sub_refundprice }">
|
||||
<span style="color: red">( 当前订单损耗比为 {$row.order_data.loss_proportion|htmlentities}% | 忽略损耗应退全额为 {$row.order_data.auto_price|htmlentities} [若为0说明课时已用完或计算应退金额小于0.01,请自行决定是否退全款] | 退款金额不能超过订单应退全额{$row.order_data.sub_refundprice|htmlentities} )</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
|
@ -15,6 +15,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
|
||||
|
@ -1,3 +1,8 @@
|
||||
<style>
|
||||
/* td{*/
|
||||
/* display: flex;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<div class="panel panel-default panel-intro">
|
||||
|
||||
<div class="panel-heading">
|
||||
@ -15,6 +20,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
|
||||
|
@ -15,6 +15,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/teacher/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
@ -15,6 +15,7 @@
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
{$check_auth_msg}
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/verification/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
|
@ -4,11 +4,11 @@
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class='control-relative'>
|
||||
<input id="c-address_city" data-rule="required" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="" type="text">
|
||||
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="{$q_address_city}" type="text">
|
||||
</div>
|
||||
<input type="hidden" id="province" name="row[province]" value="" >
|
||||
<input type="hidden" id="city" name="row[city]" value="" >
|
||||
<input type="hidden" id="district" name="row[district]" value="" >
|
||||
<input type="hidden" id="province" name="row[province]" value="{$q_province_code}" >
|
||||
<input type="hidden" id="city" name="row[city]" value="{$q_city_code}" >
|
||||
<input type="hidden" id="district" name="row[district]" value="{$q_area_code}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
|
@ -30,9 +30,9 @@ class User extends Api
|
||||
{
|
||||
$this->miniConfig = (new Wechat)->getMiniConfig();
|
||||
parent::_initialize();
|
||||
if (!Config::get('fastadmin.usercenter')) {
|
||||
$this->error(__('User center already closed'));
|
||||
}
|
||||
// if (!Config::get('fastadmin.usercenter')) {
|
||||
// $this->error(__('User center already closed'));
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -361,7 +361,7 @@ class Classes extends Base
|
||||
|
||||
$params["city"] = $this->request->get('city/s', ''); //机构店铺id
|
||||
$params["district"] = $this->request->get('district/s', ''); //机构店铺id
|
||||
$params["status"] = $this->request->get('status/s', ''); //机构店铺id
|
||||
$params["status"] = $this->request->get('status/s', '-2'); //机构店铺id
|
||||
$params["recommend"] = $this->request->get('recommend/s', ''); //机构店铺id
|
||||
$params["hot"] = $this->request->get('hot/s', ''); //机构店铺id
|
||||
$params["new"] = $this->request->get('new/s', ''); //机构店铺id
|
||||
@ -381,7 +381,7 @@ class Classes extends Base
|
||||
|
||||
$params["start_time"] = $this->request->get('start_time/d', ''); //主讲师用户id
|
||||
$params["end_time"] = $this->request->get('end_time/d', ''); //机构店铺id
|
||||
$params["auth_status"] = $this->request->get('auth_status/d', '-1'); //机构店铺id
|
||||
$params["auth_status"] = $this->request->get('auth_status/d', '-2'); //机构店铺id
|
||||
|
||||
|
||||
|
||||
|
@ -336,4 +336,109 @@ class Shop extends Base
|
||||
|
||||
|
||||
|
||||
/** 编辑认证信息
|
||||
* @ApiTitle( 编辑认证信息)
|
||||
* @ApiSummary(编辑认证信息)
|
||||
* @ApiRoute(/api/school/shop/edit)
|
||||
* @ApiMethod(POST)
|
||||
* @ApiParams(name = "name", type = "string",required=true,description = "机构名称")
|
||||
* @ApiParams(name = "logo", type = "string",required=true,description = "logo单图")
|
||||
* @ApiParams(name = "image", type = "string",required=true,description = "封面单图")
|
||||
* @ApiParams(name = "content", type = "string",required=true,description = "店铺详情")
|
||||
* @ApiParams(name = "tel", type = "string",required=true,description = "服务电话(非必填)")
|
||||
* @ApiParams(name = "desc", type = "string",required=false,description = "申请备注(非必填)")
|
||||
* @ApiParams(name = "front_idcard_image", type = "string",required=true,description = "法人身份证正面")
|
||||
* @ApiParams(name = "reverse_idcard_image", type = "string",required=true,description = "法人身份证反面")
|
||||
* @ApiParams(name = "images", type = "string",required=true,description = "环境照片(多个逗号拼接)")
|
||||
* @ApiParams(name = "yyzzdm", type = "string",required=true,description = "社会统一信用代码")
|
||||
* @ApiParams(name = "yyzz_images", type = "string",required=true,description = "营业执照照片(多个逗号拼接)")
|
||||
* @ApiParams(name = "address", type = "string",required=true,description = "店铺地址")
|
||||
* @ApiParams(name = "address_detail", type = "string",required=true,description = "店铺详细地址")
|
||||
* @ApiParams(name = "longitude", type = "string",required=true,description = "经度")
|
||||
* @ApiParams(name = "latitude", type = "string",required=true,description = "纬度")
|
||||
* @ApiParams(name = "province", type = "int",required=true,description = "省编号")
|
||||
* @ApiParams(name = "city", type = "int",required=true,description = "市编号")
|
||||
* @ApiParams(name = "district", type = "int",required=true,description = "县区编号")
|
||||
* @ApiParams(name = "establish_time", type = "int",required=true,description = "成立时间10位秒级时间戳")
|
||||
* @ApiParams(name = "people", type = "int",required=true,description = "员工人数")
|
||||
* @ApiParams(name = "legal_entity", type = "string",required=true,description = "法人姓名")
|
||||
* @ApiParams(name = "gender", type = "int",required=true,description = "法人性别:0=女,1=男")
|
||||
* @ApiParams(name = "nation", type = "string",required=true,description = "法人民族")
|
||||
* @ApiParams(name = "out_look", type = "string",required=true,description = "法人政治面貌")
|
||||
* @ApiParams(name = "birthtime", type = "int",required=true,description = "法人出生日期10位秒级时间戳")
|
||||
* @ApiParams(name = "native_place", type = "string",required=true,description = "法人籍贯")
|
||||
* @ApiParams(name = "card_number", type = "string",required=true,description = "法人身份证号码")
|
||||
* @ApiParams(name = "diploma", type = "string",required=true,description = "法人学历")
|
||||
* @ApiParams(name = "post", type = "string",required=true,description = "法人职务")
|
||||
* @ApiParams(name = "social_position", type = "string",required=true,description = "法人社会职务")
|
||||
*
|
||||
*
|
||||
* @ApiReturn({
|
||||
*
|
||||
*})
|
||||
*/
|
||||
public function edit(){
|
||||
$params=[];
|
||||
$params["name"] = $this->request->post('name/s','');
|
||||
$params["logo"] = $this->request->post('logo/s','');
|
||||
$params["image"] = $this->request->post('image/s','');
|
||||
$params["content"] = $this->request->post('content/s','');
|
||||
|
||||
$params["tel"] = $this->request->post('tel/s','');
|
||||
$params["desc"] = $this->request->post('desc/s','');
|
||||
$params["front_idcard_image"] = $this->request->post('front_idcard_image/s','');
|
||||
$params["reverse_idcard_image"] = $this->request->post('reverse_idcard_image/s','');
|
||||
|
||||
$params["images"] = $this->request->post('images/s','');
|
||||
$params["yyzz_images"] = $this->request->post('yyzz_images/s','');
|
||||
$params["yyzzdm"] = $this->request->post('yyzzdm/s','');
|
||||
|
||||
|
||||
$params["address"] = $this->request->post('address/s','');
|
||||
$params["address_detail"] = $this->request->post('address_detail/s','');
|
||||
$params["longitude"] = $this->request->post('longitude/s','');
|
||||
$params["latitude"] = $this->request->post('latitude/s','');
|
||||
|
||||
|
||||
|
||||
|
||||
$params["province"] = $this->request->post('province/d','');
|
||||
$params["city"] = $this->request->post('city/d','');
|
||||
$params["district"] = $this->request->post('district/d','');
|
||||
|
||||
|
||||
|
||||
$params["establish_time"] = $this->request->post('establish_time/d','');
|
||||
$params["people"] = $this->request->post('people/d','');
|
||||
$params["legal_entity"] = $this->request->post('legal_entity/s','');
|
||||
$params["gender"] = $this->request->post('gender/d','');
|
||||
$params["nation"] = $this->request->post('nation/s','');
|
||||
$params["out_look"] = $this->request->post('out_look/s','');
|
||||
$params["birthtime"] = $this->request->post('birthtime/d','');
|
||||
$params["native_place"] = $this->request->post('native_place/s','');
|
||||
$params["card_number"] = $this->request->post('card_number/s','');
|
||||
$params["diploma"] = $this->request->post('diploma/s','');
|
||||
$params["post"] = $this->request->post('post/s','');
|
||||
$params["social_position"] = $this->request->post('social_position/s','');
|
||||
|
||||
|
||||
|
||||
|
||||
// if(empty($id)){
|
||||
// $this->error(__('缺少必要参数'));
|
||||
// }
|
||||
|
||||
$user_id = 0;
|
||||
$user = $this->auth->getUser();//登录用户
|
||||
if($user)$user_id = $user['id'];
|
||||
try {
|
||||
$res = $this->model->updateData($user_id,$params,true,true);
|
||||
} catch (\Exception $e){
|
||||
// Log::log($e->getMessage());
|
||||
$this->error($e->getMessage(),['errcode'=>$e->getCode()]);
|
||||
}
|
||||
$this->success('编辑成功', ['detail' => $res]);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -29,10 +29,17 @@ class Base extends Api
|
||||
$user = $this->auth->getUser();//登录用户
|
||||
if($user)$user_id = $user['id'];
|
||||
if(!$user_id)$this->error("请登录后再访问该接口!",['errcode'=>30002], 401);
|
||||
|
||||
$shop_id = 0;
|
||||
try{
|
||||
$shop_id = ClassesLib::checkOptionAuth(0,$user_id,"user");
|
||||
}catch (\Exception $e){
|
||||
$this->error($e->getMessage(),['errcode'=>30003]);
|
||||
}
|
||||
$this->classes_lib_ids = (new ClassesLib)->getClassesAuthIds($user_id);
|
||||
|
||||
//如果没有任何可管理的classes_lib_id 则返回错误
|
||||
if(!$this->classes_lib_ids)$this->error("您没有员工权限访问该接口!",['errcode'=>30003]);
|
||||
if(!$this->classes_lib_ids && !$shop_id)$this->error("您没有员工权限访问该接口!",['errcode'=>30003]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -73,29 +73,29 @@ class Classes extends Base
|
||||
$params = [];
|
||||
$params["status"] = $this->request->post('status/s', 0); //上架状态:1=上架,2=下架,3=平台下架
|
||||
$params["teacher_id"] = $this->request->post('teacher_id/d', 0); //老师id
|
||||
$params["classes_type"] = $this->request->post('classes_type/s', 0); //老师id
|
||||
$params["classes_cate_ids"] = $this->request->post('classes_cate_ids/s', 0); //课程标签
|
||||
$params["classes_label_ids"] = $this->request->post('classes_label_ids/s', 0); //课程热门标签
|
||||
$params["self_label_tag"] = $this->request->post('self_label_tag/s', 0); //老师id
|
||||
$params["title"] = $this->request->post('title/s', 0); //老师id
|
||||
$params["headimage"] = $this->request->post('headimage/s', 0); //老师id
|
||||
$params["images"] = $this->request->post('images/s', 0); //老师id
|
||||
$params["type"] = $this->request->post('type/s', 0); //老师id
|
||||
$params["spec"] = $this->request->post('spec/s', 0); //老师id
|
||||
$params["classes_type"] = $this->request->post('classes_type/s', ''); //老师id
|
||||
$params["classes_cate_ids"] = $this->request->post('classes_cate_ids/s', ''); //课程标签
|
||||
$params["classes_label_ids"] = $this->request->post('classes_label_ids/s', ''); //课程热门标签
|
||||
$params["self_label_tag"] = $this->request->post('self_label_tag/s', ''); //老师id
|
||||
$params["title"] = $this->request->post('title/s', ''); //老师id
|
||||
$params["headimage"] = $this->request->post('headimage/s', ''); //老师id
|
||||
$params["images"] = $this->request->post('images/s', ''); //老师id
|
||||
$params["type"] = $this->request->post('type/s', ''); //老师id
|
||||
$params["spec"] = $this->request->post('spec/s', ''); //老师id
|
||||
$params["classes_num"] = $this->request->post('classes_num/d', 0); //核销次数
|
||||
//
|
||||
$params["address_type"] = $this->request->post('address_type/s', 0); //老师id
|
||||
$params["address_type"] = $this->request->post('address_type/s', ''); //老师id
|
||||
$params["province"] = $this->request->post('province/d', 0); //老师id
|
||||
$params["city"] = $this->request->post('city/d', 0); //老师id
|
||||
$params["district"] = $this->request->post('district/d', 0); //老师id
|
||||
$params["address"] = $this->request->post('address/s', 0); //老师id
|
||||
$params["address_detail"] = $this->request->post('address_detail/s', 0); //老师id
|
||||
$params["address"] = $this->request->post('address/s', ''); //老师id
|
||||
$params["address_detail"] = $this->request->post('address_detail/s', ''); //老师id
|
||||
$params["longitude"] = $this->request->post('longitude/s', 0); //老师id
|
||||
$params["latitude"] = $this->request->post('latitude/s', 0); //老师id
|
||||
$params["content"] = $this->request->post('content/s', 0); //老师id
|
||||
$params["notice"] = $this->request->post('notice/s', 0); //老师id
|
||||
$params["content"] = $this->request->post('content/s', ''); //老师id
|
||||
$params["notice"] = $this->request->post('notice/s', ''); //老师id
|
||||
$params["price"] = $this->request->post('price/f', 0); //老师id
|
||||
$params["selfhot"] = $this->request->post('selfhot/s', 0); //老师id
|
||||
$params["selfhot"] = $this->request->post('selfhot/s', ''); //老师id
|
||||
|
||||
|
||||
//classes_type
|
||||
@ -151,29 +151,29 @@ class Classes extends Base
|
||||
if($user)$user_id = $user['id'];
|
||||
$params = [];
|
||||
$id = $this->request->post('id/d', 0);
|
||||
$params["status"] = $this->request->post('status/s', 0); //上架状态:1=上架,2=下架,3=平台下架
|
||||
$params["status"] = $this->request->post('status/s', ''); //上架状态:1=上架,2=下架,3=平台下架
|
||||
$params["teacher_id"] = $this->request->post('teacher_id/d', 0); //老师id
|
||||
$params["classes_type"] = $this->request->post('classes_type/s', 0); //老师id
|
||||
$params["classes_cate_ids"] = $this->request->post('classes_cate_ids/s', 0); //课程标签
|
||||
$params["classes_label_ids"] = $this->request->post('classes_label_ids/s', 0); //课程热门标签
|
||||
$params["self_label_tag"] = $this->request->post('self_label_tag/s', 0); //老师id
|
||||
$params["title"] = $this->request->post('title/s', 0); //老师id
|
||||
$params["headimage"] = $this->request->post('headimage/s', 0); //老师id
|
||||
$params["images"] = $this->request->post('images/s', 0); //老师id
|
||||
$params["type"] = $this->request->post('type/s', 0); //老师id
|
||||
$params["spec"] = $this->request->post('spec/s', 0); //老师id
|
||||
$params["address_type"] = $this->request->post('address_type/s', 0); //老师id
|
||||
$params["classes_type"] = $this->request->post('classes_type/s', ''); //老师id
|
||||
$params["classes_cate_ids"] = $this->request->post('classes_cate_ids/s', ''); //课程标签
|
||||
$params["classes_label_ids"] = $this->request->post('classes_label_ids/s', ''); //课程热门标签
|
||||
$params["self_label_tag"] = $this->request->post('self_label_tag/s', ''); //老师id
|
||||
$params["title"] = $this->request->post('title/s', ''); //老师id
|
||||
$params["headimage"] = $this->request->post('headimage/s', ''); //老师id
|
||||
$params["images"] = $this->request->post('images/s', ''); //老师id
|
||||
$params["type"] = $this->request->post('type/s', ''); //老师id
|
||||
$params["spec"] = $this->request->post('spec/s', ''); //老师id
|
||||
$params["address_type"] = $this->request->post('address_type/s', ''); //老师id
|
||||
$params["province"] = $this->request->post('province/d', 0); //老师id
|
||||
$params["city"] = $this->request->post('city/d', 0); //老师id
|
||||
$params["district"] = $this->request->post('district/d', 0); //老师id
|
||||
$params["address"] = $this->request->post('address/s', 0); //老师id
|
||||
$params["address_detail"] = $this->request->post('address_detail/s', 0); //老师id
|
||||
$params["address"] = $this->request->post('address/s', ''); //老师id
|
||||
$params["address_detail"] = $this->request->post('address_detail/s', ''); //老师id
|
||||
$params["longitude"] = $this->request->post('longitude/s', 0); //老师id
|
||||
$params["latitude"] = $this->request->post('latitude/s', 0); //老师id
|
||||
$params["content"] = $this->request->post('content/s', 0); //老师id
|
||||
$params["notice"] = $this->request->post('notice/s', 0); //老师id
|
||||
$params["content"] = $this->request->post('content/s', ''); //老师id
|
||||
$params["notice"] = $this->request->post('notice/s', ''); //老师id
|
||||
$params["price"] = $this->request->post('price/f', 0); //老师id
|
||||
$params["selfhot"] = $this->request->post('selfhot/s', 0); //老师id
|
||||
$params["selfhot"] = $this->request->post('selfhot/s', ''); //老师id
|
||||
|
||||
|
||||
//classes_type
|
||||
@ -217,6 +217,34 @@ class Classes extends Base
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ApiTitle(课程更改状态)
|
||||
* @ApiSummary(课程更改状态)
|
||||
* @ApiMethod(POST)
|
||||
* @ApiParams(name = "id", type = "string",required=true,description = "需要更改状态的课程id")
|
||||
* @ApiParams(name = "status", type = "string",required=true,description = "需要更改状态:1=上架,2=下架")
|
||||
* @ApiReturn({
|
||||
*
|
||||
*})
|
||||
*/
|
||||
public function update_status(){
|
||||
$user_id = 0;
|
||||
$user = $this->auth->getUser();//登录用户
|
||||
if($user)$user_id = $user['id'];
|
||||
|
||||
$id = $this->request->post('id/s', '');
|
||||
$status = $this->request->post('status/s', '');
|
||||
try{
|
||||
$res = $this->model->updateStatusByOper($status,$id,true,'user',$user_id,true);
|
||||
}catch (\Throwable $e){
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
$this->success("状态更改成功",["self"=>$res]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -86,12 +86,11 @@ class Order extends Base
|
||||
$classes_lib_id = $this->request->get('classes_lib_id/s', ''); //搜索关键字
|
||||
// $type = $this->request->get('type/s', ''); //筛选学员和教练单
|
||||
|
||||
|
||||
try{
|
||||
//当前申请状态
|
||||
$res = $this->model::workList($user_id,$page, $limit,$keywords,$status,$classes_lib_id,$this->classes_lib_ids);
|
||||
// if($user_id =='670153'){
|
||||
// file_put_contents("ceshi66.txt",(new AppointmentOrder())->getLastSql());
|
||||
// }
|
||||
// var_dump($this->model->getLastSql());
|
||||
}catch (\Exception $e){
|
||||
|
||||
$this->error($e->getMessage());
|
||||
|
@ -213,6 +213,67 @@ class ServiceOrder extends Base
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ApiTitle( POST机构帮用户申请售后接口【get 传入classes_order_id 查询计算退款额度】 )
|
||||
* @ApiSummary(机构帮用户申请售后接口)
|
||||
* @ApiMethod(POST/GET)
|
||||
* @ApiParams(name = "classes_order_id", type = "string",required=true,description = "需要售后的课程订单id")
|
||||
* @ApiParams(name = "reason", type = "string",required=true,description = "申请理由")
|
||||
* @ApiParams(name = "price", type = "string",required=true,description = "同意的退款金额")
|
||||
* @ApiReturn({
|
||||
*
|
||||
*})
|
||||
*/
|
||||
public function create(){
|
||||
$user_id = 0;
|
||||
$user = $this->auth->getUser();//登录用户
|
||||
if($user)$user_id = $user['id'];
|
||||
$classes_order = $this->request->param('classes_order_id/s', 0); //课程id
|
||||
$reason = $this->request->post('reason/s', ''); //订单号
|
||||
$price = $this->request->post('price/f', ''); //订单号
|
||||
//如果是post则提交
|
||||
if($this->request->isPost()){
|
||||
try{
|
||||
$remark = "机构前台工作人员帮忙下售后单";
|
||||
//当前申请状态
|
||||
$res = $this->model->afterSales($classes_order,$reason,$remark,'user',$user_id,true);
|
||||
|
||||
$status = "yes";
|
||||
$reject_reason = "";
|
||||
$reject_images = "";
|
||||
$model = (new \app\common\model\school\classes\order\ServiceOrder());
|
||||
$model->shopConfirmation($res["order_no"],$status,$price,$reject_reason,$reject_images,0,true,'user',$user_id,true);
|
||||
|
||||
|
||||
|
||||
}catch (\Exception $e){
|
||||
// Log::log($e->getMessage());
|
||||
$this->error($e->getMessage(),['errcode'=>$e->getCode()]);
|
||||
}
|
||||
$this->success('申请售后成功', $res);
|
||||
}
|
||||
//如果是get为查询
|
||||
if($this->request->isGet()){
|
||||
|
||||
$row = \app\common\model\school\classes\order\Order::where('id|order_no',$classes_order)->find();
|
||||
if (!$row) {
|
||||
$this->error(__('找不到订单!'));
|
||||
}
|
||||
$order_info = \app\common\model\school\classes\order\ServiceOrder::getCost("43246634123432564",$classes_order,"",[],true);
|
||||
// $row = $this->model->get($param['ids']);
|
||||
$res = array_merge($row->toArray(),$order_info);
|
||||
$this->success('查询计算金额成功', $res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace app\common\controller;
|
||||
|
||||
use app\admin\controller\famysql\Field;
|
||||
use app\admin\library\Auth;
|
||||
use app\admin\model\Admin;
|
||||
use app\common\library\Virtual;
|
||||
use app\common\model\school\Area;
|
||||
use Monolog\Handler\IFTTTHandler;
|
||||
@ -123,6 +124,44 @@ class Backend extends Controller
|
||||
protected $need_auth = false;
|
||||
protected $no_auth_fields = [];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 判断是否数据关联shop_id
|
||||
*/
|
||||
protected $storeIdFieldAutoFill = null;
|
||||
|
||||
/**
|
||||
* 判断是否数据关联store_id
|
||||
*/
|
||||
protected $shopIdAutoCondition = null;
|
||||
|
||||
/**
|
||||
* 控制器前置方法
|
||||
*/
|
||||
protected $beforeActionList = [
|
||||
'setShopAutoRelation',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 设置商家关联关系
|
||||
*/
|
||||
protected function setShopAutoRelation(){
|
||||
if($this->model){
|
||||
$fields = $this->model->getQuery()->getTableInfo('','fields');
|
||||
if(!isset($this->storeIdFieldAutoFill)){
|
||||
$this->storeIdFieldAutoFill = in_array("store_id",$fields);
|
||||
}
|
||||
if(!isset($this->shopIdAutoCondition)){
|
||||
$this->shopIdAutoCondition = in_array("shop_id",$fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected function no_auth_fields_check($params,$row){
|
||||
|
||||
foreach ($params as $k=>$v){
|
||||
@ -201,6 +240,11 @@ class Backend extends Controller
|
||||
$this->assign('q_address_city', $city_data['address_city']);
|
||||
}
|
||||
|
||||
protected function getAuthMsg(){
|
||||
|
||||
$this->assign('check_auth_msg', Admin::checkAuthMsg($this->auth->id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -358,7 +402,7 @@ class Backend extends Controller
|
||||
* @param boolean $relationSearch 是否关联查询
|
||||
* @return array
|
||||
*/
|
||||
protected function buildparams($searchfields = null, $relationSearch = null)
|
||||
protected function buildparams($searchfields = null, $relationSearch = null,$excludefields = [])
|
||||
{
|
||||
$searchfields = is_null($searchfields) ? $this->searchFields : $searchfields;
|
||||
$relationSearch = is_null($relationSearch) ? $this->relationSearch : $relationSearch;
|
||||
@ -380,6 +424,7 @@ class Backend extends Controller
|
||||
$op = (array)json_decode($op, true);
|
||||
$filter = $filter ? $filter : [];
|
||||
$where = [];
|
||||
$excludearray = [];
|
||||
$alias = [];
|
||||
$bind = [];
|
||||
$name = '';
|
||||
@ -395,6 +440,15 @@ class Backend extends Controller
|
||||
}
|
||||
unset($item);
|
||||
$sort = implode(',', $sortArr);
|
||||
|
||||
if($this->shopIdAutoCondition){
|
||||
$shopIds = Admin::getHaveShopId($this->auth->id);
|
||||
if(is_array($shopIds)){
|
||||
$where[] = [$aliasName.'shop_id','in',$shopIds];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds)) {
|
||||
$where[] = [$aliasName . $this->dataLimitField, 'in', $adminIds];
|
||||
@ -413,6 +467,19 @@ class Backend extends Controller
|
||||
continue;
|
||||
}
|
||||
$sym = $op[$k] ?? '=';
|
||||
//忽略的查询条件出现在忽略数组中 2022年9月6日18:55:17
|
||||
if(in_array($k, $excludefields)){
|
||||
$excludearray[$k]['value'] = $v;
|
||||
$excludearray[$k]['op'] = $sym;
|
||||
|
||||
if (stripos($k, ".") === false) {
|
||||
$excludearray[$k]['alias'] = $aliasName;
|
||||
}
|
||||
unset($filter[$k]);
|
||||
unset($op[$k]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (stripos($k, ".") === false) {
|
||||
$k = $aliasName . $k;
|
||||
}
|
||||
@ -533,7 +600,7 @@ class Backend extends Controller
|
||||
}
|
||||
}
|
||||
};
|
||||
return [$where, $sort, $order, $offset, $limit, $page, $alias, $bind];
|
||||
return [$where, $sort, $order, $offset, $limit, $page, $alias, $bind,$excludearray];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -637,9 +704,23 @@ class Backend extends Controller
|
||||
if (is_array($adminIds)) {
|
||||
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
}
|
||||
if($this->shopIdAutoCondition){
|
||||
$shopIds = Admin::getHaveShopId($this->auth->id);
|
||||
if(is_array($shopIds)){
|
||||
$this->model->where('shop_id',"in",$shopIds);
|
||||
}
|
||||
}
|
||||
|
||||
$list = [];
|
||||
$total = $this->model->where($where)->count();
|
||||
if ($total > 0) {
|
||||
if($this->shopIdAutoCondition){
|
||||
$shopIds = Admin::getHaveShopId($this->auth->id);
|
||||
if(is_array($shopIds)){
|
||||
$this->model->where('shop_id',"in",$shopIds);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($adminIds)) {
|
||||
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ class ManystoreBase extends Controller
|
||||
* @param boolean $relationSearch 是否关联查询
|
||||
* @return array
|
||||
*/
|
||||
protected function buildparams($searchfields = null, $relationSearch = null)
|
||||
protected function buildparams($searchfields = null, $relationSearch = null,$excludefields = [])
|
||||
{
|
||||
$searchfields = is_null($searchfields) ? $this->searchFields : $searchfields;
|
||||
$relationSearch = is_null($relationSearch) ? $this->relationSearch : $relationSearch;
|
||||
@ -437,6 +437,7 @@ class ManystoreBase extends Controller
|
||||
$filter = $filter ? $filter : [];
|
||||
$where = [];
|
||||
$alias = [];
|
||||
$excludearray = [];
|
||||
$bind = [];
|
||||
$name = '';
|
||||
$aliasName = '';
|
||||
@ -469,6 +470,18 @@ class ManystoreBase extends Controller
|
||||
continue;
|
||||
}
|
||||
$sym = isset($op[$k]) ? $op[$k] : '=';
|
||||
//忽略的查询条件出现在忽略数组中 2022年9月6日18:55:17
|
||||
if(in_array($k, $excludefields)){
|
||||
$excludearray[$k]['value'] = $v;
|
||||
$excludearray[$k]['op'] = $sym;
|
||||
|
||||
if (stripos($k, ".") === false) {
|
||||
$excludearray[$k]['alias'] = $aliasName;
|
||||
}
|
||||
unset($filter[$k]);
|
||||
unset($op[$k]);
|
||||
continue;
|
||||
}
|
||||
if (stripos($k, ".") === false) {
|
||||
$k = $aliasName . $k;
|
||||
}
|
||||
@ -586,7 +599,7 @@ class ManystoreBase extends Controller
|
||||
}
|
||||
}
|
||||
};
|
||||
return [$where, $sort, $order, $offset, $limit, $page, $alias, $bind];
|
||||
return [$where, $sort, $order, $offset, $limit, $page, $alias, $bind,$excludearray];
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,19 +59,19 @@ class UserHook
|
||||
Message::send($title,$desc,$mini_type,$to_id,$to_type,$status,$platform,$params,$oper_id,$oper_type);
|
||||
$manystore = Manystore::where("shop_id",$user_auth["shop_id"])->find();
|
||||
if($manystore){
|
||||
//加入核销员
|
||||
$verification = Verification::where("user_id",$user_auth["user_id"])
|
||||
->where("shop_id",$user_auth["shop_id"])
|
||||
->where("manystore_id",$manystore["id"])->find();
|
||||
if(!$verification){
|
||||
Verification::create([
|
||||
"user_id"=>$user_auth["user_id"],
|
||||
"shop_id"=>$user_auth["shop_id"],
|
||||
"manystore_id"=>$manystore["id"],
|
||||
"status"=>'2',
|
||||
"classes_lib_ids"=>"",
|
||||
]);
|
||||
}
|
||||
// //加入核销员
|
||||
// $verification = Verification::where("user_id",$user_auth["user_id"])
|
||||
// ->where("shop_id",$user_auth["shop_id"])
|
||||
// ->where("manystore_id",$manystore["id"])->find();
|
||||
// if(!$verification){
|
||||
// Verification::create([
|
||||
// "user_id"=>$user_auth["user_id"],
|
||||
// "shop_id"=>$user_auth["shop_id"],
|
||||
// "manystore_id"=>$manystore["id"],
|
||||
// "status"=>'2',
|
||||
// "classes_lib_ids"=>"",
|
||||
// ]);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ class ManystoreShop extends BaseModel
|
||||
|
||||
public function checkFull($id){
|
||||
$self = $this->get($id,['teachers']);
|
||||
// var_dump($self->toArray());
|
||||
if($self){
|
||||
if(empty($self["address_city"])
|
||||
|| empty($self["province"])
|
||||
|| empty($self["city"])
|
||||
@ -205,9 +205,11 @@ class ManystoreShop extends BaseModel
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function checkFullMsg($id){
|
||||
if($this->checkFull($id)){
|
||||
if($id && $this->checkFull($id)){
|
||||
//必要信息已完善
|
||||
return '<div class="alert alert-success-light">
|
||||
<b >必要展示信息已完善!可正常上架课程!</b></div>';
|
||||
@ -499,6 +501,222 @@ class ManystoreShop extends BaseModel
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**更新机构数据
|
||||
* @param $type 申请类型 类型:1=个人,2=机构
|
||||
* @param int $user_id 申请人
|
||||
* @param $params 申请参数
|
||||
* @param bool $check
|
||||
* @param bool $trans
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function updateData($user_id=0,$params=[],$check=false,$trans=false){
|
||||
|
||||
if($check){
|
||||
$user = User::get($user_id);
|
||||
if(!$user)throw new \Exception("用户不存在");
|
||||
//已经是机构
|
||||
$shop = ManystoreShop::where( 'user_id',$user_id)->find();
|
||||
if(!$shop)throw new \Exception("未申请机构,请先去申请机构");
|
||||
|
||||
//验证参数
|
||||
//$type 1=个人,2=机构
|
||||
if(!in_array($shop['type'],['1','2']))throw new \Exception("类型参数错误");
|
||||
|
||||
if(!in_array($params['gender'],[0,1]))throw new \Exception("年龄参数错误");
|
||||
|
||||
unset($params['user_id']);
|
||||
unset($params['type']);
|
||||
|
||||
//switch不同类型type做不同验证
|
||||
//未传手机号则默认用户手机号
|
||||
if(empty($params['tel'])) $params['tel'] = $user['mobile'];
|
||||
|
||||
switch ($shop['type']) {
|
||||
case '1': //个人
|
||||
$rule = [
|
||||
'name' => 'require',
|
||||
'tel' => 'require|number',
|
||||
// 'desc' => 'require',
|
||||
'front_idcard_image' => 'require',
|
||||
'reverse_idcard_image' => 'require',
|
||||
|
||||
'address' => 'require',
|
||||
// 'address_detail' => 'require',
|
||||
'longitude' => 'require',
|
||||
'latitude' => 'require',
|
||||
'province' => 'require',
|
||||
'city' => 'require',
|
||||
'district' => 'require',
|
||||
|
||||
'gender'=> 'require',
|
||||
'nation'=> 'require',
|
||||
'out_look'=> 'require',
|
||||
'birthtime'=> 'require',
|
||||
'native_place'=> 'require',
|
||||
'card_number'=> 'require',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
$rule_msg = [
|
||||
'name.require' => '姓名必须填写',
|
||||
'tel.require' => '服务电话必须填写',
|
||||
'tel.number' => '服务电话必须是数字',
|
||||
// 'desc.require' => '申请备注必须填写',
|
||||
'front_idcard_image.require' => '身份证正面必须上传',
|
||||
'reverse_idcard_image.require' => '身份证反面必须上传',
|
||||
'address.require' => '地址必填',
|
||||
// 'address_detail.require' => '详细地址必填',
|
||||
'longitude.require' => '经度必填',
|
||||
'latitude.require' => '纬度必填',
|
||||
'province.require' => '省编号必填',
|
||||
'city.require' => '市编号必填',
|
||||
'district.require' => '县区编号必填',
|
||||
|
||||
|
||||
'gender.require'=> '个人性别必填',
|
||||
'nation.require'=> '个人民族必填',
|
||||
'out_look.require'=> '个人政治面貌必填',
|
||||
'birthtime.require'=> '个人出生日期必填',
|
||||
'native_place.require'=> '个人籍贯必填',
|
||||
'card_number.require'=> '个人身份证号码必填',
|
||||
|
||||
];
|
||||
break;
|
||||
case '2': //机构
|
||||
|
||||
$rule = [
|
||||
'name' => 'require',
|
||||
'tel' => 'require|number',
|
||||
// 'desc' => 'require',
|
||||
'front_idcard_image' => 'require',
|
||||
'reverse_idcard_image' => 'require',
|
||||
'images' => 'require',
|
||||
'yyzz_images' => 'require',
|
||||
// 'yyzzdm' => 'require',
|
||||
|
||||
|
||||
'address' => 'require',
|
||||
// 'address_detail' => 'require',
|
||||
'longitude' => 'require',
|
||||
'latitude' => 'require',
|
||||
'province' => 'require',
|
||||
'city' => 'require',
|
||||
'district' => 'require',
|
||||
|
||||
// 'establish_time' => 'require',
|
||||
// 'people' => 'require',
|
||||
|
||||
|
||||
'gender'=> 'require',
|
||||
'nation'=> 'require',
|
||||
'out_look'=> 'require',
|
||||
'birthtime'=> 'require',
|
||||
'native_place'=> 'require',
|
||||
'card_number'=> 'require',
|
||||
|
||||
];
|
||||
|
||||
$rule_msg = [
|
||||
'address.require' => '地址必填',
|
||||
// 'address_detail.require' => '详细地址必填',
|
||||
'longitude.require' => '经度必填',
|
||||
'latitude.require' => '纬度必填',
|
||||
'province.require' => '省编号必填',
|
||||
'city.require' => '市编号必填',
|
||||
'district.require' => '县区编号必填',
|
||||
'name.require' => '机构名称必须填写',
|
||||
'tel.require' => '服务电话必须填写',
|
||||
'tel.number' => '服务电话必须是数字',
|
||||
// 'desc.require' => '申请备注必须填写',
|
||||
'front_idcard_image.require' => '法人身份证正面必须上传',
|
||||
'reverse_idcard_image.require' => '法人身份证反面必须上传',
|
||||
'images.require' => '机构环境照片必须上传',
|
||||
'yyzz_images.require' => '营业执照照片必须上传',
|
||||
// 'yyzzdm.require' => '企业统一信用代码必填',
|
||||
// 'establish_time.require' => '成立时间必填',
|
||||
// 'people.require' => '员工人数必填',
|
||||
|
||||
|
||||
'gender.require'=> '法人性别必填',
|
||||
'nation.require'=> '法人民族必填',
|
||||
'out_look.require'=> '法人政治面貌必填',
|
||||
'birthtime.require'=> '法人出生日期必填',
|
||||
'native_place.require'=> '法人籍贯必填',
|
||||
'card_number.require'=> '法人身份证号码必填',
|
||||
|
||||
];
|
||||
|
||||
break;
|
||||
}
|
||||
self::check($params,$rule,$rule_msg);
|
||||
|
||||
}
|
||||
$province_name = Area::where("id" ,$params['province'])->value("name");
|
||||
if(!$province_name) throw new \Exception("省份不存在");
|
||||
$city_name = Area::where("id" ,$params['city'])->value("name");
|
||||
if(!$city_name) throw new \Exception("市不存在");
|
||||
$district_name = Area::where("id" ,$params['district'])->value("name");
|
||||
if(!$district_name) throw new \Exception("区县不存在");
|
||||
$params['address_city'] = $province_name."/".$city_name."/".$district_name;
|
||||
|
||||
|
||||
|
||||
|
||||
// $order = self::getHaveCancelOrder($order_no);
|
||||
|
||||
//判断逻辑
|
||||
if($trans){
|
||||
self::beginTrans();
|
||||
}
|
||||
$res = true;
|
||||
try{
|
||||
//事务逻辑
|
||||
|
||||
//商家表单更新
|
||||
$shop_info = $shop->allowField(true)->save($params);
|
||||
if($shop_info === false){
|
||||
throw new \Exception($shop->getError());
|
||||
}
|
||||
|
||||
|
||||
$shop = ManystoreShop::where( 'user_id',$user_id)->find();
|
||||
//更新申请单状态为审核中 暂时先屏蔽
|
||||
// $shop['status']= '0';
|
||||
// //清空审核时间
|
||||
// $shop['reason']= '';
|
||||
// $shop['auth_time']= 0;
|
||||
// $shop["admin_id"] = 0;
|
||||
// $shop->save();
|
||||
|
||||
// $store = Manystore::where("shop_id",$shop['id'])->find();
|
||||
// $store["status"] = 'hidden';
|
||||
// $store->save();
|
||||
|
||||
|
||||
//调用订单事件
|
||||
$data = ['shop' => $shop];
|
||||
\think\Hook::listen('shop_apply_after', $data);
|
||||
|
||||
if($trans){
|
||||
self::commitTrans();
|
||||
}
|
||||
}catch (\Exception $e){
|
||||
if($trans){
|
||||
self::rollbackTrans();
|
||||
}
|
||||
throw new \Exception($e->getMessage());
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/** 机构后台默认密码获取
|
||||
* @param $type
|
||||
* @param $user_id
|
||||
@ -650,15 +868,31 @@ public static function getAuthInfo($user_id){
|
||||
$shop_id = 0;
|
||||
$type = '1';
|
||||
$reason =""; //失败原因
|
||||
$check_full_msg = "";
|
||||
$check_full = false;
|
||||
$check_field = [
|
||||
"address_city",
|
||||
"province",
|
||||
"city",
|
||||
"district",
|
||||
"longitude",
|
||||
"latitude",
|
||||
"name",
|
||||
"image",
|
||||
"images",
|
||||
"content",
|
||||
"tel",
|
||||
"logo"
|
||||
];
|
||||
$apply_info = null;
|
||||
if(!$user_id)return compact('auth_status','shop_id','reason','apply_info',"type");
|
||||
if(!$user_id)return compact("check_full_msg","check_full","check_field",'auth_status','shop_id','reason','apply_info',"type");
|
||||
|
||||
//得到申请单
|
||||
$apply_info = self::where("user_id",$user_id)->where("status","1")->find();
|
||||
if(!$apply_info)$apply_info = self::where("user_id",$user_id)->find();
|
||||
//不存在说明未申请,直接返回
|
||||
if(!$apply_info){
|
||||
return compact('auth_status','shop_id','reason','apply_info',"type");
|
||||
return compact("check_full_msg","check_full","check_field",'auth_status','shop_id','reason','apply_info',"type");
|
||||
}
|
||||
$type = $apply_info['type'];
|
||||
//从申请单取到申请状态
|
||||
@ -672,8 +906,12 @@ public static function getAuthInfo($user_id){
|
||||
$shop_id = $apply_info['id'];
|
||||
}
|
||||
|
||||
//是否完善展示信息
|
||||
$self = new self;
|
||||
$check_full_msg = $self->checkFullMsg($shop_id);
|
||||
$check_full = $self->checkFull($shop_id);
|
||||
|
||||
return compact('auth_status','shop_id','reason','apply_info',"type");
|
||||
return compact("check_full_msg","check_full","check_field",'auth_status','shop_id','reason','apply_info',"type");
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,6 +7,7 @@ use app\common\library\Virtual;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\dyqc\ManystoreShop;
|
||||
use app\common\model\manystore\Shop;
|
||||
use app\common\model\manystore\UserAuth;
|
||||
use app\common\model\school\Area;
|
||||
use app\common\model\school\classes\lib\Spec;
|
||||
use app\common\model\User;
|
||||
@ -50,8 +51,28 @@ class ClassesLib extends BaseModel
|
||||
'distance_text',
|
||||
'start_time_text',
|
||||
'end_time_text',
|
||||
'has_expire',
|
||||
];
|
||||
|
||||
public function getHasExpireList()
|
||||
{
|
||||
return ['1' => __('Has_expire 1'), '2' => __('Has_expire 2')];
|
||||
}
|
||||
|
||||
|
||||
public function getHasExpireAttr($value, $data)
|
||||
{
|
||||
$end_time = (isset($data['end_time']) ? $data['end_time'] : '');
|
||||
if(!$end_time) return '2';
|
||||
|
||||
if( $end_time < time()) {
|
||||
return '1';
|
||||
}else{
|
||||
return '2';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getStartTimeTextAttr($value, $data)
|
||||
{
|
||||
@ -102,7 +123,7 @@ class ClassesLib extends BaseModel
|
||||
protected static function init()
|
||||
{
|
||||
self::afterInsert(function ($row) {
|
||||
if (!$row['weigh']) {
|
||||
if (!empty($row['weigh'])) {
|
||||
$pk = $row->getPk();
|
||||
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
|
||||
}
|
||||
@ -310,7 +331,7 @@ class ClassesLib extends BaseModel
|
||||
|
||||
public function specs()
|
||||
{
|
||||
return $this->hasMany(ClassesSpec::class,'classes_lib_id');
|
||||
return $this->hasMany(ClassesSpec::class,'classes_lib_id')->order("weigh desc,id desc");
|
||||
}
|
||||
|
||||
// public function collect()
|
||||
@ -587,10 +608,17 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function getClassesAuthIds($user_id){
|
||||
// $classes_lib_ids = Verification::where("user_id",$user_id)->where("status",'1')->column("classes_lib_ids");
|
||||
//必须是授权过的用户
|
||||
if(config("site.shop_auth_user_check")){
|
||||
$auth_shop_ids = UserAuth::where("status" ,1)->where("user_id",$user_id)->column("shop_id");
|
||||
$shop_where = ["shop_id" ,"in" ,$auth_shop_ids];
|
||||
}else{
|
||||
$shop_where = [[]];
|
||||
}
|
||||
|
||||
//核销员有核销全部课程权力
|
||||
$classes_lib_ids = [];
|
||||
$shop_id = Verification::where("user_id",$user_id)->where("status",'1')->value("shop_id");
|
||||
$shop_id = Verification::where("user_id",$user_id)->where(...$shop_where)->where("status",'1')->value("shop_id");
|
||||
if($shop_id){
|
||||
$classes_libids = ClassesLib::where("shop_id",$shop_id)->column("id");
|
||||
if($classes_libids)$classes_lib_ids[] = implode(",", $classes_libids);
|
||||
@ -605,7 +633,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
}
|
||||
}
|
||||
//判断是否有老师身份
|
||||
$teacher = Teacher::where("user_id",$user_id)->find();
|
||||
$teacher = Teacher::where("user_id",$user_id)->where(...$shop_where)->find();
|
||||
if($teacher){
|
||||
$lib_ids = ClassesLib::where("teacher_id",$teacher['id'])->column('id');
|
||||
$this->classes_lib_ids = array_merge($this->classes_lib_ids,$lib_ids);
|
||||
@ -632,17 +660,13 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
$cate_list = Cate::where("status",'1')->column("name","id");
|
||||
$label_list = Label::where("status",'1')->column("name","id");
|
||||
$type_list = Type::where("status",'1')->column("name","id");
|
||||
|
||||
// 查询自提点
|
||||
if(isset($status) && in_array($status, ['1','2','3'])){
|
||||
$selfetch = self::with($with);
|
||||
}else{
|
||||
$selfetch = self::with($with)->where($a.'status', '1');
|
||||
// 查询自提点
|
||||
if($status == "-2"){
|
||||
$selfetch = $selfetch->where($a.'status', '1');
|
||||
}
|
||||
|
||||
if(isset($auth_status) && in_array($auth_status, ['0','1','2'])){
|
||||
|
||||
}else{
|
||||
if($auth_status == "-2"){
|
||||
$selfetch = $selfetch->where("{$a}auth_status",1);
|
||||
}
|
||||
|
||||
@ -742,10 +766,15 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
}
|
||||
|
||||
//设置订单信息
|
||||
if(isset($auth_status) && $auth_status != -1){
|
||||
if(isset($auth_status) && $auth_status != -1 && $auth_status != -2){
|
||||
$selfetch = $selfetch->where("{$a}auth_status", 'in', ''.$auth_status);
|
||||
}
|
||||
|
||||
//设置订单信息
|
||||
if(isset($status) && $status != -1 && $status != -2){
|
||||
$selfetch = $selfetch->where("{$a}status", 'in', ''.$status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//区域搜索
|
||||
@ -812,7 +841,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
//排序
|
||||
switch ($order) {
|
||||
case "normal": //综合排序(推薦優先)
|
||||
$selfetch = $selfetch->order("{$a}recommend desc,{$a}weigh desc,{$a}verification_num desc,{$a}sale desc,{$a}sign_num desc");
|
||||
$selfetch = $selfetch->order("{$a}sale desc,{$a}sign_num desc,{$a}new desc,{$a}weigh desc,{$a}id desc");
|
||||
break;
|
||||
case "distance": //距离优先 权重
|
||||
$selfetch = $selfetch->order("distance asc,{$a}recommend desc,{$a}weigh desc,{$a}verification_num desc,{$a}sale desc,{$a}sign_num desc");
|
||||
@ -828,9 +857,14 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
$selfetch = $selfetch->order("{$a}selfhot desc,{$a}recommend desc,{$a}weigh desc,{$a}verification_num desc,{$a}sale desc,{$a}sign_num desc");
|
||||
break;
|
||||
|
||||
case "recommend": //推薦优先
|
||||
$selfetch = $selfetch->order("{$a}recommend desc,{$a}weigh desc,{$a}verification_num desc,{$a}sale desc,{$a}sign_num desc");
|
||||
break;
|
||||
|
||||
case "sale": //銷量优先
|
||||
$selfetch = $selfetch->order("{$a}sale desc,{$a}verification_num desc,{$a}sign_num desc,{$a}recommend desc,{$a}weigh desc");
|
||||
break;
|
||||
|
||||
case "views": //浏览量优先
|
||||
$selfetch = $selfetch->order("{$a}views desc,{$a}recommend desc,{$a}weigh desc,{$a}verification_num desc,{$a}sale desc");
|
||||
break;
|
||||
@ -988,12 +1022,14 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
$where = [
|
||||
"user_id"=>$user_id,
|
||||
"classes_lib_id"=>$id,
|
||||
"weigh"=>$classes_lib["weigh"],
|
||||
// "weigh"=>$classes_lib["weigh"],
|
||||
];
|
||||
//查询是否已收藏
|
||||
$res1 = Collect::where($where)->find();
|
||||
if($collect){
|
||||
if(!$res1){
|
||||
$where["weigh"] = $classes_lib["weigh"];
|
||||
|
||||
//未收藏,添加收藏
|
||||
$res1 = new Collect();
|
||||
$res1->allowField(true)->save($where);
|
||||
@ -1005,6 +1041,8 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
\think\Hook::listen('classes_collect_success_after', $data);
|
||||
|
||||
}else{
|
||||
|
||||
unset($where["weigh"]);
|
||||
//取消收藏
|
||||
$res1 = Collect::where($where)->delete();
|
||||
\app\common\model\school\classes\ClassesLib::update_classes($classes_lib["id"]);
|
||||
@ -1032,7 +1070,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
|
||||
protected function updateCheck($id,$params=[],$row=null){
|
||||
if($params && $row){
|
||||
|
||||
// var_dump(111);
|
||||
if(!$this->no_auth_fields_check($params,$row)){
|
||||
return true;
|
||||
}
|
||||
@ -1058,13 +1096,22 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
public $success_auth = false;
|
||||
public $error_auth = false;
|
||||
|
||||
public function classesCheck(&$params,$shop_id=null,$row=null)
|
||||
public function classesCheck(&$params,$shop_id=null,$row=null,$oper_type='user',$oper_id=0)
|
||||
{
|
||||
if(!config("site.classes_edit_shop_limit")){
|
||||
if($row)$params["auth_status"] = $params["auth_status"] ?? $row["auth_status"];
|
||||
}
|
||||
|
||||
|
||||
if(config("site.classes_number_only_one")){
|
||||
$params["classes_num"] = 1;
|
||||
}
|
||||
|
||||
$params["auth_status"] = $params["auth_status"] ?? '0';
|
||||
|
||||
$params["status"] = $params["status"] ?? '3';
|
||||
if(!$shop_id)$shop_id = $params["shop_id"] ?? 0;
|
||||
if(empty($params["weigh"]))$params["weigh"] = 0;
|
||||
|
||||
|
||||
$manystore = Manystore::where("shop_id",$shop_id)->find();
|
||||
@ -1101,6 +1148,23 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
|
||||
//独立地点需传定位信息
|
||||
if($params["address_type"] == "2"){
|
||||
|
||||
if(empty($params["address_city"])
|
||||
&& !empty($params["province"])
|
||||
&& !empty($params["city"])
|
||||
&& !empty($params["district"])){
|
||||
|
||||
$province_name = Area::where("id" ,$params['province'])->value("name");
|
||||
if(!$province_name) throw new \Exception("省份不存在");
|
||||
$city_name = Area::where("id" ,$params['city'])->value("name");
|
||||
if(!$city_name) throw new \Exception("市不存在");
|
||||
$district_name = Area::where("id" ,$params['district'])->value("name");
|
||||
if(!$district_name) throw new \Exception("区县不存在");
|
||||
$params['address_city'] = $province_name."/".$city_name."/".$district_name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(empty($params["address_city"])
|
||||
|| empty($params["province"])
|
||||
|| empty($params["city"])
|
||||
@ -1158,6 +1222,66 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
}
|
||||
|
||||
|
||||
$rule = [
|
||||
'manystore_id'=>'require',
|
||||
'shop_id'=>'require',
|
||||
'teacher_id'=>'require',
|
||||
"classes_type" => 'require',
|
||||
'headimage' => 'require',
|
||||
'title' => 'require',
|
||||
'images' => 'require',
|
||||
'address' => 'require',
|
||||
'address_detail' => 'require',
|
||||
'longitude' => 'require',
|
||||
'latitude' => 'require',
|
||||
'province' => 'require',
|
||||
'city' => 'require',
|
||||
'district' => 'require',
|
||||
'address_city' => 'require',
|
||||
'type' => 'require',
|
||||
'classes_num' => 'require',
|
||||
'address_type' => 'require',
|
||||
'content' => 'require',
|
||||
'notice' => 'require',
|
||||
'price' => 'require',
|
||||
|
||||
];
|
||||
|
||||
|
||||
$rule_msg = [
|
||||
"manystore_id.require"=>'机构id必填',
|
||||
"shop_id.require"=>'机构id必填',
|
||||
"teacher_id.require"=>'老师必填',
|
||||
"classes_type.require"=>'课程类型必填',
|
||||
"headimage.require"=>'课程头图必填',
|
||||
'title.require' => '课程名称必须填写',
|
||||
'images.require' => '课程轮播图必须上传',
|
||||
|
||||
'address.require' => '地址必填',
|
||||
'address_detail.require' => '详细地址必填',
|
||||
'longitude.require' => '经度必填',
|
||||
'latitude.require' => '纬度必填',
|
||||
'province.require' => '省编号必填',
|
||||
'city.require' => '市编号必填',
|
||||
'district.require' => '县区编号必填',
|
||||
|
||||
'address_city.require' => '城市选择必填',
|
||||
'type.require' => '地点类型必填',
|
||||
'classes_num.require'=> '核销数必填',
|
||||
'address_type.require'=> '地址类型必填',
|
||||
'content.require'=> '课程详情必填',
|
||||
'notice.require'=> '课程须知必填',
|
||||
'price.require'=> '售价必填',
|
||||
|
||||
|
||||
];
|
||||
|
||||
self::check($params,$rule,$rule_msg);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//更新
|
||||
if($row){
|
||||
$this->have_auth = false;
|
||||
@ -1191,10 +1315,13 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
if(empty($spec))throw new \Exception("请至少添加一个课时规格");
|
||||
|
||||
foreach ($spec as $k=>&$v){
|
||||
unset($v["limit"]);
|
||||
unset($v["status_name"]);
|
||||
unset($v["visible"]);
|
||||
$v["classes_lib_id"] = $row->id;
|
||||
//先不进行判定,交给提交后再判定
|
||||
$classesSpec = new ClassesSpec;
|
||||
$classesSpec->specCheck($v,$shop_id,empty($v["id"])? null : ClassesSpec::get($v["id"]),false);
|
||||
$classesSpec->specCheck($v,$shop_id,empty($v["id"])? null : ClassesSpec::get($v["id"]),false,$oper_type,$oper_id);
|
||||
|
||||
}
|
||||
$params["spec"] = $spec;
|
||||
@ -1219,8 +1346,10 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
if(empty($spec))throw new \Exception("请至少添加一个课时规格");
|
||||
|
||||
foreach ($spec as $k=>&$v){
|
||||
unset($v["limit"]);
|
||||
unset($v["status_name"]);
|
||||
$v["classes_lib_id"] = 0;
|
||||
(new ClassesSpec)->specCheck($v,$shop_id,null);
|
||||
(new ClassesSpec)->specCheck($v,$shop_id,null,true,$oper_type,$oper_id);
|
||||
}
|
||||
$params["spec"] = $spec;
|
||||
}
|
||||
@ -1264,12 +1393,15 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
|
||||
|
||||
|
||||
protected function update_check(&$params,$row=null,$shop_id=0)
|
||||
protected function update_check(&$params,$row=null,$shop_id=0, $oper_type="user",$oper_id=null)
|
||||
{
|
||||
|
||||
|
||||
if(!empty($params["weigh"]))$params["weigh"] = 0;
|
||||
if(!empty($params["shop_id"]))$params["shop_id"] = $shop_id;
|
||||
|
||||
$this->classesCheck($params,$shop_id,$row);
|
||||
|
||||
$this->classesCheck($params,$shop_id,$row,$oper_type,$oper_id);
|
||||
|
||||
//特有认证判断
|
||||
// $this->authClasses($params,$row);
|
||||
@ -1289,7 +1421,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
}else{
|
||||
//新增(需审核)
|
||||
$params["add_type"] = '1';
|
||||
$params["add_id"] = $this->auth->id;
|
||||
$params["add_id"] = $oper_id ?: $this->auth->id;
|
||||
$params['status'] = "3";//平台下架
|
||||
$params['auth_status'] = 0;
|
||||
|
||||
@ -1324,6 +1456,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
switch ($oper_type) {
|
||||
case 'user':
|
||||
if($only_admin)throw new \Exception("您无权操作该订单!");
|
||||
@ -1343,7 +1476,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
if(!$help_user_info) throw new \Exception("代下单员工不存在!");
|
||||
$classes_lib_ids = (new ClassesLib)->getClassesAuthIds($oper_id);
|
||||
|
||||
if(!$shop_id)$shop_id = self::where("id" ,"in", $classes_lib_ids)->value("shop_id");
|
||||
if(!$shop_id && $classes_lib_ids)$shop_id = self::where("id" ,"in", $classes_lib_ids)->value("shop_id");
|
||||
|
||||
//判断当前订单课程是否在此课程授权范围内
|
||||
if($classes && !in_array($classes_id,$classes_lib_ids)) throw new \Exception("该课程不在您的授权范围内,无法代操作!");
|
||||
@ -1387,27 +1520,27 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function createClassesByOper($params,$check=false,$oper_type='user',$oper_id=0,$trans=false){
|
||||
public function createClassesByOper(&$params,$check=false,$oper_type='user',$oper_id=0,$trans=false){
|
||||
|
||||
$model = new self;
|
||||
|
||||
|
||||
//用户操作权限检测
|
||||
$shop_id = self::checkOptionAuth(0, $oper_id,$oper_type);
|
||||
$params["shop_id"] = $shop_id;
|
||||
|
||||
|
||||
//事务逻辑
|
||||
$this->update_check($params,$row=null,$shop_id, $oper_type,$oper_id);
|
||||
|
||||
|
||||
|
||||
$this->update_check($params,$row=null,$shop_id);
|
||||
$spec = $params["spec"];
|
||||
unset($params["spec"]);
|
||||
|
||||
|
||||
$province_name = Area::where("id" ,$params['province'])->value("name");
|
||||
if(!$province_name) throw new \Exception("省份不存在");
|
||||
$city_name = Area::where("id" ,$params['city'])->value("name");
|
||||
if(!$city_name) throw new \Exception("市不存在");
|
||||
$district_name = Area::where("id" ,$params['district'])->value("name");
|
||||
if(!$district_name) throw new \Exception("区县不存在");
|
||||
$params['address_city'] = $province_name."/".$city_name."/".$district_name;
|
||||
|
||||
|
||||
|
||||
//判断逻辑
|
||||
if($trans){
|
||||
@ -1415,7 +1548,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
}
|
||||
$res = true;
|
||||
try{
|
||||
//事务逻辑
|
||||
|
||||
|
||||
|
||||
$result = $model->allowField(true)->save($params);
|
||||
@ -1431,7 +1564,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
$specss = \app\common\model\school\classes\ClassesSpec::where("classes_lib_id",$model["id"])->select();
|
||||
foreach ($specss as $k=>$specs){
|
||||
$params =$specs;
|
||||
(new \app\common\model\school\classes\ClassesSpec)->specCheck($params,null,$specs);
|
||||
(new \app\common\model\school\classes\ClassesSpec)->specCheck($params,null,$specs,true,$oper_type,$oper_id);
|
||||
}
|
||||
|
||||
//课时数必须大于等于课时核销数
|
||||
@ -1474,7 +1607,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
if($trans){
|
||||
self::rollbackTrans();
|
||||
}
|
||||
throw new \Exception($e->getMessage().$e->getFile().$e->getLine());
|
||||
throw new \Exception($e->getMessage());
|
||||
}
|
||||
return $model;
|
||||
}
|
||||
@ -1492,26 +1625,20 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
|
||||
//用户操作权限检测
|
||||
$shop_id = self::checkOptionAuth($ids, $oper_id,$oper_type);
|
||||
|
||||
$params["shop_id"] = $shop_id;
|
||||
|
||||
$row = self::where('id',$ids)->where("shop_id",$shop_id)->find();
|
||||
if(!$row) throw new \Exception("课程不存在!");
|
||||
|
||||
|
||||
$this->update_check($params,$row,$shop_id);
|
||||
$this->update_check($params,$row,$shop_id,$oper_type, $oper_id);
|
||||
$spec = $params["spec"] ?? [];//$params["delete_spec_ids"]
|
||||
$delete_spec_ids = $params["delete_spec_ids"] ?? [];
|
||||
unset($params["spec"]);
|
||||
unset($params["delete_spec_ids"]);
|
||||
|
||||
|
||||
$province_name = Area::where("id" ,$params['province'])->value("name");
|
||||
if(!$province_name) throw new \Exception("省份不存在");
|
||||
$city_name = Area::where("id" ,$params['city'])->value("name");
|
||||
if(!$city_name) throw new \Exception("市不存在");
|
||||
$district_name = Area::where("id" ,$params['district'])->value("name");
|
||||
if(!$district_name) throw new \Exception("区县不存在");
|
||||
$params['address_city'] = $province_name."/".$city_name."/".$district_name;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1545,7 +1672,7 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
$specss = \app\common\model\school\classes\ClassesSpec::where("classes_lib_id",$row["id"])->select();
|
||||
foreach ($specss as $k=>$specs){
|
||||
$params =$specs;
|
||||
(new \app\common\model\school\classes\ClassesSpec)->specCheck($params,null,$specs);
|
||||
(new \app\common\model\school\classes\ClassesSpec)->specCheck($params,null,$specs,true,$oper_type,$oper_id);
|
||||
}
|
||||
|
||||
|
||||
@ -1638,4 +1765,55 @@ $user_unpaid_order = $user_paid_order =null;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** 小程序端操作课程上下架
|
||||
* @param bool $check
|
||||
* @param bool $trans
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function updateStatusByOper($status,$ids,$check=false,$oper_type='user',$oper_id=0,$trans=false){
|
||||
|
||||
//用户操作权限检测
|
||||
if($check){
|
||||
$shop_id = self::checkOptionAuth($ids, $oper_id,$oper_type);
|
||||
if(!in_array($status,['1','2'] ))throw new \Exception("状态参数错误!");
|
||||
//审核中无法操作上下架
|
||||
$row = self::where('id',$ids)->where("shop_id",$shop_id)->find();
|
||||
if(!$row) throw new \Exception("课程不存在或无权限!");
|
||||
if($row["status"] == '3') throw new \Exception("已平台下架无法操作!");
|
||||
if($row["auth_status"] != '1' && $status =="1")throw new \Exception("审核通过才能上架!");
|
||||
}else{
|
||||
$row = self::where('id',$ids)->find();
|
||||
if(!$row) throw new \Exception("课程不存在或无权限!");
|
||||
}
|
||||
|
||||
//判断逻辑
|
||||
if($trans){
|
||||
self::beginTrans();
|
||||
}
|
||||
$res = true;
|
||||
try{
|
||||
//事务逻辑
|
||||
$params = [
|
||||
"status"=>$status,
|
||||
];
|
||||
$result = $row->allowField(true)->save($params);
|
||||
|
||||
if($trans){
|
||||
self::commitTrans();
|
||||
}
|
||||
}catch (\Exception $e){
|
||||
if($trans){
|
||||
self::rollbackTrans();
|
||||
}
|
||||
throw new \Exception($e->getMessage().$e->getFile().$e->getLine());
|
||||
}
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ class ClassesSpec extends BaseModel
|
||||
}
|
||||
|
||||
|
||||
public function specCheck(&$params,$shop_id=null,$row=null,$check=true)
|
||||
public function specCheck(&$params,$shop_id=null,$row=null,$check=true,$oper_type='user',$oper_id=0)
|
||||
{
|
||||
|
||||
//限定人数必须大于0
|
||||
@ -150,16 +150,30 @@ class ClassesSpec extends BaseModel
|
||||
//结束时间不能是已经过去的时间
|
||||
$now_time = time();
|
||||
if($end_time<=$now_time){
|
||||
// throw new \Exception("结束时间不能是已经过去的时间");
|
||||
throw new \Exception("{$params["name"]}结束时间不能是已经过去的时间");
|
||||
}
|
||||
|
||||
//如果是员工操作,则结束时间必须大于当前时间n秒
|
||||
if($oper_type == "user" && $oper_id){
|
||||
$classes_timeout_time = config("site.classes_timeout_time") ?:0;
|
||||
if($classes_timeout_time > 0) {
|
||||
$now_times = time() + $classes_timeout_time;
|
||||
if($start_time<=$now_times){
|
||||
//$now_time时间格式化
|
||||
$now_time_text = date("Y-m-d H:i",$now_times);
|
||||
throw new \Exception("{$params["name"]}开始时间必须在{$now_time_text}之后");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//开始和结束时间必须是同一天
|
||||
$start_time_date = date("Y-m-d",$start_time);
|
||||
$end_time_date = date("Y-m-d",$end_time);
|
||||
if($start_time_date!=$end_time_date){
|
||||
throw new \Exception("{$params["name"]}开始和结束时间必须是同一天");
|
||||
}
|
||||
// $start_time_date = date("Y-m-d",$start_time);
|
||||
// $end_time_date = date("Y-m-d",$end_time);
|
||||
// if($start_time_date!=$end_time_date){
|
||||
// throw new \Exception("{$params["name"]}开始和结束时间必须是同一天");
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
@ -903,17 +903,17 @@ class Order extends BaseModel
|
||||
|
||||
//存在同规格正在进行中的课时预约
|
||||
$order_info = self::where('classes_lib_spec_id',$classes_lib_spec_id)
|
||||
->where('status','in',['-1',"0"])
|
||||
->where('status','in',['-1',"0","3"])
|
||||
->where('user_id',$user_id)
|
||||
->find();
|
||||
if($order_info) throw new \Exception("该课时已预约,请勿重复预约!");
|
||||
if($order_info) throw new \Exception("该课时已预约或已上过,请勿重复预约!");
|
||||
|
||||
//新增或更换课时时判断
|
||||
//是否达成限制人数
|
||||
//允许人数为0说明不限制
|
||||
if($classes_lib_spec_info['limit_num'] > 0){
|
||||
//得到当前课时已参与人数
|
||||
$sign_num = self::where("classes_lib_spec_id",$classes_lib_spec_id)->where("status","in",["-1","0"])->count();
|
||||
$sign_num = self::where("classes_lib_spec_id",$classes_lib_spec_id)->where("status","in",["-1","0","3"])->count();
|
||||
|
||||
if($add){
|
||||
//订单新增课时
|
||||
|
@ -485,7 +485,6 @@ class Order extends BaseModel
|
||||
$order_info = self::where(['order_no'=>$order_no])->find();
|
||||
if($order_info) throw new \Exception("订单已生成,如需重新下单请退出页面重新进入!");
|
||||
|
||||
|
||||
}
|
||||
//校验订单参数
|
||||
//课程是否存在并上架
|
||||
@ -924,14 +923,16 @@ class Order extends BaseModel
|
||||
'shop'=>['*'],
|
||||
'detail'=>['*'],
|
||||
'evaluate'=>['*'],
|
||||
'serviceorder'=>['*']
|
||||
];
|
||||
$CANCEL = '-3';
|
||||
$NOPAY = '0';
|
||||
$PAYED = '3';
|
||||
$REFUND = '6';
|
||||
$FINISH = '9';
|
||||
$IN_SERVICE = '4';
|
||||
$alisa = (new self)->getWithAlisaName();
|
||||
$sort = "field({$alisa}.status,'{$NOPAY}','{$PAYED}','{$FINISH}','{$REFUND}','{$CANCEL}') asc,{$alisa}.id desc";
|
||||
$sort = "field({$alisa}.status,'{$NOPAY}','{$PAYED}','{$FINISH}','{$REFUND}','{$IN_SERVICE}','{$CANCEL}') asc,{$alisa}.id desc";
|
||||
$serch_where = ['status'=>$status,'user_id'=>$user_id,'keywords'=>$keywords,"classes_lib_id"=>$classes_lib_id,"has_evaluate"=>$has_evaluate];
|
||||
// if($type)$serch_where['type'] = $type;
|
||||
return (new self)->getBaseList($serch_where, $page, $limit,$sort,$with_field);
|
||||
@ -946,13 +947,15 @@ class Order extends BaseModel
|
||||
$PAYED = '3';
|
||||
$REFUND = '6';
|
||||
$FINISH = '9';
|
||||
|
||||
$IN_SERVICE = '4';
|
||||
$cancel_number = self::getBaseWhere(array_merge(['status'=>$CANCEL],$where))->count();
|
||||
$nopay_number = self::getBaseWhere(array_merge(['status'=>$NOPAY],$where))->count();
|
||||
$payed_number = self::getBaseWhere(array_merge(['status'=>$PAYED],$where))->count();
|
||||
$retund_number = self::getBaseWhere(array_merge(['status'=>$REFUND],$where))->count();
|
||||
$finish_number = self::getBaseWhere(array_merge(['status'=>$FINISH],$where))->count();
|
||||
return compact('cancel_number','nopay_number','payed_number','retund_number','finish_number');
|
||||
$in_service_number = self::getBaseWhere(array_merge(['status'=>$IN_SERVICE],$where))->count();
|
||||
|
||||
return compact('cancel_number','nopay_number','payed_number','in_service_number','retund_number','finish_number');
|
||||
}
|
||||
|
||||
|
||||
@ -969,20 +972,23 @@ class Order extends BaseModel
|
||||
|
||||
|
||||
|
||||
public static function workList($page, $limit,$keywords,$status,$classes_lib_id=[],$classes_lib_ids=[],$has_evaluate=0){
|
||||
public static function workList($user_id,$page, $limit,$keywords,$status,$classes_lib_id=[],$classes_lib_ids=[],$has_evaluate=0){
|
||||
$with_field = [
|
||||
'user'=>['nickname','mobile','avatar','realname'],
|
||||
'base'=>['*'],
|
||||
'shop'=>['*'],
|
||||
'detail'=>['*'],
|
||||
'evaluate'=>['*'],
|
||||
'serviceorder'=>['*']
|
||||
];
|
||||
$CANCEL = '-3';
|
||||
$NOPAY = '0';
|
||||
$PAYED = '3';
|
||||
$IN_SERVICE = '4';
|
||||
$REFUND = '6';
|
||||
$FINISH = '9';
|
||||
$alisa = (new self)->getWithAlisaName();
|
||||
$sort = "field({$alisa}.status,'{$NOPAY}','{$PAYED}','{$FINISH}','{$REFUND}','{$CANCEL}') asc,{$alisa}.id desc";
|
||||
$sort = "field({$alisa}.status,'{$NOPAY}','{$PAYED}','{$FINISH}','{$REFUND}','{$IN_SERVICE}','{$CANCEL}') asc,{$alisa}.id desc";
|
||||
$serch_where = ['status'=>$status,'keywords'=>$keywords,"classes_lib_id"=>$classes_lib_id,"classes_lib_ids"=>$classes_lib_ids];
|
||||
// if($type)$serch_where['type'] = $type;
|
||||
return (new self)->getBaseList($serch_where, $page, $limit,$sort,$with_field);
|
||||
@ -1041,13 +1047,13 @@ class Order extends BaseModel
|
||||
// '已核销人数',
|
||||
$spec->verification_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_spec_id",$spec["id"])->where("status","=","3")->count();
|
||||
//已报名人数
|
||||
$spec->sign_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_spec_id",$spec["id"])->where("status","in",["-1","0"])->count();
|
||||
$spec->sign_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_spec_id",$spec["id"])->where("status","in",["-1","0","3"])->count();
|
||||
$spec->save();
|
||||
}
|
||||
|
||||
}
|
||||
//统计课程总报名和总核销
|
||||
$lib->sign_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_id",$lib["id"])->where("status","in",["-1","0"])->count();
|
||||
$lib->sign_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_id",$lib["id"])->where("status","in",["-1","0","3"])->count();
|
||||
$lib->verification_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_id",$lib["id"])->where("status","=","3")->count();
|
||||
$lib->save();
|
||||
|
||||
|
@ -258,6 +258,9 @@ class ServiceOrder extends BaseModel
|
||||
try{
|
||||
//事务逻辑
|
||||
$order = $this->createOrder($classes_order,$reason,$mark,$oper_type,$oper_id);
|
||||
|
||||
//如果传了价格则顺带调用商家价格确认
|
||||
|
||||
if($trans){
|
||||
self::commitTrans();
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ return [
|
||||
//FastAdmin配置
|
||||
'fastadmin' => [
|
||||
//是否开启前台会员中心
|
||||
'usercenter' => true,
|
||||
'usercenter' => false,
|
||||
//会员注册验证码类型email/mobile/wechat/text/false
|
||||
'user_register_captcha' => 'text',
|
||||
//登录验证码
|
||||
|
@ -18,7 +18,7 @@
|
||||
<div class="container">
|
||||
<div class="text-center">
|
||||
<h1>{$site.name|htmlentities}</h1>
|
||||
<a href="{:url('index/user/index', '', false, true)}">{:__('Member center')}</a>
|
||||
<!-- <a href="{:url('index/user/index', '', false, true)}">{:__('Member center')}</a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,6 +54,7 @@ class UserAuth extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","user_id","manystoreshop.name","user.nickname","user.realname","user.mobile"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -109,6 +110,16 @@ class UserAuth extends ManystoreBase
|
||||
if(!$user)$user = (new \app\common\model\User)->addUserByMobile($people_mobile,$people_name);
|
||||
$user['nickname'] = $people_name;
|
||||
$user->save();
|
||||
|
||||
//添加用户机构认证
|
||||
try {
|
||||
\app\common\model\manystore\UserAuth::auth(0,SHOP_ID,$user["id"],0,'shop',$this->auth->id);
|
||||
}catch (\Exception $e){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}catch (\Exception $e){
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class ClassesLib extends ManystoreBase
|
||||
$this->view->assign("classesTypeList", $this->model->getClassesTypeList());
|
||||
$this->view->assign("classesTypeListJson", json_encode($this->model->getClassesTypeList(), JSON_UNESCAPED_UNICODE));
|
||||
|
||||
|
||||
$this->view->assign("classes_number_only_one", config("site.classes_number_only_one"));
|
||||
|
||||
$this->view->assign("specStatusList", (new \app\manystore\model\school\classes\ClassesSpec)->getStatusList());
|
||||
|
||||
@ -89,6 +89,7 @@ class ClassesLib extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","title","address","address_detail","address_city","user.nickname","user.realname","user.mobile","manystoreshop.name"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -96,12 +97,34 @@ class ClassesLib extends ManystoreBase
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
list($where, $sort, $order, $offset, $limit, $page, $alias, $bind, $excludearray) = $this->buildparams(null, null, ["has_expire"]);
|
||||
|
||||
if (isset($excludearray['has_expire']['value']) && $excludearray['has_expire']['value']) {
|
||||
$has_expire = $excludearray['has_expire']['value'];
|
||||
$as = (new \app\common\model\school\classes\ClassesLib())->getWithAlisaName();
|
||||
switch ($has_expire) {
|
||||
case '1': //查过期
|
||||
$expireWhere = [
|
||||
$as . '.end_time', '<=', time(),
|
||||
];
|
||||
break;
|
||||
case '2': //查未过期
|
||||
$expireWhere = [
|
||||
$as . '.end_time', '>', time(),
|
||||
];
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
} else {
|
||||
$expireWhere = [[]];
|
||||
}
|
||||
|
||||
$list = $this->model
|
||||
->with(['manystore','manystoreshop','user','admin'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->where(...$expireWhere)
|
||||
->paginate($limit);
|
||||
|
||||
// var_dump($this->model->getLastSql());die;
|
||||
@ -218,6 +241,7 @@ class ClassesLib extends ManystoreBase
|
||||
{
|
||||
|
||||
$shop_id = SHOP_ID;
|
||||
$params["shop_id"] = $shop_id;
|
||||
|
||||
|
||||
try {
|
||||
|
@ -60,6 +60,8 @@ class ClassesSpec extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","name","schoolclasseslib.title"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -57,6 +57,8 @@ class Evaluate extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","message_text","user_id","schoolclassesorder.order_no","schoolclassesorder.pay_no","schoolclasseslib.title","schoolteacher.name","manystoreshop.name","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -55,6 +55,7 @@ class Teacher extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","name","user.nickname","user.realname","user.mobile"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -55,6 +55,7 @@ class Verification extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
$this->searchFields = ["id","manystoreshop.name","user.nickname","user.realname","user.mobile"];
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -53,6 +53,10 @@ class Order extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
|
||||
$this->searchFields = ["id","order_no","schoolclassesorder.order_no","schoolclassesorder.pay_no","user_id","schoolclasseslibspec.name","schoolclassesorderdetail.title","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -48,6 +48,10 @@ class Order extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
|
||||
$this->searchFields = ["id","order_no","pay_no","user_id","code","manystoreshop.name","schoolclassesorderdetail.title","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
@ -128,7 +132,19 @@ class Order extends ManystoreBase
|
||||
|
||||
$model = (new \app\common\model\school\classes\order\ServiceOrder());
|
||||
$remark = "机构端管理员帮忙下售后单";
|
||||
$model->afterSales($classes_order,$reason,$remark,'shop',$this->auth->id,true);
|
||||
$order = $model->afterSales($classes_order,$reason,$remark,'shop',$this->auth->id,true);
|
||||
|
||||
|
||||
|
||||
$price = $params["price"];
|
||||
$status = "yes";
|
||||
$reject_reason = "";
|
||||
$reject_images = "";
|
||||
$model = (new \app\common\model\school\classes\order\ServiceOrder());
|
||||
$model->shopConfirmation($order["order_no"],$status,$price,$reject_reason,$reject_images,0,true,'shop',$this->auth->id,true);
|
||||
|
||||
|
||||
|
||||
}catch (\Exception $e){
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
@ -141,7 +157,9 @@ class Order extends ManystoreBase
|
||||
}
|
||||
|
||||
// $row = $this->model->get($param['ids']);
|
||||
$this->view->assign('row', $row);
|
||||
$order_info = \app\common\model\school\classes\order\ServiceOrder::getCost("43246634123432564",$ids,"",[],true);
|
||||
// $row = $this->model->get($param['ids']);
|
||||
$this->view->assign('row',array_merge($row->toArray(),$order_info));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,10 @@ class ServiceOrder extends ManystoreBase
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
|
||||
$this->searchFields = ["id","order_no","schoolclassesorder.order_no","schoolclassesorder.pay_no","user_id","manystoreshop.name","schoolclassesorderdetail.title","user.nickname","user.realname","user.mobile"];
|
||||
|
||||
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
|
@ -3,7 +3,9 @@
|
||||
namespace app\manystore\controller\user;
|
||||
|
||||
use app\common\controller\ManystoreBase;
|
||||
use app\common\model\manystore\UserAuth;
|
||||
use app\manystore\model\school\classes\order\Order;
|
||||
use fast\Tree;
|
||||
|
||||
/**
|
||||
* 会员管理
|
||||
@ -46,6 +48,7 @@ class User extends ManystoreBase
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
$this->searchFields = ["id","nickname","realname","mobile"];
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
@ -69,4 +72,167 @@ class User extends ManystoreBase
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Selectpage的实现方法
|
||||
*
|
||||
* 当前方法只是一个比较通用的搜索匹配,请按需重载此方法来编写自己的搜索逻辑,$where按自己的需求写即可
|
||||
* 这里示例了所有的参数,所以比较复杂,实现上自己实现只需简单的几行即可
|
||||
*
|
||||
*/
|
||||
protected function selectpage()
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['trim', 'strip_tags', 'htmlspecialchars']);
|
||||
|
||||
//搜索关键词,客户端输入以空格分开,这里接收为数组
|
||||
$word = (array)$this->request->request("q_word/a");
|
||||
//当前页
|
||||
$page = $this->request->request("pageNumber");
|
||||
//分页大小
|
||||
$pagesize = $this->request->request("pageSize");
|
||||
//搜索条件
|
||||
$andor = $this->request->request("andOr", "and", "strtoupper");
|
||||
//排序方式
|
||||
$orderby = (array)$this->request->request("orderBy/a");
|
||||
//显示的字段
|
||||
$field = $this->request->request("showField");
|
||||
//主键
|
||||
$primarykey = $this->request->request("keyField");
|
||||
//主键值
|
||||
$primaryvalue = $this->request->request("keyValue");
|
||||
//搜索字段
|
||||
$searchfield = (array)$this->request->request("searchField/a");
|
||||
//自定义搜索条件
|
||||
$custom = (array)$this->request->request("custom/a");
|
||||
//是否返回树形结构
|
||||
$istree = $this->request->request("isTree", 0);
|
||||
$ishtml = $this->request->request("isHtml", 0);
|
||||
if ($istree) {
|
||||
$word = [];
|
||||
$pagesize = 999999;
|
||||
}
|
||||
$order = [];
|
||||
foreach ($orderby as $k => $v) {
|
||||
$order[$v[0]] = $v[1];
|
||||
}
|
||||
$field = $field ? $field : 'name';
|
||||
|
||||
//如果有primaryvalue,说明当前是初始化传值
|
||||
if ($primaryvalue !== null) {
|
||||
$where = [$primarykey => ['in', $primaryvalue]];
|
||||
$pagesize = 999999;
|
||||
} else {
|
||||
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
|
||||
$logic = $andor == 'AND' ? '&' : '|';
|
||||
$searchfield = is_array($searchfield) ? implode($logic, $searchfield) : $searchfield;
|
||||
$searchfield = str_replace(',', $logic, $searchfield);
|
||||
$word = array_filter(array_unique($word));
|
||||
if (count($word) == 1) {
|
||||
$query->where($searchfield, "like", "%" . reset($word) . "%");
|
||||
} else {
|
||||
$query->where(function ($query) use ($word, $searchfield) {
|
||||
foreach ($word as $index => $item) {
|
||||
$query->whereOr(function ($query) use ($item, $searchfield) {
|
||||
$query->where($searchfield, "like", "%{$item}%");
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if ($custom && is_array($custom)) {
|
||||
foreach ($custom as $k => $v) {
|
||||
if (is_array($v) && 2 == count($v)) {
|
||||
$query->where($k, trim($v[0]), $v[1]);
|
||||
} else {
|
||||
$query->where($k, '=', $v);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
if($this->shopIdAutoCondition){
|
||||
$this->model->where(array('shop_id'=>SHOP_ID));
|
||||
}
|
||||
//只允许查到授权过的用户
|
||||
$user_ids = UserAuth::where("shop_id",SHOP_ID)->column("user_id");
|
||||
if($user_ids){
|
||||
$this->model->where("id","in",$user_ids);
|
||||
}else{
|
||||
$this->model->where("id","=",-1);
|
||||
}
|
||||
$list = [];
|
||||
$total = $this->model->where($where)->count();
|
||||
if ($total > 0) {
|
||||
if($this->shopIdAutoCondition){
|
||||
$this->model->where(array('shop_id'=>SHOP_ID));
|
||||
}
|
||||
if($user_ids){
|
||||
$this->model->where("id","in",$user_ids);
|
||||
}else{
|
||||
$this->model->where("id","=",-1);
|
||||
}
|
||||
|
||||
$fields = is_array($this->selectpageFields) ? $this->selectpageFields : ($this->selectpageFields && $this->selectpageFields != '*' ? explode(',', $this->selectpageFields) : []);
|
||||
|
||||
//如果有primaryvalue,说明当前是初始化传值,按照选择顺序排序
|
||||
if ($primaryvalue !== null && preg_match("/^[a-z0-9_\-]+$/i", $primarykey)) {
|
||||
$primaryvalue = array_unique(is_array($primaryvalue) ? $primaryvalue : explode(',', $primaryvalue));
|
||||
$primaryvalue = implode(',', $primaryvalue);
|
||||
|
||||
$this->model->orderRaw("FIELD(`{$primarykey}`, {$primaryvalue})");
|
||||
} else {
|
||||
$this->model->order($order);
|
||||
}
|
||||
|
||||
$datalist = $this->model->where($where)
|
||||
->page($page, $pagesize)
|
||||
->select();
|
||||
|
||||
foreach ($datalist as $index => $item) {
|
||||
unset($item['password'], $item['salt']);
|
||||
if ($this->selectpageFields == '*') {
|
||||
$result = [
|
||||
$primarykey => isset($item[$primarykey]) ? $item[$primarykey] : '',
|
||||
$field => isset($item[$field]) ? $item[$field] : '',
|
||||
'nickname' => isset($item['nickname']) ? $item['nickname'] : '',
|
||||
'mobile' => isset($item['mobile']) ? $item['mobile'] : '',
|
||||
'realname' => isset($item['realname']) ? $item['realname'] : '',
|
||||
];
|
||||
} else {
|
||||
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
|
||||
}
|
||||
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
|
||||
$list[] = $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ($istree && !$primaryvalue) {
|
||||
$tree = Tree::instance();
|
||||
$tree->init(collection($list)->toArray(), 'pid');
|
||||
$list = $tree->getTreeList($tree->getTreeArray(0), $field);
|
||||
if (!$ishtml) {
|
||||
foreach ($list as &$item) {
|
||||
$item = str_replace(' ', ' ', $item);
|
||||
}
|
||||
unset($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($word) == 1 && !$list) {
|
||||
$word = reset($word);
|
||||
$list[] = [
|
||||
'nickname' => '未授权',
|
||||
'mobile' => $word,
|
||||
'realname' => '',
|
||||
];
|
||||
}
|
||||
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
|
||||
return json(['list' => $list, 'total' => $total]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'Shop_id' => '机构shopid',
|
||||
'User_id' => '授权用户',
|
||||
'User_id' => '授权前台用户',
|
||||
'Status' => '授权状态',
|
||||
'Status 0' => '待确认',
|
||||
'Status 1' => '通过',
|
||||
@ -10,12 +10,12 @@ return [
|
||||
'Add' => '添加用户授权申请',
|
||||
'Delete'=>'取消授权',
|
||||
'Del'=>'取消授权',
|
||||
'User.mobile'=>'用户手机号',
|
||||
'User.mobile'=>'授权前台用户手机号',
|
||||
|
||||
'Auth_time' => '授权确认时间',
|
||||
'Createtime' => '发起时间',
|
||||
'Update_time' => '修改时间',
|
||||
'Manystoreshop.name' => '店铺名称',
|
||||
'User.nickname' => '昵称',
|
||||
'User.avatar' => '头像'
|
||||
'Manystoreshop.name' => '机构名称',
|
||||
'User.nickname' => '授权前台用户昵称',
|
||||
'User.avatar' => '授权前台用户头像'
|
||||
];
|
||||
|
@ -2,11 +2,15 @@
|
||||
|
||||
return [
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构店铺id',
|
||||
'User_id' => '主讲师用户id',
|
||||
'Shop_id' => '机构',
|
||||
'User_id' => '主讲师用户',
|
||||
'Classes_cate_ids' => '标签',
|
||||
'Classes_label_ids' => '热门',
|
||||
|
||||
'Has_expire' => '是否过期',
|
||||
'Has_expire 1' => '往期课程',
|
||||
'Has_expire 2' => '进行中课程',
|
||||
|
||||
'Start_time' => '开始时间',
|
||||
'End_time' => '结束时间',
|
||||
|
||||
@ -16,22 +20,22 @@ return [
|
||||
'Add_type 1' => '机构',
|
||||
'Add_type 2' => '总后台',
|
||||
'Add_id' => '添加人id',
|
||||
'Title' => '标题',
|
||||
'Headimage' => '头图',
|
||||
'Images' => '轮播图',
|
||||
'Type' => '地点类型',
|
||||
'Title' => '课程名称',
|
||||
'Headimage' => '课程头图',
|
||||
'Images' => '课程轮播图',
|
||||
'Type' => '课程地点类型',
|
||||
'Type out' => '户外',
|
||||
'Type in' => '室内',
|
||||
'Classes_num' => '核销次数',
|
||||
'Address_type' => '地址类型',
|
||||
'Address_type 1' => '按机构',
|
||||
'Address_type 2' => '独立位置',
|
||||
'Address_type 1' => '机构内授课',
|
||||
'Address_type 2' => '特定位置授课',
|
||||
'Address_city' => '城市选择',
|
||||
'Province' => '省编号',
|
||||
'City' => '市编号',
|
||||
'District' => '县区编号',
|
||||
'Address' => '店铺地址',
|
||||
'Address_detail' => '店铺详细地址',
|
||||
'Address' => '地址',
|
||||
'Address_detail' => '详细地址',
|
||||
'Longitude' => '经度',
|
||||
'Latitude' => '纬度',
|
||||
'Classes_date_text' => '上课日期',
|
||||
@ -70,21 +74,21 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystoreshop.name' => '店铺名称',
|
||||
'Manystoreshop.image' => '封面图',
|
||||
'Manystoreshop.address_city' => '城市选择',
|
||||
'Manystoreshop.province' => '省编号',
|
||||
'Manystoreshop.city' => '市编号',
|
||||
'Manystoreshop.district' => '县区编号',
|
||||
'Manystoreshop.address' => '店铺地址',
|
||||
'Manystoreshop.address_detail' => '店铺详细地址',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Admin.nickname' => '昵称',
|
||||
'Admin.avatar' => '头像',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystoreshop.name' => '机构名称',
|
||||
'Manystoreshop.image' => '机构封面图',
|
||||
'Manystoreshop.address_city' => '机构城市选择',
|
||||
'Manystoreshop.province' => '机构省编号',
|
||||
'Manystoreshop.city' => '机构市编号',
|
||||
'Manystoreshop.district' => '机构县区编号',
|
||||
'Manystoreshop.address' => '机构地址',
|
||||
'Manystoreshop.address_detail' => '机构详细地址',
|
||||
'User.nickname' => '讲师用户昵称',
|
||||
'User.realname' => '讲师用户真实姓名',
|
||||
'User.mobile' => '讲师用户手机号',
|
||||
'User.avatar' => '讲师用户头像',
|
||||
'Admin.nickname' => '管理员昵称',
|
||||
'Admin.avatar' => '管理员头像',
|
||||
'Limit_num' => '总限定人数',
|
||||
'Sign_num' => '总已报名人数',
|
||||
'Verification_num' => '总已核销人数',
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'Classes_lib_id' => '课程id',
|
||||
'Name' => '规格名',
|
||||
'Name' => '每节课名',
|
||||
'Time' => '课时开始结束时间',
|
||||
'Start_time' => '开始时间',
|
||||
'End_time' => '结束时间',
|
||||
@ -16,6 +16,6 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Schoolclasseslib.title' => '标题',
|
||||
'Schoolclasseslib.headimage' => '头图'
|
||||
'Schoolclasseslib.title' => '课程名称',
|
||||
'Schoolclasseslib.headimage' => '课程头图'
|
||||
];
|
||||
|
@ -5,10 +5,10 @@ return [
|
||||
'Classes_lib_id' => '课程id',
|
||||
'Weigh' => '权重',
|
||||
'Createtime' => '创建时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Schoolclasseslib.title' => '标题',
|
||||
'Schoolclasseslib.headimage' => '头图'
|
||||
'User.nickname' => '收藏人昵称',
|
||||
'User.realname' => '收藏人真实姓名',
|
||||
'User.mobile' => '收藏人手机号',
|
||||
'User.avatar' => '收藏人头像',
|
||||
'Schoolclasseslib.title' => '课程名称',
|
||||
'Schoolclasseslib.headimage' => '课程头图'
|
||||
];
|
||||
|
@ -23,16 +23,16 @@ return [
|
||||
'Weigh' => '权重',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Schoolclasseslib.title' => '标题',
|
||||
'Schoolclasseslib.headimage' => '头图',
|
||||
'Schoolclassesorder.order_no' => '订单号',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystoreshop.name' => '店铺名称',
|
||||
'Manystoreshop.logo' => '品牌LOGO',
|
||||
'User.nickname' => '评价人昵称',
|
||||
'User.realname' => '评价人真实姓名',
|
||||
'User.mobile' => '评价人手机号',
|
||||
'User.avatar' => '评价人头像',
|
||||
'Schoolclasseslib.title' => '课程名称',
|
||||
'Schoolclasseslib.headimage' => '课程头图',
|
||||
'Schoolclassesorder.order_no' => '课程单号',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystoreshop.name' => '机构名称',
|
||||
'Manystoreshop.logo' => '机构LOGO',
|
||||
'Schoolteacher.name' => '教师名',
|
||||
'Schoolteacher.head_image' => '教师头像'
|
||||
];
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '预约单号',
|
||||
|
||||
'Edit'=>'修改用户预约的课时',
|
||||
'Add'=>'帮用户预约课时',
|
||||
@ -20,7 +20,7 @@ return [
|
||||
'User_id' => '下单人id',
|
||||
'Classes_order_detail_id' => '订单课程id',
|
||||
'Classes_lib_id' => '课程id',
|
||||
'Name' => '课程规格名',
|
||||
'Name' => '本节课名',
|
||||
'Start_time' => '开始时间',
|
||||
'End_time' => '结束时间',
|
||||
'Limit_num' => '本课时限定人数(0不限制)',
|
||||
@ -38,13 +38,13 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Schoolclassesorder.order_no' => '订单号',
|
||||
'Schoolclasseslibspec.name' => '规格名',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Schoolclassesorderdetail.title' => '标题',
|
||||
'Schoolclassesorderdetail.headimage' => '头图',
|
||||
'Schoolclasseslib.title' => '标题'
|
||||
'Schoolclassesorder.order_no' => '课程单号',
|
||||
'Schoolclasseslibspec.name' => '本节课名',
|
||||
'User.nickname' => '预约用户昵称',
|
||||
'User.realname' => '预约用户真实姓名',
|
||||
'User.mobile' => '预约用户手机号',
|
||||
'User.avatar' => '预约用户头像',
|
||||
'Schoolclassesorderdetail.title' => '课程名称',
|
||||
'Schoolclassesorderdetail.headimage' => '课程头图',
|
||||
'Schoolclasseslib.title' => '课程名称'
|
||||
];
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '课程单号',
|
||||
'Pay_no' => '微信支付单号',
|
||||
'User_id' => '下单人id',
|
||||
'Edit'=>'订单详情',
|
||||
@ -57,24 +57,24 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystore.avatar' => '头像',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Manystoreshop.name' => '店铺名称',
|
||||
'Manystoreshop.image' => '封面图',
|
||||
'Manystoreshop.address_city' => '城市选择',
|
||||
'Manystoreshop.province' => '省编号',
|
||||
'Manystoreshop.city' => '市编号',
|
||||
'Manystoreshop.district' => '县区编号',
|
||||
'Manystoreshop.address' => '店铺地址',
|
||||
'Manystoreshop.address_detail' => '店铺详细地址',
|
||||
'Schoolclasseslib.title' => '标题',
|
||||
'Schoolclasseslib.headimage' => '头图',
|
||||
'Schoolclassesorderdetail.title' => '标题',
|
||||
'Schoolclassesorderdetail.headimage' => '头图',
|
||||
'Admin.nickname' => '昵称',
|
||||
'Admin.avatar' => '头像'
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystore.avatar' => '机构账号头像',
|
||||
'User.nickname' => '下单人昵称',
|
||||
'User.realname' => '下单人真实姓名',
|
||||
'User.mobile' => '下单人手机号',
|
||||
'User.avatar' => '下单人头像',
|
||||
'Manystoreshop.name' => '机构名称',
|
||||
'Manystoreshop.image' => '机构封面图',
|
||||
'Manystoreshop.address_city' => '机构城市选择',
|
||||
'Manystoreshop.province' => '机构省编号',
|
||||
'Manystoreshop.city' => '机构市编号',
|
||||
'Manystoreshop.district' => '机构县区编号',
|
||||
'Manystoreshop.address' => '机构地址',
|
||||
'Manystoreshop.address_detail' => '机构详细地址',
|
||||
'Schoolclasseslib.title' => '课程名称',
|
||||
'Schoolclasseslib.headimage' => '课程头图',
|
||||
'Schoolclassesorderdetail.title' => '课程名称',
|
||||
'Schoolclassesorderdetail.headimage' => '课程头图',
|
||||
'Admin.nickname' => '管理员昵称',
|
||||
'Admin.avatar' => '管理员头像'
|
||||
];
|
||||
|
@ -12,22 +12,22 @@ return [
|
||||
'Add_type 1' => '机构',
|
||||
'Add_type 2' => '总后台',
|
||||
'Add_id' => '添加人id',
|
||||
'Title' => '标题',
|
||||
'Headimage' => '头图',
|
||||
'Images' => '轮播图',
|
||||
'Type' => '地点类型',
|
||||
'Title' => '课程名称',
|
||||
'Headimage' => '课程头图',
|
||||
'Images' => '课程轮播图',
|
||||
'Type' => '课程地点类型',
|
||||
'Type out' => '户外',
|
||||
'Type in' => '室内',
|
||||
'Classes_num' => '课时数',
|
||||
'Address_type' => '地址类型',
|
||||
'Classes_num' => '核销数',
|
||||
'Address_type' => '课程地址类型',
|
||||
'Address_type 1' => '按机构',
|
||||
'Address_type 2' => '独立位置',
|
||||
'Address_city' => '城市选择',
|
||||
'Province' => '省编号',
|
||||
'City' => '市编号',
|
||||
'District' => '县区编号',
|
||||
'Address' => '店铺地址',
|
||||
'Address_detail' => '店铺详细地址',
|
||||
'Address' => '地址',
|
||||
'Address_detail' => '详细地址',
|
||||
'Longitude' => '经度',
|
||||
'Latitude' => '纬度',
|
||||
'Classes_date_text' => '上课日期',
|
||||
@ -46,19 +46,19 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'Schoolclassesorder.order_no' => '订单号',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystore.avatar' => '头像',
|
||||
'Manystoreshop.name' => '店铺名称',
|
||||
'Manystoreshop.image' => '封面图',
|
||||
'Manystoreshop.address_city' => '城市选择',
|
||||
'Manystoreshop.province' => '省编号',
|
||||
'Manystoreshop.city' => '市编号',
|
||||
'Manystoreshop.district' => '县区编号',
|
||||
'Manystoreshop.address' => '店铺地址',
|
||||
'Manystoreshop.address_detail' => '店铺详细地址',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像'
|
||||
'Schoolclassesorder.order_no' => '课程单号',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystore.avatar' => '机构账号头像',
|
||||
'Manystoreshop.name' => '机构名称',
|
||||
'Manystoreshop.image' => '机构封面图',
|
||||
'Manystoreshop.address_city' => '机构城市选择',
|
||||
'Manystoreshop.province' => '机构省编号',
|
||||
'Manystoreshop.city' => '机构市编号',
|
||||
'Manystoreshop.district' => '机构县区编号',
|
||||
'Manystoreshop.address' => '机构地址',
|
||||
'Manystoreshop.address_detail' => '机构详细地址',
|
||||
'User.nickname' => '下单人昵称',
|
||||
'User.realname' => '下单人真实姓名',
|
||||
'User.mobile' => '下单人手机号',
|
||||
'User.avatar' => '下单人头像'
|
||||
];
|
||||
|
@ -26,5 +26,5 @@ return [
|
||||
'Result_status 6' => '驳回',
|
||||
'Log_text' => '记录内容',
|
||||
'Createtime' => '创建时间',
|
||||
'Schoolclassesorder.order_no' => '订单号'
|
||||
'Schoolclassesorder.order_no' => '课程单号'
|
||||
];
|
||||
|
@ -8,7 +8,7 @@ return [
|
||||
'Classes_order_detail_id' => '订单课程id',
|
||||
'Classes_lib_id' => '课程id',
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构店铺id',
|
||||
'Shop_id' => '机构id',
|
||||
'Status' => '售后状态',
|
||||
'Status 1' => '待处理',
|
||||
'Status 4' => '处理中',
|
||||
@ -49,17 +49,17 @@ return [
|
||||
'Checkouttime' => '结单时间',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Schoolclassesorder.order_no' => '订单号',
|
||||
'Schoolclassesorder.order_no' => '课程单号',
|
||||
'Schoolclassesorder.pay_no' => '微信支付单号',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Schoolclassesorderdetail.title' => '标题',
|
||||
'Schoolclassesorderdetail.headimage' => '头图',
|
||||
'Schoolclasseslib.title' => '标题',
|
||||
'Schoolclasseslib.headimage' => '头图',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystoreshop.name' => '店铺名称',
|
||||
'Manystoreshop.logo' => '品牌LOGO'
|
||||
'User.nickname' => '售后用户昵称',
|
||||
'User.realname' => '售后用户真实姓名',
|
||||
'User.mobile' => '售后用户手机号',
|
||||
'User.avatar' => '售后用户头像',
|
||||
'Schoolclassesorderdetail.title' => '课程名称',
|
||||
'Schoolclassesorderdetail.headimage' => '课程头图',
|
||||
'Schoolclasseslib.title' => '课程名称',
|
||||
'Schoolclasseslib.headimage' => '课程头图',
|
||||
'Manystore.nickname' => '机构账号昵称',
|
||||
'Manystoreshop.name' => '机构名称',
|
||||
'Manystoreshop.logo' => '机构LOGO'
|
||||
];
|
||||
|
@ -31,12 +31,12 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Schoolclassesserviceorder.order_no' => '售后单号',
|
||||
'Schoolclassesorder.order_no' => '订单号',
|
||||
'Schoolclassesorder.order_no' => '课程单号',
|
||||
'Schoolclassesorder.pay_no' => '微信支付单号',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像',
|
||||
'Schoolclassesorderdetail.title' => '标题',
|
||||
'Admin.nickname' => '昵称'
|
||||
'User.nickname' => '售后用户昵称',
|
||||
'User.realname' => '售后用户真实姓名',
|
||||
'User.mobile' => '售后用户手机号',
|
||||
'User.avatar' => '售后用户头像',
|
||||
'Schoolclassesorderdetail.title' => '课程名称',
|
||||
'Admin.nickname' => '管理员昵称'
|
||||
];
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'Manystore_id' => '机构账号id',
|
||||
'Shop_id' => '机构店铺id',
|
||||
'Shop_id' => '机构',
|
||||
'User_id' => '教师前台用户',
|
||||
'Name' => '教师名',
|
||||
'Head_image' => '教师头像',
|
||||
@ -16,16 +16,16 @@ return [
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'Deletetime' => '删除时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.realname' => '真实姓名',
|
||||
'User.avatar' => '头像',
|
||||
'Manystore.nickname' => '昵称',
|
||||
'Manystoreshop.name' => '店铺名称',
|
||||
'Manystoreshop.image' => '封面图',
|
||||
'Manystoreshop.address_city' => '城市选择',
|
||||
'Manystoreshop.province' => '省编号',
|
||||
'Manystoreshop.city' => '市编号',
|
||||
'Manystoreshop.district' => '县区编号',
|
||||
'Manystoreshop.address' => '店铺地址',
|
||||
'Manystoreshop.address_detail' => '店铺详细地址'
|
||||
'User.nickname' => '教师前台用户昵称',
|
||||
'User.realname' => '教师前台用户真实姓名',
|
||||
'User.avatar' => '教师前台用户头像',
|
||||
'Manystore.nickname' => '教师前台用户昵称',
|
||||
'Manystoreshop.name' => '机构名称',
|
||||
'Manystoreshop.image' => '机构封面图',
|
||||
'Manystoreshop.address_city' => '机构城市选择',
|
||||
'Manystoreshop.province' => '机构省编号',
|
||||
'Manystoreshop.city' => '机构市编号',
|
||||
'Manystoreshop.district' => '机构县区编号',
|
||||
'Manystoreshop.address' => '机构地址',
|
||||
'Manystoreshop.address_detail' => '机构详细地址'
|
||||
];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user