基于jeecg-boot的flowable流程历史记录显示修改

news2025/4/18 1:13:29

更多nbcio-boot功能请看演示系统

gitee源代码地址

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

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

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

历史记录增加开始与结束的显示,以方便用户查看。

1、前端修改,代码如下:

<el-card class="box-card" v-if="flowRecordList">
      <div slot="header" class="clearfix">
        <span class="el-icon-notebook-1">审批记录</span>
      </div>
      <el-col :span="16" :offset="4">
        <div class="block">
          <el-timeline>
            <el-timeline-item v-for="(item,index ) in flowRecordList" :key="index" :icon="setIcon(item.finishTime)"
              :color="setColor(item.finishTime)">
              <p style="font-weight: 700">{{item.taskName}}</p>
              <el-card v-if="item.activityType === 'startEvent'" class="box-card" shadow="hover">
                {{ item.assigneeName }} 在 {{ item.createTime }} 发起流程
              </el-card>
              <el-card v-if="item.activityType === 'userTask'" :body-style="{ padding: '10px' }">
                <label v-if="item.assigneeName" style="font-weight: normal;margin-right: 30px;">实际办理:
                  {{item.assigneeName}}
                  <el-tag type="info" size="mini">{{item.deptName}}</el-tag>
                </label>
                <label v-if="item.candidate" style="font-weight: normal;margin-right: 30px;">候选办理:
                  {{item.candidate}}</label>
                <label style="font-weight: normal">接收时间: </label><label
                  style="color:#8a909c;font-weight: normal">{{item.createTime}}</label>
                <label v-if="item.finishTime" style="margin-left: 30px;font-weight: normal">办结时间: </label><label
                  style="color:#8a909c;font-weight: normal">{{item.finishTime}}</label>
                <label v-if="item.duration" style="margin-left: 30px;font-weight: normal">耗时: </label><label
                  style="color:#8a909c;font-weight: normal">{{item.duration}}</label>
                <p v-if="item.listFlowCommentDto" v-for="(commentitem,index ) in item.listFlowCommentDto" :key="index">
                   <el-tag type="success" v-if="commentitem.type === '1'"> {{commentitem.comment}}</el-tag>
                   <el-form  v-if= "commentitem.type === '1' && fileitem.type === '1'  && item.listcommentFileDto.length>0" v-for="(fileitem,fileindex ) in item.listcommentFileDto" :key="fileindex">
                     <el-form-item label="附件"  prop="listcommentFileDto">
                          <j-upload  v-if="fileitem.type === '1'" v-model="fileitem.fileurl" :disabled = "true"  text="上传的文件" ></j-upload>                 
                     </el-form-item>
                   </el-form>  
                   <el-tag type="warning" v-if="commentitem.type === '2'"> {{"退回: "+ commentitem.comment}}</el-tag>
                   <el-form v-if= "commentitem.type === '2' && fileitem.type === '2'  && item.listcommentFileDto.length>0" v-for="(fileitem,fileindex ) in item.listcommentFileDto" :key="fileindex">
                     <el-form-item label="附件"  prop="listcommentFileDto">
                          <j-upload v-if="fileitem.type === '2'" v-model="fileitem.fileurl" :disabled = "true"  text="退回上传的文件" ></j-upload> 
                     </el-form-item>
                   </el-form>  
                   <el-tag type="danger" v-if="commentitem.type === '3'">  {{"驳回: "+commentitem.comment}}</el-tag>
                   <el-form v-if= "commentitem.type === '3' && fileitem.type === '3'  && item.listcommentFileDto.length>0" v-for="(fileitem,fileindex ) in item.listcommentFileDto" :key="fileindex">
                     <el-form-item label="附件"  prop="listcommentFileDto">
                        <j-upload v-if="fileitem.type === '3'"  v-model="fileitem.fileurl" :disabled = "true"  text="驳回上传的文件" ></j-upload>
                     </el-form-item>
                   </el-form>  
                   <el-tag type="success" v-if="commentitem.type === '4'">  {{commentitem.comment}}</el-tag>
                   <el-form  v-if= "commentitem.type === '4' && fileitem.type === '4'  && item.listcommentFileDto.length>0" v-for="(fileitem,fileindex ) in item.listcommentFileDto" :key="fileindex">
                     <el-form-item label="附件"  prop="listcommentFileDto">
                          <j-upload  v-if="fileitem.type === '4'" v-model="fileitem.fileurl" :disabled = "true"  text="委派上传的文件" ></j-upload>                 
                     </el-form-item>
                   </el-form>  
                   <el-tag type="success" v-if="commentitem.type === '5'">  {{commentitem.comment}}</el-tag>  
                    <el-form v-if= "commentitem.type === '5' && fileitem.type === '5' && item.listcommentFileDto.length>0" v-for="(fileitem,fileindex ) in item.listcommentFileDto" :key="fileindex">
                      <el-form-item label="附件"  prop="listcommentFileDto" >
                         <j-upload v-model="fileitem.fileurl" :disabled = "true"  text="转办上传的文件" ></j-upload>
                      </el-form-item>
                    </el-form>  
                    <el-tag type="warning" v-if="commentitem.type === '7'"> {{"撤回: "+commentitem.comment}}</el-tag>  <!--撤回信息-->
                    <el-tag type="warning" v-if="commentitem.type === '6'"> {{commentitem.comment}}</el-tag>  <!--终止信息-->
                    <el-tag type="warning" v-if="commentitem.type === '8'"> {{commentitem.comment}}</el-tag>  <!--跳过信息-->
                    <el-tag type="success" v-if="commentitem.type === '9'"> {{commentitem.comment}}</el-tag>  <!--前加签-->
                    <el-tag type="success" v-if="commentitem.type === '10'"> {{commentitem.comment}}</el-tag>  <!--后加签-->
                    <el-tag type="success" v-if="commentitem.type === '11'"> {{commentitem.comment}}</el-tag>  <!--多实例加签-->
                    <el-tag type="success" v-if="commentitem.type === '12'"> {{commentitem.comment}}</el-tag>  <!--跳转信息-->
                 </p>
              </el-card>
              <el-card v-if="item.activityType === 'endEvent'" class="box-card" shadow="hover">
                {{ item.createTime }} 流程结束
              </el-card>
            </el-timeline-item>
          </el-timeline>
        </div>
      </el-col>
    </el-card>

2、后端修改

/**
     * 流程历史流转记录
     * add by nbacheng
     * @param  procInsId 流程实例Id, 流程发布id, 任务id
     * @return
     */
    @Override
    public Result flowRecord(String procInsId,String deployId, String businessKey, String taskId, String category) {
    	Map<String, Object> map = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(procInsId)) {
            List<HistoricActivityInstance> list = historyService
                    .createHistoricActivityInstanceQuery()
                    .processInstanceId(procInsId)
                    .activityTypes(CollUtil.newHashSet(BpmnXMLConstants.ELEMENT_EVENT_START, BpmnXMLConstants.ELEMENT_EVENT_END, BpmnXMLConstants.ELEMENT_TASK_USER))
                    .orderByHistoricActivityInstanceStartTime().desc()
                    .orderByHistoricActivityInstanceEndTime().desc()
                    .list();
            List<FlowTaskDto> hisFlowList = new ArrayList<>();
            // 获取流程实例
            HistoricProcessInstance historicProcIns = historyService.createHistoricProcessInstanceQuery()
                .processInstanceId(procInsId)
                .includeProcessVariables()
                .singleResult();
            String startUserId = historicProcIns.getStartUserId();
            for (HistoricActivityInstance histIns : list) {
            	FlowTaskDto flowTask = new FlowTaskDto();
            	if (BpmnXMLConstants.ELEMENT_EVENT_START.equals(histIns.getActivityType())) {
            		SysUser startUser = iFlowThirdService.getUserByUsername(startUserId);
            		flowTask.setAssigneeId(startUser.getUsername());
                    flowTask.setAssigneeName(startUser.getRealname());
                    flowTask.setCreateTime(histIns.getStartTime());
                    flowTask.setFinishTime(histIns.getEndTime());
                    flowTask.setActivityType(histIns.getActivityType());
            	}
            	if (BpmnXMLConstants.ELEMENT_EVENT_END.equals(histIns.getActivityType())) {
                    flowTask.setCreateTime(histIns.getStartTime());
                    flowTask.setFinishTime(histIns.getEndTime());
                    flowTask.setActivityType(histIns.getActivityType());
            	}
                if (StringUtils.isNotBlank(histIns.getTaskId())) {
                    flowTask.setTaskId(histIns.getTaskId());
                    flowTask.setTaskName(histIns.getActivityName());
                    flowTask.setCreateTime(histIns.getStartTime());
                    flowTask.setFinishTime(histIns.getEndTime());
                    flowTask.setActivityType(histIns.getActivityType());
                    if (StringUtils.isNotBlank(histIns.getAssignee())) {
                    	SysUser sysUser = iFlowThirdService.getUserByUsername(histIns.getAssignee());
                    	if(sysUser !=null) {
	                    	flowTask.setAssigneeId(sysUser.getUsername());
	                        flowTask.setAssigneeName(sysUser.getRealname());
	                        List<String> departNamesByUsername = iFlowThirdService.getDepartNamesByUsername(histIns.getAssignee());
	                        flowTask.setDeptName(CollUtil.join(departNamesByUsername,","));
                    	}
                       
                    }
                    // 展示审批人员
                    List<HistoricIdentityLink> linksForTask = historyService.getHistoricIdentityLinksForTask(histIns.getTaskId());
                    StringBuilder stringBuilder = new StringBuilder();
                    for (HistoricIdentityLink identityLink : linksForTask) {
                        if ("candidate".equals(identityLink.getType())) {
                            if (StringUtils.isNotBlank(identityLink.getUserId())) {
                                SysUser sysUser = iFlowThirdService.getUserByUsername(identityLink.getUserId());
                                stringBuilder.append(sysUser.getRealname()).append(",");
                            }
                            if (StringUtils.isNotBlank(identityLink.getGroupId())) {
                            	 List<SysRole> allRole = iFlowThirdService.getAllRole();
                                 SysRole sysRole = allRole.stream().filter(o -> StringUtils.equals(identityLink.getGroupId(), o.getId())).findAny().orElse(new SysRole());
                                stringBuilder.append(sysRole.getRoleName()).append(",");
                            }
                        }
                    }
                    if (StringUtils.isNotBlank(stringBuilder)) {
                        flowTask.setCandidate(stringBuilder.substring(0, stringBuilder.length() - 1));
                    }

                    flowTask.setDuration(histIns.getDurationInMillis() == null || histIns.getDurationInMillis() == 0 ? null : getDate(histIns.getDurationInMillis()));
                    // 获取意见评论内容
                    List<Comment> commentList = taskService.getProcessInstanceComments(histIns.getProcessInstanceId());
                    List<FlowCommentDto> listFlowCommentDto = new ArrayList<FlowCommentDto>();
                    commentList.forEach(comment -> {
                        if (histIns.getTaskId().equals(comment.getTaskId())) {
                            //flowTask.setComment(FlowCommentDto.builder().type(comment.getType()).comment(comment.getFullMessage()).build());
                            //FlowCommentDto flowcommentDto = FlowCommentDto.builder().type(comment.getType()).comment(comment.getFullMessage()).build();
                        	FlowCommentDto flowcommentDto = new FlowCommentDto();
                        	flowcommentDto.setType(comment.getType());
                        	flowcommentDto.setComment(comment.getFullMessage());
                            listFlowCommentDto.add(flowcommentDto);
                        }
                    });
                    flowTask.setListFlowCommentDto(listFlowCommentDto);
                    //获取附件
                    List<Attachment> commentfileList = taskService.getProcessInstanceAttachments(histIns.getProcessInstanceId());
                    List<FlowCommentFileDto> listcommentFileDto =  new ArrayList<FlowCommentFileDto>();
                    commentfileList.forEach(commentfile -> {
                        if (histIns.getTaskId().equals(commentfile.getTaskId())) {
                        	FlowCommentFileDto flowcommenfiletDto = new FlowCommentFileDto();
                        	flowcommenfiletDto.setType(commentfile.getType());
                        	flowcommenfiletDto.setFileurl(commentfile.getUrl());
                        	listcommentFileDto.add(flowcommenfiletDto);
                        }
                    });
                    flowTask.setListcommentFileDto(listcommentFileDto);
                    
                    // 获取历史任务节点表单数据值
                    List<HistoricVariableInstance> listHistoricVariableInstance = historyService.createHistoricVariableInstanceQuery()
                    .processInstanceId(procInsId)
                    .taskId(histIns.getTaskId())
                    .list();  
                    
                    Map<String, Object> variables = new HashedMap<String, Object>();
                    Map<String, Object> formconf = new HashedMap<String, Object>();
                    
                    for(HistoricVariableInstance historicVariableInstance:listHistoricVariableInstance) {
                    	variables.put(historicVariableInstance.getVariableName(), historicVariableInstance.getValue());
                    }
                    formconf.put("formValue", variables);
                     // 获取历史任务节点表单参数
                    if(Objects.nonNull(histIns.getTaskId())) {
    	        		HistoricTaskInstance taskIns = historyService.createHistoricTaskInstanceQuery()
    	                    .taskId(histIns.getTaskId())
    	                    .includeIdentityLinks()
    	                    .includeProcessVariables()
    	                    .includeTaskLocalVariables()
    	                    .finished()
    	                    .singleResult();
    	                if (Objects.nonNull(taskIns)) {
    	                {
    	                  String formId = taskIns.getFormKey();
    	                  SysForm sysForm = sysDeployFormService.selectCurSysDeployForm(formId, deployId, taskIns.getTaskDefinitionKey());
    	                  if (Objects.nonNull(sysForm)) {
    	                	  formconf.put("config", JSONObject.parseObject(sysForm.getFormContent()).get("config"));
    	                	  formconf.put("list", JSONObject.parseObject(sysForm.getFormContent()).get("list"));
    		              }
    	                }
    	        	  }
                    }    
                    flowTask.setTaskFormValues(formconf);
                }
                hisFlowList.add(flowTask);
            }
            map.put("flowList", hisFlowList);
        }
              
        if (Objects.nonNull(category) && category.equalsIgnoreCase("online") && StringUtils.isNotBlank(businessKey)) {// 获取online数据表单配置
        	LambdaQueryWrapper<FlowMyOnline> flowMyOnlineLambdaQueryWrapper = new LambdaQueryWrapper<>();
            flowMyOnlineLambdaQueryWrapper.eq(FlowMyOnline::getDataId, businessKey);//以后这里还要加上onlineId
            FlowMyOnline online = flowMyOnlineService.getOne(flowMyOnlineLambdaQueryWrapper);
            if (Objects.nonNull(online)) {
            	Map<String, Object> onlCgformHeadMap = flowOnlCgformHeadService.getOnlCgformHeadByFormId(online.getOnlineId());
            	map.put("onlineConfig", onlCgformHeadMap.get("formData"));
            	map.put("onlineId", online.getOnlineId());
            }
            
        }
        else if (Objects.nonNull(category) && StringUtils.isNotBlank(businessKey) && !Objects.equals(businessKey, "null") && (category != "online")) { // 获取初始化自定义表单
          FlowMyBusiness business = flowMyBusinessService.getByDataId(businessKey);
          String serviceImplName = business.getServiceImplName();
          FlowCallBackServiceI flowCallBackService = (FlowCallBackServiceI) SpringContextUtils.getBean(serviceImplName);
          // 流程处理完后,进行回调业务层
          if (flowCallBackService!=null){
            Object businessDataById = flowCallBackService.getBusinessDataById(businessKey);
            map.put("formData",businessDataById);
            map.put("routeName", business.getRouteName());
          }
        }
        else {
	         if (StringUtils.isNotBlank(deployId)) {
	        	//获取当前节点的初始化表单
	        	if(Objects.nonNull(taskId)) {
	        		HistoricTaskInstance taskIns = historyService.createHistoricTaskInstanceQuery()
	                    .taskId(taskId)
	                    .includeIdentityLinks()
	                    .includeProcessVariables()
	                    .includeTaskLocalVariables()
	                    .singleResult();
	                if (Objects.nonNull(taskIns)) {
	                	String formId = taskIns.getFormKey();
		                SysForm sysForm = sysDeployFormService.selectCurSysDeployForm(formId, deployId, taskIns.getTaskDefinitionKey());
		                if (Objects.nonNull(sysForm)) {
		                	map.put("taskFormData", JSONObject.parseObject(sysForm.getFormContent()));
			            }
	                }
	        	  }
	        	else {
	        		SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(deployId);
	            	if (Objects.isNull(sysForm)) {
	                  return Result.error("请先配置流程表单");
	            	}
	            	map.put("formData", JSONObject.parseObject(sysForm.getFormContent()));
	        	}
	        }
        }
        if(isStartUserNode(taskId)) {
        	map.put("isStartUserNode", true);
        }
        return Result.OK(map);
    }

3、效果图

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

在iPhone上构建自定义数据采集完整指南

在iPhone上构建自定义数据采集工具可以帮助我们更好地满足特定需求&#xff0c;提高数据采集的灵活性和准确性。本文将为您提供一份完整的指南和示例代码&#xff0c;教您如何在iPhone上构建自定义数据采集工具。 自定义数据采集工具的核心组件 a、数据模型 数据模型是数据采…

VectorDraw Developer Framework 10.1004 Crack

VectorDraw 开发人员框架 (VDF) 是一个图形引擎库&#xff0c;开发人员可以使用它来可视化其应用程序。通过提供的功能&#xff0c;我们的客户可以轻松创建、编辑、管理、导出、导入和打印 2D 和 3D 绘图 - 图形文件。VDF 使用的强大格式称为 VDML&#xff08;以及与 VDML 相同…

leetcode 20.有效括号 栈的简单应用

题目 数据结构 栈 code var isValid function(s) {// 空串和长度为奇数的字符串一定不符合要求if(!s || s.len%2){return true}let match {(: ),[: ],{: }}let stack []let len s.lengthfor(let i0; i<len; i){const ch s[i]if(ch[ || ch( || ch{){// 如果是左括号,…

macOS - 安装使用 SQLite

文章目录 关于 SQLite安装 使用 关于 SQLite 官网&#xff1a;https://sqlite.org/index.html 安装 https://formulae.brew.sh/formula/sqlite brew install sqlite包被安装在了&#xff1a;/usr/local/Cellar/sqlite/3.43.0_1 查看已安装版本信息 $ brew info sqlite >…

Demo记录|移动端H5页面如何实现上下滑动触发事件的小功能

Demo记录|移动端H5页面如何实现上下滑动触发事件的小功能 简单记录一个小demo&#xff0c;如果写h5页面比较实用&#xff0c;可以实现一些有趣的功能。 我这里主要是用来另类的实现抖音视频上下切换播放&#xff0c;因为视频涉及的选集&#xff0c;不能按照网上大部分的使用列表…

MT4移动端应用指南:随时随地进行交易

如今&#xff0c;随着科技的不断发展&#xff0c;我们可以随时随地通过手机进行各种操作&#xff0c;包括进行金融交易。本文将为大家介绍一款优秀的金融交易软件——MT4&#xff08;可在mtw.so/6gwPno这点下&#xff09;移动端应用&#xff0c;并提供详细的使用指南&#xff0…

OpenCV(二十三):中值滤波

1.中值滤波的原理 中值滤波&#xff08;Median Filter&#xff09;是一种常用的非线性图像滤波方法&#xff0c;用于去除图像中的椒盐噪声等离群点。它的原理是基于邻域像素值的排序&#xff0c;并将中间值作为当前像素的新值。 2.中值滤波函数 medianBlur() void cv::medianBl…

postgre 12.11单实例安装文档

一 下载 访问https://www.postgresql.org/download/&#xff0c;点击左侧的‘source进行下载&#xff0c;一般选择bz2的安装包。 二 安装 这里安装12.11版本的postgre&#xff0c;数据目录路径为/data/server/pgdata&#xff0c;端口为5432. 2.1 安装依赖包 #安装 yum in…

前端开发从 0 到 1 掌握 docker

文章目录 前端从 0 到 1 掌握 docker一、docker 的一些基础概念概念定义question&#xff1a;什么是docker&#xff1f; 为什么要使用docker&#xff1f; 二、实战操作 (墙裂建议读者实操一遍)Part1 - Linux CentOS 服务安装 DockerPart2 - 启动、使用、查看等命令Part3 - 示例…

TSUMU58CDT9-1显示器芯片方案

TSUMU58CDT9-1是用于LCD显示器的整体解决方案图形处理IC&#xff0c;面板分辨率高达WUXGA。它配置了高速集成三adc /PLL、集成DVI/HDMI接收器、高质量显示处理引擎、集成微控制器和支持LVDS面板接口格式的输出显示接口。TSUMU58CDT9-1支持一个灵活的可配置数字输入接口&#xf…

嵌入式面试/笔试C相关总结

1、存储 单片机端编译后分为code ro rw zi几个区域&#xff0c;其中code是执行文件&#xff0c;ro(read only)只读区域&#xff0c;存放const修饰常量、字符串。rw(read write)存放已初始化变量。zi存放未初始化变量。编译完成后bin大小为coderorw。运行时所需内存为rwzi。 在电…

升级iOS 17出现白苹果、不断重启等系统问题怎么办?

iOS 17发布后了&#xff0c;很多果粉都迫不及待的将iphone/ipad升级到最新iOS17系统&#xff0c;体验新系统功能。 但部分果粉因硬件、软件的各种情况&#xff0c;导致升级系统后出现故障&#xff0c;比如白苹果、不断重启、卡在系统升级界面等等问题。 如果遇到了这些系统问题…

第 2 章 线性表(静态链表示例)

1. 背景说明 图 2.10(b) 展示了图 2.10(a) 所示线性表在插入数据元素 “SHI” 和删除数据元素 “ZHENG” 之后的状况。 为了和指针型描述的线性链表相区别&#xff0c;我们给这种用数组描述的链表起名叫静态链表。 2. 示例代码 /* 静态链表示例源文件 */#include <stdio.h…

北京互联网营销服务商浩希数字科技申请1350万美元纳斯达克IPO上市

来源&#xff1a;猛兽财经 作者&#xff1a;猛兽财经 猛兽财经获悉&#xff0c;总部位于北京的互联网营销服务商浩希数字科技&#xff08;Haoxi Health Technology Limited &#xff09;近期已向美国证券交易委员会&#xff08;SEC&#xff09;提交招股书&#xff0c;申请在纳斯…

MySQL之用户管理

用户 用户信息 MySQL中的用户&#xff0c;都存储在系统数据库mysql的user表中 ps&#xff1a; host&#xff1a; 表示这个用户可以从哪个主机登陆&#xff0c;如果是localhost&#xff0c;表示只能从本机登陆 user&#xff1a; 用户名 authentication_string&#xff1a; 用户…

el-table自适应列宽实现

【背景小记】 el-table的el-table-column如果不指定width的话&#xff0c;会自动设定一个宽度&#xff0c;表格内容会自动换行&#xff0c;对强迫症用户来说非常不友好&#xff0c;为了追求完美用户体验&#xff0c;所以这里需要实现两个效果&#xff1a; 1. 强制表格内容不换…

Cento7 Docker-compose安装以及使用InfluxDB

InfluxDB是一个时序数据库&#xff0c;主要用于监控场景的数据支撑&#xff0c;对于那些写少读多按时间序查询数据的场景是非常适用的。接下来我们用docker-compose的形式安装。首先先装好docker,docker-compose命令 yum -y install yum-utils device-mapper-persistent-data…

XREAL Air 2 Pro发布,加入电致变色技术,拓展AR眼镜使用场景

【2023年9月6日 中国北京】继刚刚宣布XREAL Air在全球销量突破20万台后&#xff0c;全球领先的消费级AR眼镜品牌XREAL今日于中国市场正式推出XREAL Air 2系列新品。全新Air 2系列包含两款AR眼镜产品&#xff1a;在显示、佩戴舒适性、音频等核心维度全面升级&#xff0c;体验全面…

【牛客刷题】反转固定区间链表、每k个节点一组反转

链表内指定区间反转_牛客题霸_牛客网 ListNode* reverseList(ListNode* head, ListNode* tail) {ListNode* pre nullptr;ListNode* cur head;while (cur ! tail) { 最后cur就是tailListNode* temp cur->next;cur->next pre;pre cur;cur temp;}return pre;}ListNode…

goLang笔记+beego框架

goLang笔记+ 初始安装之后 GOPATH: Go开发相关的环境变量如下: GOROOT:GOROOT就是Go的安装目录,(类似于java的JDK) GOPATH:GOPATH是我们的工作空间,保存go项目代码和第三方依赖包 GOPATH可以设置多个,其中,第一个将会是默认的包目录,使用 go get 下载的包都会在第一…