|
|
|
@ -9,6 +9,7 @@ import (
|
|
|
|
|
"dsBaseRpc/Utils/RedisUtil"
|
|
|
|
|
"dsBaseRpc/Utils/SqlKit"
|
|
|
|
|
"dsBaseRpc/models"
|
|
|
|
|
"errors"
|
|
|
|
|
"fmt"
|
|
|
|
|
"github.com/xormplus/builder"
|
|
|
|
|
)
|
|
|
|
@ -125,7 +126,7 @@ func PageSysLoginPerson(in *SysLoginpersonProto.QueryArg) ([]map[string]interfac
|
|
|
|
|
myBuilder.OrderBy("t3.sort_id").OrderBy("t3.org_type").OrderBy("t3.id_int")
|
|
|
|
|
//获取拼接完成的SQL语句
|
|
|
|
|
sql, err := myBuilder.Limit(limit, offset).ToBoundSQL()
|
|
|
|
|
if err!=nil{
|
|
|
|
|
if err != nil {
|
|
|
|
|
fmt.Println(err.Error())
|
|
|
|
|
}
|
|
|
|
|
list, count, err := SqlKit.Query(sql)
|
|
|
|
@ -241,6 +242,10 @@ func EnableDisableAccount(personIds []string, bUse int) error {
|
|
|
|
|
|
|
|
|
|
//根据登录信息表,获取人员与单位的关系信息
|
|
|
|
|
func GetBureauIdsByPersonIds(personIds []string) ([]map[string]interface{}, string, error) {
|
|
|
|
|
//如果没有正确传入参数
|
|
|
|
|
if len(personIds) == 0 {
|
|
|
|
|
return nil, Const.DataBaseActionError, errors.New("没有正确传入人员ID数组")
|
|
|
|
|
}
|
|
|
|
|
//一组人员,肯定是同一个身份ID
|
|
|
|
|
myBuilder := builder.Dialect(builder.MYSQL).Select("identity_id").From("t_sys_loginperson").
|
|
|
|
|
Where(builder.Eq{"person_id": personIds[0]})
|
|
|
|
|