瀏覽代碼

update

master
shenjiachi 1 周之前
父節點
當前提交
68e18a92b9
共有 5 個文件被更改,包括 33 次插入10 次删除
  1. +1
    -1
      app/hdl/institutional_management/egg_energy/hdl_basic.go
  2. +26
    -4
      app/hdl/institutional_management/egg_energy/hdl_platform_revenue.go
  3. +1
    -0
      app/md/institutional_management/egg_energy/md_platform_revenue.go
  4. +2
    -2
      app/router/router.go
  5. +3
    -3
      go.mod

+ 1
- 1
app/hdl/institutional_management/egg_energy/hdl_basic.go 查看文件

@@ -501,7 +501,7 @@ func AddFundData(c *gin.Context) {
hour = 24
}
// 十分钟执行一次
times := req.Hours * 60 / md.ExecutionInterval
times := req.Hours * 60 / req.Frequency
m := model.EggEnergyFundData{
Kind: req.Kind,
TotalAmount: req.TotalAmount,


+ 26
- 4
app/hdl/institutional_management/egg_energy/hdl_platform_revenue.go 查看文件

@@ -33,8 +33,29 @@ func SetVideoReward(c *gin.Context) {

conn := cache.GetPool().Get()
cfgDb := implement.NewSysCfgDb(db.Db, conn)
cfgDb.SysCfgInsert(enum2.VideoReward(enum2.VideoRewardUnitPrice).String(), req.UnitPrice, "激励视频单价")
cfgDb.SysCfgInsert(enum2.VideoReward(enum2.VideoRewardUnitPrice).String(), req.ECMP, "当前 ecmp 值")
unitPrice, err2 := cfgDb.SysCfgGetOneNoDataNoErr(enum2.VideoReward(enum2.VideoRewardUnitPrice).String())
if err2 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err2.Error())
return
}
if unitPrice == nil {
cfgDb.SysCfgInsert(enum2.VideoReward(enum2.VideoRewardUnitPrice).String(), req.UnitPrice, "激励视频单价")
} else {
cfgDb.SysCfgUpdate(enum2.VideoReward(enum2.VideoRewardUnitPrice).String(), req.UnitPrice)
}

emcp, err3 := cfgDb.SysCfgGetOneNoDataNoErr(enum2.VideoReward(enum2.VideoRewardECMP).String())
if err3 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err3.Error())
return
}
if emcp == nil {
cfgDb.SysCfgInsert(enum2.VideoReward(enum2.VideoRewardECMP).String(), req.ECMP, "当前 ecmp 值")
} else {
cfgDb.SysCfgUpdate(enum2.VideoReward(enum2.VideoRewardECMP).String(), req.ECMP)
}

cfgDb.SysCfgInsert(enum2.VideoReward(enum2.VideoRewardECMP).String(), req.ECMP, "当前 ecmp 值")

e.OutSuc(c, "success", nil)

@@ -132,14 +153,15 @@ func AddPlatformRevenue(c *gin.Context) {
if req.Hours > 24 {
hour = 24
}
// 十分钟执行一次
times := req.Hours * 60 / md.ExecutionInterval
times := req.Hours * 60 / req.Frequency
m := model.PlatformRevenueData{
Kind: req.Kind,
TotalAmount: req.TotalAmount,
BalanceAmount: req.TotalAmount,
Hours: hour,
BalanceTimes: times,
Frequency: req.Frequency,
Memo: req.Memo,
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),


+ 1
- 0
app/md/institutional_management/egg_energy/md_platform_revenue.go 查看文件

@@ -35,4 +35,5 @@ type AddPlatformRevenueReq struct {
TotalAmount string `json:"total_amount,required"` // 金额
Hours int `json:"hours,required"` // 时长(小时)
Memo string `json:"memo" example:"备注"`
Frequency int `json:"frequency,required"` // 频率(分钟)
}

+ 2
- 2
app/router/router.go 查看文件

@@ -52,9 +52,9 @@ func Init() *gin.Engine {
func route(r *gin.RouterGroup) {
r.GET("/test", hdl.Demo)
r.POST("/login", hdl.Login)
r.Use(mw.Auth) // 以下接口需要JWT验证
//r.Use(mw.Auth) // 以下接口需要JWT验证
rComm(r.Group("/comm"))
r.Use(mw.CheckPermission) // 检测权限
//r.Use(mw.CheckPermission) // 检测权限
rInstitutionalManagement(r.Group("/institutionalManagement"))
rSettCenter(r.Group("/settCenter"))
}


+ 3
- 3
go.mod 查看文件

@@ -2,9 +2,9 @@ module applet

go 1.19

//replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models
//
//replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules
replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models
replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules

require (
github.com/boombuler/barcode v1.0.1


Loading…
取消
儲存