|
@@ -97,16 +97,24 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
fields.keySet().forEach(item -> {
|
|
|
endfields.put(toUnderScoreCase(item), fields.get(item));
|
|
|
});
|
|
|
+ Map<String, Object> endConditions = new HashMap<>();
|
|
|
+ conditions.keySet().forEach(item -> {
|
|
|
+ endConditions.put(toUnderScoreCase(item), conditions.get(item));
|
|
|
+ });
|
|
|
endfields.put("update_by", SecurityUtils.getUsername());
|
|
|
endfields.put("update_time", DateUtils.getTime());
|
|
|
endfields.put("update_by_id", SecurityUtils.getUserId());
|
|
|
- return commonMapper.edit(endfields, tableName, conditions);
|
|
|
+ return commonMapper.edit(endConditions, tableName, conditions);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int batchDelete(CommonEntity commonEntity) {
|
|
|
String tableName = (String) commonEntity.getBasicMap().get("tableName");
|
|
|
Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
|
|
|
+ Map<String, Object> endConditions = new HashMap<>();
|
|
|
+ conditions.keySet().forEach(item -> {
|
|
|
+ endConditions.put(toUnderScoreCase(item), conditions.get(item));
|
|
|
+ });
|
|
|
return commonMapper.batchDelete(tableName, conditions);
|
|
|
}
|
|
|
|