|
@@ -4,6 +4,7 @@ import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
"hongze/hongze_task/models"
|
|
|
+ "hongze/hongze_task/services/alarm_msg"
|
|
|
"hongze/hongze_task/services/company"
|
|
|
"hongze/hongze_task/services/cygx"
|
|
|
"hongze/hongze_task/utils"
|
|
@@ -155,6 +156,10 @@ func CompanyTryOut(cont context.Context) (err error) {
|
|
|
{
|
|
|
cygx.YanXuanCompanyCompanyTryOut(v.CompanyId)
|
|
|
}
|
|
|
+
|
|
|
+ { // 更新用户是否签约过
|
|
|
+ UpdateCompanyProductIsSigning(v.CompanyId,v.ProductId)
|
|
|
+ }
|
|
|
}
|
|
|
return
|
|
|
}
|
|
@@ -767,3 +772,17 @@ func StaticCompanyTryDay(cont context.Context) (err error) {
|
|
|
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+// 更新用户是否签约过
|
|
|
+func UpdateCompanyProductIsSigning(companyId ,productId int) () {
|
|
|
+ var err error
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ msg := fmt.Sprint("companyId:", companyId,"productId:", productId)
|
|
|
+ go alarm_msg.SendAlarmMsg("更新用户是否签约过失败:UpdateCompanyProductIsSigning "+err.Error()+msg, 2)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ err = models.UpdateCompanyProductIsSigningById(companyId,productId)
|
|
|
+ return
|
|
|
+}
|