nbcio-boot因升级mybatis-plus到3.5.3.1和JSQLParser 到4.6引起的online表单开发的数据库导入出错解决

更多功能看演示系统

gitee源代码地址

后端代码: https://gitee.com/nbacheng/nbcio-boot

前端代码:https://gitee.com/nbacheng/nbcio-vue.git

在线演示(包括H5) : http://122.227.135.243:9888
 

    nbcio-boot因升级mybatis-plus到3.5.3.1和JSQLParser 到4.6引起的online表单开发的数据库导入出错,出错如下:

    初步判断应该跟online设计的jar包有关,因为这部分没开放源代码,所以只能考虑升级了

从3.0.02升级到3.2.2

<dependency><groupId>org.jeecgframework.boot</groupId><artifactId>hibernate-re</artifactId><version>3.2.2</version></dependency>

 升级后出现原先跟online表单相关的代码出现错误

其中BpmCommonComtroller去掉两个保存的引入类

 

FlowOnlCgformHeadController类修改如下:

package com.nbcio.modules.flowable.controller;import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.online.cgform.entity.OnlCgformHead;
import org.jeecg.modules.online.cgform.model.b;
import org.jeecg.modules.online.cgform.service.IOnlCgformFieldService;
import org.jeecg.modules.online.cgform.service.IOnlCgformHeadService;
import org.jeecg.modules.online.cgform.service.IOnlineJoinQueryService;
import org.jeecg.modules.online.cgform.service.IOnlineService;
import org.jeecg.modules.online.config.exception.BusinessException;import com.nbcio.modules.flowable.entity.FlowOnlCgformHead;
import com.nbcio.modules.flowable.entity.vo.OnlCgformDataVo;
import com.nbcio.modules.flowable.service.IFlowOnlCgformHeadService;
import com.nbcio.modules.flowable.utils.onlineUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSONObject;import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;/*** @Description: flow_onl_cgform_head* @Author: nbacheng* @Date:   2022-10-22* @Version: V1.0*/
@Api(tags="flow_onl_cgform_head")
@RestController
@RequestMapping("/flowable/onlCgformHead")
@Slf4j
public class FlowOnlCgformHeadController extends JeecgController<FlowOnlCgformHead, IFlowOnlCgformHeadService> {@Autowiredprivate IFlowOnlCgformHeadService flowOnlCgformHeadService;@Autowiredprivate IOnlCgformHeadService onlCgformHeadService;@Autowiredprivate IOnlineService onlineService;@AutowiredIOnlineJoinQueryService onlineJoinQueryService;@Autowiredprivate IOnlCgformFieldService onlCgformFieldService;/*** 分页列表查询** @param flowOnlCgformHead* @param pageNo* @param pageSize* @param req* @return*/@AutoLog(value = "flow_onl_cgform_head-分页列表查询")@ApiOperation(value="flow_onl_cgform_head-分页列表查询", notes="flow_onl_cgform_head-分页列表查询")@GetMapping(value = "/list")public Result<?> queryPageList(FlowOnlCgformHead flowOnlCgformHead,@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,HttpServletRequest req) {QueryWrapper<FlowOnlCgformHead> queryWrapper = QueryGenerator.initQueryWrapper(flowOnlCgformHead, req.getParameterMap());Page<FlowOnlCgformHead> page = new Page<FlowOnlCgformHead>(pageNo, pageSize);IPage<FlowOnlCgformHead> pageList = flowOnlCgformHeadService.page(page, queryWrapper);return Result.OK(pageList);}/***   添加** @param flowOnlCgformHead* @return*/@AutoLog(value = "flow_onl_cgform_head-添加")@ApiOperation(value="flow_onl_cgform_head-添加", notes="flow_onl_cgform_head-添加")@PostMapping(value = "/add")public Result<?> add(@RequestBody FlowOnlCgformHead flowOnlCgformHead) {flowOnlCgformHeadService.save(flowOnlCgformHead);return Result.OK("添加成功!");}/***  编辑** @param flowOnlCgformHead* @return*/@AutoLog(value = "flow_onl_cgform_head-编辑")@ApiOperation(value="flow_onl_cgform_head-编辑", notes="flow_onl_cgform_head-编辑")@PutMapping(value = "/edit")public Result<?> edit(@RequestBody FlowOnlCgformHead flowOnlCgformHead) {flowOnlCgformHeadService.updateById(flowOnlCgformHead);return Result.OK("编辑成功!");}/***   通过id删除** @param id* @return*/@AutoLog(value = "flow_onl_cgform_head-通过id删除")@ApiOperation(value="flow_onl_cgform_head-通过id删除", notes="flow_onl_cgform_head-通过id删除")@DeleteMapping(value = "/delete")public Result<?> delete(@RequestParam(name="id",required=true) String id) {flowOnlCgformHeadService.removeById(id);return Result.OK("删除成功!");}/***  批量删除** @param ids* @return*/@AutoLog(value = "flow_onl_cgform_head-批量删除")@ApiOperation(value="flow_onl_cgform_head-批量删除", notes="flow_onl_cgform_head-批量删除")@DeleteMapping(value = "/deleteBatch")public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {this.flowOnlCgformHeadService.removeByIds(Arrays.asList(ids.split(",")));return Result.OK("批量删除成功!");}/*** 通过id查询** @param id* @return*/@AutoLog(value = "flow_onl_cgform_head-通过id查询")@ApiOperation(value="flow_onl_cgform_head-通过id查询", notes="flow_onl_cgform_head-通过id查询")@GetMapping(value = "/queryById")public Result<?> queryById(@RequestParam(name="id",required=true) String id) {FlowOnlCgformHead flowOnlCgformHead = flowOnlCgformHeadService.getById(id);if(flowOnlCgformHead==null) {return Result.error("未找到对应数据");}return Result.OK(flowOnlCgformHead);}/*** 通过formId查询** @param formId* @return*/@AutoLog(value = "flow_onl_cgform_head-通过formId查询")@ApiOperation(value="flow_onl_cgform_head-通过formId查询", notes="flow_onl_cgform_head-通过formId查询")@GetMapping(value = "/queryByFormId/{formId}")public Result<?> queryByFormId(@PathVariable("formId")  String formId) {Map<String, Object> flowOnlCgformHeadMap = flowOnlCgformHeadService.getOnlCgformHeadByFormId(formId);if(flowOnlCgformHeadMap==null) {return Result.error("未找到对应数据");}return Result.OK(flowOnlCgformHeadMap);}@AutoLog(value = "getColumns-通过code查询获取online表单列表信息")@ApiOperation(value="getColumns-通过code查询获取online表单列表信息", notes="getColumns-通过code查询获取online表单列表信息")@GetMapping({"/getColumns/{code}"})public Result<b> getColumns(@PathVariable("code") String code) {Result result = new Result();OnlCgformHead onlCgformHead = (OnlCgformHead)this.onlCgformHeadService.getById(code);if (onlCgformHead == null) {result.error500("实体不存在");return result;} else {LoginUser loginuser = (LoginUser)SecurityUtils.getSubject().getPrincipal();b onlComplexModel = this.onlineService.queryOnlineConfig(onlCgformHead, loginuser.getUsername());onlComplexModel.setIsDesForm(onlCgformHead.getIsDesForm());onlComplexModel.setDesFormCode(onlCgformHead.getDesFormCode());result.setResult(onlComplexModel);result.setOnlTable(onlCgformHead.getTableName());return result;}}@AutoLog(value = "getData-通过code查询获取online表单数据")@ApiOperation(value="getData-通过code查询获取online表单数据", notes="getData-通过code查询获取online表单数据")@GetMapping({"/getData/{code}"})public Result<Map<String, Object>> getData(@PathVariable("code") String code, HttpServletRequest request) {Result result = new Result();OnlCgformHead onlCgformHead = (OnlCgformHead) this.onlCgformHeadService.getById(code);if (onlCgformHead == null) {result.error500("实体不存在");return result;} else {Map map = null;try {Map objectmap = onlineUtils.objectHashMap(request);boolean bJoinQuery = onlineUtils.isJoinQuery(onlCgformHead);if (bJoinQuery) {map = this.onlineJoinQueryService.pageList(onlCgformHead, objectmap);} else {map = this.onlCgformFieldService.queryAutolistPage(onlCgformHead, objectmap, (List) null);}this.getEnhanceList(onlCgformHead, map);result.setResult(map);} catch (Exception except) {log.error(except.getMessage(), except);result.error500("数据库查询失败," + except.getMessage());}result.setOnlTable(onlCgformHead.getTableName());return result;}}@AutoLog(value = "getFormItem-通过code查询获取子表单数据")@ApiOperation(value="getFormItem-通过code查询获取子表单数据", notes="getFormItem-通过code查询获取子表单数据")@GetMapping({"/getFormItem/{code}"})public Result<?> getFormItem(@PathVariable("code") String code, HttpServletRequest var2) {OnlCgformHead onlCgformHead = (OnlCgformHead) this.onlCgformHeadService.getById(code);if (onlCgformHead == null) {Result.error("表不存在");}Result result = new Result();LoginUser loginuser = (LoginUser) SecurityUtils.getSubject().getPrincipal();JSONObject formItemJsonObject = this.onlineService.queryOnlineFormItem(onlCgformHead, loginuser.getUsername());result.setResult(onlineUtils.resultOnlineFormItem(formItemJsonObject));result.setOnlTable(onlCgformHead.getTableName());return result;}/***   添加** @param flowOnlCgformHead* @return*/@AutoLog(value = "flow_onl_cgform_head-保存")@ApiOperation(value="flow_onl_cgform_head-保存", notes="flow_onl_cgform_head-保存")@PostMapping(value = "/save")public Result<?> save(@RequestBody OnlCgformDataVo onlCgformDataVo) {try {flowOnlCgformHeadService.save(onlCgformDataVo);} catch (BusinessException e) {// TODO Auto-generated catch blocke.printStackTrace();}return Result.OK("保存成功!");}/*** 导出excel** @param request* @param flowOnlCgformHead*/@RequestMapping(value = "/exportXls")public ModelAndView exportXls(HttpServletRequest request, FlowOnlCgformHead flowOnlCgformHead) {return super.exportXls(request, flowOnlCgformHead, FlowOnlCgformHead.class, "test_onl_cgform_head");}/*** 通过excel导入数据** @param request* @param response* @return*/@RequestMapping(value = "/importExcel", method = RequestMethod.POST)public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {return super.importExcel(request, response, FlowOnlCgformHead.class);}private void getEnhanceList(OnlCgformHead onlCgformHead, Map<String, Object> map) throws BusinessException {List recordlist = (List) map.get("records");this.onlCgformHeadService.executeEnhanceList(onlCgformHead, "query", recordlist);}}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/62560.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【Spring专题】Bean的声明周期流程图

目录 前言阅读指引 流程图一、之前推测的简单流程图&#xff08;一点点参考&#xff09;*二、Bean生命周期流程图&#xff08;根据Spring源码自结&#xff09;*三、阶段源码流程图&#xff08;不断更新&#xff09; 前言 我向来不主张【通过源码】理解业务&#xff0c;因为每个…

NZ系列工具NZ01:64位系统VBA二维码应用技术

【分享成果&#xff0c;随喜正能量】汗水能浇出成功的鲜花&#xff0c;拼搏能赢来胜利的喜悦&#xff0c;人生不易&#xff0c;累也过&#xff0c;闲也过&#xff0c;只要能充实就是最好过&#xff0c;有也过&#xff0c;没也过&#xff0c;为什么你不看看众生怎么过&#xff0…

Bert详细学习及代码实现详解

BERT概述 BERT的全称是Bidirectional Encoder Representation from Transformers&#xff0c;即双向Transformer的Encoder&#xff0c;因为decoder是不能获要预测的信息的。在大型语料库&#xff08;Wikipedia BookCorpus&#xff09;上训练一个大型模型&#xff08;12 层到 …

springBoot整合RabbitMq实现手动确认消息

如何保证消息的可靠性投递&#xff1f; 1.保证生产者向broke可靠性投递&#xff0c;开启ack投递成功确认&#xff0c;如果失败的话进行消息补偿 /*** author yueF_L* date 2023-08-10 01:32* ConfirmCallback&#xff1a;消息只要被 RabbitMQ broker 接收到就会触发confirm方…

【React学习】—类的基本知识(五)

【React学习】—类的基本知识&#xff08;五&#xff09; <script>// 创建一个Person类class Person{//构造器方法constructor(name,age){this.namename;this.ageage;}//一般方法speak(){//speak方法一般放在哪里&#xff1f;类的原型上&#xff0c;供实例使用//通过Pers…

什么是DNS的缓存?

DNS 缓存是一个临时的数据库&#xff0c;存储在计算机或网络设备&#xff08;如路由器&#xff09;上&#xff0c;用于保存最近的 DNS 查询结果。这种缓存机制可以加速后续的相同查询&#xff0c;因为设备可以直接从缓存中提取先前的查询结果&#xff0c;而不需要再次到外部的 …

SpringBoot自动装配及run方法原理探究

自动装配 1、pom.xml spring-boot-dependencies&#xff1a;核心依赖在父工程中&#xff01;我们在写或者引入一些SpringBoot依赖的时候&#xff0c;不需要指定版本&#xff0c;就因为有这些版本仓库 1.1 其中它主要是依赖一个父工程&#xff0c;作用是管理项目的资源过滤及…

【刷题笔记8.10】LeetCode题目:有效括号

LeetCode题目&#xff1a;有效括号 1、题目描述&#xff1a; 给定一个只包括 ‘(’&#xff0c;‘)’&#xff0c;‘{’&#xff0c;‘}’&#xff0c;‘[’&#xff0c;‘]’ 的字符串 s &#xff0c;判断字符串是否有效。 有效字符串需满足&#xff1a; 左括号必须用相同…

CTFSHOW 文件包含

目录 web78 php://filter web79 data://text/plain web80 日志文件包含 web81 web82-86 session 文件包含 web87 死亡代码 绕过 rot13 base64 rot13 base64 web88 web78 php://filter <?php/* # -*- coding: utf-8 -*- # Author: h1xa # Date: 2020-09-16 10:…

【VUE】项目本地开启https访问模式(vite4)

在实际开发中&#xff0c;有时候需要项目以https形式进行页面访问/调试&#xff0c;下面介绍下非vue-cli创建的vue项目如何开启https 环境 vue: ^3.2.47vite: ^4.1.4 根据官方文档&#xff1a;开发服务器选项 | Vite 官方中文文档 ps&#xff1a;首次操作&#xff0c;不要被类…

【深度学习中的批量归一化BN和层归一化LN】BN层(Batch Normalization)和LN层(Layer Normalization)的区别

文章目录 1、概述2、BN层3、LN层4、Pytorch的实现5、BN层和LN层的对比 1、概述 归一化(Normalization) 方法&#xff1a;指的是把不同维度的特征&#xff08;例如序列特征或者图像的特征图等&#xff09;转换为相同或相似的尺度范围内的方法&#xff0c;比如把数据特征映射到[…

分清性能测试,负载测试,压力测试这三个的区别

做测试一年多来&#xff0c;虽然平时的工作都能很好的完成&#xff0c;但最近突然发现自己在关于测试的整体知识体系上面的了解很是欠缺&#xff0c;所以&#xff0c;在工作之余也做了一些测试方面的知识的补充。不足之处&#xff0c;还请大家多多交流&#xff0c;互相学习。 …