作者 yangfu

分页修改

... ... @@ -11,7 +11,7 @@ type ListCooperationApplicationQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 查询偏离量
PageNumber int `json:"pageIndex" valid:"Required"`
PageNumber int `json:"pageNumber" valid:"Required"`
// 查询限制
PageSize int `json:"pageSize" valid:"Required"`
//审核状态
... ...
... ... @@ -11,7 +11,7 @@ type GoodsStatisticsCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 查询偏离量
PageNumber int `json:"pageIndex"`
PageNumber int `json:"pageNumber"`
// 查询限制
PageSize int `json:"pageSize" valid:"Required"`
// 排行榜类型,1月榜,2年榜 3总榜,默认展示年榜
... ...
... ... @@ -73,7 +73,7 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
applicationQuery.Operator)
resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{
PageNumber: applicationQuery.PageNumber,
PageNumber: applicationQuery.PageNumber + 1, //手机序号从0开始的
PageSize: applicationQuery.PageSize,
//CompanyId: int(applicationQuery.Operator.CompanyId),
OrgId: applicationQuery.Operator.OrgId,
... ... @@ -156,7 +156,7 @@ func (srv CooperationApplicationsService) PersonSearchCooperationApplications(ap
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
applicationQuery.Operator)
resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{
PageNumber: applicationQuery.PageNumber,
PageNumber: applicationQuery.PageNumber + 1,
PageSize: applicationQuery.PageSize,
CompanyId: int(applicationQuery.Operator.CompanyId),
CooperationApplicationStatus: applicationQuery.Status,
... ...
... ... @@ -90,7 +90,7 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
projectQuery.Operator)
result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{
PageNumber: projectQuery.PageNumber,
PageNumber: projectQuery.PageNumber + 1, //手机序号从0开始的
PageSize: projectQuery.PageSize,
Status: int(projectQuery.Status),
OrgId: projectQuery.Operator.OrgId,
... ... @@ -107,7 +107,7 @@ func (srv CooperationProjectService) PersonSearchCooperationProject(projectQuery
projectQuery.Operator)
//orgidStr := strconv.Itoa(projectQuery.OrgId)
result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{
PageNumber: projectQuery.PageNumber,
PageNumber: projectQuery.PageNumber + 1, //手机序号从0开始的
PageSize: projectQuery.PageSize,
OrgId: projectQuery.OrgId,
//UserBaseId: projectQuery.Operator.UserBaseId,
... ...
... ... @@ -17,7 +17,7 @@ func (srv CompanyCreditAccountService) CreditAccountSearch(cmd *command.CreditAc
gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
cmd.Operator)
resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{
PageNumber: cmd.PageNumber,
PageNumber: cmd.PageNumber + 1, //手机序号从0开始的
PageSize: cmd.PageSize,
PaymentStatus: cmd.PaymentStatus,
OrgId: cmd.Operator.OrgId,
... ... @@ -83,7 +83,7 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi
gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
cmd.Operator)
resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{
PageNumber: cmd.PageNumber,
PageNumber: cmd.PageNumber + 1, //手机序号从0开始的
PageSize: cmd.PageSize,
PaymentStatus: 2,
//TODO:时间段过滤
... ...
... ... @@ -16,7 +16,7 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit
gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
cmd.Operator)
resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{
PageNumber: cmd.PageNumber,
PageNumber: cmd.PageNumber + 1, //手机序号从0开始的
PageSize: cmd.PageSize,
PaymentStatus: 2,
UserBaseId: cmd.Operator.UserBaseId,
... ...
... ... @@ -15,7 +15,7 @@ func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackC
gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
cmd.Operator)
resultMenu, err := gateway.ContractUndertakerFeedbackSearch(allied_creation_cooperation.ReqContractUndertakerFeedbackSearch{
PageNumber: cmd.PageNumber,
PageNumber: cmd.PageNumber + 1, //手机序号从0开始的
PageSize: cmd.PageSize,
MatchWord: cmd.MatchWord,
CompanyId: cmd.Operator.CompanyId,
... ...
... ... @@ -9,6 +9,7 @@ type RoleItem struct {
OrgName string `json:"orgName"`
RoleType int `json:"roleType"`
Ext Ext `json:"ext"`
AuthFlag int `json:"authFlag"` // 1:可操作(编辑,修改等)
}
type Ext struct {
... ...
... ... @@ -99,7 +99,7 @@ func (rolesService *RolesService) RoleList(roleListQuery *query.RoleListQuery) (
}
result := []dto.RoleItem{}
for _, v := range roleList.Roles {
result = append(result, dto.RoleItem{
item := dto.RoleItem{
RoleId: strconv.Itoa(int(v.RoleID)),
OrgId: strconv.Itoa(int(v.OrgID)),
RoleName: v.RoleName,
... ... @@ -107,7 +107,11 @@ func (rolesService *RolesService) RoleList(roleListQuery *query.RoleListQuery) (
OrgName: v.Ext.OrgName,
RoleType: v.RoleType,
Ext: v.Ext,
})
}
if int64(v.OrgID) == roleListQuery.Operator.OrgId {
item.AuthFlag = 1
}
result = append(result, item)
}
var cnt int64 = roleList.Count
return cnt, result, nil
... ...
... ... @@ -9,6 +9,7 @@ type CompanyUserItem struct {
UserId string `json:"userId"`
UserName string `json:"userName"`
UserType int `json:"userType"`
AuthFlag int `json:"authFlag"` // 1:可操作(编辑,修改等)
}
//CompanyUserInfo 用户数据详情
... ... @@ -84,4 +85,5 @@ type CooperationUserItem struct {
UserName string `json:"userName"`
OrgName string `json:"orgName"`
OrgId string `json:"orgId"`
AuthFlag int `json:"authFlag"` // 1:可操作(编辑,修改等)
}
... ...
... ... @@ -210,6 +210,9 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co
UserName: v.UserInfo.UserName,
UserType: v.UserType,
}
if v.Org.OrgId == int(companyUserListQuery.Operator.OrgId) {
item.AuthFlag = 1
}
listData = append(listData, item)
}
return cnt, listData, nil
... ... @@ -399,6 +402,9 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery *
OrgName: v.Org.OrgName,
OrgId: strconv.Itoa(v.Org.OrgId),
}
if v.Org.OrgId == int(cooperationUserListQuery.Operator.OrgId) {
item.AuthFlag = 1
}
if !v.CooperationInfo.CooperationDeadline.IsZero() && v.CooperationInfo.CooperationDeadline.After(time.Unix(1136044800, 0)) {
item.CooperationDeadline = v.CooperationInfo.CooperationDeadline.Format("2006-01-02")
}
... ...