feat: sale info
This commit is contained in:
@@ -20,6 +20,8 @@ type DecryptMobileData struct {
|
||||
Mobile string `json:"mobile"`
|
||||
}
|
||||
|
||||
const encryptedPhoneLen = 72
|
||||
|
||||
func NewDecryptMobileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DecryptMobileLogic {
|
||||
return &DecryptMobileLogic{
|
||||
ctx: ctx,
|
||||
@@ -38,6 +40,9 @@ func (l *DecryptMobileLogic) DecryptMobile(in *chore.DecryptMobileReq) (*chore.R
|
||||
if originMobile == utils.StringEmpty {
|
||||
return failResponse(utils.ErrorParams), nil
|
||||
}
|
||||
if len(originMobile) < encryptedPhoneLen {
|
||||
return failResponse(utils.ErrorMobileError), nil
|
||||
}
|
||||
|
||||
mobile, err := utils.DecryptPhone(originMobile)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user