Class HistoryController


  • @RestController
    @RequestMapping("/history")
    public class HistoryController
    extends Object
    实体修改历史
    Author:
    shidaobang
    Date:
    2025/01/06
    • Constructor Detail

      • HistoryController

        public HistoryController()
    • Method Detail

      • getEntityChanges

        @RequestMapping("/changes")
        @Transactional("rsPublicTransactionManager")
        public net.risesoft.pojo.Y9Result<String> getEntityChanges​(@RequestParam
                                                                   String entity,
                                                                   @RequestParam
                                                                   Optional<Object> id,
                                                                   @RequestParam
                                                                   Optional<String> author)
        获取实体修改
        Parameters:
        entity - 实体类
        id - ID
        author - 操作人
        Returns:
        Y9Result<String>
      • getEntityShadows

        @RequestMapping("/shadows")
        @Transactional("rsPublicTransactionManager")
        public net.risesoft.pojo.Y9Result<List<Object>> getEntityShadows​(@RequestParam
                                                                         String entity,
                                                                         @RequestParam
                                                                         Optional<Object> id,
                                                                         @RequestParam
                                                                         Optional<String> author)
        获取实体的历史版本
        Parameters:
        entity - 实体
        id - ID
        author - 操作人
        Returns:
        Y9Result<List<Object>>
      • getEntityShadowsRows

        @RequestMapping("/getShadowRows")
        @Transactional("rsPublicTransactionManager")
        public net.risesoft.pojo.Y9Result<List<Map<String,​Object>>> getEntityShadowsRows​(@RequestParam
                                                                                               String entity,
                                                                                               @RequestParam
                                                                                               Optional<String> id,
                                                                                               @RequestParam
                                                                                               Optional<String> author)
                                                                                        throws ClassNotFoundException
        获取实体历史版本
        Parameters:
        entity - 实体
        id - ID
        author - 操作人
        Returns:
        Y9Result<List<Map<String, Object>>>
        Throws:
        ClassNotFoundException - 找不到类异常
      • getEntitySnapshots

        @RequestMapping("/snapshots")
        @Transactional("rsPublicTransactionManager")
        public net.risesoft.pojo.Y9Result<List<org.javers.core.metamodel.object.CdoSnapshot>> getEntitySnapshots​(@RequestParam
                                                                                                                 String entity,
                                                                                                                 @RequestParam
                                                                                                                 Optional<Object> id,
                                                                                                                 @RequestParam
                                                                                                                 Optional<String> author)
        获取实体历史版本(键值对的形式)
        Parameters:
        entity - 实体
        id - ID
        author - 作者
        Returns:
        Y9Result<List<CdoSnapshot>>
      • getShadowTitles

        @RequestMapping("/getShadowTitles")
        @Transactional("rsPublicTransactionManager")
        public net.risesoft.pojo.Y9Result<Set<String>> getShadowTitles​(@RequestParam
                                                                       String entity,
                                                                       @RequestParam
                                                                       Optional<Object> id)
        获取实体字段名
        Parameters:
        entity - 实体
        id - ID
        Returns:
        Y9Result<Set<String>>