Commit ab57e0abca7c786c1167c6e844b86e9823719d45

Authored by liuzujun
1 parent 8e4be7b8

修改数据存储bug

Showing 1 changed file with 3 additions and 4 deletions   Show diff stats
src/shared/ModelBaseMysql.lua
... ... @@ -280,12 +280,11 @@ function ModelBaseMysql:setProperties(fields, forceSave)
280 280 tostring(self), self.class.__cname, property, typ, type(value)))
281 281  
282 282 if typ == "number" or typ == "string" then
283   - if self[propname] == value then
284   - return
  283 + if self[propname] ~= value then
  284 + self[propname] = value
  285 + self.cacheFields[property] = self[propname]
285 286 end
286 287 end
287   - self[propname] = value
288   - self.cacheFields[property] = self[propname]
289 288 end
290 289 end
291 290 if forceSave then
... ...