Skip to content

Commit

Permalink
feat-ICreateAbility-增加beforeCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
aruis committed Nov 12, 2024
1 parent 435bfea commit 16b8667
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
*/
public interface ICreateAbility extends IDatabaseAbilityStd, IMetadataAbility {

default void beforeCreate(Map body) {

}

default void afterCreate(String id) {

}
Expand All @@ -38,6 +42,7 @@ default void afterCreate(String id) {
@Transactional
@Operation(summary = "新增数据", description = "返回新增数据ID")
default String create(Map body) {
beforeCreate(body);
HashMap map = new HashMap<>(body);
fitOutDefaultValue(map);

Expand Down

0 comments on commit 16b8667

Please sign in to comment.