| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <?php
- namespace App\Http\Controllers\Api\v1;
- use App\Http\Controllers\Api\BaseController;
- use App\Http\Validator\EnshrineNoticeValidator;
- use App\Http\Validator\EnshrineValidator;
- use App\Services\EnshrineNoticeService;
- use App\Services\EnshrineService;
- use App\Services\MotionService;
- use Illuminate\Http\Request;
- /**
- * 供奉控制器类
- * @author wesmiler
- * @since 2020/11/10
- * Class EnshrineController
- * @package App\Http\Controllers
- */
- class EnshrineController extends BaseController
- {
- /**
- * 构造函数
- * @author wesmiler
- * @since 2020/11/11
- * EnshrineController constructor.
- */
- public function __construct()
- {
- parent::__construct();
- $this->service = new EnshrineService();
- $this->noticeService = new EnshrineNoticeService();
- $this->motionService = new MotionService();
- }
- /**
- * 供奉记录
- * @return array
- */
- public function index(){
- return $this->service->getDataList($this->userId);
- }
- /**
- * 供奉物品
- * @return array
- */
- public function goods(){
- return $this->service->goods();
- }
- /**
- * 选择佛像
- * @return mixed
- */
- public function select(){
- return $this->service->select($this->userId);
- }
- /**
- * 送圣
- * @return array
- */
- public function packoff(){
- return $this->service->packoff($this->userId);
- }
- /**
- * 超度牌位
- * @return mixed
- */
- public function chaodu(Request $request, EnshrineValidator $validator){
- $params = $validator->check($request->all(),'chaodu');
- if(!is_array($params)){
- return message($params, false);
- }
- return $this->service->chaodu($this->userId);
- }
- /**
- * 保存供奉操作记录
- * @return array
- */
- public function actionRecord(){
- return $this->service->actionRecord($this->userId);
- }
- /**
- * 供奉操作记录
- * @return array
- */
- public function xinyuan(){
- return $this->service->actionList($this->userId);
- }
- /**
- * 供奉操作记录处理
- * @return array
- */
- public function catchXuyuan(){
- return $this->service->catchXuyuan($this->userId);
- }
- /**
- * 购买物品
- * @return array
- */
- public function buy(){
- return $this->service->buy($this->userId);
- }
- /**
- * 贡品购买记录
- * @return array
- */
- public function orderList(){
- return $this->service->orderList($this->userId);
- }
- /**
- * 发布忏悔/回向记录
- * @return mixed
- */
- public function noticePublish(Request $request, EnshrineNoticeValidator $validator){
- $params = $validator->check($request->all(),'publish');
- if(!is_array($params)){
- return message($params, false);
- }
- return $this->noticeService->publish($this->userId);
- }
- /**
- * 忏悔回向记录
- * @return mixed
- */
- public function notice(){
- return $this->noticeService->getDataList($this->userId);
- }
- /**
- * 忏悔回向记录删除
- * @return mixed
- */
- public function noticeDel(){
- return $this->noticeService->del($this->userId);
- }
- /**
- * 念佛记录
- * @return array
- */
- public function motion(){
- return $this->motionService->save($this->userId);
- }
- /**
- * 念佛统计
- * @return array
- */
- public function motionCount(){
- return $this->motionService->counts($this->userId);
- }
- }
|