Selaa lähdekoodia

add 查询分红列表、社区长

master
shenjiachi 1 viikko sitten
vanhempi
commit
ab83c66c87
7 muutettua tiedostoa jossa 800 lisäystä ja 30 poistoa
  1. +146
    -3
      app/hdl/institutional_management/public_platoon/hdl_basic.go
  2. +45
    -0
      app/md/institutional_management/public_platoon/md_public_platoon.go
  3. +4
    -2
      app/router/router.go
  4. +224
    -8
      docs/docs.go
  5. +224
    -8
      docs/swagger.json
  6. +154
    -8
      docs/swagger.yaml
  7. +3
    -1
      go.mod

+ 146
- 3
app/hdl/institutional_management/public_platoon/hdl_basic.go Näytä tiedosto

@@ -470,6 +470,53 @@ func AddFreePublishUser(c *gin.Context) {
e.OutSuc(c, id, nil)
}

// ListCommunityDividends
// @Summary 制度中心-公排管理-社区分红(查询)
// @Tags 公排管理
// @Description 社区分红(查询)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.ListCommunityDividendsReq true "页数、每页大小必填 起止时间、起止数量选填"
// @Success 200 {object} md.ListCommunityDividendsResp "具体数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList [post]
func ListCommunityDividends(c *gin.Context) {
var req *md.ListCommunityDividendsReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}
dividendsDb := implement.NewEggEnergyCommunityDividendsDb(db.Db)
dividends, total, err2 := dividendsDb.EggEnergyCommunityDividendsFindAndCount(req.Page, req.Limit, req.StartAt, req.EndAt, req.StartNums, req.EndNums)
if err2 != nil {
e.OutErr(c, e.ERR_DB_ORM, err2.Error())
return
}
list := make([]md.EggEnergyCommunityDividends, len(dividends))
for i, dividend := range dividends {
list[i] = md.EggEnergyCommunityDividends{
Id: dividend.Id,
Nums: dividend.Nums,
Name: dividend.Name,
CoinId: dividend.CoinId,
PersonsNum: dividend.PersonsNum,
IsOver: dividend.IsOver,
CreateAt: dividend.CreateAt,
UpdateAt: dividend.UpdateAt,
}
}
resp := md.ListCommunityDividendsResp{
List: list,
Paginate: md.Paginate{
Limit: req.Limit,
Page: req.Page,
Total: total,
},
}
e.OutSuc(c, resp, nil)
}

// AddCommunityDividends
// @Summary 制度中心-公排管理-社区分红(新增)
// @Tags 公排管理
@@ -491,6 +538,7 @@ func AddCommunityDividends(c *gin.Context) {
now := time.Now()
var m model.EggEnergyCommunityDividends
m = model.EggEnergyCommunityDividends{
Nums: req.Nums,
Name: req.Name,
CoinId: 0,
PersonsNum: 0,
@@ -507,6 +555,91 @@ func AddCommunityDividends(c *gin.Context) {
e.OutSuc(c, id, nil)
}

// ListCommunityDividendsWithUser
// @Summary 制度中心-公排管理-社区长列表(查询)
// @Tags 公排管理
// @Description 社区长列表(查询)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.ListCommunityDividendsWithUserReq true "页数、每页大小必填 手机号、用户ID选填"
// @Success 200 {object} md.ListCommunityDividendsWithUserResp "社区长列表"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList [post]
func ListCommunityDividendsWithUser(c *gin.Context) {
var req *md.ListCommunityDividendsWithUserReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}

var uid int64
if req.Phone != "" {
userDb := implement.NewUserDb(db.Db)
user, err := userDb.UserGetOneByParams(map[string]interface{}{
"key": "phone",
"value": req.Phone,
})
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
uid = user.Id
}
if req.Uid != 0 {
uid = req.Uid
}

dividendsWithUserDb := implement.NewEggEnergyCommunityDividendsWithUserDb(db.Db)
dividendsWithUserList, total, err := dividendsWithUserDb.EggEnergyCommunityDividendsWithUserFindAndCount(req.Page, req.Limit, uid)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}

list := make([]md.EggEnergyCommunityDividendsWithUser, len(dividendsWithUserList))
if len(dividendsWithUserList) > 0 {
uids := make([]int64, len(dividendsWithUserList))
for i, user := range dividendsWithUserList {
uids[i] = user.Uid
}
userDb := implement.NewUserDb(db.Db)
users, err := userDb.UserFindByParams(map[string]interface{}{
"key": "id",
"value": uids,
})
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
userMap := make(map[int64]model.User)
for _, user := range users {
userMap[user.Id] = user
}

for i, user := range dividendsWithUserList {
list[i] = md.EggEnergyCommunityDividendsWithUser{
Id: user.Id,
Uid: user.Uid,
Memo: user.Memo,
Phone: userMap[user.Uid].Phone,
Nickname: userMap[user.Uid].Nickname,
}
}
}

resp := md.ListCommunityDividendsWithUserResp{
List: list,
Paginate: md.Paginate{
Limit: req.Limit,
Page: req.Page,
Total: total,
},
}

e.OutSuc(c, resp, nil)
}

// AddCommunityDividendsWithUser
// @Summary 制度中心-公排管理-社区长列表(新增)
// @Tags 公排管理
@@ -525,6 +658,17 @@ func AddCommunityDividendsWithUser(c *gin.Context) {
return
}

communityDividendsWithUserDb := implement.NewEggEnergyCommunityDividendsWithUserDb(db.Db)
exist, err := communityDividendsWithUserDb.EggEnergyCommunityDividendsWithUserExist(req.Uid)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
if exist {
e.OutErr(c, e.ERR_BAD_REQUEST, "请勿重复添加")
return
}

now := time.Now()
var m model.EggEnergyCommunityDividendsWithUser
m = model.EggEnergyCommunityDividendsWithUser{
@@ -534,7 +678,6 @@ func AddCommunityDividendsWithUser(c *gin.Context) {
UpdateAt: now.Format("2006-01-02 15:04:05"),
}

communityDividendsWithUserDb := implement.NewEggEnergyCommunityDividendsWithUserDb(db.Db)
id, err := communityDividendsWithUserDb.EggEnergyCommunityDividendsWithUserInsert(&m)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
@@ -567,8 +710,8 @@ func UserDailyActivityAnalysis(c *gin.Context) {
return
}

sql1 := "SELECT COUNT(*) AS total, uid FROM `egg_energy_user_activity` WHERE uid IN (SELECT uid FROM `user_relate` WHERE parent_uid = ?) GROUP BY uid"
results, err := db.Db.QueryString(sql1, req.Uid)
sql1 := "SELECT COUNT(*) AS total, uid FROM `egg_energy_user_activity` WHERE uid IN (SELECT uid FROM `user_relate` WHERE parent_uid = ?) AND date > ? AND date < ? GROUP BY uid"
results, err := db.Db.QueryString(sql1, req.Uid, req.StartDate, req.EndDate)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return


+ 45
- 0
app/md/institutional_management/public_platoon/md_public_platoon.go Näytä tiedosto

@@ -91,11 +91,56 @@ type AddFreePublishUserReq struct {
Uid int64 `json:"uid"`
}

type ListCommunityDividendsReq struct {
Page int `json:"page,required"` // 页数
Limit int `json:"limit,required"` // 每页大小
StartAt string `json:"start_at"` // 开始时间
EndAt string `json:"end_at"` // 结束时间
StartNums int64 `json:"start_nums"` // 分红总量下限
EndNums int64 `json:"end_nums"` // 分红总量上限
}

type EggEnergyCommunityDividends struct {
Id int `json:"id"`
Nums int `json:"nums"` // 分红数量
Name string `json:"name" example:"名称"`
CoinId int `json:"coin_id"` // 虚拟币 id
PersonsNum int `json:"persons_num"` // 分红人数
IsOver int `json:"is_over"` // 是否分红完毕
CreateAt string `json:"create_at"` // 分红时间
UpdateAt string `json:"update_at"`
}

type ListCommunityDividendsResp struct {
List []EggEnergyCommunityDividends `json:"list"`
Paginate Paginate `json:"paginate"`
}

type AddCommunityDividendsReq struct {
Name string `json:"name,required" example:"社区分红名称"`
Nums int `json:"nums,required"` // 社区分红数量
}

type ListCommunityDividendsWithUserReq struct {
Page int `json:"page,required"`
Limit int `json:"limit,required"`
Phone string `json:"phone"`
Uid int64 `json:"uid"`
}

type EggEnergyCommunityDividendsWithUser struct {
Id int `json:"id"`
Uid int64 `json:"uid"`
Memo string `json:"memo" example:"备注"`
Nickname string `json:"nickname"`
Phone string `json:"phone"`
}

type ListCommunityDividendsWithUserResp struct {
List []EggEnergyCommunityDividendsWithUser `json:"list"`
Paginate Paginate `json:"paginate"`
}

type AddCommunityDividendsWithUserReq struct {
Uid int64 `json:"uid,required"` // 新增社区长用户 ID
Memo string `json:"memo" example:"备注"`


+ 4
- 2
app/router/router.go Näytä tiedosto

@@ -51,9 +51,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"))
}

@@ -73,7 +73,9 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
}
rCommunityDividends := rPublicPlatoon.Group("/communityDividends")
{
rCommunityDividends.POST("/communityDividendsList", public_platoon.ListCommunityDividends)
rCommunityDividends.POST("/communityDividendsAdd", public_platoon.AddCommunityDividends)
rCommunityDividends.POST("/communityDividendsWithUserList", public_platoon.ListCommunityDividendsWithUser)
rCommunityDividends.POST("/communityDividendsWithUserAdd", public_platoon.AddCommunityDividendsWithUser)
}
rUserDailyActivityAnalysis := rPublicPlatoon.Group("/userDailyActivityAnalysis")


+ 224
- 8
docs/docs.go Näytä tiedosto

@@ -63,7 +63,7 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/activePointsUserCoinFlowList": {
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList": {
"post": {
"description": "活跃积分持有流水(查询)",
"consumes": [
@@ -110,7 +110,7 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/activePointsUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList": {
"post": {
"description": "活跃积分持有(获取)",
"consumes": [
@@ -156,7 +156,7 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/greenEnergyUserCoinFlowList": {
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList": {
"post": {
"description": "绿色能量持有流水(查询)",
"consumes": [
@@ -203,7 +203,7 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/greenEnergyUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList": {
"post": {
"description": "绿色能量(获取)",
"consumes": [
@@ -296,6 +296,53 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList": {
"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.ListCommunityDividendsReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.ListCommunityDividendsResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserAdd": {
"post": {
"description": "社区长列表(新增)",
@@ -343,6 +390,53 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": {
"post": {
"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.ListCommunityDividendsWithUserReq"
}
}
],
"responses": {
"200": {
"description": "社区长列表",
"schema": {
"$ref": "#/definitions/md.ListCommunityDividendsWithUserResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/publicPlatoon/exchangeUserPosition": {
"post": {
"description": "关系分布图(位置转换)",
@@ -942,14 +1036,59 @@ const docTemplate = `{
}
}
},
"md.DirectionMap": {
"md.EggEnergyCommunityDividends": {
"type": "object",
"properties": {
"key": {
"coin_id": {
"description": "虚拟币 id",
"type": "integer"
},
"create_at": {
"description": "分红时间",
"type": "string"
},
"value": {
"id": {
"type": "integer"
},
"is_over": {
"description": "是否分红完毕",
"type": "integer"
},
"name": {
"type": "string",
"example": "名称"
},
"nums": {
"description": "分红数量",
"type": "integer"
},
"persons_num": {
"description": "分红人数",
"type": "integer"
},
"update_at": {
"type": "string"
}
}
},
"md.EggEnergyCommunityDividendsWithUser": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"memo": {
"type": "string",
"example": "备注"
},
"nickname": {
"type": "string"
},
"phone": {
"type": "string"
},
"uid": {
"type": "integer"
}
}
},
@@ -1327,6 +1466,80 @@ const docTemplate = `{
}
}
},
"md.ListCommunityDividendsReq": {
"type": "object",
"properties": {
"end_at": {
"description": "结束时间",
"type": "string"
},
"end_nums": {
"description": "分红总量上限",
"type": "integer"
},
"limit": {
"description": "每页大小",
"type": "integer"
},
"page": {
"description": "页数",
"type": "integer"
},
"start_at": {
"description": "开始时间",
"type": "string"
},
"start_nums": {
"description": "分红总量下限",
"type": "integer"
}
}
},
"md.ListCommunityDividendsResp": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.EggEnergyCommunityDividends"
}
},
"paginate": {
"$ref": "#/definitions/applet_app_md_institutional_management_public_platoon.Paginate"
}
}
},
"md.ListCommunityDividendsWithUserReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"page": {
"type": "integer"
},
"phone": {
"type": "string"
},
"uid": {
"type": "integer"
}
}
},
"md.ListCommunityDividendsWithUserResp": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.EggEnergyCommunityDividendsWithUser"
}
},
"paginate": {
"$ref": "#/definitions/applet_app_md_institutional_management_public_platoon.Paginate"
}
}
},
"md.LoginReq": {
"type": "object",
"required": [
@@ -1378,7 +1591,10 @@ const docTemplate = `{
"direction": {
"type": "array",
"items": {
"$ref": "#/definitions/md.DirectionMap"
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}


+ 224
- 8
docs/swagger.json Näytä tiedosto

@@ -56,7 +56,7 @@
}
}
},
"/api/institutionalManagement/eggEnergy/activePointsUserCoinFlowList": {
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList": {
"post": {
"description": "活跃积分持有流水(查询)",
"consumes": [
@@ -103,7 +103,7 @@
}
}
},
"/api/institutionalManagement/eggEnergy/activePointsUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList": {
"post": {
"description": "活跃积分持有(获取)",
"consumes": [
@@ -149,7 +149,7 @@
}
}
},
"/api/institutionalManagement/eggEnergy/greenEnergyUserCoinFlowList": {
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList": {
"post": {
"description": "绿色能量持有流水(查询)",
"consumes": [
@@ -196,7 +196,7 @@
}
}
},
"/api/institutionalManagement/eggEnergy/greenEnergyUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList": {
"post": {
"description": "绿色能量(获取)",
"consumes": [
@@ -289,6 +289,53 @@
}
}
},
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList": {
"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.ListCommunityDividendsReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.ListCommunityDividendsResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserAdd": {
"post": {
"description": "社区长列表(新增)",
@@ -336,6 +383,53 @@
}
}
},
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": {
"post": {
"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.ListCommunityDividendsWithUserReq"
}
}
],
"responses": {
"200": {
"description": "社区长列表",
"schema": {
"$ref": "#/definitions/md.ListCommunityDividendsWithUserResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/publicPlatoon/exchangeUserPosition": {
"post": {
"description": "关系分布图(位置转换)",
@@ -935,14 +1029,59 @@
}
}
},
"md.DirectionMap": {
"md.EggEnergyCommunityDividends": {
"type": "object",
"properties": {
"key": {
"coin_id": {
"description": "虚拟币 id",
"type": "integer"
},
"create_at": {
"description": "分红时间",
"type": "string"
},
"value": {
"id": {
"type": "integer"
},
"is_over": {
"description": "是否分红完毕",
"type": "integer"
},
"name": {
"type": "string",
"example": "名称"
},
"nums": {
"description": "分红数量",
"type": "integer"
},
"persons_num": {
"description": "分红人数",
"type": "integer"
},
"update_at": {
"type": "string"
}
}
},
"md.EggEnergyCommunityDividendsWithUser": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"memo": {
"type": "string",
"example": "备注"
},
"nickname": {
"type": "string"
},
"phone": {
"type": "string"
},
"uid": {
"type": "integer"
}
}
},
@@ -1320,6 +1459,80 @@
}
}
},
"md.ListCommunityDividendsReq": {
"type": "object",
"properties": {
"end_at": {
"description": "结束时间",
"type": "string"
},
"end_nums": {
"description": "分红总量上限",
"type": "integer"
},
"limit": {
"description": "每页大小",
"type": "integer"
},
"page": {
"description": "页数",
"type": "integer"
},
"start_at": {
"description": "开始时间",
"type": "string"
},
"start_nums": {
"description": "分红总量下限",
"type": "integer"
}
}
},
"md.ListCommunityDividendsResp": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.EggEnergyCommunityDividends"
}
},
"paginate": {
"$ref": "#/definitions/applet_app_md_institutional_management_public_platoon.Paginate"
}
}
},
"md.ListCommunityDividendsWithUserReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"page": {
"type": "integer"
},
"phone": {
"type": "string"
},
"uid": {
"type": "integer"
}
}
},
"md.ListCommunityDividendsWithUserResp": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.EggEnergyCommunityDividendsWithUser"
}
},
"paginate": {
"$ref": "#/definitions/applet_app_md_institutional_management_public_platoon.Paginate"
}
}
},
"md.LoginReq": {
"type": "object",
"required": [
@@ -1371,7 +1584,10 @@
"direction": {
"type": "array",
"items": {
"$ref": "#/definitions/md.DirectionMap"
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}


+ 154
- 8
docs/swagger.yaml Näytä tiedosto

@@ -99,13 +99,45 @@ definitions:
description: 团队人数
type: integer
type: object
md.DirectionMap:
md.EggEnergyCommunityDividends:
properties:
key:
coin_id:
description: 虚拟币 id
type: integer
create_at:
description: 分红时间
type: string
value:
id:
type: integer
is_over:
description: 是否分红完毕
type: integer
name:
example: 名称
type: string
nums:
description: 分红数量
type: integer
persons_num:
description: 分红人数
type: integer
update_at:
type: string
type: object
md.EggEnergyCommunityDividendsWithUser:
properties:
id:
type: integer
memo:
example: 备注
type: string
nickname:
type: string
phone:
type: string
uid:
type: integer
type: object
md.ExchangeUserPositionReq:
properties:
position_1:
@@ -360,6 +392,56 @@ definitions:
description: xx天未活跃,处罚滑落
type: integer
type: object
md.ListCommunityDividendsReq:
properties:
end_at:
description: 结束时间
type: string
end_nums:
description: 分红总量上限
type: integer
limit:
description: 每页大小
type: integer
page:
description: 页数
type: integer
start_at:
description: 开始时间
type: string
start_nums:
description: 分红总量下限
type: integer
type: object
md.ListCommunityDividendsResp:
properties:
list:
items:
$ref: '#/definitions/md.EggEnergyCommunityDividends'
type: array
paginate:
$ref: '#/definitions/applet_app_md_institutional_management_public_platoon.Paginate'
type: object
md.ListCommunityDividendsWithUserReq:
properties:
limit:
type: integer
page:
type: integer
phone:
type: string
uid:
type: integer
type: object
md.ListCommunityDividendsWithUserResp:
properties:
list:
items:
$ref: '#/definitions/md.EggEnergyCommunityDividendsWithUser'
type: array
paginate:
$ref: '#/definitions/applet_app_md_institutional_management_public_platoon.Paginate'
type: object
md.LoginReq:
properties:
code:
@@ -395,7 +477,9 @@ definitions:
properties:
direction:
items:
$ref: '#/definitions/md.DirectionMap'
additionalProperties:
type: string
type: object
type: array
type: object
md.SonUserDailyActivityAnalysisNode:
@@ -606,7 +690,7 @@ paths:
summary: Demo测试
tags:
- Demo
/api/institutionalManagement/eggEnergy/activePointsUserCoinFlowList:
/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList:
post:
consumes:
- application/json
@@ -637,7 +721,7 @@ paths:
summary: 制度中心-活跃积分持有者明细-活跃积分持有流水(查询)
tags:
- 公排管理
/api/institutionalManagement/eggEnergy/activePointsUserCoinList:
/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList:
post:
consumes:
- application/json
@@ -667,7 +751,7 @@ paths:
summary: 制度中心-活跃积分持有者明细-活跃积分持有(获取)
tags:
- 公排管理
/api/institutionalManagement/eggEnergy/greenEnergyUserCoinFlowList:
/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList:
post:
consumes:
- application/json
@@ -698,7 +782,7 @@ paths:
summary: 制度中心-绿色能量持有者明细-绿色能量持有流水(查询)
tags:
- 公排管理
/api/institutionalManagement/eggEnergy/greenEnergyUserCoinList:
/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList:
post:
consumes:
- application/json
@@ -759,6 +843,37 @@ paths:
summary: 制度中心-公排管理-社区分红(新增)
tags:
- 公排管理
/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList:
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.ListCommunityDividendsReq'
produces:
- application/json
responses:
"200":
description: 具体数据
schema:
$ref: '#/definitions/md.ListCommunityDividendsResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-公排管理-社区分红(查询)
tags:
- 公排管理
/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserAdd:
post:
consumes:
@@ -790,6 +905,37 @@ paths:
summary: 制度中心-公排管理-社区长列表(新增)
tags:
- 公排管理
/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList:
post:
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.ListCommunityDividendsWithUserReq'
produces:
- application/json
responses:
"200":
description: 社区长列表
schema:
$ref: '#/definitions/md.ListCommunityDividendsWithUserResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-公排管理-社区长列表(查询)
tags:
- 公排管理
/api/institutionalManagement/publicPlatoon/exchangeUserPosition:
post:
consumes:


+ 3
- 1
go.mod Näytä tiedosto

@@ -4,6 +4,8 @@ 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

require (
github.com/boombuler/barcode v1.0.1
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5
@@ -33,6 +35,7 @@ require (

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241112032738-ca9b07ba7b24
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.2
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
github.com/go-sql-driver/mysql v1.8.1
github.com/gocolly/colly v1.2.0
@@ -40,7 +43,6 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.2 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect


Ladataan…
Peruuta
Tallenna