ShippingTemplateUndelive.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\controller\merchant\store\shipping;
  12. use think\App;
  13. use crmeb\basic\BaseController;
  14. use app\common\repositories\store\shipping\ShippingTemplateUndeliveRepository as repository;
  15. class ShippingTemplateUndelive extends BaseController
  16. {
  17. protected $repository;
  18. /**
  19. * ShippingTemplateUndelive constructor.
  20. * @param App $app
  21. * @param repository $repository
  22. */
  23. public function __construct(App $app, repository $repository)
  24. {
  25. parent::__construct($app);
  26. $this->repository = $repository;
  27. }
  28. /**
  29. * @Author:Qinii
  30. * @Date: 2020/5/8
  31. * @Time: 14:39
  32. * @param $id
  33. * @return mixed
  34. */
  35. public function delete($id)
  36. {
  37. if(!$this->repository->merExists($this->request->merId(),$id))
  38. return app('json')->fail('数据不存在');
  39. $this->repository->delete($id);
  40. return app('json')->success('删除成功') ;
  41. }
  42. }