作者 yangfu

feat:按用户IC卡号搜索

... ... @@ -45,6 +45,8 @@ type ListUserQuery struct {
InCompanyIds []int64 `cname:"在企业范围内" json:"inCompanyIds,omitempty"`
// 用户编号 企业内标识
UserCode string `cname:"用户编号" json:"userCode,omitempty"`
// IC卡号
IcCardNumber string `cname:"IC卡号" json:"icCardNumber,omitempty"`
}
func (listUserQuery *ListUserQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -211,6 +211,7 @@ func (repository *UserRepository) Find(queryOptions map[string]interface{}) (int
query.Where(`company_id in (?)`, pg.In(v))
}
query.SetWhereByQueryOption("user_code = ?", "userCode")
query.SetWhereByQueryOption("ext->>'icCardNumber' = ?", "icCardNumber")
query.SetWhereByQueryOption("user_base_id=?", "userBaseId")
query.SetWhereByQueryOption("(user_type & ?)>0", "userType")
query.SetWhereByQueryOption("enable_status=?", "enableStatus")
... ...