GameDiceone_Buy.php 559 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. class GameDiceone_Buy extends BaseModel
  4. {
  5. protected $table="game_diceone";
  6. public $timestamps = false;
  7. //撤单
  8. function Cancel($where){
  9. $res=$this->where($where)->where('status',0)->update(['delstatus'=>2]);
  10. if($res){
  11. return -5051262422;//作废失败
  12. }
  13. return 1;
  14. }
  15. function cancel_order($order_id){
  16. $res=$this->where('order_id',$order_id)->update(['delstatus'=>2]);
  17. if(!$res){
  18. return -7021021122;
  19. }
  20. return 1;
  21. }
  22. }