文件
mashangyoujiu/Application/Retail/Controller/ManagerController.class.php

100 行
3.1 KiB
PHP
可执行文件

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<?php
namespace Retail\Controller;
use Common\Business\Manager;
use Common\Model\JurisdictionUserModel;
use Common\Model\RetailManagerModel;
use Common\Model\RetailStoreModel;
//[1.7.90]
/**
* 店长
* Class ManagerController
* @package Retail\Controller
*/
class ManagerController extends BaseController
{
public function manager()
{
$this->display();
}
/**
* 店长列表
*/
public function managerList()
{
$param['merchant_id'] = $this->merchant_id;
$param['keyword'] = I('post.keyword');
$param['store_id'] = I('post.store_id');
$param['page'] = I('post.page') ? I('post.page') : 1;
$param['limit'] = I('post.limit') ? I('post.limit') : 10;
$ManagerClass = new Manager();
$result = $ManagerClass->getManagerList($param);
$this->ajaxReturn($result);
}
/**
* 添加店长
*/
public function addManager()
{
$param = I("post.");
$param['merchant_id'] = $this->merchant_id;
$ManagerClass = new Manager();
$result = $ManagerClass->addStoreManager($param);
if ($result['status'] == 1) {
//操作日志记录
$source = 0; //请求来源: 0pc系统 1小助手
$type = 3; //平台:1合伙人端 2代理商端 3商户端 4门店端
$request_data = json_encode($param); //请求参数 json数据
$desc = '门店店长新增'; //操作行为描述
action_log($source, $type, $request_data, $desc);
}
$this->ajaxReturn($result);
}
/**
* 修改店长信息
*/
public function editManager()
{
$param['merchant_id'] = $this->merchant_id;
$param['id'] = I('post.id');
$param['real_name'] = I('post.name'); // 名字
$param['mobile_phone'] = I('post.mobile'); // 手机号码
$param['pwd'] = I('post.password'); // 密码
$ManagerClass = new Manager();
$result = $ManagerClass->editStoreManager($param);
if ($result['status'] == 1) {
//操作日志记录
$source = 0; //请求来源: 0pc系统 1小助手
$type = 3; //平台:1合伙人端 2代理商端 3商户端 4门店端
$request_data = json_encode($_POST); //请求参数 json数据
$desc = '门店店长信息编辑'; //操作行为描述
action_log($source, $type, $request_data, $desc);
}
$this->ajaxReturn($result);
}
public function delManager()
{
$id = I('post.id');
$ManagerClass = new Manager();
$result = $ManagerClass->delStoreManager($id);
if ($result['status'] == 1) {
//操作日志记录
$source = 0; //请求来源: 0pc系统 1小助手
$type = 3; //平台:1合伙人端 2代理商端 3商户端 4门店端
$request_data = json_encode($_POST); //请求参数 json数据
$desc = '门店店长删除'; //操作行为描述
action_log($source, $type, $request_data, $desc);
}
$this->ajaxReturn($result);
}
}