|
@@ -15,7 +15,7 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
-func MaterialDetail(msgId, positionId int64) (dataMap map[string]interface{}) {
|
|
|
+func MaterialDetail(msgId, positionId int64, userId string) (dataMap map[string]interface{}) {
|
|
|
//查询到内容
|
|
|
dataMap = map[string]interface{}{}
|
|
|
data := entity.Mysql.SelectBySql("SELECT a.id,a.title,a.content,a.createtime,a.group_id,a.link,a.msg_type,b.file_url,b.material_content,b.qrcode_url,b.task_description,b.task_name,b.img_webpage,b.receive_user_name,b.receive_position_id,b.id as mid FROM jianyu.message_send_log a LEFT JOIN bi_service.operating_materials b ON a.id = b.msg_id WHERE a.id = ?", msgId)
|
|
@@ -33,15 +33,15 @@ func MaterialDetail(msgId, positionId int64) (dataMap map[string]interface{}) {
|
|
|
dataMap["attUrl"] = ""
|
|
|
}
|
|
|
code := ""
|
|
|
- ch := entity.JyBi.FindOne("dwd_d_userbase_belongto_rulecode", map[string]interface{}{"position_id": positionId}, "code", "")
|
|
|
+ ch := entity.JyBi.FindOne("dwd_d_userbase_belongto_rulecode", map[string]interface{}{"user_id": userId}, "code", "")
|
|
|
if ch != nil && len(*ch) > 0 {
|
|
|
code = common.InterfaceToStr((*ch)["code"])
|
|
|
}
|
|
|
if common.InterfaceToStr(dataMap["qrcode_url"]) != "" {
|
|
|
- dataMap["qrcode_url"] = fmt.Sprintf("%s/material/%d/%s", config.ConfigJson.JyWebDomain, common.Int64All(dataMap["mid"]), code)
|
|
|
+ dataMap["qrcode_url"] = fmt.Sprintf("%s/material/%d/%s?tp=material", config.ConfigJson.JyWebDomain, common.Int64All(dataMap["mid"]), code)
|
|
|
}
|
|
|
if common.InterfaceToStr(dataMap["img_webpage"]) != "" {
|
|
|
- dataMap["img_webpage"] = fmt.Sprintf("%s/material/%d/%s?types=1", config.ConfigJson.JyWebDomain, common.Int64All(dataMap["mid"]), code)
|
|
|
+ dataMap["img_webpage"] = fmt.Sprintf("%s/material/%d/%s?types=1&tp=material", config.ConfigJson.JyWebDomain, common.Int64All(dataMap["mid"]), code)
|
|
|
}
|
|
|
return dataMap
|
|
|
}
|