mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-04 21:28:00 +08:00
Solved the bugs that when editted file in resource center online, don't update the time and size of the file
This commit is contained in:
parent
929399e804
commit
76662d31da
@ -569,6 +569,7 @@ public class ResourcesService extends BaseService {
|
||||
* @param resourceId
|
||||
* @return
|
||||
*/
|
||||
@Transactional(value = "TransactionManager",rollbackFor = Exception.class)
|
||||
public Result updateResourceContent(int resourceId, String content) {
|
||||
Result result = new Result();
|
||||
|
||||
@ -597,6 +598,10 @@ public class ResourcesService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
resource.setSize(content.getBytes().length);
|
||||
resource.setUpdateTime(new Date());
|
||||
resourcesMapper.update(resource);
|
||||
|
||||
User user = userMapper.queryDetailsById(resource.getUserId());
|
||||
String tenantCode = tenantMapper.queryById(user.getTenantId()).getTenantCode();
|
||||
|
||||
|
@ -118,6 +118,7 @@ public class ResourceMapperProvider {
|
||||
SET("`alias` = #{resource.alias}");
|
||||
SET("`desc` = #{resource.desc}");
|
||||
SET("`update_time` = #{resource.updateTime}");
|
||||
SET("`size` = #{resource.size}");
|
||||
WHERE("`id` = #{resource.id}");
|
||||
}}.toString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user