|
@@ -126,7 +126,7 @@ type VarietyItem struct {
|
|
|
PermissionUserId string `description:"有操作权限的用户id"`
|
|
|
ModifyTime string `description:"修改时间"`
|
|
|
CreateTime string `description:"创建时间"`
|
|
|
- Button VarietyButton `description:"操作按钮权限"`
|
|
|
+ Button VarietyButton `gorm:"-" description:"操作按钮权限"`
|
|
|
}
|
|
|
|
|
|
type VarietyButton struct {
|
|
@@ -137,13 +137,16 @@ type VarietyButton struct {
|
|
|
|
|
|
// GetListBySuperAdminPage 不区分是否有分析权限的获取分页数据
|
|
|
func (item Variety) GetListBySuperAdminPage(condition string, pars []interface{}, startSize, pageSize int) (total int, items []*VarietyItem, err error) {
|
|
|
- baseSql := ` FROM ( SELECT a.*, GROUP_CONCAT(DISTINCT b.sys_user_id ORDER BY b.sys_user_id ASC SEPARATOR ',') AS permission_user_id FROM variety a
|
|
|
+ baseSql := ` FROM ( SELECT a.variety_id,a.variety_name,a.last_update_sys_user_id,
|
|
|
+a.last_update_sys_user_real_name,a.production_day,a.sys_user_id,a.sys_user_real_name,a.modify_time,a.create_time,LISTAGG(b.sys_user_id, ',') WITHIN GROUP (ORDER BY b.sys_user_id ASC) AS permission_user_id
|
|
|
+ FROM variety a
|
|
|
LEFT JOIN variety_admin_permission b on a.variety_id=b.variety_id
|
|
|
LEFT JOIN variety_edb_info c on a.variety_id=c.variety_id WHERE 1=1 `
|
|
|
if condition != "" {
|
|
|
baseSql += condition
|
|
|
}
|
|
|
- baseSql += ` GROUP BY a.variety_id ) d `
|
|
|
+ baseSql += ` GROUP BY a.variety_id,a.variety_name,a.last_update_sys_user_id,
|
|
|
+a.last_update_sys_user_real_name,a.production_day,a.sys_user_id,a.sys_user_real_name,a.modify_time,a.create_time ) d `
|
|
|
// 数据总数
|
|
|
totalSql := `SELECT COUNT(1) total ` + baseSql
|
|
|
|