post()->goCheck('add'); (new GoodsUnitLogic())->add($params); return $this->success('商品单位添加成功',[],1,1); } /** * @notes 查看商品单位列表 * @return \think\response\Json * @author ljj * @date 2021/7/19 6:27 下午 */ public function lists() { return $this->dataLists(new GoodsUnitLists()); } /** * @notes 删除商品单位 * @return \think\response\Json * @author ljj * @date 2021/7/19 6:37 下午 */ public function del() { $params = (new GoodsUnitValidate())->post()->goCheck('del'); (new GoodsUnitLogic())->del($params); return $this->success('商品单位删除成功',[],1,1); } /** * @notes 编辑商品单位 * @return \think\response\Json * @author ljj * @date 2021/7/19 6:52 下午 */ public function edit() { $params = (new GoodsUnitValidate())->post()->goCheck('edit'); (new GoodsUnitLogic())->edit($params); return $this->success('商品单位修改成功',[],1,1); } /** * @notes 查看商品单位详情 * @return \think\response\Json * @author ljj * @date 2021/7/19 7:01 下午 */ public function detail() { $params = (new GoodsUnitValidate())->goCheck('detail'); $result = (new GoodsUnitLogic())->detail($params); return $this->success('商品单位详情获取成功',$result,1,0); } }