作者 yangfu

feat:按用户IC卡号搜索

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