|
@@ -25,7 +25,7 @@ func CreateClue(in *pb.CreateCuleReq) (result *pb.BiReply, err error) {
|
|
|
}, nil
|
|
|
}
|
|
|
uId := common.ObjToString((*info)["baseinfo_id"])
|
|
|
- userId := ""
|
|
|
+ userId, userName := "", ""
|
|
|
clueInfo := entity.JyBiTidb.FindOne("dwd_f_crm_clue_info", bson.M{"uid": uId}, "", "")
|
|
|
if clueInfo != nil && len(*clueInfo) > 0 {
|
|
|
return &pb.BiReply{
|
|
@@ -34,9 +34,10 @@ func CreateClue(in *pb.CreateCuleReq) (result *pb.BiReply, err error) {
|
|
|
Data: nil,
|
|
|
}, nil
|
|
|
}
|
|
|
- userInfo := entity.JyBiTidb.FindOne("dwd_f_userbase_baseinfo", bson.M{"phone": in.Phone}, "userid", "")
|
|
|
+ userInfo := entity.JyBiTidb.FindOne("dwd_f_userbase_baseinfo", bson.M{"phone": in.Phone}, "userid,name", "")
|
|
|
if userInfo != nil && len(*userInfo) > 0 {
|
|
|
userId = common.ObjToString((*userInfo)["userid"])
|
|
|
+ userName = common.ObjToString((*userInfo)["name"])
|
|
|
}
|
|
|
isGroup, isCommerce := CompanyType(in.Phone) //判断是否集团公司、工商库
|
|
|
clueId := int64(0)
|
|
@@ -52,7 +53,7 @@ func CreateClue(in *pb.CreateCuleReq) (result *pb.BiReply, err error) {
|
|
|
"top_cluetype": "4",
|
|
|
"sub_cluetype": "154",
|
|
|
"trailstatus": "01",
|
|
|
- "name": in.Phone,
|
|
|
+ "name": userName,
|
|
|
"phone": in.Phone,
|
|
|
"company_nature": isGroup,
|
|
|
"company_verification": isCommerce,
|
|
@@ -134,14 +135,15 @@ func TransferClue(in *pb.TransferClueReq) (result *pb.BiReply, err error) {
|
|
|
endtime := common.ObjToString((*orderInfo)["vip_endtime"])
|
|
|
t, _ := time.Parse(date.Date_Full_Layout, endtime)
|
|
|
|
|
|
- isExpired := false // 即将过期
|
|
|
- if time.Now().Unix() > t.Unix()+3*30*24*3600 {
|
|
|
+ isExpired := false // 过期订单
|
|
|
+ if time.Now().Unix() > t.Unix() {
|
|
|
return &pb.BiReply{
|
|
|
ErrorCode: 1,
|
|
|
ErrorMsg: "订单已经过期",
|
|
|
Data: nil,
|
|
|
}, nil
|
|
|
- } else if t.Unix() > time.Now().Unix() && time.Now().Unix()+3*30*24*3600 > t.Unix() {
|
|
|
+ }
|
|
|
+ if t.Unix() < time.Now().Unix()+3*30*24*3600 && t.Unix() > time.Now().Unix() {
|
|
|
isExpired = true
|
|
|
}
|
|
|
buy_subject := common.IntAll((*orderInfo)["buy_subject"])
|