|
@@ -30,16 +30,16 @@ func MaterialDetail(msgId, positionId int64) (dataMap map[string]interface{}) {
|
|
|
attArr = append(attArr, gconv.String(v["file_url"]))
|
|
|
}
|
|
|
dataMap["attUrl"] = strings.Join(attArr, ",")
|
|
|
- code := ""
|
|
|
- ch := entity.JyBi.FindOne("dwd_d_userbase_belongto_rulecode", map[string]interface{}{"position_id": positionId}, "code", "")
|
|
|
- if ch != nil && len(*ch) > 0 {
|
|
|
- code = common.InterfaceToStr((*ch)["code"])
|
|
|
- }
|
|
|
- dataMap["qrcode_url"] = fmt.Sprintf("%s/material/%s/%s", config.ConfigJson.JyWebDomain, encrypt.SE.EncodeString(common.InterfaceToStr(dataMap["mid"])), code)
|
|
|
- dataMap["img_webpage"] = fmt.Sprintf("%s/material/%s/%s?types=1", config.ConfigJson.JyWebDomain, encrypt.SE.EncodeString(common.InterfaceToStr(dataMap["mid"])), code)
|
|
|
} else {
|
|
|
dataMap["attUrl"] = ""
|
|
|
}
|
|
|
+ code := ""
|
|
|
+ ch := entity.JyBi.FindOne("dwd_d_userbase_belongto_rulecode", map[string]interface{}{"position_id": positionId}, "code", "")
|
|
|
+ if ch != nil && len(*ch) > 0 {
|
|
|
+ code = common.InterfaceToStr((*ch)["code"])
|
|
|
+ }
|
|
|
+ dataMap["qrcode_url"] = fmt.Sprintf("%s/material/%s/%s", config.ConfigJson.JyWebDomain, encrypt.SE.EncodeString(common.InterfaceToStr(dataMap["mid"])), code)
|
|
|
+ dataMap["img_webpage"] = fmt.Sprintf("%s/material/%s/%s?types=1", config.ConfigJson.JyWebDomain, encrypt.SE.EncodeString(common.InterfaceToStr(dataMap["mid"])), code)
|
|
|
return dataMap
|
|
|
}
|
|
|
return nil
|