WH01243 4 jaren geleden
bovenliggende
commit
8ddde3ebf0

+ 0 - 1
src/jfw/front/ws_dataExport.go

@@ -387,7 +387,6 @@ func (wd *WsDataExport) SearchExport() error {
 		Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
 		SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
 	}
-
 	saveData := reqData.PassBidSearchExport()
 	saveData["s_openid"] = openid
 	saveData["s_userid"] = userId

+ 3 - 3
src/jfw/modules/distribution/src/config.json

@@ -3,12 +3,12 @@
 	"webdomain":"http://web-jydev-wh.jianyu360.cn",
 	"mongodb": {
 		"main": {
-			"address": "192.168.3.128:27080",
+			"address": "192.168.3.11:27090",
 	 		"size": 5,
 	 		"dbName": "qfw"
 		},
 		"log": {
-			"address": "192.168.3.128:27080",
+			"address": "192.168.3.11:27090",
 	 		"size": 5,
 	 		"dbName": "qfw",
 			"userName": "admin",
@@ -45,7 +45,7 @@
         }
     ],
     "workerNum":10,
-    "jobNum":20,
+	"jobNum":20,
     "modular":{
     	"bottomTxt": "- 全国招标信息免费看,不遮挡 -",
 		"butTxt": "打 开",

+ 1 - 2
src/jfw/modules/distribution/src/main.go

@@ -1,6 +1,7 @@
 package main
 
 import (
+	"github.com/go-xweb/xweb"
 	"net/http"
 	_ "service/a"
 	_ "service/action"
@@ -8,8 +9,6 @@ import (
 	_ "service/filter"
 	_ "service/public"
 	_ "timetask"
-
-	"github.com/go-xweb/xweb"
 )
 
 func main() {

+ 7 - 2
src/jfw/modules/distribution/src/service/action/partner.go

@@ -51,7 +51,7 @@ func (p *Partner) SendMessage() {
 
 //加入伙伴
 func (p *Partner) AddPartner() {
-	if !R.CheckReqParam(p.ResponseWriter, p.Request, "phone", "email", "type", "channel","contacts") {
+	if !R.CheckReqParam(p.ResponseWriter, p.Request, "phone", "email", "type", "channel", "contacts") {
 		return
 	}
 	status, msg := func() (int, string) {
@@ -119,6 +119,10 @@ func (p *Partner) AddPartner() {
 			islogoff, auth_status := isLogOffUser(userid)
 			name, idcard := "", ""
 			log.Println("是否是注销后的用户:", islogoff, "认证状态:", auth_status)
+			is_adopt := 0
+			if typ == 1 {
+				is_adopt = 1
+			}
 			insert := map[string]interface{}{
 				"type":          typ,
 				"phone":         phone,
@@ -129,7 +133,7 @@ func (p *Partner) AddPartner() {
 				"createtime":    time.Now().Format(qu.Date_Full_Layout),
 				"lastlogintime": time.Now().Format(qu.Date_Full_Layout),
 				"contacts":      contacts,
-				"is_adopt":0,
+				"is_adopt":      is_adopt,
 			}
 			if islogoff {
 				name, idcard = getLogOffInfo(userid)
@@ -158,6 +162,7 @@ func (p *Partner) AddPartner() {
 					"email":         mail,
 					"channel":       channel,
 					"uid":           userid,
+					"is_adopt":      is_adopt,
 					"auth_status":   qu.If(typ == 2, 1, auth_status), //认证状态
 					"createtime":    time.Now().Format(qu.Date_Full_Layout),
 					"lastlogintime": time.Now().Format(qu.Date_Full_Layout),

+ 4 - 6
src/jfw/modules/distribution/src/service/action/share.go

@@ -95,14 +95,13 @@ func (this *Share) LinkShare(discored string) error {
 	//userId := "5c89fead1c298a4d75fef39e"
 
 	_, url, _, _ := analyseWord(discored, userId)
-	log.Println("获取三级页面地址:",url)
+	log.Println("获取三级页面地址:", url)
 	return this.Redirect(url)
 }
 
 //分析口令
 func analyseWord(discored, userId string) (name, url, appUrl, shareNickname string) {
-
-	log.Println("分析口令传入参数",discored)
+	log.Println("分析口令传入参数", discored)
 	//指令第一个字母
 	encry := discored[:1]
 	//模块  A:超级订阅  B:数据导出  C:数据报告等  D公告信息 _SX三天有效
@@ -208,7 +207,7 @@ func CopyInfo(discored, userId string) (res map[string]interface{}) {
 		if (suffix == suffix_msgt) {
 			appUrl = "/jyapp" + appUrl
 		}
-		log.Println("需要打开页面地址:"+appUrl)
+		log.Println("需要打开页面地址:" + appUrl)
 		res = map[string]interface{}{
 			"title":     fmt.Sprintf(Sysconfig.Modular["title"].(string), shareNickname), //标题
 			"subTitle":  fmt.Sprintf(Sysconfig.Modular["subTitle"].(string), name),       //副标题
@@ -251,13 +250,13 @@ func (this *Share) GetOtherWordShare() {
 							"email":         0,
 							"channel":       "微信",
 							"uid":           userId,
+							"is_adopt":      1,
 							"auth_status":   0, //认证状态
 							"createtime":    time.Now().Format(qu.Date_Full_Layout),
 							"lastlogintime": time.Now().Format(qu.Date_Full_Layout),
 						}
 						insert_1 = Mysql.InsertByTx(tx, "dis_partner", insert) //伙伴表
 						log.Println("插入伙伴计划", insert_1)
-
 						partner_user = Mysql.CountBySql(`select count(*) from account where uid=?`, userId) > 0
 						if (!partner_user) {
 							insert_3 = Mysql.InsertByTx(tx, "account", map[string]interface{}{ //个人账户表
@@ -408,4 +407,3 @@ func (this *Share) ShareLogs() {
 		log.Println(this.GetSession("userId"), msg)
 	}
 }
-

+ 5 - 4
src/jfw/modules/subscribepay/src/entity/distribution.go

@@ -8,6 +8,7 @@ import (
 	"pay"
 	qutil "qfw/util"
 	"qfw/util/redis"
+	"strconv"
 	"strings"
 	"time"
 	"util"
@@ -20,7 +21,7 @@ func DisWordRecode(order_id, sale_money int, product_name, disWord string) {
 	if redisDis != "" {
 		//分销者id
 		shareUId := strings.Split(redisDis, "##")[1]
-		/*//查询用户是企业还是个人账户
+		//查询用户是企业还是个人账户
 		parentList := util.Mysql.SelectBySql("select  * from  dis_partner where uid=? ", shareUId)
 		parentType := 1
 		if len(*parentList) > 0 {
@@ -29,7 +30,7 @@ func DisWordRecode(order_id, sale_money int, product_name, disWord string) {
 		}
 		if (parentType == 2) {
 			return
-		}*/
+		}
 		//查询产品信息   获取  rate 佣金比例
 		var c_rate float64 = 0
 		if p_data, ok := util.MQFW.Find("dis_product", nil, `{"l_createdate":1}`, nil, false, -1, -1); ok && p_data != nil {
@@ -72,7 +73,7 @@ func DisWordRecode(order_id, sale_money int, product_name, disWord string) {
 func OtherDisWordRecode(order_id, sale_money int, product_name, disWord, userId, creatTime string) {
 	//redis 获取分销者信息
 	//查询用户是企业还是个人账户
-	/*parentList := util.Mysql.SelectBySql("select  * from  dis_partner where uid=? ", userId)
+	parentList := util.Mysql.SelectBySql("select  * from  dis_partner where uid=? ", userId)
 	parentType := 1
 	if len(*parentList) > 0 {
 		parentTypeInt, _ := strconv.Atoi(fmt.Sprint((*parentList)[0]["type"]))
@@ -80,7 +81,7 @@ func OtherDisWordRecode(order_id, sale_money int, product_name, disWord, userId,
 	}
 	if (parentType == 2) {
 		return
-	}*/
+	}
 	infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=? and  password =? ", userId, disWord)
 	if len(*infoList) != 0 {
 		//分销者id

+ 1 - 4
src/jfw/modules/subscribepay/src/main.go

@@ -8,7 +8,6 @@ import (
 	"net/http"
 	"net/rpc"
 	"qfw/util/endless"
-	"rpcfollow"
 	_ "service"
 	"timetask"
 	_ "util"
@@ -17,10 +16,7 @@ import (
 )
 
 func main() {
-
 	go func() {
-		frpc := new(rpcfollow.JyPayRpc)
-		rpc.Register(frpc)
 		rpc.HandleHTTP()
 		// err := http.ListenAndServe(":"+Config.Webrpcport, nil)
 		// if err != nil {
@@ -30,6 +26,7 @@ func main() {
 		if err != nil {
 			log.Println("ListenAndServe: ", err)
 		}
+
 	}()
 
 	go timetask.Run()

+ 0 - 4
src/jfw/modules/weixin/src/distribution.json

@@ -19,10 +19,6 @@
 		"X":{
 			"name":" 5000+万条招标信息免费看,不遮挡!<a href='%s'>立即点击</a>,你身边的人都在悄悄用剑鱼标讯找商机!",
 			"url":"/X/%s"
-		},
-		"G":{
-			"name":"你身边的人都在用剑鱼标讯【超级订阅】找商机就差你了!<a href='%s'>立即点击</a>,快速获取全国招标项目!",
-			"url":"/G/%s"
 		}
 	}
 }

+ 7 - 3
src/jfw/modules/weixin/src/wx/wx.go

@@ -392,9 +392,13 @@ func saveUser(u *UserInfo, source, pre, RSource, CSource string) (bool, string,
 		newUser["s_province"] = u.Province
 		newUser["s_city"] = u.City
 		newUser["i_applystatus"] = 1
-		newUser["disWord"]=source
-		newUser["startTime"]=time.Now().Unix()
-		newUser["endTime"]=time.Now().AddDate(1, 0, 0).Unix()
+		if source!=""{
+			newUser["disWord"] = strings.Split(source, "_")[1]
+			newUser["startTime"] = time.Now().Unix()
+			newUser["endTime"] = time.Now().AddDate(1, 0, 0).Unix()
+		}
+
+
 		if isJyopUser {
 			newUser["s_registersource"] = "openplatform"
 		}