浏览代码

Merge branch 'small_289' into debug

xiziwen 5 月之前
父节点
当前提交
fa8bd1a477
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 1 1
      controllers/statistic_report.go
  2. 7 0
      models/system/sys_group.go

+ 1 - 1
controllers/statistic_report.go

@@ -5774,7 +5774,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
+}