Merge pull request #8640 from dataease/pr@dev@feat_pb_link_ticket
feat: 公共链接增加ticket机制
This commit is contained in:
commit
07640c4bf7
@ -8,11 +8,13 @@ import io.dataease.controller.request.panel.PanelViewLogRequest;
|
|||||||
import io.dataease.controller.request.panel.link.*;
|
import io.dataease.controller.request.panel.link.*;
|
||||||
import io.dataease.dto.panel.link.GenerateDto;
|
import io.dataease.dto.panel.link.GenerateDto;
|
||||||
import io.dataease.dto.panel.link.ValidateDto;
|
import io.dataease.dto.panel.link.ValidateDto;
|
||||||
|
import io.dataease.plugins.common.base.domain.PanelLinkTicket;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Api(tags = "仪表板:链接管理")
|
@Api(tags = "仪表板:链接管理")
|
||||||
@ -45,6 +47,11 @@ public interface LinkApi {
|
|||||||
@PostMapping("/currentGenerate/{resourceId}")
|
@PostMapping("/currentGenerate/{resourceId}")
|
||||||
GenerateDto currentGenerate(String resourceId);
|
GenerateDto currentGenerate(String resourceId);
|
||||||
|
|
||||||
|
@DePermission(type = DePermissionType.PANEL)
|
||||||
|
@ApiOperation("当前ticket信息")
|
||||||
|
@PostMapping("/currentTicket/{resourceId}")
|
||||||
|
List<PanelLinkTicket> queryTicket(String resourceId);
|
||||||
|
|
||||||
@ApiOperation("验证访问")
|
@ApiOperation("验证访问")
|
||||||
@PostMapping("/validate")
|
@PostMapping("/validate")
|
||||||
ValidateDto validate(LinkValidateRequest request) throws Exception;
|
ValidateDto validate(LinkValidateRequest request) throws Exception;
|
||||||
@ -70,5 +77,11 @@ public interface LinkApi {
|
|||||||
@PostMapping("/viewLog")
|
@PostMapping("/viewLog")
|
||||||
void viewLinkLog(@RequestBody LinkViewLogRequest request);
|
void viewLinkLog(@RequestBody LinkViewLogRequest request);
|
||||||
|
|
||||||
|
@ApiOperation("保存ticket")
|
||||||
|
@PostMapping("/saveTicket")
|
||||||
|
String saveTicket(@RequestBody TicketCreator creator);
|
||||||
|
|
||||||
|
@ApiOperation("删除ticket")
|
||||||
|
@PostMapping("/delTicket")
|
||||||
|
void deleteTicket(@RequestBody TicketDelRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import io.dataease.dto.panel.link.GenerateDto;
|
|||||||
import io.dataease.dto.panel.link.ValidateDto;
|
import io.dataease.dto.panel.link.ValidateDto;
|
||||||
import io.dataease.plugins.common.base.domain.PanelGroupWithBLOBs;
|
import io.dataease.plugins.common.base.domain.PanelGroupWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.PanelLink;
|
import io.dataease.plugins.common.base.domain.PanelLink;
|
||||||
|
import io.dataease.plugins.common.base.domain.PanelLinkTicket;
|
||||||
import io.dataease.service.chart.ChartViewService;
|
import io.dataease.service.chart.ChartViewService;
|
||||||
import io.dataease.service.panel.PanelLinkService;
|
import io.dataease.service.panel.PanelLinkService;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
@ -27,6 +28,7 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -64,6 +66,11 @@ public class LinkServer implements LinkApi {
|
|||||||
return panelLinkService.currentGenerate(resourceId);
|
return panelLinkService.currentGenerate(resourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PanelLinkTicket> queryTicket(@PathVariable("resourceId") String resourceId) {
|
||||||
|
return panelLinkService.queryTicket(resourceId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValidateDto validate(@RequestBody LinkValidateRequest request) throws Exception {
|
public ValidateDto validate(@RequestBody LinkValidateRequest request) throws Exception {
|
||||||
String link = request.getLink();
|
String link = request.getLink();
|
||||||
@ -141,4 +148,14 @@ public class LinkServer implements LinkApi {
|
|||||||
String pid = panelGroupWithBLOBs.getPid();
|
String pid = panelGroupWithBLOBs.getPid();
|
||||||
DeLogUtils.save(operateType, SysLogConstants.SOURCE_TYPE.LINK, panelId, pid, userId, SysLogConstants.SOURCE_TYPE.USER);
|
DeLogUtils.save(operateType, SysLogConstants.SOURCE_TYPE.LINK, panelId, pid, userId, SysLogConstants.SOURCE_TYPE.USER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String saveTicket(TicketCreator creator) {
|
||||||
|
return panelLinkService.saveTicket(creator);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTicket(TicketDelRequest request) {
|
||||||
|
panelLinkService.deleteTicket(request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
package io.dataease.controller.request.panel.link;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TicketCreator implements Serializable {
|
||||||
|
|
||||||
|
private String ticket;
|
||||||
|
|
||||||
|
private Long exp;
|
||||||
|
|
||||||
|
private String args;
|
||||||
|
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
private boolean generateNew;
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package io.dataease.controller.request.panel.link;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TicketDelRequest implements Serializable {
|
||||||
|
|
||||||
|
private String ticket;
|
||||||
|
|
||||||
|
}
|
||||||
@ -16,4 +16,8 @@ public class GenerateDto {
|
|||||||
private String pwd;
|
private String pwd;
|
||||||
@ApiModelProperty("有效期")
|
@ApiModelProperty("有效期")
|
||||||
private Long overTime;
|
private Long overTime;
|
||||||
|
@ApiModelProperty("ticket必填")
|
||||||
|
private boolean requireTicket;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,19 +8,14 @@ import io.dataease.commons.utils.AuthUtils;
|
|||||||
import io.dataease.commons.utils.CodingUtil;
|
import io.dataease.commons.utils.CodingUtil;
|
||||||
import io.dataease.commons.utils.DeLogUtils;
|
import io.dataease.commons.utils.DeLogUtils;
|
||||||
import io.dataease.commons.utils.ServletUtils;
|
import io.dataease.commons.utils.ServletUtils;
|
||||||
import io.dataease.controller.request.panel.link.EnablePwdRequest;
|
import io.dataease.controller.request.panel.link.*;
|
||||||
import io.dataease.controller.request.panel.link.LinkRequest;
|
|
||||||
import io.dataease.controller.request.panel.link.OverTimeRequest;
|
|
||||||
import io.dataease.controller.request.panel.link.PasswordRequest;
|
|
||||||
import io.dataease.dto.panel.PanelGroupDTO;
|
import io.dataease.dto.panel.PanelGroupDTO;
|
||||||
import io.dataease.dto.panel.link.GenerateDto;
|
import io.dataease.dto.panel.link.GenerateDto;
|
||||||
import io.dataease.ext.ExtPanelGroupMapper;
|
import io.dataease.ext.ExtPanelGroupMapper;
|
||||||
import io.dataease.ext.ExtPanelLinkMapper;
|
import io.dataease.ext.ExtPanelLinkMapper;
|
||||||
import io.dataease.plugins.common.base.domain.*;
|
import io.dataease.plugins.common.base.domain.*;
|
||||||
import io.dataease.plugins.common.base.mapper.PanelGroupMapper;
|
import io.dataease.plugins.common.base.mapper.*;
|
||||||
import io.dataease.plugins.common.base.mapper.PanelLinkMapper;
|
import io.dataease.plugins.common.exception.DataEaseException;
|
||||||
import io.dataease.plugins.common.base.mapper.PanelLinkMappingMapper;
|
|
||||||
import io.dataease.plugins.common.base.mapper.PanelWatermarkMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -56,6 +51,9 @@ public class PanelLinkService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ExtPanelGroupMapper extPanelGroupMapper;
|
private ExtPanelGroupMapper extPanelGroupMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PanelLinkTicketMapper panelLinkTicketMapper;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void changeValid(LinkRequest request) {
|
public void changeValid(LinkRequest request) {
|
||||||
PanelLink po = new PanelLink();
|
PanelLink po = new PanelLink();
|
||||||
@ -140,6 +138,18 @@ public class PanelLinkService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PanelLinkTicket> queryTicket(String resourceId) {
|
||||||
|
Long userId = AuthUtils.getUser().getUserId();
|
||||||
|
PanelLinkMappingExample example = new PanelLinkMappingExample();
|
||||||
|
example.createCriteria().andResourceIdEqualTo(resourceId).andUserIdEqualTo(userId);
|
||||||
|
List<PanelLinkMapping> mappings = panelLinkMappingMapper.selectByExample(example);
|
||||||
|
PanelLinkMapping mapping = mappings.get(0);
|
||||||
|
String uuid = mapping.getUuid();
|
||||||
|
PanelLinkTicketExample exampleTicket = new PanelLinkTicketExample();
|
||||||
|
exampleTicket.createCriteria().andUuidEqualTo(uuid);
|
||||||
|
return panelLinkTicketMapper.selectByExample(exampleTicket);
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public GenerateDto currentGenerate(String resourceId) {
|
public GenerateDto currentGenerate(String resourceId) {
|
||||||
PanelLink one = findOne(resourceId, AuthUtils.getUser().getUserId());
|
PanelLink one = findOne(resourceId, AuthUtils.getUser().getUserId());
|
||||||
@ -152,7 +162,6 @@ public class PanelLinkService {
|
|||||||
one.setEnablePwd(false);
|
one.setEnablePwd(false);
|
||||||
mapper.insert(one);
|
mapper.insert(one);
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelLinkMappingExample example = new PanelLinkMappingExample();
|
PanelLinkMappingExample example = new PanelLinkMappingExample();
|
||||||
example.createCriteria().andResourceIdEqualTo(resourceId).andUserIdEqualTo(AuthUtils.getUser().getUserId());
|
example.createCriteria().andResourceIdEqualTo(resourceId).andUserIdEqualTo(AuthUtils.getUser().getUserId());
|
||||||
List<PanelLinkMapping> mappings = panelLinkMappingMapper.selectByExample(example);
|
List<PanelLinkMapping> mappings = panelLinkMappingMapper.selectByExample(example);
|
||||||
@ -162,11 +171,12 @@ public class PanelLinkService {
|
|||||||
mapping.setResourceId(resourceId);
|
mapping.setResourceId(resourceId);
|
||||||
mapping.setUserId(AuthUtils.getUser().getUserId());
|
mapping.setUserId(AuthUtils.getUser().getUserId());
|
||||||
mapping.setUuid(CodingUtil.shortUuid());
|
mapping.setUuid(CodingUtil.shortUuid());
|
||||||
|
mapping.setRequireTicket(false);
|
||||||
panelLinkMappingMapper.insert(mapping);
|
panelLinkMappingMapper.insert(mapping);
|
||||||
} else {
|
} else {
|
||||||
mapping = mappings.get(0);
|
mapping = mappings.get(0);
|
||||||
}
|
}
|
||||||
return convertDto(one, mapping.getUuid());
|
return convertDto(one, mapping.getUuid(), mapping.getRequireTicket());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteByResourceId(String resourceId) {
|
public void deleteByResourceId(String resourceId) {
|
||||||
@ -205,13 +215,14 @@ public class PanelLinkService {
|
|||||||
return linkParam;
|
return linkParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
private GenerateDto convertDto(PanelLink link, String uuid) {
|
private GenerateDto convertDto(PanelLink link, String uuid, boolean requireTicket) {
|
||||||
GenerateDto result = new GenerateDto();
|
GenerateDto result = new GenerateDto();
|
||||||
result.setValid(link.getValid());
|
result.setValid(link.getValid());
|
||||||
result.setEnablePwd(link.getEnablePwd());
|
result.setEnablePwd(link.getEnablePwd());
|
||||||
result.setPwd(link.getPwd());
|
result.setPwd(link.getPwd());
|
||||||
result.setUri(BASEURL + buildLinkParam(link, uuid));
|
result.setUri(BASEURL + buildLinkParam(link, uuid));
|
||||||
result.setOverTime(link.getOverTime());
|
result.setOverTime(link.getOverTime());
|
||||||
|
result.setRequireTicket(requireTicket);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,6 +283,50 @@ public class PanelLinkService {
|
|||||||
return contextPath + SHORT_URL_PREFIX + (StringUtils.isBlank(uuid) ? mapping.getId() : uuid);
|
return contextPath + SHORT_URL_PREFIX + (StringUtils.isBlank(uuid) ? mapping.getId() : uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String saveTicket(TicketCreator creator) {
|
||||||
|
String ticket = creator.getTicket();
|
||||||
|
if (StringUtils.isNotBlank(ticket)) {
|
||||||
|
PanelLinkTicket ticketEntity = getByTicket(ticket);
|
||||||
|
if (ObjectUtils.isNotEmpty(ticketEntity)) {
|
||||||
|
PanelLinkTicketExample example = new PanelLinkTicketExample();
|
||||||
|
example.createCriteria().andTicketEqualTo(ticket);
|
||||||
|
if (creator.isGenerateNew()) {
|
||||||
|
ticketEntity.setTicket(CodingUtil.shortUuid());
|
||||||
|
}
|
||||||
|
panelLinkTicketMapper.updateByExample(ticketEntity, example);
|
||||||
|
return ticketEntity.getTicket();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ticket = CodingUtil.shortUuid();
|
||||||
|
PanelLinkTicket linkTicket = new PanelLinkTicket();
|
||||||
|
linkTicket.setTicket(ticket);
|
||||||
|
linkTicket.setArgs(creator.getArgs());
|
||||||
|
linkTicket.setExp(creator.getExp());
|
||||||
|
linkTicket.setUuid(creator.getUuid());
|
||||||
|
panelLinkTicketMapper.insert(linkTicket);
|
||||||
|
return ticket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteTicket(TicketDelRequest request) {
|
||||||
|
String ticket = request.getTicket();
|
||||||
|
if (StringUtils.isBlank(ticket)) {
|
||||||
|
DataEaseException.throwException("ticket为必填参数");
|
||||||
|
}
|
||||||
|
PanelLinkTicketExample example = new PanelLinkTicketExample();
|
||||||
|
example.createCriteria().andTicketEqualTo(ticket);
|
||||||
|
panelLinkTicketMapper.deleteByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public PanelLinkTicket getByTicket(String ticket) {
|
||||||
|
PanelLinkTicketExample example = new PanelLinkTicketExample();
|
||||||
|
example.createCriteria().andTicketEqualTo(ticket);
|
||||||
|
List<PanelLinkTicket> tickets = panelLinkTicketMapper.selectByExample(example);
|
||||||
|
if (CollectionUtils.isEmpty(tickets)) return null;
|
||||||
|
return tickets.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
public String getUrlByIndex(Long index) {
|
public String getUrlByIndex(Long index) {
|
||||||
PanelLinkMapping mapping = panelLinkMappingMapper.selectByPrimaryKey(index);
|
PanelLinkMapping mapping = panelLinkMappingMapper.selectByPrimaryKey(index);
|
||||||
|
|
||||||
@ -281,7 +336,7 @@ public class PanelLinkService {
|
|||||||
if (StringUtils.isNotBlank(mapping.getUuid())) {
|
if (StringUtils.isNotBlank(mapping.getUuid())) {
|
||||||
one.setResourceId("error-resource-id");
|
one.setResourceId("error-resource-id");
|
||||||
}
|
}
|
||||||
return convertDto(one, mapping.getUuid()).getUri();
|
return convertDto(one, mapping.getUuid(), mapping.getRequireTicket()).getUri();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrlByUuid(String uuid) {
|
public String getUrlByUuid(String uuid) {
|
||||||
@ -297,6 +352,6 @@ public class PanelLinkService {
|
|||||||
String resourceId = mapping.getResourceId();
|
String resourceId = mapping.getResourceId();
|
||||||
Long userId = mapping.getUserId();
|
Long userId = mapping.getUserId();
|
||||||
PanelLink one = findOne(resourceId, userId);
|
PanelLink one = findOne(resourceId, userId);
|
||||||
return convertDto(one, uuid).getUri();
|
return convertDto(one, uuid, mapping.getRequireTicket()).getUri();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,17 @@
|
|||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for panel_link_ticket
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `panel_link_ticket`;
|
||||||
|
CREATE TABLE `panel_link_ticket`
|
||||||
|
(
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||||
|
`uuid` varchar(255) NOT NULL,
|
||||||
|
`ticket` varchar(255) NOT NULL,
|
||||||
|
`exp` bigint DEFAULT NULL,
|
||||||
|
`args` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1;
|
||||||
|
|
||||||
|
ALTER TABLE `panel_link_mapping`
|
||||||
|
ADD COLUMN `require_ticket` tinyint(1) NOT NULL DEFAULT 0 AFTER `uuid`;
|
||||||
@ -66,6 +66,28 @@ export function loadGenerate(resourceId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function loadTicketApi(resourceId) {
|
||||||
|
return request({
|
||||||
|
url: 'api/link/currentTicket/' + resourceId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveTicketApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/link/saveTicket',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function delTicketApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/link/delTicket',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function loadResource(resourceId, userId) {
|
export function loadResource(resourceId, userId) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/link/resourceDetail/' + resourceId + '/' + userId,
|
url: 'api/link/resourceDetail/' + resourceId + '/' + userId,
|
||||||
|
|||||||
@ -1,117 +1,243 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="de-link-ticket-container">
|
||||||
<el-form
|
|
||||||
ref="linkForm"
|
<el-tabs v-model="activeName">
|
||||||
inline
|
<el-tab-pane
|
||||||
:model="form"
|
v-for="item in tabList"
|
||||||
size="small"
|
:key="item.name"
|
||||||
:rules="rules"
|
:label="item.label"
|
||||||
label-width="80px"
|
:name="item.name"
|
||||||
|
/>
|
||||||
|
</el-tabs>
|
||||||
|
<div
|
||||||
|
v-if="activeName === 'link'"
|
||||||
|
class="link"
|
||||||
>
|
>
|
||||||
|
<el-form
|
||||||
<el-form-item :label="$t('panel.link_share')">
|
ref="linkForm"
|
||||||
<el-switch
|
inline
|
||||||
v-model="valid"
|
:model="form"
|
||||||
style="width: 370px;"
|
size="small"
|
||||||
:active-value="true"
|
:rules="rules"
|
||||||
:inactive-value="false"
|
label-width="80px"
|
||||||
@change="onChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label=" ">
|
|
||||||
<el-link
|
|
||||||
class="de-link"
|
|
||||||
style="width: 370px;"
|
|
||||||
disabled
|
|
||||||
>{{ $t('panel.link_share_desc') }}</el-link>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
v-if="valid"
|
|
||||||
:label="$t('panel.link')"
|
|
||||||
>
|
>
|
||||||
<el-input
|
|
||||||
v-model.number="form.uri"
|
|
||||||
disabled
|
|
||||||
style="width: 370px;"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item :label="$t('panel.link_share')">
|
||||||
v-if="valid"
|
<el-switch
|
||||||
:label="$t('panel.over_time')"
|
v-model="valid"
|
||||||
prop="overTime"
|
style="width: 370px;"
|
||||||
>
|
:active-value="true"
|
||||||
<el-date-picker
|
:inactive-value="false"
|
||||||
v-model="form.overTime"
|
@change="onChange"
|
||||||
type="datetime"
|
/>
|
||||||
:placeholder="$t('commons.date.select_date_time')"
|
</el-form-item>
|
||||||
align="right"
|
<el-form-item label=" ">
|
||||||
value-format="timestamp"
|
|
||||||
:picker-options="pickerOptions"
|
|
||||||
default-time="23:59:59"
|
|
||||||
popper-class="link-date-picker-class"
|
|
||||||
@change="resetOverTime"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item
|
|
||||||
v-if="valid"
|
|
||||||
label=" "
|
|
||||||
>
|
|
||||||
<el-checkbox
|
|
||||||
v-model="form.enablePwd"
|
|
||||||
@change="resetEnablePwd"
|
|
||||||
>{{ $t('panel.passwd_protect') }} </el-checkbox>
|
|
||||||
|
|
||||||
<span
|
|
||||||
v-if="form.enablePwd"
|
|
||||||
class="de-span"
|
|
||||||
>{{ form.pwd }}</span>
|
|
||||||
<span
|
|
||||||
v-if="form.enablePwd"
|
|
||||||
class="de-span"
|
|
||||||
@click="resetPwd"
|
|
||||||
>
|
|
||||||
<el-link
|
<el-link
|
||||||
:underline="false"
|
class="de-link"
|
||||||
type="primary"
|
style="width: 370px;"
|
||||||
>{{ $t('commons.reset') }}</el-link>
|
disabled
|
||||||
</span>
|
>{{ $t('panel.link_share_desc') }}</el-link>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="valid"
|
||||||
|
:label="$t('panel.link')"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model.number="form.uri"
|
||||||
|
disabled
|
||||||
|
style="width: 370px;"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<div
|
<el-form-item
|
||||||
v-if="valid"
|
v-if="valid"
|
||||||
class="auth-root-class"
|
:label="$t('panel.over_time')"
|
||||||
>
|
prop="overTime"
|
||||||
<span slot="footer">
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.overTime"
|
||||||
|
type="datetime"
|
||||||
|
:placeholder="$t('commons.date.select_date_time')"
|
||||||
|
align="right"
|
||||||
|
value-format="timestamp"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
default-time="23:59:59"
|
||||||
|
popper-class="link-date-picker-class"
|
||||||
|
@change="resetOverTime"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-button
|
<el-form-item
|
||||||
v-if="!form.enablePwd"
|
v-if="valid"
|
||||||
v-clipboard:copy="form.uri"
|
label=" "
|
||||||
v-clipboard:success="onCopy"
|
>
|
||||||
v-clipboard:error="onError"
|
<el-checkbox
|
||||||
size="mini"
|
v-model="form.enablePwd"
|
||||||
type="primary"
|
@change="resetEnablePwd"
|
||||||
>{{ $t('panel.copy_link') }}</el-button>
|
>{{ $t('panel.passwd_protect') }} </el-checkbox>
|
||||||
<el-button
|
|
||||||
|
<span
|
||||||
v-if="form.enablePwd"
|
v-if="form.enablePwd"
|
||||||
v-clipboard:copy="form.uri + ' Password: '+ form.pwd"
|
class="de-span"
|
||||||
v-clipboard:success="onCopy"
|
>{{ form.pwd }}</span>
|
||||||
v-clipboard:error="onError"
|
<span
|
||||||
size="mini"
|
v-if="form.enablePwd"
|
||||||
type="primary"
|
class="de-span"
|
||||||
|
@click="resetPwd"
|
||||||
>
|
>
|
||||||
{{ $t('panel.copy_link_passwd') }}</el-button>
|
<el-link
|
||||||
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
|
>{{ $t('commons.reset') }}</el-link>
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
</span>
|
<div
|
||||||
|
v-if="valid"
|
||||||
|
class="auth-root-class"
|
||||||
|
>
|
||||||
|
<span slot="footer">
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-if="!form.enablePwd"
|
||||||
|
v-clipboard:copy="form.uri"
|
||||||
|
v-clipboard:success="onCopy"
|
||||||
|
v-clipboard:error="onError"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
>{{ $t('panel.copy_link') }}</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="form.enablePwd"
|
||||||
|
v-clipboard:copy="form.uri + ' Password: '+ form.pwd"
|
||||||
|
v-clipboard:success="onCopy"
|
||||||
|
v-clipboard:error="onError"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
>
|
||||||
|
{{ $t('panel.copy_link_passwd') }}</el-button>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="activeName === 'ticket'"
|
||||||
|
class="ticket"
|
||||||
|
>
|
||||||
|
<div class="ticket-model">
|
||||||
|
<el-checkbox v-model="requireTicket" />
|
||||||
|
<span>ticket必选</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="ticket-table"
|
||||||
|
>
|
||||||
|
<div class="add-ticket">
|
||||||
|
<span>
|
||||||
|
<i
|
||||||
|
class="el-icon-circle-plus-outline"
|
||||||
|
@click="addRow()"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="ticket"
|
||||||
|
label="ticket"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="ticket-row">
|
||||||
|
<span>{{ scope.row.ticket }}</span>
|
||||||
|
<span class="refresh-i">
|
||||||
|
<i
|
||||||
|
class="el-icon-refresh"
|
||||||
|
@click="refreshTicket(scope.row)"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
</el-form>
|
<el-table-column
|
||||||
|
prop="exp"
|
||||||
|
label="有效期(分钟)"
|
||||||
|
width="100"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-if="scope.row.isEdit"
|
||||||
|
v-model="scope.row.exp"
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
size="mini"
|
||||||
|
/>
|
||||||
|
<span v-else>
|
||||||
|
{{ scope.row.exp }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="args"
|
||||||
|
label="参数"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-if="scope.row.isEdit"
|
||||||
|
v-model="scope.row.args"
|
||||||
|
type="text"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
maxlength="100"
|
||||||
|
size="mini"
|
||||||
|
/>
|
||||||
|
<span v-else>
|
||||||
|
{{ scope.row.args }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
width="60"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="ticket-op">
|
||||||
|
<span>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
@click="deleteTicket(scope.row, scope.$idnex)"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<i
|
||||||
|
v-if="!scope.row.isEdit"
|
||||||
|
class="el-icon-edit"
|
||||||
|
@click="editRow(scope.row)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
v-else
|
||||||
|
class="el-icon-circle-check"
|
||||||
|
@click="saveRow(scope.row)"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
loadGenerate,
|
loadGenerate,
|
||||||
|
loadTicketApi,
|
||||||
|
saveTicketApi,
|
||||||
|
delTicketApi,
|
||||||
setPwd,
|
setPwd,
|
||||||
switchValid,
|
switchValid,
|
||||||
switchEnablePwd,
|
switchEnablePwd,
|
||||||
@ -120,11 +246,8 @@ import {
|
|||||||
} from '@/api/link'
|
} from '@/api/link'
|
||||||
import { randomRange } from '@/utils/StringUtils'
|
import { randomRange } from '@/utils/StringUtils'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
name: 'LinkGenerate',
|
name: 'LinkGenerate',
|
||||||
components: {
|
components: {},
|
||||||
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
resourceId: {
|
resourceId: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -133,6 +256,13 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
requireTicket: false,
|
||||||
|
uuid: '',
|
||||||
|
tabList: [
|
||||||
|
{ name: 'link', 'label': '链接分享' }
|
||||||
|
],
|
||||||
|
activeName: 'link',
|
||||||
|
tableData: [],
|
||||||
pwdNums: 4,
|
pwdNums: 4,
|
||||||
valid: false,
|
valid: false,
|
||||||
form: {},
|
form: {},
|
||||||
@ -181,12 +311,56 @@ export default {
|
|||||||
return window.location.origin
|
return window.location.origin
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
valid(val) {
|
||||||
|
if (val) {
|
||||||
|
this.tabList.push({ name: 'ticket', 'label': 'Ticket设置' })
|
||||||
|
} else {
|
||||||
|
this.tabList.splice(1, 1)
|
||||||
|
this.activeName = 'link'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.form = this.defaultForm
|
this.form = this.defaultForm
|
||||||
this.currentGenerate()
|
this.currentGenerate()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
refreshTicket(row) {
|
||||||
|
const param = JSON.parse(JSON.stringify(row))
|
||||||
|
param['generateNew'] = true
|
||||||
|
saveTicketApi(param).then(res => {
|
||||||
|
row.ticket = res.data
|
||||||
|
})
|
||||||
|
console.log(row.ticket)
|
||||||
|
},
|
||||||
|
deleteTicket(row, index) {
|
||||||
|
const param = { ticket: row.ticket }
|
||||||
|
delTicketApi(param).then(() => {
|
||||||
|
this.tableData.splice(index, 1)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editRow(row) {
|
||||||
|
row.isEdit = true
|
||||||
|
},
|
||||||
|
saveRow(row) {
|
||||||
|
saveTicketApi(row).then(res => {
|
||||||
|
row.isEdit = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addRow() {
|
||||||
|
const row = {
|
||||||
|
ticket: '',
|
||||||
|
exp: 30,
|
||||||
|
args: '',
|
||||||
|
uuid: this.uuid
|
||||||
|
}
|
||||||
|
saveTicketApi(row).then(res => {
|
||||||
|
row.ticket = res.data
|
||||||
|
row.isEdit = false
|
||||||
|
this.tableData.splice(0, 0, row)
|
||||||
|
})
|
||||||
|
},
|
||||||
currentGenerate() {
|
currentGenerate() {
|
||||||
loadGenerate(this.resourceId).then(res => {
|
loadGenerate(this.resourceId).then(res => {
|
||||||
const {
|
const {
|
||||||
@ -209,6 +383,13 @@ export default {
|
|||||||
/* overTime && (this.form.overTime = overTime) */
|
/* overTime && (this.form.overTime = overTime) */
|
||||||
overTime && (this.$set(this.form, 'overTime', overTime))
|
overTime && (this.$set(this.form, 'overTime', overTime))
|
||||||
this.requestShort()
|
this.requestShort()
|
||||||
|
this.valid && loadTicketApi(this.resourceId).then(res => {
|
||||||
|
const data = res.data
|
||||||
|
data.forEach(item => {
|
||||||
|
item.isEdit = false
|
||||||
|
this.tableData.push(item)
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -277,6 +458,7 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.form.uri = this.origin + res.data
|
this.form.uri = this.origin + res.data
|
||||||
|
this.uuid = res.data.substring(res.data.lastIndexOf('/') + 1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -333,6 +515,60 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.de-link-ticket-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 0px;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 0;
|
||||||
|
::v-deep .el-tabs__item {
|
||||||
|
line-height: 24px;
|
||||||
|
font-size: 18px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
::v-deep .el-tabs__nav-scroll {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
.link {
|
||||||
|
padding: 0 20px !important;
|
||||||
|
}
|
||||||
|
.ticket {
|
||||||
|
padding: 0 20px !important;
|
||||||
|
.ticket-model {
|
||||||
|
padding: 8px 10px;
|
||||||
|
label {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ticket-table {
|
||||||
|
padding: 10px 0 10px 8px;
|
||||||
|
height: 260px;
|
||||||
|
overflow-y: overlay;
|
||||||
|
position: relative;
|
||||||
|
.add-ticket {
|
||||||
|
position: absolute;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
top: 18px;
|
||||||
|
right: 5px;
|
||||||
|
z-index: 9;
|
||||||
|
span {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 2px;
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(51, 112, 255, .1);
|
||||||
|
color: var(--primary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
.de-link {
|
.de-link {
|
||||||
justify-content: left !important;
|
justify-content: left !important;
|
||||||
}
|
}
|
||||||
@ -345,5 +581,38 @@ export default {
|
|||||||
margin: 15px 0px 5px;
|
margin: 15px 0px 5px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
.ticket-op {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 2px;
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(51, 112, 255, .1);
|
||||||
|
color: var(--primary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ticket-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.refresh-i {
|
||||||
|
margin-left: 5px;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 2px;
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(51, 112, 255, .1);
|
||||||
|
color: var(--primary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -375,6 +375,7 @@
|
|||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
:title="$t('panel.link_share')"
|
:title="$t('panel.link_share')"
|
||||||
:visible.sync="linkVisible"
|
:visible.sync="linkVisible"
|
||||||
|
class="link-dialog"
|
||||||
width="500px"
|
width="500px"
|
||||||
@closed="removeLink"
|
@closed="removeLink"
|
||||||
>
|
>
|
||||||
@ -1239,4 +1240,13 @@ export default {
|
|||||||
/*display: inline;*/
|
/*display: inline;*/
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
.link-dialog ::v-deep .el-dialog__title {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.link-dialog ::v-deep .el-dialog__body {
|
||||||
|
height: 350px;
|
||||||
|
}
|
||||||
|
.link-dialog ::v-deep .el-dialog__headerbtn {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -13,5 +13,7 @@ public class PanelLinkMapping implements Serializable {
|
|||||||
|
|
||||||
private String uuid;
|
private String uuid;
|
||||||
|
|
||||||
|
private Boolean requireTicket;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
@ -363,6 +363,66 @@ public class PanelLinkMappingExample {
|
|||||||
addCriterion("uuid not between", value1, value2, "uuid");
|
addCriterion("uuid not between", value1, value2, "uuid");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketIsNull() {
|
||||||
|
addCriterion("require_ticket is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketIsNotNull() {
|
||||||
|
addCriterion("require_ticket is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketEqualTo(Boolean value) {
|
||||||
|
addCriterion("require_ticket =", value, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketNotEqualTo(Boolean value) {
|
||||||
|
addCriterion("require_ticket <>", value, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketGreaterThan(Boolean value) {
|
||||||
|
addCriterion("require_ticket >", value, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketGreaterThanOrEqualTo(Boolean value) {
|
||||||
|
addCriterion("require_ticket >=", value, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketLessThan(Boolean value) {
|
||||||
|
addCriterion("require_ticket <", value, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketLessThanOrEqualTo(Boolean value) {
|
||||||
|
addCriterion("require_ticket <=", value, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketIn(List<Boolean> values) {
|
||||||
|
addCriterion("require_ticket in", values, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketNotIn(List<Boolean> values) {
|
||||||
|
addCriterion("require_ticket not in", values, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketBetween(Boolean value1, Boolean value2) {
|
||||||
|
addCriterion("require_ticket between", value1, value2, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRequireTicketNotBetween(Boolean value1, Boolean value2) {
|
||||||
|
addCriterion("require_ticket not between", value1, value2, "requireTicket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
package io.dataease.plugins.common.base.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PanelLinkTicket implements Serializable {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
private String ticket;
|
||||||
|
|
||||||
|
private Long exp;
|
||||||
|
|
||||||
|
private String args;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
@ -0,0 +1,530 @@
|
|||||||
|
package io.dataease.plugins.common.base.domain;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PanelLinkTicketExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
public PanelLinkTicketExample() {
|
||||||
|
oredCriteria = new ArrayList<Criteria>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderByClause(String orderByClause) {
|
||||||
|
this.orderByClause = orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderByClause() {
|
||||||
|
return orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistinct(boolean distinct) {
|
||||||
|
this.distinct = distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDistinct() {
|
||||||
|
return distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criteria> getOredCriteria() {
|
||||||
|
return oredCriteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void or(Criteria criteria) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria or() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract static class GeneratedCriteria {
|
||||||
|
protected List<Criterion> criteria;
|
||||||
|
|
||||||
|
protected GeneratedCriteria() {
|
||||||
|
super();
|
||||||
|
criteria = new ArrayList<Criterion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return criteria.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition) {
|
||||||
|
if (condition == null) {
|
||||||
|
throw new RuntimeException("Value for condition cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value, String property) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||||
|
if (value1 == null || value2 == null) {
|
||||||
|
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNull() {
|
||||||
|
addCriterion("id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNotNull() {
|
||||||
|
addCriterion("id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdEqualTo(Long value) {
|
||||||
|
addCriterion("id =", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIn(List<Long> values) {
|
||||||
|
addCriterion("id in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("id not in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id not between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidIsNull() {
|
||||||
|
addCriterion("uuid is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidIsNotNull() {
|
||||||
|
addCriterion("uuid is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidEqualTo(String value) {
|
||||||
|
addCriterion("uuid =", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidNotEqualTo(String value) {
|
||||||
|
addCriterion("uuid <>", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidGreaterThan(String value) {
|
||||||
|
addCriterion("uuid >", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("uuid >=", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidLessThan(String value) {
|
||||||
|
addCriterion("uuid <", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("uuid <=", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidLike(String value) {
|
||||||
|
addCriterion("uuid like", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidNotLike(String value) {
|
||||||
|
addCriterion("uuid not like", value, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidIn(List<String> values) {
|
||||||
|
addCriterion("uuid in", values, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidNotIn(List<String> values) {
|
||||||
|
addCriterion("uuid not in", values, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidBetween(String value1, String value2) {
|
||||||
|
addCriterion("uuid between", value1, value2, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUuidNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("uuid not between", value1, value2, "uuid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketIsNull() {
|
||||||
|
addCriterion("ticket is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketIsNotNull() {
|
||||||
|
addCriterion("ticket is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketEqualTo(String value) {
|
||||||
|
addCriterion("ticket =", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketNotEqualTo(String value) {
|
||||||
|
addCriterion("ticket <>", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketGreaterThan(String value) {
|
||||||
|
addCriterion("ticket >", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("ticket >=", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketLessThan(String value) {
|
||||||
|
addCriterion("ticket <", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("ticket <=", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketLike(String value) {
|
||||||
|
addCriterion("ticket like", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketNotLike(String value) {
|
||||||
|
addCriterion("ticket not like", value, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketIn(List<String> values) {
|
||||||
|
addCriterion("ticket in", values, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketNotIn(List<String> values) {
|
||||||
|
addCriterion("ticket not in", values, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketBetween(String value1, String value2) {
|
||||||
|
addCriterion("ticket between", value1, value2, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTicketNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("ticket not between", value1, value2, "ticket");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpIsNull() {
|
||||||
|
addCriterion("`exp` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpIsNotNull() {
|
||||||
|
addCriterion("`exp` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpEqualTo(Long value) {
|
||||||
|
addCriterion("`exp` =", value, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpNotEqualTo(Long value) {
|
||||||
|
addCriterion("`exp` <>", value, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpGreaterThan(Long value) {
|
||||||
|
addCriterion("`exp` >", value, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("`exp` >=", value, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpLessThan(Long value) {
|
||||||
|
addCriterion("`exp` <", value, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("`exp` <=", value, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpIn(List<Long> values) {
|
||||||
|
addCriterion("`exp` in", values, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpNotIn(List<Long> values) {
|
||||||
|
addCriterion("`exp` not in", values, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("`exp` between", value1, value2, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExpNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("`exp` not between", value1, value2, "exp");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsIsNull() {
|
||||||
|
addCriterion("args is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsIsNotNull() {
|
||||||
|
addCriterion("args is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsEqualTo(String value) {
|
||||||
|
addCriterion("args =", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsNotEqualTo(String value) {
|
||||||
|
addCriterion("args <>", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsGreaterThan(String value) {
|
||||||
|
addCriterion("args >", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("args >=", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsLessThan(String value) {
|
||||||
|
addCriterion("args <", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("args <=", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsLike(String value) {
|
||||||
|
addCriterion("args like", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsNotLike(String value) {
|
||||||
|
addCriterion("args not like", value, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsIn(List<String> values) {
|
||||||
|
addCriterion("args in", values, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsNotIn(List<String> values) {
|
||||||
|
addCriterion("args not in", values, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsBetween(String value1, String value2) {
|
||||||
|
addCriterion("args between", value1, value2, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andArgsNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("args not between", value1, value2, "args");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Criterion {
|
||||||
|
private String condition;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
private Object secondValue;
|
||||||
|
|
||||||
|
private boolean noValue;
|
||||||
|
|
||||||
|
private boolean singleValue;
|
||||||
|
|
||||||
|
private boolean betweenValue;
|
||||||
|
|
||||||
|
private boolean listValue;
|
||||||
|
|
||||||
|
private String typeHandler;
|
||||||
|
|
||||||
|
public String getCondition() {
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondValue() {
|
||||||
|
return secondValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoValue() {
|
||||||
|
return noValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingleValue() {
|
||||||
|
return singleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetweenValue() {
|
||||||
|
return betweenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isListValue() {
|
||||||
|
return listValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeHandler() {
|
||||||
|
return typeHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.typeHandler = null;
|
||||||
|
this.noValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
if (value instanceof List<?>) {
|
||||||
|
this.listValue = true;
|
||||||
|
} else {
|
||||||
|
this.singleValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value) {
|
||||||
|
this(condition, value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.secondValue = secondValue;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
this.betweenValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue) {
|
||||||
|
this(condition, value, secondValue, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,6 +6,7 @@
|
|||||||
<result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
|
<result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
|
||||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||||
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
|
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
|
||||||
|
<result column="require_ticket" jdbcType="BIT" property="requireTicket" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
@ -66,7 +67,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, resource_id, user_id, uuid
|
id, resource_id, user_id, uuid, require_ticket
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMappingExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMappingExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@ -100,9 +101,9 @@
|
|||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMapping">
|
<insert id="insert" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMapping">
|
||||||
insert into panel_link_mapping (id, resource_id, user_id,
|
insert into panel_link_mapping (id, resource_id, user_id,
|
||||||
uuid)
|
uuid, require_ticket)
|
||||||
values (#{id,jdbcType=BIGINT}, #{resourceId,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
|
values (#{id,jdbcType=BIGINT}, #{resourceId,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
|
||||||
#{uuid,jdbcType=VARCHAR})
|
#{uuid,jdbcType=VARCHAR}, #{requireTicket,jdbcType=BIT})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMapping">
|
<insert id="insertSelective" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMapping">
|
||||||
insert into panel_link_mapping
|
insert into panel_link_mapping
|
||||||
@ -119,6 +120,9 @@
|
|||||||
<if test="uuid != null">
|
<if test="uuid != null">
|
||||||
uuid,
|
uuid,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="requireTicket != null">
|
||||||
|
require_ticket,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@ -133,6 +137,9 @@
|
|||||||
<if test="uuid != null">
|
<if test="uuid != null">
|
||||||
#{uuid,jdbcType=VARCHAR},
|
#{uuid,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="requireTicket != null">
|
||||||
|
#{requireTicket,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMappingExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.dataease.plugins.common.base.domain.PanelLinkMappingExample" resultType="java.lang.Long">
|
||||||
@ -156,6 +163,9 @@
|
|||||||
<if test="record.uuid != null">
|
<if test="record.uuid != null">
|
||||||
uuid = #{record.uuid,jdbcType=VARCHAR},
|
uuid = #{record.uuid,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.requireTicket != null">
|
||||||
|
require_ticket = #{record.requireTicket,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@ -166,7 +176,8 @@
|
|||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||||
user_id = #{record.userId,jdbcType=BIGINT},
|
user_id = #{record.userId,jdbcType=BIGINT},
|
||||||
uuid = #{record.uuid,jdbcType=VARCHAR}
|
uuid = #{record.uuid,jdbcType=VARCHAR},
|
||||||
|
require_ticket = #{record.requireTicket,jdbcType=BIT}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@ -183,6 +194,9 @@
|
|||||||
<if test="uuid != null">
|
<if test="uuid != null">
|
||||||
uuid = #{uuid,jdbcType=VARCHAR},
|
uuid = #{uuid,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="requireTicket != null">
|
||||||
|
require_ticket = #{requireTicket,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
@ -190,7 +204,8 @@
|
|||||||
update panel_link_mapping
|
update panel_link_mapping
|
||||||
set resource_id = #{resourceId,jdbcType=VARCHAR},
|
set resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||||
user_id = #{userId,jdbcType=BIGINT},
|
user_id = #{userId,jdbcType=BIGINT},
|
||||||
uuid = #{uuid,jdbcType=VARCHAR}
|
uuid = #{uuid,jdbcType=VARCHAR},
|
||||||
|
require_ticket = #{requireTicket,jdbcType=BIT}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package io.dataease.plugins.common.base.mapper;
|
||||||
|
|
||||||
|
import io.dataease.plugins.common.base.domain.PanelLinkTicket;
|
||||||
|
import io.dataease.plugins.common.base.domain.PanelLinkTicketExample;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface PanelLinkTicketMapper {
|
||||||
|
long countByExample(PanelLinkTicketExample example);
|
||||||
|
|
||||||
|
int deleteByExample(PanelLinkTicketExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(PanelLinkTicket record);
|
||||||
|
|
||||||
|
int insertSelective(PanelLinkTicket record);
|
||||||
|
|
||||||
|
List<PanelLinkTicket> selectByExample(PanelLinkTicketExample example);
|
||||||
|
|
||||||
|
PanelLinkTicket selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") PanelLinkTicket record, @Param("example") PanelLinkTicketExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") PanelLinkTicket record, @Param("example") PanelLinkTicketExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(PanelLinkTicket record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(PanelLinkTicket record);
|
||||||
|
}
|
||||||
@ -0,0 +1,211 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="io.dataease.plugins.common.base.mapper.PanelLinkTicketMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="io.dataease.plugins.common.base.domain.PanelLinkTicket">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
|
||||||
|
<result column="ticket" jdbcType="VARCHAR" property="ticket" />
|
||||||
|
<result column="exp" jdbcType="BIGINT" property="exp" />
|
||||||
|
<result column="args" jdbcType="VARCHAR" property="args" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, uuid, ticket, `exp`, args
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="io.dataease.plugins.common.base.domain.PanelLinkTicketExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from panel_link_ticket
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from panel_link_ticket
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from panel_link_ticket
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="io.dataease.plugins.common.base.domain.PanelLinkTicketExample">
|
||||||
|
delete from panel_link_ticket
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="io.dataease.plugins.common.base.domain.PanelLinkTicket">
|
||||||
|
insert into panel_link_ticket (id, uuid, ticket,
|
||||||
|
`exp`, args)
|
||||||
|
values (#{id,jdbcType=BIGINT}, #{uuid,jdbcType=VARCHAR}, #{ticket,jdbcType=VARCHAR},
|
||||||
|
#{exp,jdbcType=BIGINT}, #{args,jdbcType=VARCHAR})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="io.dataease.plugins.common.base.domain.PanelLinkTicket">
|
||||||
|
insert into panel_link_ticket
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="uuid != null">
|
||||||
|
uuid,
|
||||||
|
</if>
|
||||||
|
<if test="ticket != null">
|
||||||
|
ticket,
|
||||||
|
</if>
|
||||||
|
<if test="exp != null">
|
||||||
|
`exp`,
|
||||||
|
</if>
|
||||||
|
<if test="args != null">
|
||||||
|
args,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="uuid != null">
|
||||||
|
#{uuid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="ticket != null">
|
||||||
|
#{ticket,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="exp != null">
|
||||||
|
#{exp,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="args != null">
|
||||||
|
#{args,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="io.dataease.plugins.common.base.domain.PanelLinkTicketExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from panel_link_ticket
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update panel_link_ticket
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.uuid != null">
|
||||||
|
uuid = #{record.uuid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.ticket != null">
|
||||||
|
ticket = #{record.ticket,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.exp != null">
|
||||||
|
`exp` = #{record.exp,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.args != null">
|
||||||
|
args = #{record.args,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update panel_link_ticket
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
uuid = #{record.uuid,jdbcType=VARCHAR},
|
||||||
|
ticket = #{record.ticket,jdbcType=VARCHAR},
|
||||||
|
`exp` = #{record.exp,jdbcType=BIGINT},
|
||||||
|
args = #{record.args,jdbcType=VARCHAR}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.plugins.common.base.domain.PanelLinkTicket">
|
||||||
|
update panel_link_ticket
|
||||||
|
<set>
|
||||||
|
<if test="uuid != null">
|
||||||
|
uuid = #{uuid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="ticket != null">
|
||||||
|
ticket = #{ticket,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="exp != null">
|
||||||
|
`exp` = #{exp,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="args != null">
|
||||||
|
args = #{args,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="io.dataease.plugins.common.base.domain.PanelLinkTicket">
|
||||||
|
update panel_link_ticket
|
||||||
|
set uuid = #{uuid,jdbcType=VARCHAR},
|
||||||
|
ticket = #{ticket,jdbcType=VARCHAR},
|
||||||
|
`exp` = #{exp,jdbcType=BIGINT},
|
||||||
|
args = #{args,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user