| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace app\business;
- use Illuminate\Support\Arr;
- use support\Db;
- class CheckInBusiness
- {
- /**通过
- * @param $id
- * @return void
- */
- static public function pass($id)
- {
- try {
- $data=Db::table('wa_check_in')->where('id',$id)->first();
- if($data->status != 1){
- throw new \Exception('当前订单已处理!');
- }
- StreamBusiness::addStream($data->user_id,$data->money,streamType12,moldType2,moldTypefild2,$id);
- Db::table('wa_check_in')->where('id',$id)->update(['status'=>2]);
- }catch (\Throwable $exception){
- throw new \Exception($exception->getMessage());
- }
- }
- /** 驳回
- * @param $id
- * @return void
- * @throws \Exception
- */
- static public function reject($id)
- {
- try {
- $data=Db::table('wa_check_in')->where('id',$id)->first();
- if($data->status != 1){
- throw new \Exception('当前订单已处理!');
- }
- Db::table('wa_check_in')->where('id',$id)->update(['status'=>3]);
- }catch (\Throwable $exception){
- throw new \Exception($exception->getMessage());
- }
- }
- }
|