服务没有所属用户时,可以修改所属用户

This commit is contained in:
GoEdgeLab
2022-12-21 17:07:02 +08:00
parent 48da717baf
commit 800dbdc77c
6 changed files with 175 additions and 9 deletions

View File

@@ -399,6 +399,17 @@ func (this *SSLCertDAO) CheckUserCert(tx *dbs.Tx, certId int64, userId int64) er
return nil
}
// UpdateCertUser 修改证书所属用户
func (this *SSLCertDAO) UpdateCertUser(tx *dbs.Tx, certId int64, userId int64) error {
if certId <= 0 || userId <= 0 {
return nil
}
return this.Query(tx).
Pk(certId).
Set("userId", userId).
UpdateQuickly()
}
// ListCertsToUpdateOCSP 查找需要更新OCSP的证书
func (this *SSLCertDAO) ListCertsToUpdateOCSP(tx *dbs.Tx, maxTries int, size int64) (result []*SSLCert, err error) {
var nowTime = time.Now().Unix()