修复主账号问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m6s

This commit is contained in:
2026-04-17 18:07:29 +08:00
parent 0d2baabcf1
commit 1033d7666b
3 changed files with 28 additions and 6 deletions

View File

@@ -112,12 +112,13 @@ func (s *Service) Create(ctx context.Context, req *dto.CreateShopRequest) (*dto.
}
account := &model.Account{
Username: req.InitUsername,
Phone: req.InitPhone,
Password: string(hashedPassword),
UserType: constants.UserTypeAgent,
ShopID: &shop.ID,
Status: constants.StatusEnabled,
Username: req.InitUsername,
Phone: req.InitPhone,
Password: string(hashedPassword),
UserType: constants.UserTypeAgent,
ShopID: &shop.ID,
Status: constants.StatusEnabled,
IsPrimary: true,
}
account.Creator = currentUserID
account.Updater = currentUserID