feat: sku
This commit is contained in:
@@ -30,7 +30,7 @@ class CycleService extends BaseService
|
||||
$arr = $this->cycleModel->whereBetween('dates',[
|
||||
date('Y-m-d',strtotime('-10 day',time())),
|
||||
date('Y-m-d',strtotime('+10 day',time())),
|
||||
])->orderBy('dates')->get();
|
||||
])->orderBy('dates')->select(['id','dates'])->get();
|
||||
if (empty($arr)) return $this->return->success('success',['list' => []]);
|
||||
|
||||
$arr = $arr->toArray();
|
||||
|
||||
@@ -78,10 +78,9 @@ class SpuService extends BaseService
|
||||
*/
|
||||
public function add(): array
|
||||
{
|
||||
$date = $this->request->input('date',date('Y-m-d'));
|
||||
|
||||
$cycleInfo = $this->cycleModel->getInfoByDate($date);
|
||||
$cycleId = (int)$this->request->input('cycle_id');
|
||||
|
||||
$cycleInfo = $this->cycleModel->getInfoById($cycleId);
|
||||
if (empty($cycleInfo)) throw new ErrException('没有该周期,请刷新后重新上传');
|
||||
|
||||
$title = $this->request->input('title');
|
||||
|
||||
Reference in New Issue
Block a user