uint ->int
This commit is contained in:
parent
a4e4a27350
commit
8b6160af9d
|
@ -33,7 +33,7 @@ func GetListByWhere(request *backend.CmdListRequest, page int, limit int) (count
|
||||||
cond = cond.And(builder.In("cmd_id", request.CmdIds))
|
cond = cond.And(builder.In("cmd_id", request.CmdIds))
|
||||||
}
|
}
|
||||||
|
|
||||||
session := croncmdmodel.GetInstance().GetDb().Where(cond)
|
session := croncmdmodel.GetInstance().GetDb().Where(cond).OrderBy("create_time desc")
|
||||||
|
|
||||||
if page != 0 && limit != 0 {
|
if page != 0 && limit != 0 {
|
||||||
session = session.Limit(limit, (page-1)*limit)
|
session = session.Limit(limit, (page-1)*limit)
|
||||||
|
|
|
@ -27,15 +27,15 @@ func GetListByWhere(request *backend.UserListRequest, page int, limit int) (coun
|
||||||
if request.DtalkUserId != "" {
|
if request.DtalkUserId != "" {
|
||||||
cond = cond.And(builder.Like{"dtalk_user_id", request.DtalkUserId})
|
cond = cond.And(builder.Like{"dtalk_user_id", request.DtalkUserId})
|
||||||
}
|
}
|
||||||
if request.DtalkUserId != "" {
|
if request.WxOpenId != "" {
|
||||||
cond = cond.And(builder.Like{"dtalk_user_id", request.DtalkUserId})
|
cond = cond.And(builder.Like{"wx_open_id", request.WxOpenId})
|
||||||
}
|
}
|
||||||
if len(request.UserIds) > 0 {
|
if len(request.UserIds) > 0 {
|
||||||
// 使用IN查询
|
// 使用IN查询
|
||||||
cond = cond.And(builder.In("user_id", request.UserIds))
|
cond = cond.And(builder.In("user_id", request.UserIds))
|
||||||
}
|
}
|
||||||
|
|
||||||
session := cronusermodel.GetInstance().GetDb().Where(cond)
|
session := cronusermodel.GetInstance().GetDb().Where(cond).OrderBy("update_time desc")
|
||||||
|
|
||||||
if page != 0 && limit != 0 {
|
if page != 0 && limit != 0 {
|
||||||
session = session.Limit(limit, (page-1)*limit)
|
session = session.Limit(limit, (page-1)*limit)
|
||||||
|
|
Loading…
Reference in New Issue