jihs 3 jaren geleden
bovenliggende
commit
00f7b87fe8

+ 47 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/entity/TbTableInfo.java

@@ -0,0 +1,47 @@
+package org.jeecg.modules.activiti.entity;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+
+@Data
+public class TbTableInfo {
+    @TableId(type= IdType.UUID)
+    private String id;
+    //表名
+    private String businessTable;
+    //表单名
+    private String text;
+    //json => String
+    @JsonIgnore
+    private String content;
+   //json
+    @TableField(exist = false)
+    private Object jsonContent;
+    //修改人
+    private String updateBy;
+    //修改时间
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+    //创建时间
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+    //创建人
+    private String createBy;
+    //组织
+    private String pkOrg;
+    @TableField(exist = false)
+    private String routeName;
+
+    public TbTableInfo() {
+    }
+}

+ 3 - 2
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/mapper/TbTableInfoMapper.java

@@ -1,13 +1,14 @@
 package org.jeecg.modules.activiti.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Select;
-
+import org.jeecg.modules.activiti.entity.TbTableInfo;
 import java.util.List;
 import java.util.Map;
 
 @Mapper
-public interface TbTableInfoMapper {
+public interface TbTableInfoMapper extends BaseMapper<TbTableInfo> {
     @Select("select * from tb_table_info")
     List<Map> getList();
 }

+ 3 - 1
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/ITbTableInfoService.java

@@ -1,8 +1,10 @@
 package org.jeecg.modules.activiti.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.activiti.entity.TbTableInfo;
 import java.util.List;
 import java.util.Map;
 
-public interface ITbTableInfoService  {
+public interface ITbTableInfoService  extends IService<TbTableInfo> {
     List<Map> getList();
 }

+ 3 - 2
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/Impl/TbTableInfoServiceImpl.java

@@ -1,15 +1,16 @@
 package org.jeecg.modules.activiti.service.Impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.activiti.entity.TbTableInfo;
 import org.jeecg.modules.activiti.mapper.TbTableInfoMapper;
 import org.jeecg.modules.activiti.service.ITbTableInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-
 import java.util.List;
 import java.util.Map;
 
 @Service
-public class TbTableInfoServiceImpl implements ITbTableInfoService {
+public class TbTableInfoServiceImpl extends ServiceImpl<TbTableInfoMapper, TbTableInfo> implements ITbTableInfoService {
     @Autowired
     private TbTableInfoMapper tbTableInfoMapper;
 

+ 0 - 35
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/TbTableInfoController.java

@@ -1,35 +0,0 @@
-package org.jeecg.modules.activiti.web;
-
-import com.alibaba.fastjson.JSONObject;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.modules.activiti.service.ITbTableInfoService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-import java.util.List;
-import java.util.Map;
-
-@RestController
-@RequestMapping("/tbTableInfo")
-@Slf4j
-@Transactional
-public class TbTableInfoController {
-   @Autowired
-   private ITbTableInfoService tbTableInfoService;
-
-   @ResponseBody
-   @RequestMapping("/list")
-   public Result<Object> list(){
-       List<Map> list = tbTableInfoService.getList();
-       for(Map map : list){
-           String content = (String) map.get("content");
-           Object obj = JSONObject.parseObject(content);
-           map.put("content", obj);
-       }
-
-       return Result.ok(list);
-   }
-}