Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-group
Commits
78f1d2f0
Commit
78f1d2f0
authored
May 01, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/family_month_rank' into 'master'
Fix/family month rank See merge request
!32
parents
11e151e3
69f225f6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
group_power_month_act.go
cron/group_cron/group_power_month_act.go
+1
-1
group_power.go
domain/service/group_power_s/group_power.go
+4
-6
No files found.
cron/group_cron/group_power_month_act.go
View file @
78f1d2f0
...
@@ -23,7 +23,7 @@ func GroupPowerMonthRankAct() {
...
@@ -23,7 +23,7 @@ func GroupPowerMonthRankAct() {
func
BufaGroupPowerMonthRankAct
()
{
func
BufaGroupPowerMonthRankAct
()
{
c
:=
cron
.
New
()
c
:=
cron
.
New
()
spec
:=
"0
4
15 1 * ?"
spec
:=
"0
28
15 1 * ?"
_
=
c
.
AddFunc
(
spec
,
func
()
{
_
=
c
.
AddFunc
(
spec
,
func
()
{
var
model
=
domain
.
CreateModelNil
()
var
model
=
domain
.
CreateModelNil
()
if
err
:=
group_power_s
.
BufaCalcGroupPowerMonthRankAct
(
model
);
err
!=
nil
{
if
err
:=
group_power_s
.
BufaCalcGroupPowerMonthRankAct
(
model
);
err
!=
nil
{
...
...
domain/service/group_power_s/group_power.go
View file @
78f1d2f0
...
@@ -255,7 +255,7 @@ func DoCalcGroupPowerMonthRankAct(model *domain.Model, calcMonth, beginDate, end
...
@@ -255,7 +255,7 @@ func DoCalcGroupPowerMonthRankAct(model *domain.Model, calcMonth, beginDate, end
}
}
func
BufaDoCalcGroupPowerMonthRankAct
(
model
*
domain
.
Model
,
calcMonth
,
beginDate
,
endDate
,
starDate
string
)
error
{
func
BufaDoCalcGroupPowerMonthRankAct
(
model
*
domain
.
Model
,
calcMonth
,
beginDate
,
endDate
,
starDate
string
)
error
{
areaList
:=
[]
int
{
1
,
2
}
areaList
:=
[]
int
{
2
}
for
_
,
area
:=
range
areaList
{
// 计算获奖
for
_
,
area
:=
range
areaList
{
// 计算获奖
model
:=
domain
.
CreateModelContext
(
model
.
MyContext
)
model
:=
domain
.
CreateModelContext
(
model
.
MyContext
)
response
,
err
:=
GetGroupPowerRankResp
(
model
,
beginDate
,
endDate
,
0
,
groupPower_e
.
GroupPowerUserHas
,
area
)
response
,
err
:=
GetGroupPowerRankResp
(
model
,
beginDate
,
endDate
,
0
,
groupPower_e
.
GroupPowerUserHas
,
area
)
...
@@ -276,12 +276,10 @@ func BufaDoCalcGroupPowerMonthRankAct(model *domain.Model, calcMonth, beginDate,
...
@@ -276,12 +276,10 @@ func BufaDoCalcGroupPowerMonthRankAct(model *domain.Model, calcMonth, beginDate,
return
err
return
err
}
}
//if area ==
1
{
//if area ==
2
{
// for _, v := range logList {
// for _, v := range logList {
// if v.RankUser == 1 {
// model.Log.Infof("bufajiangli award:%+v", v)
// model.Log.Infof("bufajiangli award:%+v", v)
// }
// }
// }
//}
//}
err
=
model
.
Transaction
(
func
(
model
*
domain
.
Model
)
error
{
err
=
model
.
Transaction
(
func
(
model
*
domain
.
Model
)
error
{
...
@@ -454,7 +452,7 @@ func bufaGetAwardAndLogList(model *domain.Model, powerIds []uint64, items []grou
...
@@ -454,7 +452,7 @@ func bufaGetAwardAndLogList(model *domain.Model, powerIds []uint64, items []grou
// HeaddressDuration: oAward.HeaddressDay})
// HeaddressDuration: oAward.HeaddressDay})
// 家族成员奖励
// 家族成员奖励
for
i
,
m
:=
range
v
.
StarList
{
for
i
,
m
:=
range
v
.
StarList
{
if
m
.
User
.
Id
==
5343751
||
m
.
User
.
Id
==
1180791
{
if
m
.
User
.
Code
==
"1217599"
||
m
.
User
.
Id
==
1180791
{
continue
continue
}
}
uRank
:=
i
+
1
uRank
:=
i
+
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment