dataLists(new GiftCardLists()); } /** * @notes 新增礼品卡 * @return \think\response\Json * @author ljj * @date 2022/3/31 11:23 上午 */ public function add() { if($this->request->isPost()) { $params = (new GiftCardValidate())->post()->goCheck('add'); $result = (new GiftCardLogic())->add($params); if($result == 'true'){ return $this->success('新增礼品卡成功'); }else{ return $this->fail(GiftCardLogic::getError()); } }else{ return $this->fail('请求方式错误'); } } /** * @notes 礼品卡批次卡号详情 * @return \think\response\Json * @author ljj * @date 2022/3/31 11:23 上午 */ public function cardDetail() { $params = (new GiftCardValidate())->goCheck('detail'); return $this->dataLists(new GiftCardInfoLists()); } /** * @notes 删除批次 * @return \think\response\Json * @author ljj * @date 2022/3/31 2:29 下午 */ public function delGiftCard() { $params = (new GiftCardValidate())->post()->goCheck('delGiftCard'); $result = (new GiftCardLogic())->deleteGiftCard($params); if (true !== $result) { return $this->fail(GiftCardLogic::getError()); } return $this->success('删除成功',[],1,1); } /** * @notes 删除礼品卡 * @return \think\response\Json * @author ljj * @date 2022/3/31 2:29 下午 */ public function delGiftCardInfo() { $params = (new GiftCardValidate())->post()->goCheck('delGiftCardInfo'); $result = (new GiftCardLogic())->deleteGiftCardInfo($params); if (true !== $result) { return $this->fail(GiftCardLogic::getError()); } return $this->success('删除成功',[],1,1); } }