@@ -68,7 +68,7 @@ func GetEggEnergyUserCoinList(c *gin.Context) { | |||||
e.OutErr(c, e.ERR_DB_ORM, err3.Error()) | e.OutErr(c, e.ERR_DB_ORM, err3.Error()) | ||||
return | return | ||||
} | } | ||||
activePointsWalletList := make([]md.ActivePointsWalletNode, len(wallets)) | |||||
activePointsWalletList := make([]md.ActivePointsWalletNode, 0, len(wallets)) | |||||
userDb := implement.NewUserDb(db.Db) | userDb := implement.NewUserDb(db.Db) | ||||
userIDs := make([]int64, len(wallets)) | userIDs := make([]int64, len(wallets)) | ||||
for i, wallet := range wallets { | for i, wallet := range wallets { | ||||
@@ -236,7 +236,7 @@ func GetEggPointsUserCoinList(c *gin.Context) { | |||||
e.OutErr(c, e.ERR_DB_ORM, err3.Error()) | e.OutErr(c, e.ERR_DB_ORM, err3.Error()) | ||||
return | return | ||||
} | } | ||||
activePointsWalletList := make([]md.ActivePointsWalletNode, len(wallets)) | |||||
activePointsWalletList := make([]md.ActivePointsWalletNode, 0, len(wallets)) | |||||
userDb := implement.NewUserDb(db.Db) | userDb := implement.NewUserDb(db.Db) | ||||
userIDs := make([]int64, len(wallets)) | userIDs := make([]int64, len(wallets)) | ||||
for i, wallet := range wallets { | for i, wallet := range wallets { | ||||
@@ -800,6 +800,27 @@ func AddCommunityDividendsWithUser(c *gin.Context) { | |||||
e.OutSuc(c, id, nil) | e.OutSuc(c, id, nil) | ||||
} | } | ||||
// DelCommunityDividendsWithUser | |||||
// @Summary 制度中心-公排管理-社区长列表(删除) | |||||
// @Tags 公排管理 | |||||
// @Description 社区长列表(删除) | |||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||||
// @Accept json | |||||
// @Produce json | |||||
// @Success 200 {int} "删除数据数量" | |||||
// @Failure 400 {object} md.Response "具体错误" | |||||
// @Router /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserDel/{$id} [DELETE] | |||||
func DelCommunityDividendsWithUser(c *gin.Context) { | |||||
id := c.Param("id") | |||||
dividendsWithUserDb := implement.NewEggEnergyCommunityDividendsWithUserDb(db.Db) | |||||
affected, err := dividendsWithUserDb.EggEnergyCommunityDividendsWithUserDel(id) | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
e.OutSuc(c, affected, nil) | |||||
} | |||||
// UserDailyActivityAnalysis | // UserDailyActivityAnalysis | ||||
// @Summary 制度中心-公排管理-日活分析 | // @Summary 制度中心-公排管理-日活分析 | ||||
// @Tags 公排管理 | // @Tags 公排管理 | ||||
@@ -235,6 +235,7 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理 | |||||
rCommunityDividends.POST("/communityDividendsAdd", public_platoon.AddCommunityDividends) | rCommunityDividends.POST("/communityDividendsAdd", public_platoon.AddCommunityDividends) | ||||
rCommunityDividends.POST("/communityDividendsWithUserList", public_platoon.ListCommunityDividendsWithUser) | rCommunityDividends.POST("/communityDividendsWithUserList", public_platoon.ListCommunityDividendsWithUser) | ||||
rCommunityDividends.POST("/communityDividendsWithUserAdd", public_platoon.AddCommunityDividendsWithUser) | rCommunityDividends.POST("/communityDividendsWithUserAdd", public_platoon.AddCommunityDividendsWithUser) | ||||
rCommunityDividends.DELETE("/communityDividendsWithUserDel/:id", public_platoon.DelCommunityDividendsWithUser) | |||||
} | } | ||||
rUserDailyActivityAnalysis := rPublicPlatoon.Group("/userDailyActivityAnalysis") | rUserDailyActivityAnalysis := rPublicPlatoon.Group("/userDailyActivityAnalysis") | ||||
{ | { | ||||
@@ -2,7 +2,7 @@ module applet | |||||
go 1.19 | go 1.19 | ||||
// replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models | |||||
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_system_rules.git => E:/company/Egg/egg_system_rules | ||||