- 改UpdtePlace的调用参数

This commit is contained in:
gazebo
2019-05-13 16:43:02 +08:00
parent 37da5be607
commit df53fcb9de
4 changed files with 33 additions and 9 deletions

View File

@@ -58,7 +58,7 @@ func UpdateEntityByKV(db *DaoDB, item interface{}, kvs map[string]interface{}, c
}
func UpdateEntityLogically(db *DaoDB, item interface{}, kvs map[string]interface{}, userName string, conditions map[string]interface{}) (num int64, err error) {
if conditions != nil {
if conditions != nil && refutil.IsFieldExist(item, model.FieldDeletedAt) {
conditions = utils.MergeMaps(conditions, map[string]interface{}{
model.FieldDeletedAt: utils.DefaultTimeValue,
})
@@ -71,7 +71,7 @@ func UpdateEntityLogically(db *DaoDB, item interface{}, kvs map[string]interface
// 此函数会更新同步标志
func UpdateEntityLogicallyAndUpdateSyncStatus(db *DaoDB, item interface{}, kvs map[string]interface{}, userName string, conditions map[string]interface{}, syncStatusFieldName string, valueMask int) (num int64, err error) {
if conditions != nil {
if conditions != nil && refutil.IsFieldExist(item, model.FieldDeletedAt) {
conditions = utils.MergeMaps(conditions, map[string]interface{}{
model.FieldDeletedAt: utils.DefaultTimeValue,
})