|
@@ -55,6 +55,9 @@ func (this *EtaBusinessUserController) List() {
|
|
|
businessCode := this.GetString("BusinessCode")
|
|
|
keyword := utils.TrimStr(this.GetString("Keyword"))
|
|
|
|
|
|
+ sortType := this.GetString("SortType")
|
|
|
+ sortParam := this.GetString("SortParam")
|
|
|
+
|
|
|
/*if businessCode <= 0 {
|
|
|
br.Msg = "请选择客户"
|
|
|
br.ErrMsg = "客户参数错误"
|
|
@@ -90,7 +93,12 @@ func (this *EtaBusinessUserController) List() {
|
|
|
condition += ` AND enabled = ? `
|
|
|
pars = append(pars, enabled)
|
|
|
}
|
|
|
-
|
|
|
+ order := ""
|
|
|
+ if sortParam == "LastLoginTime" {
|
|
|
+ if sortType == "desc" || sortType == "asc" {
|
|
|
+ order = " last_login_time " + sortType
|
|
|
+ }
|
|
|
+ }
|
|
|
total, err := models.GetUserCountByCondition(condition, pars)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
@@ -98,7 +106,7 @@ func (this *EtaBusinessUserController) List() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- list, err := models.GetUserPageListByCondition(condition, pars, startSize, pageSize)
|
|
|
+ list, err := models.GetUserPageListByCondition(condition, pars, order, startSize, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取数据失败,Err:" + err.Error()
|