|
@@ -1,22 +1,23 @@
|
|
package tools
|
|
package tools
|
|
|
|
|
|
import (
|
|
import (
|
|
- "app.yhyue.com/moapp/jybase/common"
|
|
|
|
- "app.yhyue.com/moapp/jybase/encrypt"
|
|
|
|
- "fmt"
|
|
|
|
- "jy/src/jfw/modules/weixin/src/config"
|
|
|
|
- "strconv"
|
|
|
|
- "time"
|
|
|
|
|
|
+ "app.yhyue.com/moapp/jybase/common"
|
|
|
|
+ "app.yhyue.com/moapp/jybase/encrypt"
|
|
|
|
+ "fmt"
|
|
|
|
+ "jy/src/jfw/modules/weixin/src/config"
|
|
|
|
+ "strconv"
|
|
|
|
+ "time"
|
|
)
|
|
)
|
|
|
|
|
|
// 小程序
|
|
// 小程序
|
|
func GetMiniActivateBiddingInfo(id string) (title, url, subTxt string) {
|
|
func GetMiniActivateBiddingInfo(id string) (title, url, subTxt string) {
|
|
- if uId, err := strconv.Atoi(id); err == nil && uId > 0 {
|
|
|
|
- activateInfos := Mysql.SelectBySql(`SELECT ac.classification,ab.id,ab.title FROM jyactivities.activate_count ac LEFT JOIN jyactivities.activate_bidding ab ON ac.au_id = ab.au_id WHERE au.id = ?`, uId)
|
|
|
|
|
|
+ uId, err := strconv.Atoi(id)
|
|
|
|
+ if err == nil && uId > 0 {
|
|
|
|
+ activateInfos := Mysql.SelectBySql(`SELECT au.classification,ac.bidding_id,ac.bidding_title FROM jyactivities.activate_user au LEFT JOIN jyactivities.activate_count ac ON ac.au_id = au.id WHERE au.id = ?`, uId)
|
|
if activateInfos != nil && len(*activateInfos) > 0 {
|
|
if activateInfos != nil && len(*activateInfos) > 0 {
|
|
activateInfo := (*activateInfos)[0]
|
|
activateInfo := (*activateInfos)[0]
|
|
- title = common.InterfaceToStr(activateInfo["title"])
|
|
|
|
- biddingId := common.InterfaceToStr(activateInfo["id"])
|
|
|
|
|
|
+ title = common.InterfaceToStr(activateInfo["bidding_title"])
|
|
|
|
+ biddingId := common.InterfaceToStr(activateInfo["bidding_id"])
|
|
subTxt = "感谢关注"
|
|
subTxt = "感谢关注"
|
|
if classification := common.IntAll(activateInfo["classification"]); classification > 0 {
|
|
if classification := common.IntAll(activateInfo["classification"]); classification > 0 {
|
|
subTxt = "欢迎回来"
|
|
subTxt = "欢迎回来"
|