Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	go.mod
master
huangjiajun pirms 1 nedēļas
vecāks
revīzija
a8e38d9479
17 mainītis faili ar 1092 papildinājumiem un 28 dzēšanām
  1. +1
    -1
      app/hdl/financial_center/hdl_withdraw.go
  2. +166
    -0
      app/hdl/institutional_management/egg_point_coefficient/hdl_basic.go
  3. +33
    -0
      app/md/egg_point_coefficient/md_basic.go
  4. +1
    -1
      app/md/institutional_management/egg_energy/md_egg_point.go
  5. +8
    -1
      app/router/router.go
  6. +6
    -6
      app/svc/im/svc_send_message.go
  7. +1
    -0
      app/task/init.go
  8. +1
    -0
      app/task/md/cron_key.go
  9. +2
    -2
      app/task/svc/svc_egg_energy_deal_fund_data.go
  10. +2
    -2
      app/task/svc/svc_egg_energy_deal_platform_revenue_data.go
  11. +19
    -0
      app/task/svc/svc_egg_energy_user_egg_score.go
  12. +23
    -0
      app/task/task_egg_energy_user_egg_score.go
  13. +309
    -6
      docs/docs.go
  14. +306
    -4
      docs/swagger.json
  15. +204
    -3
      docs/swagger.yaml
  16. +9
    -1
      etc/cfg.yml
  17. +1
    -1
      go.mod

+ 1
- 1
app/hdl/financial_center/hdl_withdraw.go Parādīt failu

@@ -430,7 +430,7 @@ func GetWithdrawApplyList(c *gin.Context) {
// @Param req body md.WithdrawApplyAuditReq false "筛选条件"
// @Success 200 {string} "success"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/financialCenter/withdraw/applyList [POST]
// @Router /api/financialCenter/withdraw/audit [POST]
func WithdrawApplyAudit(c *gin.Context) {
var req *md.WithdrawApplyAuditReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {


+ 166
- 0
app/hdl/institutional_management/egg_point_coefficient/hdl_basic.go Parādīt failu

@@ -0,0 +1,166 @@
package egg_point_coefficient

import (
"applet/app/db"
"applet/app/e"
md "applet/app/md/egg_point_coefficient"
"applet/app/svc"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
"github.com/gin-gonic/gin"
"time"
)

// EggPointCoefficientBatchAdd
// @Summary 制度中心-蛋蛋分区间系数管理-区间系数(新增)
// @Tags 蛋蛋分区间系数管理
// @Description 区间系数(新增 支持批量新增)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @param req body md.EggPointCoefficientBatchAddReq true "需要新增的内容"
// @Success 200 {int} "新增数据条数"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggPointCoefficient/add [POST]
func EggPointCoefficientBatchAdd(c *gin.Context) {
var req md.EggPointCoefficientBatchAddReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = svc.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
var affected int64
if len(req.List) == 0 {
e.OutSuc(c, affected, nil)
return
}
now := time.Now()
managements := make([]model.EggPointPartitionCoefficientManagement, len(req.List))
for i, node := range req.List {
managements[i] = model.EggPointPartitionCoefficientManagement{
StartScore: node.StartScore,
EndScore: node.EndScore,
Coefficient: node.Coefficient,
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),
}
}
managementDb := implement.NewEggPointPartitionCoefficientManagementDb(db.Db)
affected, err = managementDb.EggPointPartitionCoefficientManagementBatchInsert(managements)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, nil)
return
}
e.OutSuc(c, affected, nil)
}

// EggPointCoefficientDel
// @Summary 制度中心-蛋蛋分区间系数管理-区间系数(删除)
// @Tags 蛋蛋分区间系数管理
// @Description 区间系数(删除)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @param req body md.EggPointCoefficientDelReq true "需要删除的数据id"
// @Success 200 {int} "成功删除数据条数"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggPointCoefficient/del [DELETE]
func EggPointCoefficientDel(c *gin.Context) {
var req md.EggPointCoefficientDelReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = svc.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}

managementDb := implement.NewEggPointPartitionCoefficientManagementDb(db.Db)
affected, err := managementDb.EggPointPartitionCoefficientManagementDel(req.Id)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, nil)
return
}
e.OutSuc(c, affected, nil)
}

// EggPointCoefficientGet
// @Summary 制度中心-蛋蛋分区间系数管理-区间系数(获取)
// @Tags 蛋蛋分区间系数管理
// @Description 区间系数(获取)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Success 200 {object} md.EggPointCoefficientGetResp
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggPointCoefficient/index [GET]
func EggPointCoefficientGet(c *gin.Context) {
managementDb := implement.NewEggPointPartitionCoefficientManagementDb(db.Db)
managements, err := managementDb.EggPointPartitionCoefficientManagementGetAll()
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, nil)
return
}
resp := md.EggPointCoefficientGetResp{}
if managements == nil {
e.OutSuc(c, resp, nil)
return
}

list := make([]md.EggPointCoefficientNode, len(*managements))
for i, management := range *managements {
list[i] = md.EggPointCoefficientNode{
Id: management.Id,
StartScore: management.StartScore,
EndScore: management.EndScore,
Coefficient: management.Coefficient,
}
}
resp.List = list
e.OutSuc(c, resp, nil)
}

// EggPointCoefficientUpdate
// @Summary 制度中心-蛋蛋分区间系数管理-区间系数(更新)
// @Tags 蛋蛋分区间系数管理
// @Description 区间系数(更新)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @param req body md.EggPointCoefficientUpdateReq true "需要更新的数据信息"
// @Success 200 {int} "成功修改的数据数量"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggPointCoefficient/update [POST]
func EggPointCoefficientUpdate(c *gin.Context) {
var req md.EggPointCoefficientUpdateReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = svc.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
var columns []string
m := model.EggPointPartitionCoefficientManagement{}
if req.Coefficient != "" {
m.Coefficient = req.Coefficient
columns = append(columns, "coefficient")
}
if req.StartScore != "" {
m.StartScore = req.StartScore
columns = append(columns, "start_score")
}
if req.EndScore != "" {
m.EndScore = req.EndScore
columns = append(columns, "end_score")
}
managementDb := implement.NewEggPointPartitionCoefficientManagementDb(db.Db)
affected, err := managementDb.EggPointPartitionCoefficientManagementUpdate(req.Id, &m, columns...)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, nil)
return
}
e.OutSuc(c, affected, nil)
}

+ 33
- 0
app/md/egg_point_coefficient/md_basic.go Parādīt failu

@@ -0,0 +1,33 @@
package md

type EggPointCoefficientNode struct {
Id int `json:"id"`
StartScore string `json:"start_score"` // 起始分值
EndScore string `json:"end_score"` // 截止分值
Coefficient string `json:"coefficient"` // 系数
}

type EggPointCoefficientGetResp struct {
List []EggPointCoefficientNode `json:"list"`
}

type EggPointCoefficientBatchAddNode struct {
StartScore string `json:"start_score"` // 起始分值
EndScore string `json:"end_score"` // 截止分值
Coefficient string `json:"coefficient"` // 系数
}

type EggPointCoefficientBatchAddReq struct {
List []EggPointCoefficientNode `json:"list"` // 系数管理列表
}

type EggPointCoefficientDelReq struct {
Id string `json:"id" binding:"required"` // 需要删除范围的id
}

type EggPointCoefficientUpdateReq struct {
Id string `json:"id" binding:"required"` // 需要修改范围的id
StartScore string `json:"start_score"` // 起始分值
EndScore string `json:"end_score"` // 截止分值
Coefficient string `json:"coefficient"` // 系数
}

+ 1
- 1
app/md/institutional_management/egg_energy/md_egg_point.go Parādīt failu

@@ -36,7 +36,7 @@ type UserEggIndexResp struct {
Week string `json:"week" example:"周份"`
YearAndWeekList map[string][]string `json:"year_list"` //年份&&周份列表
StatisticsUserEggScoreValueRange []map[string]string `json:"statistics_user_egg_score_value_range"` //统计用户蛋蛋分范围
StatisticsUserEggKindProportion []map[string]interface{} `json:"statistics_user_egg_kind_proportion"` //统计用户蛋蛋分"评比类型"占比
StatisticsUserEggKindProportion []map[string]interface{} `json:"statistics_user_egg_kind_proportion"` //统计用户蛋蛋分"评比类型"占比 (count: 数量、name: 评分类型、proportion: 占比)
EggEnergyUserEggIndexWeight *model.EggEnergyUserEggIndexWeight `json:"egg_energy_user_egg_index_weight"` //蛋蛋分系数权重
}



+ 8
- 1
app/router/router.go Parādīt failu

@@ -12,6 +12,7 @@ import (
"applet/app/hdl/friend_circle"
"applet/app/hdl/im"
"applet/app/hdl/institutional_management/egg_energy"
"applet/app/hdl/institutional_management/egg_point_coefficient"
"applet/app/hdl/institutional_management/module_setting"
"applet/app/hdl/institutional_management/public_platoon"
"applet/app/hdl/marketing_applications/new_user_red_package"
@@ -288,7 +289,13 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
rPlaylet.POST("/save", content_reward.PlayletBaseSave) //
}
}

rEggPointCoefficient := r.Group("/eggPointCoefficient") // 蛋蛋分区间系数管理
{
rEggPointCoefficient.GET("/index", egg_point_coefficient.EggPointCoefficientGet) // 查询
rEggPointCoefficient.POST("/add", egg_point_coefficient.EggPointCoefficientBatchAdd) // 新增
rEggPointCoefficient.POST("/update", egg_point_coefficient.EggPointCoefficientUpdate) // 更新
rEggPointCoefficient.DELETE("/del", egg_point_coefficient.EggPointCoefficientDel) // 删除
}
}

func rMarketingApplications(r *gin.RouterGroup) { //营销应用


+ 6
- 6
app/svc/im/svc_send_message.go Parādīt failu

@@ -99,7 +99,7 @@ func DealGroupMessage(recordID int, req *md.BatchSendGroupMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的群ID
groupIDs = append(groupIDs, utils.Int64ToStr(groupWithOwner.GroupID))
}
@@ -140,7 +140,7 @@ func DealGroupMessage(recordID int, req *md.BatchSendGroupMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
groupIDs = sendCondition
}
} else if len(notCondition) != 0 && len(sendCondition) == 0 {
@@ -163,7 +163,7 @@ func DealGroupMessage(recordID int, req *md.BatchSendGroupMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的群ID
groupIDs = append(groupIDs, utils.Int64ToStr(groupUser.GroupId))
}
@@ -229,7 +229,7 @@ func DealUserMessage(recordID int, req *md.BatchSendUserMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的用户IM ID
userIMIDs = append(userIMIDs, utils.Int64ToStr(customerServiceWithUser.UserIMID))
}
@@ -277,7 +277,7 @@ func DealUserMessage(recordID int, req *md.BatchSendUserMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的群ID
userIMIDs = append(userIMIDs, utils.Int64ToStr(customerServiceWithUser.UserIMID))
}
@@ -335,7 +335,7 @@ func DealUserMessage(recordID int, req *md.BatchSendUserMessageReq) {
Content: req.Content,
}
// 1.2 逐个推送到 mq
ch.Publish(md2.IMEggEnergyExchange, data, md2.IMEggEnergyRoutKeyForBatchSendMessageData)
ch.Publish(md2.IMEggEnergyExchange, utils.SerializeStr(data), md2.IMEggEnergyRoutKeyForBatchSendMessageData)
// 1.3 记录推送的用户IM ID
userIMIDs = append(userIMIDs, utils.Int64ToStr(customerServiceWithUser.UserIMID))
}


+ 1
- 0
app/task/init.go Parādīt failu

@@ -90,4 +90,5 @@ func initTasks() {
jobs[taskMd.CronEggEnergyAutoRecordPrices] = taskEggEnergyAutoRecordPrices
jobs[taskMd.CronEggEnergyDealPlatformRevenueData] = taskEggEnergyDealPlatformRevenueData
jobs[taskMd.CronEggEnergyDealFundData] = taskEggEnergyDealFundData
jobs[taskMd.CronEggEnergyUserEggScore] = taskCronEggEnergyUserEggScore
}

+ 1
- 0
app/task/md/cron_key.go Parādīt failu

@@ -4,4 +4,5 @@ const (
CronEggEnergyAutoRecordPrices = "cron_egg_energy_auto_record_price" // 自动记录价格
CronEggEnergyDealPlatformRevenueData = "cron_egg_energy_deal_platform_revenue_data" // 处理平台收益
CronEggEnergyDealFundData = "cron_egg_energy_deal_fund_data" // 处理价值投入
CronEggEnergyUserEggScore = "cron_egg_energy_user_egg_score" // 处理蛋蛋分
)

+ 2
- 2
app/task/svc/svc_egg_energy_deal_fund_data.go Parādīt failu

@@ -79,9 +79,9 @@ func EggEnergyDealFundData(eg *xorm.Engine) {
amount := totalAmount.Div(times)

// 4、推入rabbitmq 异步处理
ch.Publish(md2.EggEnergyExchange, md2.EggEnergyStructForEggEnergyFundData{
ch.Publish(md2.EggEnergyExchange, utils.SerializeStr(md2.EggEnergyStructForEggEnergyFundData{
ID: data.Id,
Amount: amount.String(),
}, md2.EggEnergyRoutKeyForEggEnergyFundData)
}), md2.EggEnergyRoutKeyForEggEnergyFundData)
}
}

+ 2
- 2
app/task/svc/svc_egg_energy_deal_platform_revenue_data.go Parādīt failu

@@ -79,9 +79,9 @@ func EggEnergyDealPlatformRevenueData(eg *xorm.Engine) {
amount := totalAmount.Div(times)

// 4、推入rabbitmq 异步处理
ch.Publish(md2.EggEnergyExchange, md2.EggEnergyStructForPlatformRevenueData{
ch.Publish(md2.EggEnergyExchange, utils.SerializeStr(md2.EggEnergyStructForPlatformRevenueData{
ID: data.Id,
Amount: amount.String(),
}, md2.EggEnergyRoutKeyForPlatformRevenueData)
}), md2.EggEnergyRoutKeyForPlatformRevenueData)
}
}

+ 19
- 0
app/task/svc/svc_egg_energy_user_egg_score.go Parādīt failu

@@ -0,0 +1,19 @@
package svc

import (
"fmt"
"xorm.io/xorm"
)

// AutoScoreEggEnergyUserEggScore 自动给用户蛋蛋分打分
func AutoScoreEggEnergyUserEggScore(engine *xorm.Engine) {
fmt.Println("auto_score_egg_energy_user_egg_score...")
defer func() {
if err := recover(); err != nil {
fmt.Println(err)
return
}
}()

return
}

+ 23
- 0
app/task/task_egg_energy_user_egg_score.go Parādīt failu

@@ -0,0 +1,23 @@
package task

import (
"applet/app/task/svc"
"math/rand"
"time"
"xorm.io/xorm"
)

// 处理蛋蛋分
func taskCronEggEnergyUserEggScore(eg *xorm.Engine) {
for {
if len(ch) > workerNum {
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000)))
} else {
goto START
}
}
START:
ch <- 1
svc.AutoScoreEggEnergyUserEggScore(eg)
<-ch
}

+ 309
- 6
docs/docs.go Parādīt failu

@@ -1,5 +1,4 @@
// Code generated by swaggo/swag. DO NOT EDIT.

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"
@@ -1438,9 +1437,7 @@ const docTemplate = `{
"name": "req",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
"schema": {}
}
],
"responses": {
@@ -1461,6 +1458,52 @@ const docTemplate = `{
}
},
"/api/financialCenter/withdraw/applyList": {
"post": {
"description": "提现申请列表(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"提现"
],
"summary": "财务中心-提现-提现申请列表(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "筛选条件",
"name": "req",
"in": "body",
"schema": {
"$ref": "#/definitions/md.GetWithdrawApplyListReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetWithdrawApplyListResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/financialCenter/withdraw/audit": {
"post": {
"description": "提现审核",
"consumes": [
@@ -4288,6 +4331,185 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggPointCoefficient/add": {
"post": {
"description": "区间系数(新增 支持批量新增)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(新增)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要新增的内容",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientBatchAddReq"
}
}
],
"responses": {
"200": {
"description": "新增数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggPointCoefficient/del": {
"delete": {
"description": "区间系数(删除)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(删除)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要删除的数据id",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientDelReq"
}
}
],
"responses": {
"200": {
"description": "成功删除数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggPointCoefficient/index": {
"get": {
"description": "区间系数(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientGetResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggPointCoefficient/update": {
"post": {
"description": "区间系数(更新)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(更新)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要更新的数据信息",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientUpdateReq"
}
}
],
"responses": {
"200": {
"description": "成功修改的数据数量",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/moduleSetting/getModuleSetting": {
"get": {
"description": "个性化设置(获取)",
@@ -9360,6 +9582,85 @@ const docTemplate = `{
}
}
},
"md.EggPointCoefficientBatchAddReq": {
"type": "object",
"properties": {
"list": {
"description": "系数管理列表",
"type": "array",
"items": {
"$ref": "#/definitions/md.EggPointCoefficientNode"
}
}
}
},
"md.EggPointCoefficientDelReq": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"description": "需要删除范围的id",
"type": "string"
}
}
},
"md.EggPointCoefficientGetResp": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.EggPointCoefficientNode"
}
}
}
},
"md.EggPointCoefficientNode": {
"type": "object",
"properties": {
"coefficient": {
"description": "系数",
"type": "string"
},
"end_score": {
"description": "截止分值",
"type": "string"
},
"id": {
"type": "integer"
},
"start_score": {
"description": "起始分值",
"type": "string"
}
}
},
"md.EggPointCoefficientUpdateReq": {
"type": "object",
"required": [
"id"
],
"properties": {
"coefficient": {
"description": "系数",
"type": "string"
},
"end_score": {
"description": "截止分值",
"type": "string"
},
"id": {
"description": "需要修改范围的id",
"type": "string"
},
"start_score": {
"description": "起始分值",
"type": "string"
}
}
},
"md.ExchangeRulesStruct": {
"type": "object",
"properties": {
@@ -13002,7 +13303,7 @@ const docTemplate = `{
]
},
"statistics_user_egg_kind_proportion": {
"description": "统计用户蛋蛋分\"评比类型\"占比",
"description": "统计用户蛋蛋分\"评比类型\"占比 (count: 数量、name: 评分类型、proportion: 占比)",
"type": "array",
"items": {
"type": "object",
@@ -14117,6 +14418,8 @@ var SwaggerInfo = &swag.Spec{
Description: "管理后台接口文档",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {


+ 306
- 4
docs/swagger.json Parādīt failu

@@ -1430,9 +1430,7 @@
"name": "req",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
"schema": {}
}
],
"responses": {
@@ -1453,6 +1451,52 @@
}
},
"/api/financialCenter/withdraw/applyList": {
"post": {
"description": "提现申请列表(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"提现"
],
"summary": "财务中心-提现-提现申请列表(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "筛选条件",
"name": "req",
"in": "body",
"schema": {
"$ref": "#/definitions/md.GetWithdrawApplyListReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetWithdrawApplyListResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/financialCenter/withdraw/audit": {
"post": {
"description": "提现审核",
"consumes": [
@@ -4280,6 +4324,185 @@
}
}
},
"/api/institutionalManagement/eggPointCoefficient/add": {
"post": {
"description": "区间系数(新增 支持批量新增)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(新增)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要新增的内容",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientBatchAddReq"
}
}
],
"responses": {
"200": {
"description": "新增数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggPointCoefficient/del": {
"delete": {
"description": "区间系数(删除)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(删除)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要删除的数据id",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientDelReq"
}
}
],
"responses": {
"200": {
"description": "成功删除数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggPointCoefficient/index": {
"get": {
"description": "区间系数(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientGetResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggPointCoefficient/update": {
"post": {
"description": "区间系数(更新)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋分区间系数管理"
],
"summary": "制度中心-蛋蛋分区间系数管理-区间系数(更新)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要更新的数据信息",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.EggPointCoefficientUpdateReq"
}
}
],
"responses": {
"200": {
"description": "成功修改的数据数量",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/moduleSetting/getModuleSetting": {
"get": {
"description": "个性化设置(获取)",
@@ -9352,6 +9575,85 @@
}
}
},
"md.EggPointCoefficientBatchAddReq": {
"type": "object",
"properties": {
"list": {
"description": "系数管理列表",
"type": "array",
"items": {
"$ref": "#/definitions/md.EggPointCoefficientNode"
}
}
}
},
"md.EggPointCoefficientDelReq": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"description": "需要删除范围的id",
"type": "string"
}
}
},
"md.EggPointCoefficientGetResp": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.EggPointCoefficientNode"
}
}
}
},
"md.EggPointCoefficientNode": {
"type": "object",
"properties": {
"coefficient": {
"description": "系数",
"type": "string"
},
"end_score": {
"description": "截止分值",
"type": "string"
},
"id": {
"type": "integer"
},
"start_score": {
"description": "起始分值",
"type": "string"
}
}
},
"md.EggPointCoefficientUpdateReq": {
"type": "object",
"required": [
"id"
],
"properties": {
"coefficient": {
"description": "系数",
"type": "string"
},
"end_score": {
"description": "截止分值",
"type": "string"
},
"id": {
"description": "需要修改范围的id",
"type": "string"
},
"start_score": {
"description": "起始分值",
"type": "string"
}
}
},
"md.ExchangeRulesStruct": {
"type": "object",
"properties": {
@@ -12994,7 +13296,7 @@
]
},
"statistics_user_egg_kind_proportion": {
"description": "统计用户蛋蛋分\"评比类型\"占比",
"description": "统计用户蛋蛋分\"评比类型\"占比 (count: 数量、name: 评分类型、proportion: 占比)",
"type": "array",
"items": {
"type": "object",


+ 204
- 3
docs/swagger.yaml Parādīt failu

@@ -1435,6 +1435,60 @@ definitions:
description: 视频
type: string
type: object
md.EggPointCoefficientBatchAddReq:
properties:
list:
description: 系数管理列表
items:
$ref: '#/definitions/md.EggPointCoefficientNode'
type: array
type: object
md.EggPointCoefficientDelReq:
properties:
id:
description: 需要删除范围的id
type: string
required:
- id
type: object
md.EggPointCoefficientGetResp:
properties:
list:
items:
$ref: '#/definitions/md.EggPointCoefficientNode'
type: array
type: object
md.EggPointCoefficientNode:
properties:
coefficient:
description: 系数
type: string
end_score:
description: 截止分值
type: string
id:
type: integer
start_score:
description: 起始分值
type: string
type: object
md.EggPointCoefficientUpdateReq:
properties:
coefficient:
description: 系数
type: string
end_score:
description: 截止分值
type: string
id:
description: 需要修改范围的id
type: string
start_score:
description: 起始分值
type: string
required:
- id
type: object
md.ExchangeRulesStruct:
properties:
auto_exchange_nums_by_person:
@@ -3967,7 +4021,7 @@ definitions:
- $ref: '#/definitions/model.EggEnergyUserEggIndexWeight'
description: 蛋蛋分系数权重
statistics_user_egg_kind_proportion:
description: 统计用户蛋蛋分"评比类型"占比
description: '统计用户蛋蛋分"评比类型"占比 (count: 数量、name: 评分类型、proportion: 占比)'
items:
additionalProperties: true
type: object
@@ -5661,8 +5715,7 @@ paths:
in: body
name: req
required: true
schema:
type: object
schema: {}
produces:
- application/json
responses:
@@ -5679,6 +5732,36 @@ paths:
tags:
- Demo
/api/financialCenter/withdraw/applyList:
post:
consumes:
- application/json
description: 提现申请列表(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 筛选条件
in: body
name: req
schema:
$ref: '#/definitions/md.GetWithdrawApplyListReq'
produces:
- application/json
responses:
"200":
description: 具体数据
schema:
$ref: '#/definitions/md.GetWithdrawApplyListResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 财务中心-提现-提现申请列表(获取)
tags:
- 提现
/api/financialCenter/withdraw/audit:
post:
consumes:
- application/json
@@ -7544,6 +7627,124 @@ paths:
summary: 制度中心-绿色能量持有者明细-蛋蛋积分流水明细(查询)
tags:
- 公排管理
/api/institutionalManagement/eggPointCoefficient/add:
post:
consumes:
- application/json
description: 区间系数(新增 支持批量新增)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 需要新增的内容
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.EggPointCoefficientBatchAddReq'
produces:
- application/json
responses:
"200":
description: 新增数据条数
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋分区间系数管理-区间系数(新增)
tags:
- 蛋蛋分区间系数管理
/api/institutionalManagement/eggPointCoefficient/del:
delete:
consumes:
- application/json
description: 区间系数(删除)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 需要删除的数据id
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.EggPointCoefficientDelReq'
produces:
- application/json
responses:
"200":
description: 成功删除数据条数
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋分区间系数管理-区间系数(删除)
tags:
- 蛋蛋分区间系数管理
/api/institutionalManagement/eggPointCoefficient/index:
get:
consumes:
- application/json
description: 区间系数(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/md.EggPointCoefficientGetResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋分区间系数管理-区间系数(获取)
tags:
- 蛋蛋分区间系数管理
/api/institutionalManagement/eggPointCoefficient/update:
post:
consumes:
- application/json
description: 区间系数(更新)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 需要更新的数据信息
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.EggPointCoefficientUpdateReq'
produces:
- application/json
responses:
"200":
description: 成功修改的数据数量
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋分区间系数管理-区间系数(更新)
tags:
- 蛋蛋分区间系数管理
/api/institutionalManagement/moduleSetting/getModuleSetting:
get:
consumes:


+ 9
- 1
etc/cfg.yml Parādīt failu

@@ -60,4 +60,12 @@ mq:
es:
url: 'http://120.55.48.175:9200'
user: 'elastic'
pwd: 'fnuo123'
pwd: 'fnuo123'

im_business_rpc:
url: im-rpc-business.izhim.com
port: 1005

im_logic_rpc:
url: im-rpc-logic.izhim.com
port: 1008

+ 1
- 1
go.mod Parādīt failu

@@ -33,7 +33,7 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241205055206-f02789cb9cac
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241205041102-0e106357c399
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241203080408-75cfef2c6334
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5


Notiek ielāde…
Atcelt
Saglabāt