Browse Source

Merge branch 'master' of http://192.168.3.207:10080/group3/SwordFish_Interface_Service

jiaojiao7 4 years ago
parent
commit
4dbca4a598
1 changed files with 3 additions and 0 deletions
  1. 3 0
      service/product.go

+ 3 - 0
service/product.go

@@ -9,6 +9,7 @@ import (
 	"sfis/model"
 	"sfis/model"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
+	"time"
 )
 )
 
 
 // 创建产品
 // 创建产品
@@ -53,6 +54,8 @@ func UpdateProduct(updateMap map[string]interface{}, id int) error {
 			updateMap[k] = strV
 			updateMap[k] = strV
 		}
 		}
 	}
 	}
+	t := time.Now()
+	updateMap["update_at"] = t
 	result := db.GetSFISDB().Table("product").Where("id = ?", id).Updates(updateMap)
 	result := db.GetSFISDB().Table("product").Where("id = ?", id).Updates(updateMap)
 	if result.Error != nil {
 	if result.Error != nil {
 		global.Logger.Error("productUpdate Error", zap.Any("updateMap", updateMap), zap.Any("error", result.Error))
 		global.Logger.Error("productUpdate Error", zap.Any("updateMap", updateMap), zap.Any("error", result.Error))