| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Models;
- class Payment extends BaseModel {
- protected $table = "system_bank";
- public $timestamps = false;
- function getInfos(){
- $data=$this->orderby('sort','desc')->whereIn('type', array(2,3,4,5,6,7))->get();
- if(!$data){
- return -6010000122;
- }
- return $data->toArray();
- }
- //更新设置
- function updateInfos($data,$id){
- $res=$this->where('id',$id)->update($data);
- if(!$res){
- return -7020050022;//更新失败
- }
- return 1;
- }
- //
- function upInfos($id){
- $res=$this->where('id',$id)->first();
- if(!$res){
- return -7020050022;//
- }
- return $res->toArray();
- }
- }
|