package entity import ( . "app.yhyue.com/moapp/jybase/common" . "bp.jydev.jianyu360.cn/resourceCenter/rpc/internal/db" ) var Base_resource_use = base_resource_use{} //资源充值/消耗表 type base_resource_use struct { Id int Appid string Use_id int //使用人id Function_code string //功能代码 Add_count int //新增数量 Surplus_count int //剩余数量 Deduction_count int //扣除数量 } func (b *base_resource_use) FindLastOne(appid, function_code string, use_id int) []base_power { list := Mysql_BaseService.SelectBySql(`select * from base_resource_use where appid=? and function_code=? and use_id=? and status=1 limit 1`, appid, function_code, use_id) return JsonUnmarshal(list, []base_power{}).([]base_power) }