- mark store sku bind as modified when change storevendor price percentage
This commit is contained in:
@@ -301,7 +301,7 @@ func Struct2FlatMap(obj interface{}) map[string]interface{} {
|
||||
}
|
||||
|
||||
// todo 这里看是否需要将key值转换成标准格式(即字母大写),因为beego orm不区分,不转换也可以
|
||||
func FilterMapByStructObject(mapData map[string]interface{}, obj interface{}, excludedFields []string) (valid map[string]interface{}, invalid map[string]interface{}) {
|
||||
func FilterMapByStructObject(mapData map[string]interface{}, obj interface{}, excludedFields []string, isCheckValue bool) (valid map[string]interface{}, invalid map[string]interface{}) {
|
||||
excludedMap := make(map[string]int)
|
||||
for _, v := range excludedFields {
|
||||
excludedMap[v] = 1
|
||||
@@ -310,7 +310,7 @@ func FilterMapByStructObject(mapData map[string]interface{}, obj interface{}, ex
|
||||
valid = make(map[string]interface{})
|
||||
invalid = make(map[string]interface{})
|
||||
for k, v := range mapData {
|
||||
if m[k] != nil && excludedMap[k] == 0 && v != nil {
|
||||
if m[k] != nil && excludedMap[k] == 0 && v != nil && (!isCheckValue || m[k] != v) {
|
||||
valid[k] = v
|
||||
} else {
|
||||
invalid[k] = v
|
||||
|
||||
Reference in New Issue
Block a user