build(deps):升级部分依赖库的版本。

This commit is contained in:
徐涛
2023-06-13 20:43:24 +08:00
parent c9b7dc3aec
commit d4fbf86800
6 changed files with 113 additions and 41 deletions

View File

@@ -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 {