xiziwen 5 months ago
parent
commit
cfe2d7c956
2 changed files with 8 additions and 1 deletions
  1. 1 1
      controllers/statistic_report.go
  2. 7 0
      models/system/sys_group.go

+ 1 - 1
controllers/statistic_report.go

@@ -5770,7 +5770,7 @@ func (this *StatisticReportController) InvoicePaymentList() {
 		}
 		cond += ` AND (c.seller_id IN (` + strings.Join(sellerIdsList, ",") + `) OR d.seller_id IN (` + strings.Join(sellerIdsList, ",") + `))`
 	} else if sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_FICC_GROUP {
-		groupTeamSellerList, err := system.GetGroupSysUserList(5)
+		groupTeamSellerList, err := system.GetSysUserByParentIdGroupId(5)
 		if err != nil {
 			br.Msg = "获取销售失败"
 			br.ErrMsg = "获取销售失败,Err:" + err.Error()

+ 7 - 0
models/system/sys_group.go

@@ -238,3 +238,10 @@ type RoadshowGroupSellers struct {
 	AdminId   int    `description:"销售ID"`
 	AdminName string `description:"销售名称"`
 }
+
+func GetAllSysGroupByGroupId(groupId int) (items []*SysGroup, err error) {
+	sql := `SELECT * FROM sys_group WHERE parent_id=? OR parent_id = ? ORDER BY sort ASC, create_time ASC`
+	o := orm.NewOrm()
+	_, err = o.Raw(sql, groupId, groupId).QueryRows(&items)
+	return
+}