init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
namespace CashierApi\Controller;
|
||||
|
||||
use Think\Controller;
|
||||
|
||||
//[1.3.72]
|
||||
/**
|
||||
* 2019-6-14 ZaiYuLi
|
||||
* 获取收银logo接口
|
||||
* Class LogoController
|
||||
* @package CashierApi\Controller
|
||||
*/
|
||||
class LogoController extends BaseController
|
||||
{
|
||||
public function getLogo()
|
||||
{
|
||||
$RetailCashierLogoModel = D('RetailCashierLogo');
|
||||
$logo = $RetailCashierLogoModel->getFind(array($RetailCashierLogoModel::ID => array('gt', 0)));
|
||||
if ($logo) {
|
||||
$ImageGalleryModel = D('ImageGallery');
|
||||
$android = $ImageGalleryModel->getFieldPath(array('id' => $logo[$RetailCashierLogoModel::ANDROID_ICON_ID]));
|
||||
$pc = $ImageGalleryModel->getFieldPath(array('id' => $logo[$RetailCashierLogoModel::PC_ICON_ID]));
|
||||
$cashier = $ImageGalleryModel->getFieldPath(array('id' => $logo[$RetailCashierLogoModel::CASHIER_ICON_ID]));
|
||||
if (!empty($android) || !empty($pc) || !empty($cashier)) {
|
||||
$result['status'] = 1;
|
||||
$result['msg'] = '获取成功';
|
||||
$result['data'] = array(
|
||||
'android_icon' => $android ? $android : '',
|
||||
'pc_icon' => $pc ? $pc : '',
|
||||
'cashier_icon' => $cashier ? $cashier : ''
|
||||
);
|
||||
} else {
|
||||
$result['status'] = 0;
|
||||
$result['msg'] = '未设置图片';
|
||||
}
|
||||
} else {
|
||||
$result['status'] = 0;
|
||||
$result['msg'] = '未设置图片';
|
||||
}
|
||||
$this->ajaxReturn($result);
|
||||
}
|
||||
|
||||
public function getSubScreen()
|
||||
{
|
||||
$store_id = self::$store_id;
|
||||
$RetailSubScreenModel = D('RetailSubScreen');
|
||||
$list = $RetailSubScreenModel->getSelect(array($RetailSubScreenModel::STORE_ID => $store_id), $RetailSubScreenModel::IMAGE_ID);
|
||||
if (!empty($list)) {
|
||||
$temp = array();
|
||||
foreach ($list as &$val) {
|
||||
$image = D('ImageGallery')->getFieldPath(array('id' => $val[$RetailSubScreenModel::IMAGE_ID]));
|
||||
if (!empty($image)) {
|
||||
$temp[] = $image;
|
||||
}
|
||||
}
|
||||
$res['status'] = 1;
|
||||
$res['msg'] = '获取成功';
|
||||
$res['date'] = $temp;
|
||||
} else {
|
||||
$res['status'] = 0;
|
||||
$res['msg'] = '暂无图片';
|
||||
}
|
||||
$this->ajaxReturn($res);
|
||||
}
|
||||
public function getSubScreen_v1()
|
||||
{
|
||||
$store_id = self::$store_id;
|
||||
$storeModel = D("RetailStore");
|
||||
$type = $storeModel->getFindField(array($storeModel::ID=>$store_id),$storeModel::SCREEN_TYPE);
|
||||
switch ($type){
|
||||
case 1:
|
||||
$res['status'] = 1;
|
||||
$res['type'] = $type;
|
||||
break;
|
||||
case 2:
|
||||
$RetailSubScreenModel = D('RetailSubScreen');
|
||||
$list = $RetailSubScreenModel->getSelect(array($RetailSubScreenModel::STORE_ID => $store_id), $RetailSubScreenModel::IMAGE_ID);
|
||||
if (!empty($list)) {
|
||||
$temp = array();
|
||||
foreach ($list as &$val) {
|
||||
$image = D('ImageGallery')->getFieldInfo(array('id' => $val[$RetailSubScreenModel::IMAGE_ID]));
|
||||
if (!empty($image)) {
|
||||
$temp[] = $image;
|
||||
}
|
||||
}
|
||||
$res['status'] = 1;
|
||||
$res['msg'] = '获取成功';
|
||||
$res['type'] = $type;
|
||||
$res['date'] = $temp;
|
||||
} else {
|
||||
$res['status'] = 0;
|
||||
$res['msg'] = '暂无内容';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$res['status'] = 0;
|
||||
$res['msg'] = '暂无内容';
|
||||
break;
|
||||
}
|
||||
$this->ajaxReturn($res);
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户