Commit 97abbc92 by gongyang

提交代码

parent ed8d625f
......@@ -403,12 +403,11 @@ class SystemNoticeLogic
foreach ($returnData['data'] as &$value){
$value['create_time_cn'] = date('Y-m-d H:i:s',$value['create_time']);
$value['system_id_cn'] = '';
$value['type_cn'] = '';
$value['show_status_cn'] = '';
$value['top_status_cn'] = '';
$value['source_cn'] = '';
$value['system_id_cn'] = BusinessNoticeModel::$systemIdCn[$value['system_id']]??'';
$value['type_cn'] = BusinessNoticeModel::$typeCn[$value['type']]??'';;
$value['show_status_cn'] = BusinessNoticeModel::$showCn[$value['show_status']]??'';
$value['top_status_cn'] = BusinessNoticeModel::$topCn[$value['top_status']]??'';
$value['source_cn'] = BusinessNoticeModel::$sourceCn[$value['source']]??'';
}
return $returnData;
......
......@@ -18,6 +18,15 @@ class BusinessNoticeModel extends Model
protected $primaryKey = 'business_notice_id';
public $timestamps = false;
static public $systemIdCn = [1=>'采购系统',2=>'WMS系统'];
//类型1最新补货,2最新入库,3优势货源,4个人消息
static public $typeCn = [1=>'最新补货',2=>'最新入库',3=>'优势货源',4=>'个人消息'];
static public $showCn = [0=>'显示',1=>'隐藏'];
static public $topCn = [0=>'置顶',1=>'非置顶'];
static public $sourceCn = [0=>'系统生成',1=>'手动新增'];
public function getWhereObj($data)
{
......@@ -25,12 +34,10 @@ class BusinessNoticeModel extends Model
foreach ($data as $key=>$val){
if ($val === '')continue;
switch ($key){
case 'system_name':
case 'update_type':
case 'version_num':
case 'weonlt_id':
case 'product_user':
case 'type':
case 'title':
case 'show_status':
case 'top_status':
$obj = $obj->where($key,$val);break;
case 'smue_id_str':
$obj = $obj->whereIn('smue_id',explode(',',$val));break;
......@@ -38,9 +45,9 @@ class BusinessNoticeModel extends Model
case 'update_title':
case 'update_content':
$obj = $obj->where($key,'like','%'.$val.'%');break;
case 'begin_time':
case 'create_time_begin':
$obj = $obj->where('create_time','>',strtotime($val));break;
case 'end_time':
case 'create_time_end':
$obj = $obj->where('create_time','<=',strtotime($val));break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment