刮刮后端接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
858 B

<?php
declare (strict_types = 1);
namespace app\model;
use think\Model;
/**
* @mixin \think\Model
*/
class AdminUpScoresRecords extends Model
{
/**
* 创建上分记录
* @param $relation_id
* @param $admin_id
* @param $balance
* @param $residue_amount
* @param $relation_type
* @return mixed
*/
public static function createRecords($relation_id,$admin_id,$balance,$residue_amount,$relation_type = 1)
{
$Records = new AdminUpScoresRecords();
$Records->relation_id = $relation_id;
$Records->relation_type = $relation_type;
$Records->admin_id = $admin_id;
$Records->balance = $balance;
$Records->residue_amount = $residue_amount;
$Records->create_time = date("Y-m-d H:i:s",time());
$Records->save();
return $Records->id;
}
}