|
@@ -54,6 +54,21 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
|
|
|
number = gconv.Int(dataMap["number"])
|
|
|
}
|
|
|
}
|
|
|
+ isExists := false
|
|
|
+ id := this.FindJyConsumePackRecord()
|
|
|
+ if id != "" && this.Remarks["downUrl"] != nil {
|
|
|
+ if util.MQFW.UpdateById(jyCC, id, map[string]interface{}{
|
|
|
+ "$set": map[string]interface{}{
|
|
|
+ "l_updateDate": time.Now().Unix(),
|
|
|
+ },
|
|
|
+ }) {
|
|
|
+ delete(this.Remarks, "id")
|
|
|
+ delete(this.Remarks, "title")
|
|
|
+ r = this.Remarks
|
|
|
+ r["isExists"] = true
|
|
|
+ isExists = true
|
|
|
+ }
|
|
|
+ }
|
|
|
if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
|
|
|
if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
|
|
|
r = SupplyInfoFile(_fileName, _id)
|
|
@@ -73,24 +88,15 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
|
|
|
log.Println("大会员附件下载-历史记录异常:" + this.UserId)
|
|
|
}
|
|
|
}(this, r)*/
|
|
|
- this.saveJyConsumePackList()
|
|
|
+ if r["downUrl"] != nil {
|
|
|
+ this.Remarks["downUrl"] = r["downUrl"]
|
|
|
+ this.Remarks["size"] = r["size"]
|
|
|
+ }
|
|
|
+ if !isExists {
|
|
|
+ this.saveJyConsumePackList()
|
|
|
+ }
|
|
|
} else {
|
|
|
- isExists := false
|
|
|
//查询当月附件下载历史记录-如是已下载过的附件不再扣除次数
|
|
|
- id := this.FindJyConsumePackRecord()
|
|
|
- if id != "" && this.Remarks["downUrl"] != nil {
|
|
|
- if util.MQFW.UpdateById(jyCC, id, map[string]interface{}{
|
|
|
- "$set": map[string]interface{}{
|
|
|
- "l_updateDate": time.Now().Unix(),
|
|
|
- },
|
|
|
- }) {
|
|
|
- delete(this.Remarks, "id")
|
|
|
- delete(this.Remarks, "title")
|
|
|
- r = this.Remarks
|
|
|
- r["isExists"] = true
|
|
|
- isExists = true
|
|
|
- }
|
|
|
- }
|
|
|
// log.Println(this.Remarks, "++++++", this.AccountId, id, "-------------", isExists)
|
|
|
//当月未有消费记录
|
|
|
if !isExists {
|