作者 tangxvhui
... ... @@ -104,11 +104,12 @@ func (rs *NodeTaskService) SendEvaluationNode() error {
task.NextSentAt = &nextTime
}
// 周期的截至时间=下一个周期的开始时间-1秒
// 周期的截至时间=下一个周期的开始时间-1秒(需求方要求提交数据时间延长到第二天8点30分截止)
if task.NextSentAt == nil {
cycleTimeEnd = maxTime
} else {
cycleTimeEnd = task.NextSentAt.Local().Add(-1 * time.Second)
//cycleTimeEnd = task.NextSentAt.Local().Add(-1 * time.Second) // 周期截至时间=下一个周期起始时间-1秒
cycleTimeEnd = task.NextSentAt.Local().Add(8*time.Hour + 30*time.Minute) // 注.延长8.5小时
}
// 格式化周期的起始和截止时间
... ...
... ... @@ -6,8 +6,8 @@ import "github.com/beego/beego/v2/core/validation"
type UserRoleQueryCommand struct {
CompanyId int64 `cname:"公司ID" json:"companyId"`
RoleId int64 `cname:"角色ID" json:"roleId,string" valid:"Required"`
PageNumber int64 `cname:"分页页码" json:"pageNumber"`
PageSize int64 `cname:"分页数量" json:"pageSize"`
PageNumber int `cname:"分页页码" json:"pageNumber"`
PageSize int `cname:"分页数量" json:"pageSize"`
}
func (in *UserRoleQueryCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -104,10 +104,7 @@ func (rs *RoleUserService) ListRole(in *command.UserRoleQueryCommand) (interface
}()
ruRepository := factory.CreateRoleUserRepository(map[string]interface{}{"transactionContext": transactionContext})
in.PageNumber = 1
in.PageSize = 9999999
tempList, err := ruRepository.FindAllContainUser(1, 10, in.CompanyId, in.RoleId)
tempList, err := ruRepository.FindAllContainUser(in.PageNumber, in.PageSize, in.CompanyId, in.RoleId)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
... ...