瀏覽代碼

feat:提交

fuwencai 1 年之前
父節點
當前提交
5f3633c415

+ 4 - 4
src/jfw/modules/publicapply/src/userbase/entity/entity.go

@@ -392,12 +392,12 @@ const (
 	UserStateEntniche = 3 // 用户分类:商机管理
 )
 
-func NewOriginalPower(baseUserId, accountId, entId, positionType, positionId int64, biddingId, mgoUserId, Phone string, userId string, stype initjson.StypeInfo) OriginalPower {
+func NewOriginalPower(baseUserId, accountId, entId, positionType, positionId int64, biddingId, mgoUserId, phone string, userId string, stype initjson.StypeInfo) OriginalPower {
 	return OriginalPower{
 		PositionId:   positionId,
 		BiddingId:    biddingId,
 		MgoUserId:    mgoUserId,
-		Phone:        Phone,
+		Phone:        phone,
 		BaseUserId:   baseUserId,
 		AccountId:    accountId,
 		EntId:        entId,
@@ -463,7 +463,7 @@ func (o *OriginalPower) SavePowerRecord(originalUrl string) {
 	if rs != nil && len(*rs) > 0 && util.IntAll((*rs)[0]["id"]) != 0 {
 		// 存在则直接次数加一,更新更新时间
 		id := util.IntAll((*rs)[0]["id"])
-		updateSql := "update  original_power_record set views_times = views_times+1,update_time=? where id =?"
+		updateSql := fmt.Sprintf("update  %s set views_times = views_times+1,update_time=? where id =?", TabelOriginalPowerRecord)
 		_, err := db.Mysql.ExecBySql(updateSql, date.NowFormat(date.Date_Full_Layout), id)
 		if err != nil {
 			log.Println("更新浏览次数失败:", err, updateSql, date.NowFormat(date.Date_Full_Layout), id)
@@ -490,7 +490,7 @@ func (o *OriginalPower) SavePowerRecord(originalUrl string) {
 
 }
 
-// GetLeads 获取留资信息和判断是否满足
+// CNode  获取留资信息和判断是否满足
 func (o *OriginalPower) CNode() (leadOk bool) {
 	// 查留资source
 	if hasRetainedCapital(o.UserId, []string{"pc_article_original_one", "app_article_original_one", "wx_article_original_one", "h5_article_original_one"}) {

+ 2 - 3
src/jfw/modules/publicapply/src/userbase/service/service.go

@@ -266,7 +266,6 @@ func (this *ServiceStruct) GetOriginalText() {
 			"surplus": op.TotalCount - int64(count) - 1,
 		}})
 		return
-
 	default:
 		// 免费
 		if op.TotalCount <= int64(count) {
@@ -278,8 +277,8 @@ func (this *ServiceStruct) GetOriginalText() {
 			}})
 			return
 		}
-        var leadOk bool
-        leadOk = op.CNode()
+		var leadOk bool
+		leadOk = op.CNode()
 		// 有剩余次数  校验留资
 		if !leadOk {
 			//   留资信息不满足 需要留资 status 1