forked from free-lancers/electricity_bill_calc_service
build(deps):升级部分依赖库的版本。
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"electricity_bill_calc/types"
|
||||
"time"
|
||||
|
||||
"github.com/fufuok/utils"
|
||||
"github.com/fufuok/utils/xhash"
|
||||
"github.com/google/uuid"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
@@ -27,7 +27,7 @@ var UserService = _UserService{
|
||||
}
|
||||
|
||||
func (us _UserService) MatchUserPassword(controlCode, testCode string) bool {
|
||||
hashedCode := utils.Sha512Hex(testCode)
|
||||
hashedCode := xhash.Sha512Hex(testCode)
|
||||
return controlCode == hashedCode
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ func (us _UserService) CreateUserAccount(user *model.User, detail *model.UserDet
|
||||
detail.Id = user.Id
|
||||
}
|
||||
verifyCode := tools.RandStr(10)
|
||||
user.Password = utils.Sha512Hex(verifyCode)
|
||||
user.Password = xhash.Sha512Hex(verifyCode)
|
||||
user.ResetNeeded = true
|
||||
res, err := repository.UserRepository.CreateUser(*user, *detail, nil)
|
||||
if err != nil || !res {
|
||||
|
Reference in New Issue
Block a user