75 行
1.9 KiB
PHP
可执行文件
75 行
1.9 KiB
PHP
可执行文件
<?php
|
|
|
|
namespace CashierApi\Controller;
|
|
|
|
use CashierApi\Business\Legend;
|
|
use Common\Business\Goods;
|
|
use Common\Business\GoodsClassify;
|
|
|
|
//[1.7.90]
|
|
class LegendController extends BaseController
|
|
{
|
|
|
|
//传称的商品列表
|
|
public function goodsList()
|
|
{
|
|
$data = I('post.');
|
|
$data['store_id'] = self::$store_id;
|
|
$GoodsClass = new Goods();
|
|
$result = $GoodsClass->comStoreGoods($data);
|
|
$this->ajaxReturn($result);
|
|
}
|
|
|
|
|
|
//分类列表
|
|
public function getGoodsClassTopLevel()
|
|
{
|
|
$data = I('post.');
|
|
$data['merchant_id'] = self::$merchant_id;
|
|
$data['industry_id'] = self::$store['industry_id'];
|
|
$GoodsClassify = new GoodsClassify();
|
|
$result = $GoodsClassify->appointTypeClassList($data);
|
|
$this->ajaxReturn($result);
|
|
}
|
|
|
|
|
|
//修改plu码(已弃用)
|
|
public function modifyPlu()
|
|
{
|
|
$data = I('post.');
|
|
$data['merchant_id'] = self::$merchant_id;
|
|
$data['store_id'] = self::$store_id;
|
|
$LegendClass = new Legend();
|
|
$result = $LegendClass->modifyPlu($data);
|
|
$this->ajaxReturn($result);
|
|
}
|
|
|
|
|
|
//修改plu码|价格
|
|
public function modifyGoods()
|
|
{
|
|
$data = I('post.');
|
|
$data['merchant_id'] = self::$merchant_id;
|
|
$data['store_id'] = self::$store_id;
|
|
$LegendClass = new Legend();
|
|
$result = $LegendClass->modifyGoods($data);
|
|
if ($result['status'] == 1) {
|
|
//操作日志记录
|
|
if($data['modify_type'] == 1){
|
|
$desc = '修改plus码';
|
|
}else{
|
|
$desc = '修改商品价格';
|
|
}
|
|
action_log_v2([
|
|
'source'=>2,
|
|
'type'=>6,
|
|
'desc'=>$desc,
|
|
'request_data'=>json_encode($_POST),//请求参数 json数据
|
|
'operator_id'=>self::$cashier_id
|
|
]);
|
|
}
|
|
$this->ajaxReturn($result);
|
|
}
|
|
|
|
|
|
} |