Merge remote-tracking branch 'origin/pay_extension' into pay_extension
# Conflicts: # yudao-admin-server/src/test/resources/sql/create_tables.sqlplp
commit
aad85337ce
@ -0,0 +1 @@
|
|||||||
|
*.sql linguist-language=java
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Eslint config file
|
||||||
|
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
||||||
|
* Install the Eslint extension before using this feature.
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
browser: true,
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
ecmaFeatures: {
|
||||||
|
modules: true,
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
sourceType: 'module',
|
||||||
|
},
|
||||||
|
globals: {
|
||||||
|
wx: true,
|
||||||
|
App: true,
|
||||||
|
Page: true,
|
||||||
|
getCurrentPages: true,
|
||||||
|
getApp: true,
|
||||||
|
Component: true,
|
||||||
|
requirePlugin: true,
|
||||||
|
requireMiniProgram: true,
|
||||||
|
},
|
||||||
|
// extends: 'eslint:recommended',
|
||||||
|
rules: {},
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
临时项目,作为测试微信小程序登陆之用
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
// app.js
|
||||||
|
App({
|
||||||
|
onLaunch() {
|
||||||
|
// 展示本地存储能力
|
||||||
|
const logs = wx.getStorageSync('logs') || []
|
||||||
|
logs.unshift(Date.now())
|
||||||
|
wx.setStorageSync('logs', logs)
|
||||||
|
|
||||||
|
// 登录
|
||||||
|
wx.login({
|
||||||
|
success: res => {
|
||||||
|
// 发送 res.code 到后台换取 openId, sessionKey, unionId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
globalData: {
|
||||||
|
userInfo: null
|
||||||
|
}
|
||||||
|
})
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"pages":[
|
||||||
|
"pages/index/index",
|
||||||
|
"pages/logs/logs"
|
||||||
|
],
|
||||||
|
"window":{
|
||||||
|
"backgroundTextStyle":"light",
|
||||||
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"navigationBarTitleText": "Weixin",
|
||||||
|
"navigationBarTextStyle":"black"
|
||||||
|
},
|
||||||
|
"style": "v2",
|
||||||
|
"sitemapLocation": "sitemap.json"
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
/**app.wxss**/
|
||||||
|
.container {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 200rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<!--index.wxml-->
|
||||||
|
<view class="container">
|
||||||
|
<view class="userinfo">
|
||||||
|
<block wx:if="{{canIUseOpenData}}">
|
||||||
|
|
||||||
|
|
||||||
|
</block>
|
||||||
|
<block wx:elif="{{!hasUserInfo}}">
|
||||||
|
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
|
||||||
|
<button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
|
||||||
|
<view wx:else> 请使用1.4.4及以上版本基础库 </view>
|
||||||
|
</block>
|
||||||
|
<block wx:else>
|
||||||
|
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
|
||||||
|
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<view class="usermotto">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<text style="position: relative; left: 1rpx; top: -476rpx">授权登录测试1024</text>
|
||||||
|
|
||||||
|
<button style="position: relative; left: 0rpx; top: -361rpx" type="primary" id="login-button" bindtap="wxLogin">点击授权登录</button>
|
||||||
|
|
||||||
|
<text style="position: relative; left: 1rpx; top: -272rpx" id="login-user-id">{{holderText}}</text>
|
||||||
|
</view>
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
/**index.wxss**/
|
||||||
|
.userinfo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userinfo-avatar {
|
||||||
|
overflow: hidden;
|
||||||
|
width: 128rpx;
|
||||||
|
height: 128rpx;
|
||||||
|
margin: 20rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usermotto {
|
||||||
|
margin-top: 200px;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
// logs.js
|
||||||
|
const util = require('../../utils/util.js')
|
||||||
|
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
logs: []
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.setData({
|
||||||
|
logs: (wx.getStorageSync('logs') || []).map(log => {
|
||||||
|
return {
|
||||||
|
date: util.formatTime(new Date(log)),
|
||||||
|
timeStamp: log
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "查看启动日志",
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<!--logs.wxml-->
|
||||||
|
<view class="container log-list">
|
||||||
|
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
|
||||||
|
<text class="log-item">{{index + 1}}. {{log.date}}</text>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
.log-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 40rpx;
|
||||||
|
}
|
||||||
|
.log-item {
|
||||||
|
margin: 10rpx;
|
||||||
|
}
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
{
|
||||||
|
"description": "项目配置文件",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"value": ".eslintrc.js"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"bundle": false,
|
||||||
|
"userConfirmedBundleSwitch": false,
|
||||||
|
"urlCheck": true,
|
||||||
|
"scopeDataCheck": false,
|
||||||
|
"coverView": true,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": true,
|
||||||
|
"compileHotReLoad": false,
|
||||||
|
"lazyloadPlaceholderEnable": false,
|
||||||
|
"preloadBackgroundData": false,
|
||||||
|
"minified": true,
|
||||||
|
"autoAudits": false,
|
||||||
|
"newFeature": false,
|
||||||
|
"uglifyFileName": false,
|
||||||
|
"uploadWithSourceMap": true,
|
||||||
|
"useIsolateContext": true,
|
||||||
|
"nodeModules": false,
|
||||||
|
"enhance": true,
|
||||||
|
"useMultiFrameRuntime": true,
|
||||||
|
"useApiHook": true,
|
||||||
|
"useApiHostProcess": true,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"packNpmManually": false,
|
||||||
|
"enableEngineNative": false,
|
||||||
|
"packNpmRelationList": [],
|
||||||
|
"minifyWXSS": true,
|
||||||
|
"showES6CompileOption": false,
|
||||||
|
"minifyWXML": true
|
||||||
|
},
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "2.19.4",
|
||||||
|
"appid": "wx44d047d87e6284d8",
|
||||||
|
"appid1": "wx63c280fe3248a3e7",
|
||||||
|
"projectname": "mini-program-test",
|
||||||
|
"debugOptions": {
|
||||||
|
"hidedInDevtools": []
|
||||||
|
},
|
||||||
|
"scripts": {},
|
||||||
|
"staticServerOptions": {
|
||||||
|
"baseURL": "",
|
||||||
|
"servePath": ""
|
||||||
|
},
|
||||||
|
"isGameTourist": false,
|
||||||
|
"condition": {
|
||||||
|
"search": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"conversation": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"game": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"plugin": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"gamePlugin": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"miniprogram": {
|
||||||
|
"list": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||||
|
"rules": [{
|
||||||
|
"action": "allow",
|
||||||
|
"page": "*"
|
||||||
|
}]
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
baseurl: "http://127.0.0.1:28080"
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
const formatTime = date => {
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = date.getMonth() + 1
|
||||||
|
const day = date.getDate()
|
||||||
|
const hour = date.getHours()
|
||||||
|
const minute = date.getMinutes()
|
||||||
|
const second = date.getSeconds()
|
||||||
|
|
||||||
|
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatNumber = n => {
|
||||||
|
n = n.toString()
|
||||||
|
return n[1] ? n : `0${n}`
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
formatTime
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -1,9 +0,0 @@
|
|||||||
package cn.iocoder.yudao.adminserver.framework.async.config;
|
|
||||||
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableAsync
|
|
||||||
public class AsyncConfiguration {
|
|
||||||
}
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
@ApiModel("动态表单创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class WfFormCreateReqVO extends WfFormBaseVO {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态表单 Excel VO
|
||||||
|
*
|
||||||
|
* @author 芋艿
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WfFormExcelVO {
|
||||||
|
|
||||||
|
@ExcelProperty("表单编号")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ExcelProperty("表单名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ExcelProperty("商户状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ExcelProperty("表单JSON")
|
||||||
|
private String formJson;
|
||||||
|
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@ApiModel(value = "动态表单 Excel 导出 Request VO", description = "参数和 OsFormPageReqVO 是一致的")
|
||||||
|
@Data
|
||||||
|
public class WfFormExportReqVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单JSON")
|
||||||
|
private String formJson;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始创建时间")
|
||||||
|
private Date beginCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束创建时间")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@ApiModel("动态表单分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class WfFormPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单JSON")
|
||||||
|
private String formJson;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始创建时间")
|
||||||
|
private Date beginCreateTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束创建时间")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
@ApiModel("动态表单 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class WfFormRespVO extends WfFormBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单编号", required = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间", required = true)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("动态表单更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class WfFormUpdateReqVO extends WfFormBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单编号", required = true)
|
||||||
|
@NotNull(message = "表单编号不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("请假申请创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class OaLeaveCreateReqVO extends OaLeaveBaseVO {
|
||||||
|
|
||||||
|
private String processKey;
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请假申请 Excel VO
|
||||||
|
*
|
||||||
|
* @author 芋艿
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OaLeaveExcelVO {
|
||||||
|
|
||||||
|
@ExcelProperty("请假表单主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ExcelProperty("流程id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@ExcelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ExcelProperty("申请人id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@ExcelProperty("开始时间")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
@ExcelProperty("结束时间")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
@ExcelProperty("请假类型")
|
||||||
|
private String leaveType;
|
||||||
|
|
||||||
|
@ExcelProperty("原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
@ExcelProperty("申请时间")
|
||||||
|
private Date applyTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@ApiModel(value = "请假申请 Excel 导出 Request VO", description = "参数和 OaLeavePageReqVO 是一致的")
|
||||||
|
@Data
|
||||||
|
public class OaLeaveExportReqVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请人id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始开始时间")
|
||||||
|
private Date beginStartTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束开始时间")
|
||||||
|
private Date endStartTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始结束时间")
|
||||||
|
private Date beginEndTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束结束时间")
|
||||||
|
private Date endEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请假类型")
|
||||||
|
private String leaveType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始申请时间")
|
||||||
|
private Date beginApplyTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束申请时间")
|
||||||
|
private Date endApplyTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@ApiModel("请假申请分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class OaLeavePageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请人id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始开始时间")
|
||||||
|
private Date beginStartTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束开始时间")
|
||||||
|
private Date endStartTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始结束时间")
|
||||||
|
private Date beginEndTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束结束时间")
|
||||||
|
private Date endEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请假类型")
|
||||||
|
private String leaveType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "开始申请时间")
|
||||||
|
private Date beginApplyTime;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
@ApiModelProperty(value = "结束申请时间")
|
||||||
|
private Date endApplyTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
@ApiModel("请假申请 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class OaLeaveRespVO extends OaLeaveBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请假表单主键", required = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class TaskHandleVO {
|
||||||
|
|
||||||
|
private Object formObject;
|
||||||
|
|
||||||
|
|
||||||
|
private List<TaskStepVO> historyTask;
|
||||||
|
|
||||||
|
|
||||||
|
private String taskVariable;
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class TaskQueryReqVO {
|
||||||
|
|
||||||
|
private String processKey;
|
||||||
|
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
private String businessKey;
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class TaskReqVO {
|
||||||
|
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
private Map<String,Object> variables;
|
||||||
|
|
||||||
|
private String comment;
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class TaskStepVO {
|
||||||
|
|
||||||
|
private String stepName;
|
||||||
|
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
private String assignee;
|
||||||
|
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@ApiModel("待办任务申请分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class TodoTaskPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
private String assignee;
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@ApiModel("待办任务 Response VO")
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class TodoTaskRespVO {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:未签收
|
||||||
|
* 2:已签收
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
private String processName;
|
||||||
|
|
||||||
|
|
||||||
|
private String processKey;
|
||||||
|
|
||||||
|
|
||||||
|
private String businessKey;
|
||||||
|
|
||||||
|
|
||||||
|
private String formKey;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.convert.form;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormExcelVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormRespVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.form.WfForm;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态表单 Convert
|
||||||
|
*
|
||||||
|
* @author 芋艿
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface WfFormConvert {
|
||||||
|
|
||||||
|
WfFormConvert INSTANCE = Mappers.getMapper(WfFormConvert.class);
|
||||||
|
|
||||||
|
WfForm convert(WfFormCreateReqVO bean);
|
||||||
|
|
||||||
|
WfForm convert(WfFormUpdateReqVO bean);
|
||||||
|
|
||||||
|
WfFormRespVO convert(WfForm bean);
|
||||||
|
|
||||||
|
List<WfFormRespVO> convertList(List<WfForm> list);
|
||||||
|
|
||||||
|
PageResult<WfFormRespVO> convertPage(PageResult<WfForm> page);
|
||||||
|
|
||||||
|
List<WfFormExcelVO> convertList02(List<WfForm> list);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.convert.oa;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.*;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OaLeaveDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请假申请 Convert
|
||||||
|
*
|
||||||
|
* @author 芋艿
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface OaLeaveConvert {
|
||||||
|
|
||||||
|
OaLeaveConvert INSTANCE = Mappers.getMapper(OaLeaveConvert.class);
|
||||||
|
|
||||||
|
OaLeaveDO convert(OaLeaveCreateReqVO bean);
|
||||||
|
|
||||||
|
OaLeaveDO convert(OaLeaveUpdateReqVO bean);
|
||||||
|
|
||||||
|
OaLeaveRespVO convert(OaLeaveDO bean);
|
||||||
|
|
||||||
|
List<OaLeaveRespVO> convertList(List<OaLeaveDO> list);
|
||||||
|
|
||||||
|
PageResult<OaLeaveRespVO> convertPage(PageResult<OaLeaveDO> page);
|
||||||
|
|
||||||
|
List<OaLeaveExcelVO> convertList02(List<OaLeaveDO> list);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.convert.workflow;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TodoTaskConvert {
|
||||||
|
TodoTaskConvert INSTANCE = Mappers.getMapper(TodoTaskConvert.class);
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请假申请 DO
|
||||||
|
*
|
||||||
|
* @author 芋艿
|
||||||
|
*/
|
||||||
|
@TableName("oa_leave")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class OaLeaveDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请假表单主键
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 流程id
|
||||||
|
*/
|
||||||
|
private String processInstanceId;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 申请人id
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 请假类型
|
||||||
|
*/
|
||||||
|
private String leaveType;
|
||||||
|
/**
|
||||||
|
* 原因
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
/**
|
||||||
|
* 申请时间
|
||||||
|
*/
|
||||||
|
private Date applyTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.process;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程模型实体类 映射 activiti ProcessDefinition接口
|
||||||
|
*
|
||||||
|
* @author ZJQ
|
||||||
|
* @date 2021/9/7 23:23
|
||||||
|
*/
|
||||||
|
public class ProcessDefinitionDO {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String version;
|
||||||
|
|
||||||
|
private String resourceName;
|
||||||
|
|
||||||
|
private String deploymentId;
|
||||||
|
|
||||||
|
private String diagramResourceName;
|
||||||
|
|
||||||
|
private boolean suspended;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.dal.mysql.form;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormExportReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormPageReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.form.WfForm;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态表单 Mapper
|
||||||
|
*
|
||||||
|
* @author 风里雾里
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface WfFormMapper extends BaseMapperX<WfForm> {
|
||||||
|
|
||||||
|
default PageResult<WfForm> selectPage(WfFormPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new QueryWrapperX<WfForm>()
|
||||||
|
.likeIfPresent("name", reqVO.getName())
|
||||||
|
.eqIfPresent("status", reqVO.getStatus())
|
||||||
|
.eqIfPresent("form_json", reqVO.getFormJson())
|
||||||
|
.eqIfPresent("remark", reqVO.getRemark())
|
||||||
|
.betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||||
|
.orderByDesc("id") );
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<WfForm> selectList(WfFormExportReqVO reqVO) {
|
||||||
|
return selectList(new QueryWrapperX<WfForm>()
|
||||||
|
.likeIfPresent("name", reqVO.getName())
|
||||||
|
.eqIfPresent("status", reqVO.getStatus())
|
||||||
|
.eqIfPresent("form_json", reqVO.getFormJson())
|
||||||
|
.eqIfPresent("remark", reqVO.getRemark())
|
||||||
|
.betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||||
|
.orderByDesc("id") );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.dal.mysql.oa;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OaLeaveDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请假申请 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋艿
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface OaLeaveMapper extends BaseMapperX<OaLeaveDO> {
|
||||||
|
|
||||||
|
default PageResult<OaLeaveDO> selectPage(OaLeavePageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new QueryWrapperX<OaLeaveDO>()
|
||||||
|
.eqIfPresent("process_instance_id", reqVO.getProcessInstanceId())
|
||||||
|
.eqIfPresent("status", reqVO.getStatus())
|
||||||
|
.eqIfPresent("user_id", reqVO.getUserId())
|
||||||
|
.betweenIfPresent("start_time", reqVO.getBeginStartTime(), reqVO.getEndStartTime())
|
||||||
|
.betweenIfPresent("end_time", reqVO.getBeginEndTime(), reqVO.getEndEndTime())
|
||||||
|
.eqIfPresent("leave_type", reqVO.getLeaveType())
|
||||||
|
.eqIfPresent("reason", reqVO.getReason())
|
||||||
|
.betweenIfPresent("apply_time", reqVO.getBeginApplyTime(), reqVO.getEndApplyTime())
|
||||||
|
.orderByDesc("id") );
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<OaLeaveDO> selectList(OaLeaveExportReqVO reqVO) {
|
||||||
|
return selectList(new QueryWrapperX<OaLeaveDO>()
|
||||||
|
.eqIfPresent("process_instance_id", reqVO.getProcessInstanceId())
|
||||||
|
.eqIfPresent("status", reqVO.getStatus())
|
||||||
|
.eqIfPresent("user_id", reqVO.getUserId())
|
||||||
|
.betweenIfPresent("start_time", reqVO.getBeginStartTime(), reqVO.getEndStartTime())
|
||||||
|
.betweenIfPresent("end_time", reqVO.getBeginEndTime(), reqVO.getEndEndTime())
|
||||||
|
.eqIfPresent("leave_type", reqVO.getLeaveType())
|
||||||
|
.eqIfPresent("reason", reqVO.getReason())
|
||||||
|
.betweenIfPresent("apply_time", reqVO.getBeginApplyTime(), reqVO.getEndApplyTime())
|
||||||
|
.orderByDesc("id") );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
// TODO @芋艿:思考下 activiti、oa 的定位,边界,模块的拆分
|
||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti;
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.service.config;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysPostService;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService;
|
||||||
|
import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
|
import org.activiti.api.runtime.shared.identity.UserGroupManager;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static java.util.Collections.singleton;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UserGroupManagerService implements UserGroupManager {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UserDetailsService userDetailsService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysUserService userService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysPostService sysPostService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂时使用岗位来代替
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<String> getUserGroups(String userId) {
|
||||||
|
// final LoginUser loginUser = (LoginUser) userDetailsService.loadUserByUsername(userId);
|
||||||
|
// final Long id = loginUser.getId();
|
||||||
|
final SysUserDO user = userService.getUserByUsername(userId);
|
||||||
|
return sysPostService.getPosts(user.getPostIds()).stream().map(post -> post.getCode()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getUserRoles(String userId) {
|
||||||
|
return Arrays.asList("ROLE_ACTIVITI_USER");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getGroups() {
|
||||||
|
throw new UnsupportedOperationException("getGroups is now un supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getUsers() {
|
||||||
|
throw new UnsupportedOperationException("getGroups is now un supported");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.service.config;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
|
import org.activiti.api.runtime.shared.security.PrincipalGroupsProvider;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.security.Principal;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UserGroupsProvider implements PrincipalGroupsProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getGroups(Principal principal) {
|
||||||
|
|
||||||
|
if(principal instanceof Authentication){
|
||||||
|
Authentication authentication = (Authentication) principal;
|
||||||
|
final Object user = authentication.getPrincipal();
|
||||||
|
if( user instanceof LoginUser){
|
||||||
|
return ((LoginUser) user).getGroups();
|
||||||
|
}else{
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.service.form;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormExportReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormPageReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.form.WfForm;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态表单 Service 接口
|
||||||
|
*
|
||||||
|
* TODO @风里雾里
|
||||||
|
*/
|
||||||
|
public interface WfFormService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建动态表单
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createForm(@Valid WfFormCreateReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新动态表单
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateForm(@Valid WfFormUpdateReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除动态表单
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteForm(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得动态表单
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 动态表单
|
||||||
|
*/
|
||||||
|
WfForm getForm(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得动态表单列表
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
* @return 动态表单列表
|
||||||
|
*/
|
||||||
|
List<WfForm> getFormList(Collection<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得动态表单分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 动态表单分页
|
||||||
|
*/
|
||||||
|
PageResult<WfForm> getFormPage(WfFormPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得动态表单列表, 用于 Excel 导出
|
||||||
|
*
|
||||||
|
* @param exportReqVO 查询条件
|
||||||
|
* @return 动态表单列表
|
||||||
|
*/
|
||||||
|
List<WfForm> getFormList(WfFormExportReqVO exportReqVO);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.service.form.impl;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormExportReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormPageReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.WfFormUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.convert.form.WfFormConvert;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.form.WfForm;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.mysql.form.WfFormMapper;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.service.form.WfFormService;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.adminserver.modules.activiti.enums.form.WfFormErrorCodeConstants.FORM_NOT_EXISTS;
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态表单 Service 实现类
|
||||||
|
*
|
||||||
|
* TODO @风里雾里
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class WfFormServiceImpl implements WfFormService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private WfFormMapper formMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createForm(WfFormCreateReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
WfForm form = WfFormConvert.INSTANCE.convert(createReqVO);
|
||||||
|
formMapper.insert(form);
|
||||||
|
// 返回
|
||||||
|
return form.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateForm(WfFormUpdateReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
this.validateFormExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
WfForm updateObj = WfFormConvert.INSTANCE.convert(updateReqVO);
|
||||||
|
formMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteForm(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
this.validateFormExists(id);
|
||||||
|
// 删除
|
||||||
|
formMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateFormExists(Long id) {
|
||||||
|
if (formMapper.selectById(id) == null) {
|
||||||
|
throw exception(FORM_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WfForm getForm(Long id) {
|
||||||
|
return formMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WfForm> getFormList(Collection<Long> ids) {
|
||||||
|
return formMapper.selectBatchIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<WfForm> getFormPage(WfFormPageReqVO pageReqVO) {
|
||||||
|
return formMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WfForm> getFormList(WfFormExportReqVO exportReqVO) {
|
||||||
|
return formMapper.selectList(exportReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.service.oa;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OaLeaveCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OaLeaveExportReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OaLeavePageReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OaLeaveUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OaLeaveDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请假申请 Service 接口
|
||||||
|
*
|
||||||
|
* @author 芋艿
|
||||||
|
*/
|
||||||
|
public interface OaLeaveService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建请假申请
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createLeave(@Valid OaLeaveCreateReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新请假申请
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateLeave(@Valid OaLeaveUpdateReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除请假申请
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteLeave(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得请假申请
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 请假申请
|
||||||
|
*/
|
||||||
|
OaLeaveDO getLeave(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得请假申请列表
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
* @return 请假申请列表
|
||||||
|
*/
|
||||||
|
List<OaLeaveDO> getLeaveList(Collection<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得请假申请分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 请假申请分页
|
||||||
|
*/
|
||||||
|
PageResult<OaLeaveDO> getLeavePage(OaLeavePageReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得请假申请列表, 用于 Excel 导出
|
||||||
|
*
|
||||||
|
* @param exportReqVO 查询条件
|
||||||
|
* @return 请假申请列表
|
||||||
|
*/
|
||||||
|
List<OaLeaveDO> getLeaveList(OaLeaveExportReqVO exportReqVO);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.activiti.service.workflow;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo.*;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
// TODO @芋艿:前缀,注释
|
||||||
|
public interface TaskService {
|
||||||
|
|
||||||
|
PageResult<TodoTaskRespVO> getTodoTaskPage(TodoTaskPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
void claimTask(String taskId);
|
||||||
|
|
||||||
|
void getTaskHistory(String taskId);
|
||||||
|
|
||||||
|
void completeTask(TaskReqVO taskReq);
|
||||||
|
|
||||||
|
// void flowImage(String taskId, HttpServletResponse response);
|
||||||
|
TaskHandleVO getTaskSteps(TaskQueryReqVO taskQuery);
|
||||||
|
|
||||||
|
List<TaskStepVO> getHistorySteps(String processInstanceId);
|
||||||
|
|
||||||
|
TodoTaskRespVO getTaskFormKey(TaskQueryReqVO taskQuery);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.system.controller.tenant;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo.*;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.convert.tenant.SysTenantConvert;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.service.tenant.SysTenantService;
|
||||||
|
import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
|
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
|
||||||
|
@Api(tags = "租户")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/tenant")
|
||||||
|
public class SysTenantController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysTenantService tenantService;
|
||||||
|
|
||||||
|
@GetMapping("/get-id-by-name")
|
||||||
|
@ApiOperation(value = "使用租户名,获得租户编号", notes = "登录界面,根据用户的租户名,获得租户编号")
|
||||||
|
@ApiImplicitParam(name = "name", value = "租户名", required = true, example = "芋道源码", dataTypeClass = Long.class)
|
||||||
|
public CommonResult<Long> getTenantIdByName(@RequestParam("name") String name) {
|
||||||
|
SysTenantDO tenantDO = tenantService.getTenantByName(name);
|
||||||
|
return success(tenantDO != null ? tenantDO.getId() : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@ApiOperation("创建租户")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:tenant:create')")
|
||||||
|
public CommonResult<Long> createTenant(@Valid @RequestBody SysTenantCreateReqVO createReqVO) {
|
||||||
|
return success(tenantService.createTenant(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@ApiOperation("更新租户")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:tenant:update')")
|
||||||
|
public CommonResult<Boolean> updateTenant(@Valid @RequestBody SysTenantUpdateReqVO updateReqVO) {
|
||||||
|
tenantService.updateTenant(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@ApiOperation("删除租户")
|
||||||
|
@ApiImplicitParam(name = "id", value = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:tenant:delete')")
|
||||||
|
public CommonResult<Boolean> deleteTenant(@RequestParam("id") Long id) {
|
||||||
|
tenantService.deleteTenant(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@ApiOperation("获得租户")
|
||||||
|
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:tenant:query')")
|
||||||
|
public CommonResult<SysTenantRespVO> getTenant(@RequestParam("id") Long id) {
|
||||||
|
SysTenantDO tenant = tenantService.getTenant(id);
|
||||||
|
return success(SysTenantConvert.INSTANCE.convert(tenant));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("获得租户列表")
|
||||||
|
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:tenant:query')")
|
||||||
|
public CommonResult<List<SysTenantRespVO>> getTenantList(@RequestParam("ids") Collection<Long> ids) {
|
||||||
|
List<SysTenantDO> list = tenantService.getTenantList(ids);
|
||||||
|
return success(SysTenantConvert.INSTANCE.convertList(list));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperation("获得租户分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:tenant:query')")
|
||||||
|
public CommonResult<PageResult<SysTenantRespVO>> getTenantPage(@Valid SysTenantPageReqVO pageVO) {
|
||||||
|
PageResult<SysTenantDO> pageResult = tenantService.getTenantPage(pageVO);
|
||||||
|
return success(SysTenantConvert.INSTANCE.convertPage(pageResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@ApiOperation("导出租户 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:tenant:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportTenantExcel(@Valid SysTenantExportReqVO exportReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
List<SysTenantDO> list = tenantService.getTenantList(exportReqVO);
|
||||||
|
// 导出 Excel
|
||||||
|
List<SysTenantExcelVO> datas = SysTenantConvert.INSTANCE.convertList02(list);
|
||||||
|
ExcelUtils.write(response, "租户.xls", "数据", SysTenantExcelVO.class, datas);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("租户创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class SysTenantCreateReqVO extends SysTenantBaseVO {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
@ApiModel("租户 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class SysTenantRespVO extends SysTenantBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户编号", required = true, example = "1024")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间", required = true)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("租户更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class SysTenantUpdateReqVO extends SysTenantBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户编号", required = true, example = "1024")
|
||||||
|
@NotNull(message = "租户编号不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
### 请求 /system/user/page 接口 => 没有权限
|
### 请求 /system/user/page 接口 => 没有权限
|
||||||
GET {{baseUrl}}/system/user/page?pageNo=1&pageSize=10
|
GET {{baseUrl}}/system/user/page?pageNo=1&pageSize=10
|
||||||
Authorization: Bearer test104 # 使用测试账号
|
Authorization: Bearer test1 # 使用测试账号
|
||||||
|
tenant-id: 1
|
||||||
|
|||||||
@ -0,0 +1,36 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.system.convert.tenant;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo.SysTenantCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo.SysTenantExcelVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo.SysTenantRespVO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.system.controller.tenant.vo.SysTenantUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户 Convert
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SysTenantConvert {
|
||||||
|
|
||||||
|
SysTenantConvert INSTANCE = Mappers.getMapper(SysTenantConvert.class);
|
||||||
|
|
||||||
|
SysTenantDO convert(SysTenantCreateReqVO bean);
|
||||||
|
|
||||||
|
SysTenantDO convert(SysTenantUpdateReqVO bean);
|
||||||
|
|
||||||
|
SysTenantRespVO convert(SysTenantDO bean);
|
||||||
|
|
||||||
|
List<SysTenantRespVO> convertList(List<SysTenantDO> list);
|
||||||
|
|
||||||
|
PageResult<SysTenantRespVO> convertPage(PageResult<SysTenantDO> page);
|
||||||
|
|
||||||
|
List<SysTenantExcelVO> convertList02(List<SysTenantDO> list);
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue