Преглед изворни кода

Merge branch 'crm/crm_16_9_rai' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

zhangchuanxing пре 1 недеља
родитељ
комит
75f78ffe7e

+ 1 - 1
models/cygx/rai_serve_bill.go

@@ -155,7 +155,7 @@ func GetCygxRaiServeBillRespList(condition string, pars []interface{}, startSize
 	if condition != "" {
 		sql += condition
 	}
-	sql += ` ORDER BY bill_id DESC   LIMIT ?,? `
+	sql += ` ORDER BY view_time DESC   LIMIT ?,? `
 	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
 	return
 }

+ 16 - 16
services/cygx/acitvity.go

@@ -1265,21 +1265,21 @@ func DoActivityOnenIdWxTemplateMsg(activityId int) (err error) {
 		return err
 	}
 	//已经推送过的不做二次推送
-	listSendOpendId, err := cygx.GeCygxActivityUserTemplateRecordListByActivityId(activityId, utils.TEMPLATE_MSG_CYGX_ACTIVITY_ADD)
-	if err != nil && err.Error() != utils.ErrNoRow() {
-		return err
-	}
-	mapSendOpenid := make(map[string]int)
-	for _, v := range listSendOpendId {
-		mapSendOpenid[v.OpenId] = v.UserId
-	}
+	//listSendOpendId, err := cygx.GeCygxActivityUserTemplateRecordListByActivityId(activityId, utils.TEMPLATE_MSG_CYGX_ACTIVITY_ADD)
+	//if err != nil && err.Error() != utils.ErrNoRow() {
+	//	return err
+	//}
+	//mapSendOpenid := make(map[string]int)
+	//for _, v := range listSendOpendId {
+	//	mapSendOpenid[v.OpenId] = v.UserId
+	//}
 
 	var OpenIdList []*models.OpenIdList
 	for _, v := range openidPowerByActivitySetList {
-		if mapSendOpenid[v.OpenId] > 0 {
-			//fmt.Println("已经推过了")
-			continue
-		}
+		//if mapSendOpenid[v.OpenId] > 0 {
+		//	//fmt.Println("已经推过了")
+		//	continue
+		//}
 		item := new(models.OpenIdList)
 		item.UserId = v.UserId
 		item.OpenId = v.OpenId
@@ -1312,10 +1312,10 @@ func DoActivityOnenIdWxTemplateMsg(activityId int) (err error) {
 
 	var OpenIdListYx []*models.OpenIdList
 	for _, v := range openidPowerByActivitySetListYx {
-		if mapSendOpenid[v.OpenId] > 0 {
-			//fmt.Println("已经推过了")
-			continue
-		}
+		//if mapSendOpenid[v.OpenId] > 0 {
+		//	//fmt.Println("已经推过了")
+		//	continue
+		//}
 		item := new(models.OpenIdList)
 		item.UserId = v.UserId
 		item.OpenId = v.OpenId

+ 11 - 11
services/cygx/activity_wx_msg.go

@@ -37,17 +37,17 @@ func SendWxMsgWithCygxActivityUpdateLimitPeople(activityId int) (err error) {
 	//listSendOpendId, err := models.GeUserTemplateRecordListBysendType(utils.TEMPLATE_MSG_CYGX_ACTIVITY_LIMIT_PEOPLE, strconv.Itoa(activityId))
 
 	//已经推送过的不做二次推送
-	listSendOpendId, err := cygx.GeCygxActivityUserTemplateRecordListByActivityId(activityId, utils.TEMPLATE_MSG_CYGX_ACTIVITY_LIMIT_PEOPLE)
-	if err != nil && err.Error() != utils.ErrNoRow() {
-		return err
-	}
-	if err != nil && err.Error() != utils.ErrNoRow() {
-		return err
-	}
-	mapSendOpenid := make(map[string]int)
-	for _, v := range listSendOpendId {
-		mapSendOpenid[v.OpenId] = v.UserId
-	}
+	//listSendOpendId, err := cygx.GeCygxActivityUserTemplateRecordListByActivityId(activityId, utils.TEMPLATE_MSG_CYGX_ACTIVITY_LIMIT_PEOPLE)
+	//if err != nil && err.Error() != utils.ErrNoRow() {
+	//	return err
+	//}
+	//if err != nil && err.Error() != utils.ErrNoRow() {
+	//	return err
+	//}
+	//mapSendOpenid := make(map[string]int)
+	//for _, v := range listSendOpendId {
+	//	mapSendOpenid[v.OpenId] = v.UserId
+	//}
 
 	var condition string
 	var pars []interface{}

+ 8 - 8
services/wechat_send_category_template_msg.go

@@ -308,14 +308,14 @@ func SendWxCategoryMsgWithCygxActivityUpdateLimitPeople(activityId int) (err err
 	//已经推送过的不做二次推送
 	//listSendOpendId, err := models.GeUserTemplateRecordListBysendType(utils.TEMPLATE_MSG_CYGX_ACTIVITY_LIMIT_PEOPLE, strconv.Itoa(activityId))
 	//已经推送过的不做二次推送
-	listSendOpendId, err := cygx.GeCygxActivityUserTemplateRecordListByActivityId(activityId, utils.TEMPLATE_MSG_CYGX_ACTIVITY_LIMIT_PEOPLE)
-	if err != nil && err.Error() != utils.ErrNoRow() {
-		return err
-	}
-	mapSendOpenid := make(map[string]int)
-	for _, v := range listSendOpendId {
-		mapSendOpenid[v.OpenId] = v.UserId
-	}
+	//listSendOpendId, err := cygx.GeCygxActivityUserTemplateRecordListByActivityId(activityId, utils.TEMPLATE_MSG_CYGX_ACTIVITY_LIMIT_PEOPLE)
+	//if err != nil && err.Error() != utils.ErrNoRow() {
+	//	return err
+	//}
+	//mapSendOpenid := make(map[string]int)
+	//for _, v := range listSendOpendId {
+	//	mapSendOpenid[v.OpenId] = v.UserId
+	//}
 
 	var condition string
 	var pars []interface{}