Merge branch 'test' of http://gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss into test
正在显示
4 个修改的文件
包含
11 行增加
和
8 行删除
| @@ -34,7 +34,7 @@ func (l *MiniUserLoginLogic) MiniUserLogin(req *types.MiniUserLoginRequest) (res | @@ -34,7 +34,7 @@ func (l *MiniUserLoginLogic) MiniUserLogin(req *types.MiniUserLoginRequest) (res | ||
| 34 | var ( | 34 | var ( |
| 35 | loginInfo *domain.LoginInfo | 35 | loginInfo *domain.LoginInfo |
| 36 | token string | 36 | token string |
| 37 | - loginCreator domain.LoginCreator = WXStuClientLogin{l: l} | 37 | + loginCreator domain.LoginCreator = WxClientLogin{l: l} |
| 38 | ) | 38 | ) |
| 39 | switch req.LoginType { | 39 | switch req.LoginType { |
| 40 | case domain.LoginTypeWechatLogin: | 40 | case domain.LoginTypeWechatLogin: |
| @@ -73,11 +73,11 @@ func (l *MiniUserLoginLogic) MiniUserLogin(req *types.MiniUserLoginRequest) (res | @@ -73,11 +73,11 @@ func (l *MiniUserLoginLogic) MiniUserLogin(req *types.MiniUserLoginRequest) (res | ||
| 73 | return | 73 | return |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | -type WXStuClientLogin struct { | 76 | +type WxClientLogin struct { |
| 77 | l *MiniUserLoginLogic | 77 | l *MiniUserLoginLogic |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | -func (c WXStuClientLogin) WechatPhoneLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) { | 80 | +func (c WxClientLogin) WechatPhoneLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) { |
| 81 | code := r.Code | 81 | code := r.Code |
| 82 | miniprogram := wechat.NewWechat().GetMiniProgram(&miniConfig.Config{ | 82 | miniprogram := wechat.NewWechat().GetMiniProgram(&miniConfig.Config{ |
| 83 | AppID: c.l.svcCtx.Config.Wechat.AppID, | 83 | AppID: c.l.svcCtx.Config.Wechat.AppID, |
| @@ -108,15 +108,15 @@ func (c WXStuClientLogin) WechatPhoneLogin(r domain.WechatLoginRequest) (*domain | @@ -108,15 +108,15 @@ func (c WXStuClientLogin) WechatPhoneLogin(r domain.WechatLoginRequest) (*domain | ||
| 108 | return response, nil | 108 | return response, nil |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | -func (c WXStuClientLogin) WechatLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) { | 111 | +func (c WxClientLogin) WechatLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) { |
| 112 | return nil, nil | 112 | return nil, nil |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | -func (c WXStuClientLogin) PhonePasswordLogin(phone string, password string) (*domain.LoginInfo, error) { | 115 | +func (c WxClientLogin) PhonePasswordLogin(phone string, password string) (*domain.LoginInfo, error) { |
| 116 | panic("implement me") | 116 | panic("implement me") |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | -func (c WXStuClientLogin) PhoneSmsCodeLogin(phone string, code string) (*domain.LoginInfo, error) { | 119 | +func (c WxClientLogin) PhoneSmsCodeLogin(phone string, code string) (*domain.LoginInfo, error) { |
| 120 | var ( | 120 | var ( |
| 121 | users []*domain.User | 121 | users []*domain.User |
| 122 | err error | 122 | err error |
| @@ -39,7 +39,7 @@ func (l *SystemUserSearchLogic) SystemUserSearch(req *types.SystemUserSearchRequ | @@ -39,7 +39,7 @@ func (l *SystemUserSearchLogic) SystemUserSearch(req *types.SystemUserSearchRequ | ||
| 39 | queryOptions := domain.IndexCompanyId(userToken.CompanyId)().WithOffsetLimit(req.Page, req.Size).WithOrder("id desc"). | 39 | queryOptions := domain.IndexCompanyId(userToken.CompanyId)().WithOffsetLimit(req.Page, req.Size).WithOrder("id desc"). |
| 40 | WithKV("likeName", req.Name). | 40 | WithKV("likeName", req.Name). |
| 41 | WithKV("likePhone", req.Phone). | 41 | WithKV("likePhone", req.Phone). |
| 42 | - WithKV("likePosition", req.Position). | 42 | + WithKV("position", req.Position). |
| 43 | WithKV("enable", req.Enable). | 43 | WithKV("enable", req.Enable). |
| 44 | WithKV("departmentId", req.DepartmentId) | 44 | WithKV("departmentId", req.DepartmentId) |
| 45 | if total, users, err = l.svcCtx.UserRepository.Find(l.ctx, conn, queryOptions); err != nil { | 45 | if total, users, err = l.svcCtx.UserRepository.Find(l.ctx, conn, queryOptions); err != nil { |
| @@ -166,6 +166,9 @@ func (repository *UserRepository) Find(ctx context.Context, conn transaction.Con | @@ -166,6 +166,9 @@ func (repository *UserRepository) Find(ctx context.Context, conn transaction.Con | ||
| 166 | if v, ok := queryOptions["likePhone"]; ok { | 166 | if v, ok := queryOptions["likePhone"]; ok { |
| 167 | tx.Where("phone like ? ", fmt.Sprintf("%%%v%%", v)) | 167 | tx.Where("phone like ? ", fmt.Sprintf("%%%v%%", v)) |
| 168 | } | 168 | } |
| 169 | + if v, ok := queryOptions["position"]; ok { | ||
| 170 | + tx.Where("position = ? ", v) | ||
| 171 | + } | ||
| 169 | if v, ok := queryOptions["departmentId"]; ok { | 172 | if v, ok := queryOptions["departmentId"]; ok { |
| 170 | tx.Where(fmt.Sprintf("departments @>'[%v]'", v)) | 173 | tx.Where(fmt.Sprintf("departments @>'[%v]'", v)) |
| 171 | } | 174 | } |
| @@ -45,7 +45,7 @@ type ArticleRepository interface { | @@ -45,7 +45,7 @@ type ArticleRepository interface { | ||
| 45 | IncreaseCountComment(ctx context.Context, conn transaction.Conn, incr int, articleId int64) error //评论数量变动 | 45 | IncreaseCountComment(ctx context.Context, conn transaction.Conn, incr int, articleId int64) error //评论数量变动 |
| 46 | IncreaseCountRead(ctx context.Context, conn transaction.Conn, incr int, articleId int64) error //浏览数量变动 | 46 | IncreaseCountRead(ctx context.Context, conn transaction.Conn, incr int, articleId int64) error //浏览数量变动 |
| 47 | 47 | ||
| 48 | - // 小程序端搜索查询文章 | 48 | + // CustomSearchBy 小程序端搜索查询文章 |
| 49 | // userId 人员id,谁查看文章 | 49 | // userId 人员id,谁查看文章 |
| 50 | // companyId 公司id | 50 | // companyId 公司id |
| 51 | // tagCategory 标签分类 | 51 | // tagCategory 标签分类 |
-
请 注册 或 登录 后发表评论