feat: openid login
This commit is contained in:
@@ -101,13 +101,17 @@ func maskSaleMobile(info *dao.SaleInfo) {
|
||||
info.Mobile = utils.DecryptPhoneReplace(mobile)
|
||||
}
|
||||
|
||||
// querySaleInfo 查询销售详情并附带分组;mobile 脱敏,origin_mobile 为加密串。
|
||||
// 未找到时返回 (nil, nil)。
|
||||
func querySaleInfo(id int64) (*dao.SaleInfo, error) {
|
||||
return querySaleInfoByEq(map[string]string{"id": strconv.FormatInt(id, 10)})
|
||||
}
|
||||
|
||||
func querySaleInfoByUserId(userId int64) (*dao.SaleInfo, error) {
|
||||
return querySaleInfoByEq(map[string]string{"user_id": strconv.FormatInt(userId, 10)})
|
||||
}
|
||||
|
||||
func querySaleInfoByEq(eq map[string]string) (*dao.SaleInfo, error) {
|
||||
var info dao.SaleInfo
|
||||
if err := (model.SaleModel{}.Init().GetOne(modelbase.Params{
|
||||
Eq: map[string]string{"id": strconv.FormatInt(id, 10)},
|
||||
}, &info)); err != nil {
|
||||
if err := (model.SaleModel{}.Init().GetOne(modelbase.Params{Eq: eq}, &info)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if info.Id < utils.NumberOne {
|
||||
|
||||
Reference in New Issue
Block a user