base_resource_use.go 798 B

123456789101112131415161718192021222324
  1. package entity
  2. import (
  3. . "app.yhyue.com/moapp/jybase/common"
  4. . "bp.jydev.jianyu360.cn/resourceCenter/rpc/internal/db"
  5. )
  6. var Base_resource_use = base_resource_use{}
  7. //资源充值/消耗表
  8. type base_resource_use struct {
  9. Id int
  10. Appid string
  11. Use_id int //使用人id
  12. Function_code string //功能代码
  13. Add_count int //新增数量
  14. Surplus_count int //剩余数量
  15. Deduction_count int //扣除数量
  16. }
  17. func (b *base_resource_use) FindLastOne(appid, function_code string, use_id int) []base_power {
  18. 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)
  19. return JsonUnmarshal(list, []base_power{}).([]base_power)
  20. }