parent
f6cb92502c
commit
f0d7c8d778
@ -0,0 +1,90 @@
|
|||||||
|
package ${basePackage}.module.system.ent;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseEntity;
|
||||||
|
import ${basePackage}.frame.excel.annotation.ColumnDescription;
|
||||||
|
import ${basePackage}.frame.excel.annotation.ColumnList;
|
||||||
|
import ${basePackage}.frame.excel.annotation.ColumnName;
|
||||||
|
import ${basePackage}.frame.excel.annotation.SheetName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VISITOR - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
@SheetName("应用接入")
|
||||||
|
public class Visitor extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APP_NAME - 应用名称
|
||||||
|
*/
|
||||||
|
@ColumnName("应用名称")
|
||||||
|
@ColumnDescription("")
|
||||||
|
private String appName;
|
||||||
|
/**
|
||||||
|
* APP_NOTE - 应用简介
|
||||||
|
*/
|
||||||
|
@ColumnName("应用简介")
|
||||||
|
@ColumnDescription("")
|
||||||
|
private String appNote;
|
||||||
|
/**
|
||||||
|
* APP_KEY - 应用码
|
||||||
|
*/
|
||||||
|
@ColumnName("应用码")
|
||||||
|
@ColumnDescription("")
|
||||||
|
private String appKey;
|
||||||
|
/**
|
||||||
|
* APP_SECRET - 安全码
|
||||||
|
*/
|
||||||
|
@ColumnName("安全码")
|
||||||
|
@ColumnDescription("")
|
||||||
|
private String appSecret;
|
||||||
|
/**
|
||||||
|
* VALID - 是否有效
|
||||||
|
*/
|
||||||
|
@ColumnName("是否有效")
|
||||||
|
@ColumnDescription("")
|
||||||
|
@ColumnList({"是","否"})
|
||||||
|
private Boolean valid;
|
||||||
|
|
||||||
|
public String getAppName() {
|
||||||
|
return this.appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppName(String appName) {
|
||||||
|
this.appName = appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppNote() {
|
||||||
|
return this.appNote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppNote(String appNote) {
|
||||||
|
this.appNote = appNote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppSecret() {
|
||||||
|
return this.appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppSecret(String appSecret) {
|
||||||
|
this.appSecret = appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getValid() {
|
||||||
|
return this.valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValid(Boolean valid) {
|
||||||
|
this.valid = valid;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package ${basePackage}.module.system.ent;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VISITOR_RES - 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorRes extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APP_ID - 应用主键
|
||||||
|
*/
|
||||||
|
private Long appId;
|
||||||
|
/**
|
||||||
|
* APP_KEY - 应用码
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
/**
|
||||||
|
* RES_ID - 资源主键
|
||||||
|
*/
|
||||||
|
private Long resId;
|
||||||
|
/**
|
||||||
|
* RES_CODE - 资源代码
|
||||||
|
*/
|
||||||
|
private String resCode;
|
||||||
|
|
||||||
|
public Long getAppId() {
|
||||||
|
return this.appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(Long appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getResId() {
|
||||||
|
return this.resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResId(Long resId) {
|
||||||
|
this.resId = resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResCode() {
|
||||||
|
return this.resCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResCode(String resCode) {
|
||||||
|
this.resCode = resCode;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package ${basePackage}.module.system.mgr;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.auth.Token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public interface VisitorManager {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorCreateResponse create(${basePackage}.module.system.req.VisitorCreateRequest request, Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorDeleteResponse delete(${basePackage}.module.system.req.VisitorDeleteRequest request, Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorUpdateResponse update(${basePackage}.module.system.req.VisitorUpdateRequest request, Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorFindResponse find(${basePackage}.module.system.req.VisitorFindRequest request, Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得对象
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorGetResponse get(${basePackage}.module.system.req.VisitorGetRequest request, Token token);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
package ${basePackage}.module.system.mgr;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.github.pagehelper.util.StringUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import ${basePackage}.frame.auth.Token;
|
||||||
|
import ${basePackage}.frame.base.ErrorType;
|
||||||
|
import ${basePackage}.frame.utils.IDgenerator;
|
||||||
|
import ${basePackage}.frame.utils.MapperUtil;
|
||||||
|
import ${basePackage}.frame.utils.Message;
|
||||||
|
import ${basePackage}.frame.utils.ValidationUtil;
|
||||||
|
import ${basePackage}.module.system.ent.Visitor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VISITOR - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Service
|
||||||
|
public class VisitorManagerImpl implements VisitorManager {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ${basePackage}.module.system.mpr.VisitorMapper visitorMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorCreateResponse create(${basePackage}.module.system.req.VisitorCreateRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorCreateResponse response = new ${basePackage}.module.system.rsp.VisitorCreateResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
{// 应用码唯一检查
|
||||||
|
${basePackage}.module.system.req.VisitorFindRequest visitorFindRequest = new ${basePackage}.module.system.req.VisitorFindRequest();
|
||||||
|
visitorFindRequest.setAppKey(request.getAppKey());
|
||||||
|
${basePackage}.module.system.rsp.VisitorFindResponse visitorFindResponse = this.find(visitorFindRequest, token);
|
||||||
|
if (visitorFindResponse.hasError()) {
|
||||||
|
response.addErrors(visitorFindResponse.getErrors());
|
||||||
|
return response;
|
||||||
|
} else if (visitorFindResponse.getTotalCount() > 0) {
|
||||||
|
response.addError(ErrorType.UNIQUENESS_ERROR, "[appKey]应用码已存在,请检查!");
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
long id = IDgenerator.nextId();
|
||||||
|
Visitor entity = MapperUtil.map(request, Visitor.class);
|
||||||
|
entity.setId(id);
|
||||||
|
|
||||||
|
long result = visitorMapper.insert(entity, token);
|
||||||
|
if (1L != result) {
|
||||||
|
response.addError(ErrorType.BUSINESS_ERROR, Message.CREATE_FAILURE);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
response.setId(id);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorDeleteResponse delete(${basePackage}.module.system.req.VisitorDeleteRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorDeleteResponse response = new ${basePackage}.module.system.rsp.VisitorDeleteResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
long result = visitorMapper.delete(request, token);
|
||||||
|
if (1L != result) {
|
||||||
|
response.addError(ErrorType.BUSINESS_ERROR, Message.DELETE_FAILURE);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
response.setResult(result);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorUpdateResponse update(${basePackage}.module.system.req.VisitorUpdateRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorUpdateResponse response = new ${basePackage}.module.system.rsp.VisitorUpdateResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
long result = visitorMapper.update(request, token);
|
||||||
|
if (1L != result) {
|
||||||
|
response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
response.setResult(result);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorFindResponse find(${basePackage}.module.system.req.VisitorFindRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorFindResponse response = new ${basePackage}.module.system.rsp.VisitorFindResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.getPageSize() != 0) {
|
||||||
|
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotEmpty(request.getSortKey())) {
|
||||||
|
PageHelper.orderBy(request.getSortKey() + " " + request.getSortType());
|
||||||
|
}
|
||||||
|
PageInfo<Visitor> pageInfo = new PageInfo<>(visitorMapper.find(request, token));
|
||||||
|
|
||||||
|
response.setResult(pageInfo.getList());
|
||||||
|
response.setTotalCount(pageInfo.getTotal());
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得对象
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorGetResponse get(${basePackage}.module.system.req.VisitorGetRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorGetResponse response = new ${basePackage}.module.system.rsp.VisitorGetResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
Visitor po = visitorMapper.get(request, token);
|
||||||
|
|
||||||
|
if (po != null) {
|
||||||
|
response.setVisitor(po);
|
||||||
|
} else {
|
||||||
|
response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package ${basePackage}.module.system.mgr;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.auth.Token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public interface VisitorResManager {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorResCreateResponse create(${basePackage}.module.system.req.VisitorResCreateRequest request, Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorResDeleteResponse delete(${basePackage}.module.system.req.VisitorResDeleteRequest request, Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorResUpdateResponse update(${basePackage}.module.system.req.VisitorResUpdateRequest request, Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
${basePackage}.module.system.rsp.VisitorResFindResponse find(${basePackage}.module.system.req.VisitorResFindRequest request, Token token);
|
||||||
|
}
|
@ -0,0 +1,139 @@
|
|||||||
|
package ${basePackage}.module.system.mgr;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.github.pagehelper.util.StringUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import ${basePackage}.frame.auth.Token;
|
||||||
|
import ${basePackage}.frame.base.ErrorType;
|
||||||
|
import ${basePackage}.frame.utils.IDgenerator;
|
||||||
|
import ${basePackage}.frame.utils.MapperUtil;
|
||||||
|
import ${basePackage}.frame.utils.Message;
|
||||||
|
import ${basePackage}.frame.utils.ValidationUtil;
|
||||||
|
import ${basePackage}.module.system.ent.VisitorRes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VISITOR_RES - 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Service
|
||||||
|
public class VisitorResManagerImpl implements VisitorResManager {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ${basePackage}.module.system.mpr.VisitorResMapper visitorResMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorResCreateResponse create(${basePackage}.module.system.req.VisitorResCreateRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorResCreateResponse response = new ${basePackage}.module.system.rsp.VisitorResCreateResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
long id = IDgenerator.nextId();
|
||||||
|
VisitorRes entity = MapperUtil.map(request, VisitorRes.class);
|
||||||
|
entity.setId(id);
|
||||||
|
|
||||||
|
long result = visitorResMapper.insert(entity, token);
|
||||||
|
if (1L != result) {
|
||||||
|
response.addError(ErrorType.BUSINESS_ERROR, Message.CREATE_FAILURE);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
response.setId(id);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorResDeleteResponse delete(${basePackage}.module.system.req.VisitorResDeleteRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorResDeleteResponse response = new ${basePackage}.module.system.rsp.VisitorResDeleteResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
long result = visitorResMapper.delete(request, token);
|
||||||
|
if (1L != result) {
|
||||||
|
response.addError(ErrorType.BUSINESS_ERROR, Message.DELETE_FAILURE);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
response.setResult(result);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorResUpdateResponse update(${basePackage}.module.system.req.VisitorResUpdateRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorResUpdateResponse response = new ${basePackage}.module.system.rsp.VisitorResUpdateResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
long result = visitorResMapper.update(request, token);
|
||||||
|
if (1L != result) {
|
||||||
|
response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
response.setResult(result);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 响应
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
public ${basePackage}.module.system.rsp.VisitorResFindResponse find(${basePackage}.module.system.req.VisitorResFindRequest request, Token token) {
|
||||||
|
${basePackage}.module.system.rsp.VisitorResFindResponse response = new ${basePackage}.module.system.rsp.VisitorResFindResponse();
|
||||||
|
|
||||||
|
ValidationUtil.validate(request, response);
|
||||||
|
if (response.hasError()) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.getPageSize() != 0) {
|
||||||
|
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotEmpty(request.getSortKey())) {
|
||||||
|
PageHelper.orderBy(request.getSortKey() + " " + request.getSortType());
|
||||||
|
}
|
||||||
|
PageInfo<VisitorRes> pageInfo = new PageInfo<>(visitorResMapper.find(request, token));
|
||||||
|
|
||||||
|
response.setResult(pageInfo.getList());
|
||||||
|
response.setTotalCount(pageInfo.getTotal());
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,139 @@
|
|||||||
|
<?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="${basePackage}.module.system.mpr.VisitorMapper">
|
||||||
|
|
||||||
|
<sql id="table">"SYS_VISITOR"</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
"ID","APP_NAME","APP_NOTE","APP_KEY","APP_SECRET","VALID","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="visitor" type="${basePackage}.module.system.ent.Visitor">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="APP_NAME" jdbcType="VARCHAR" property="appName"/>
|
||||||
|
<result column="APP_NOTE" jdbcType="VARCHAR" property="appNote"/>
|
||||||
|
<result column="APP_KEY" jdbcType="VARCHAR" property="appKey"/>
|
||||||
|
<result column="APP_SECRET" jdbcType="VARCHAR" property="appSecret"/>
|
||||||
|
<result column="VALID" jdbcType="BIT" property="valid"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="find" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE
|
||||||
|
"IS_DELETED" = 0
|
||||||
|
<if test="request.appName != null and request.appName != ''">
|
||||||
|
AND APP_NAME = ${r'#'}{request.appName}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND APP_KEY = ${r'#'}{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.appSecret != null and request.appSecret != ''">
|
||||||
|
AND APP_SECRET = ${r'#'}{request.appSecret}
|
||||||
|
</if>
|
||||||
|
<if test="request.valid != null">
|
||||||
|
AND VALID = ${r'#'}{request.valid}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE
|
||||||
|
"IS_DELETED" = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
${r'#'}{request.id},
|
||||||
|
${r'#'}{request.appName,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{request.appNote,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{request.appKey,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{request.appSecret,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{request.valid,jdbcType=BIT},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
${r'#'}{token.userId,jdbcType=NUMERIC},
|
||||||
|
datetime('now','localtime'),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(
|
||||||
|
${r'#'}{item.id},
|
||||||
|
${r'#'}{item.appName,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{item.appNote,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{item.appKey,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{item.appSecret,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{item.valid,jdbcType=BIT},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
${r'#'}{token.userId,jdbcType=NUMERIC},
|
||||||
|
datetime('now','localtime'),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</foreach >
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = ${r'#'}{request.id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
APP_NAME = ${r'#'}{request.appName,jdbcType=VARCHAR},
|
||||||
|
APP_NOTE = ${r'#'}{request.appNote,jdbcType=VARCHAR},
|
||||||
|
APP_KEY = ${r'#'}{request.appKey,jdbcType=VARCHAR},
|
||||||
|
APP_SECRET = ${r'#'}{request.appSecret,jdbcType=VARCHAR},
|
||||||
|
VALID = ${r'#'}{request.valid,jdbcType=BIT},
|
||||||
|
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||||
|
"LAST_UPDATE_BY" = ${r'#'}{token.userId},
|
||||||
|
"LAST_UPDATE_TIME" = datetime('now','localtime')
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = ${r'#'}{request.id}
|
||||||
|
AND "ROW_VERSION" = ${r'#'}{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="get" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE IS_DELETED = 0
|
||||||
|
AND ID = ${r'#'}{request.id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,135 @@
|
|||||||
|
<?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="${basePackage}.module.system.mpr.VisitorResMapper">
|
||||||
|
|
||||||
|
<sql id="table">"SYS_VISITOR_RES"</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
"ID","APP_ID","APP_KEY","RES_ID","RES_CODE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="visitorRes" type="${basePackage}.module.system.ent.VisitorRes">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="APP_ID" jdbcType="BIGINT" property="appId"/>
|
||||||
|
<result column="APP_KEY" jdbcType="VARCHAR" property="appKey"/>
|
||||||
|
<result column="RES_ID" jdbcType="BIGINT" property="resId"/>
|
||||||
|
<result column="RES_CODE" jdbcType="VARCHAR" property="resCode"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="find" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE
|
||||||
|
"IS_DELETED" = 0
|
||||||
|
<if test="request.appId != null and request.appId != 0">
|
||||||
|
AND APP_ID = ${r'#'}{request.appId}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND APP_KEY = ${r'#'}{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.resId != null and request.resId != 0">
|
||||||
|
AND RES_ID = ${r'#'}{request.resId}
|
||||||
|
</if>
|
||||||
|
<if test="request.resCode != null and request.resCode != ''">
|
||||||
|
AND RES_CODE = ${r'#'}{request.resCode}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE
|
||||||
|
"IS_DELETED" = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
${r'#'}{request.id},
|
||||||
|
${r'#'}{request.appId,jdbcType=BIGINT},
|
||||||
|
${r'#'}{request.appKey,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{request.resId,jdbcType=BIGINT},
|
||||||
|
${r'#'}{request.resCode,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
${r'#'}{token.userId,jdbcType=NUMERIC},
|
||||||
|
datetime('now','localtime'),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(
|
||||||
|
${r'#'}{item.id},
|
||||||
|
${r'#'}{item.appId,jdbcType=BIGINT},
|
||||||
|
${r'#'}{item.appKey,jdbcType=VARCHAR},
|
||||||
|
${r'#'}{item.resId,jdbcType=BIGINT},
|
||||||
|
${r'#'}{item.resCode,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
${r'#'}{token.userId,jdbcType=NUMERIC},
|
||||||
|
datetime('now','localtime'),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</foreach >
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = ${r'#'}{request.id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
APP_ID = ${r'#'}{request.appId,jdbcType=BIGINT},
|
||||||
|
APP_KEY = ${r'#'}{request.appKey,jdbcType=VARCHAR},
|
||||||
|
RES_ID = ${r'#'}{request.resId,jdbcType=BIGINT},
|
||||||
|
RES_CODE = ${r'#'}{request.resCode,jdbcType=VARCHAR},
|
||||||
|
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||||
|
"LAST_UPDATE_BY" = ${r'#'}{token.userId},
|
||||||
|
"LAST_UPDATE_TIME" = datetime('now','localtime')
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = ${r'#'}{request.id}
|
||||||
|
AND "ROW_VERSION" = ${r'#'}{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="get" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE IS_DELETED = 0
|
||||||
|
AND ID = ${r'#'}{request.id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,72 @@
|
|||||||
|
package ${basePackage}.module.system.mpr;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import ${basePackage}.frame.auth.Token;
|
||||||
|
import ${basePackage}.module.system.ent.Visitor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VISITOR - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @date 2020-06-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface VisitorMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long insert(@Param("request") Visitor request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long insertBatch(@Param("list") List<Visitor> request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long delete(@Param("request") ${basePackage}.module.system.req.VisitorDeleteRequest request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long update(@Param("request") ${basePackage}.module.system.req.VisitorUpdateRequest request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回对象
|
||||||
|
*/
|
||||||
|
List<Visitor> find(@Param("request") ${basePackage}.module.system.req.VisitorFindRequest request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得对象
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回对象
|
||||||
|
*/
|
||||||
|
Visitor get(@Param("request") ${basePackage}.module.system.req.VisitorGetRequest request, @Param("token") Token token);
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package ${basePackage}.module.system.mpr;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import ${basePackage}.frame.auth.Token;
|
||||||
|
import ${basePackage}.module.system.ent.VisitorRes;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VISITOR_RES - 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @date 2020-06-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface VisitorResMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long insert(@Param("request") VisitorRes request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long insertBatch(@Param("list") List<VisitorRes> request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long delete(@Param("request") ${basePackage}.module.system.req.VisitorResDeleteRequest request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回数量
|
||||||
|
*/
|
||||||
|
long update(@Param("request") ${basePackage}.module.system.req.VisitorResUpdateRequest request, @Param("token") Token token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*
|
||||||
|
* @param request 请求对象
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 返回对象
|
||||||
|
*/
|
||||||
|
List<VisitorRes> find(@Param("request") ${basePackage}.module.system.req.VisitorResFindRequest request, @Param("token") Token token);
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
import ${basePackage}.frame.base.BaseRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorCreateRequest - 应用接入新增
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorCreateRequest extends BaseRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用名称.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appName]应用名称不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[appName]应用名称长度不合法(0-50)")
|
||||||
|
private String appName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用简介.
|
||||||
|
*/
|
||||||
|
@Length(min = 0, max = 255, message = "[appNote]应用简介长度不合法(0-255)")
|
||||||
|
private String appNote;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appKey]应用码不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[appKey]应用码长度不合法(0-50)")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appSecret]安全码不能为空")
|
||||||
|
@Length(min = 0, max = 16, message = "[appSecret]安全码长度不合法(0-16)")
|
||||||
|
private String appSecret;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有效.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[valid]是否有效不能为NULL")
|
||||||
|
private Boolean valid;
|
||||||
|
|
||||||
|
public String getAppName() {
|
||||||
|
return this.appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppName(String appName) {
|
||||||
|
this.appName = appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppNote() {
|
||||||
|
return this.appNote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppNote(String appNote) {
|
||||||
|
this.appNote = appNote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppSecret() {
|
||||||
|
return this.appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppSecret(String appSecret) {
|
||||||
|
this.appSecret = appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getValid() {
|
||||||
|
return this.valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValid(Boolean valid) {
|
||||||
|
this.valid = valid;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorDeleteRequest - 应用接入删除
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorDeleteRequest extends BaseRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[id]主键不能为空")
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseFindRequest;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorFindRequest - 应用接入查询
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorFindRequest extends BaseFindRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用名称.
|
||||||
|
*/
|
||||||
|
private String appName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用码.
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全码.
|
||||||
|
*/
|
||||||
|
private String appSecret;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有效.
|
||||||
|
*/
|
||||||
|
private Boolean valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
public String getAppName() {
|
||||||
|
return this.appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppName(String appName) {
|
||||||
|
this.appName = appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppSecret() {
|
||||||
|
return this.appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppSecret(String appSecret) {
|
||||||
|
this.appSecret = appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getValid() {
|
||||||
|
return this.valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValid(Boolean valid) {
|
||||||
|
this.valid = valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(Date startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndDate() {
|
||||||
|
return endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndDate(Date endDate) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorGetRequest - 应用接入获取
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorGetRequest extends BaseRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[id]主键不能为空")
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
import ${basePackage}.frame.base.BaseRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResCreateRequest - 应用资源关系新增
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResCreateRequest extends BaseRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[appId]应用主键不能为NULL")
|
||||||
|
private Long appId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appKey]应用码不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[appKey]应用码长度不合法(0-50)")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[resId]资源主键不能为NULL")
|
||||||
|
private Long resId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源代码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[resCode]资源代码不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[resCode]资源代码长度不合法(0-50)")
|
||||||
|
private String resCode;
|
||||||
|
|
||||||
|
public Long getAppId() {
|
||||||
|
return this.appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(Long appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getResId() {
|
||||||
|
return this.resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResId(Long resId) {
|
||||||
|
this.resId = resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResCode() {
|
||||||
|
return this.resCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResCode(String resCode) {
|
||||||
|
this.resCode = resCode;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResDeleteRequest - 应用资源关系删除
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResDeleteRequest extends BaseRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[id]主键不能为空")
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseFindRequest;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResFindRequest - 应用资源关系查询
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResFindRequest extends BaseFindRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用主键.
|
||||||
|
*/
|
||||||
|
private Long appId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用码.
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源主键.
|
||||||
|
*/
|
||||||
|
private Long resId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源代码.
|
||||||
|
*/
|
||||||
|
private String resCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
public Long getAppId() {
|
||||||
|
return this.appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(Long appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getResId() {
|
||||||
|
return this.resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResId(Long resId) {
|
||||||
|
this.resId = resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResCode() {
|
||||||
|
return this.resCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResCode(String resCode) {
|
||||||
|
this.resCode = resCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(Date startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndDate() {
|
||||||
|
return endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndDate(Date endDate) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
import ${basePackage}.frame.base.BaseUpdateRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResUpdateRequest - 应用资源关系更新
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResUpdateRequest extends BaseUpdateRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[id]主键不能为NULL")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[appId]应用主键不能为NULL")
|
||||||
|
private Long appId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appKey]应用码不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[appKey]应用码长度不合法(0-50)")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[resId]资源主键不能为NULL")
|
||||||
|
private Long resId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源代码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[resCode]资源代码不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[resCode]资源代码长度不合法(0-50)")
|
||||||
|
private String resCode;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAppId() {
|
||||||
|
return this.appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(Long appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getResId() {
|
||||||
|
return this.resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResId(Long resId) {
|
||||||
|
this.resId = resId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResCode() {
|
||||||
|
return this.resCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResCode(String resCode) {
|
||||||
|
this.resCode = resCode;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
package ${basePackage}.module.system.req;
|
||||||
|
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
import ${basePackage}.frame.base.BaseUpdateRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorUpdateRequest - 应用接入更新
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorUpdateRequest extends BaseUpdateRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[id]主键不能为NULL")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用名称.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appName]应用名称不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[appName]应用名称长度不合法(0-50)")
|
||||||
|
private String appName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用简介.
|
||||||
|
*/
|
||||||
|
@Length(min = 0, max = 255, message = "[appNote]应用简介长度不合法(0-255)")
|
||||||
|
private String appNote;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appKey]应用码不能为空")
|
||||||
|
@Length(min = 0, max = 50, message = "[appKey]应用码长度不合法(0-50)")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全码.
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "[appSecret]安全码不能为空")
|
||||||
|
@Length(min = 0, max = 16, message = "[appSecret]安全码长度不合法(0-16)")
|
||||||
|
private String appSecret;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有效.
|
||||||
|
*/
|
||||||
|
@NotNull(message = "[valid]是否有效不能为NULL")
|
||||||
|
private Boolean valid;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppName() {
|
||||||
|
return this.appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppName(String appName) {
|
||||||
|
this.appName = appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppNote() {
|
||||||
|
return this.appNote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppNote(String appNote) {
|
||||||
|
this.appNote = appNote;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppKey() {
|
||||||
|
return this.appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppKey(String appKey) {
|
||||||
|
this.appKey = appKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppSecret() {
|
||||||
|
return this.appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppSecret(String appSecret) {
|
||||||
|
this.appSecret = appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getValid() {
|
||||||
|
return this.valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValid(Boolean valid) {
|
||||||
|
this.valid = valid;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorCreateResponse - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorCreateResponse extends BaseResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorDeleteResponse - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorDeleteResponse extends BaseResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数目
|
||||||
|
*/
|
||||||
|
private Long result;
|
||||||
|
|
||||||
|
public Long getResult() {
|
||||||
|
return this.result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(Long result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseFindResponse;
|
||||||
|
import ${basePackage}.module.system.ent.Visitor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorFindResponse - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorFindResponse extends BaseFindResponse<Visitor> {
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseResponse;
|
||||||
|
import ${basePackage}.module.system.ent.Visitor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorGetResponse - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorGetResponse extends BaseResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用接入
|
||||||
|
*/
|
||||||
|
private Visitor visitor;
|
||||||
|
|
||||||
|
public Visitor getVisitor() {
|
||||||
|
return this.visitor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVisitor(Visitor visitor) {
|
||||||
|
this.visitor = visitor;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResCreateResponse - 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResCreateResponse extends BaseResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResDeleteResponse - 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResDeleteResponse extends BaseResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数目
|
||||||
|
*/
|
||||||
|
private Long result;
|
||||||
|
|
||||||
|
public Long getResult() {
|
||||||
|
return this.result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(Long result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseFindResponse;
|
||||||
|
import ${basePackage}.module.system.ent.VisitorRes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResFindResponse - 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResFindResponse extends BaseFindResponse<VisitorRes> {
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorResUpdateResponse - 应用资源关系
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorResUpdateResponse extends BaseResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新数目
|
||||||
|
*/
|
||||||
|
private Long result;
|
||||||
|
|
||||||
|
public Long getResult() {
|
||||||
|
return this.result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(Long result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ${basePackage}.module.system.rsp;
|
||||||
|
|
||||||
|
import ${basePackage}.frame.base.BaseResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VisitorUpdateResponse - 应用接入
|
||||||
|
*
|
||||||
|
* @author wangbing
|
||||||
|
* @version 0.0.1
|
||||||
|
* @since 2020-06-25
|
||||||
|
*/
|
||||||
|
public class VisitorUpdateResponse extends BaseResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新数目
|
||||||
|
*/
|
||||||
|
private Long result;
|
||||||
|
|
||||||
|
public Long getResult() {
|
||||||
|
return this.result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(Long result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for VISITOR - 应用接入
|
||||||
|
-- Target : SQLite
|
||||||
|
-- Author : wangbing
|
||||||
|
-- Date: : 2020-06-25
|
||||||
|
-- ----------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS SYS_VISITOR (
|
||||||
|
"ID" BIGINT PRIMARY KEY NOT NULL,
|
||||||
|
"APP_NAME" VARCHAR(50) NOT NULL,
|
||||||
|
"APP_NOTE" VARCHAR(250),
|
||||||
|
"APP_KEY" VARCHAR(50) NOT NULL,
|
||||||
|
"APP_SECRET" VARCHAR(16) NOT NULL,
|
||||||
|
"VALID" BOOLEAN NOT NULL,
|
||||||
|
"ROW_VERSION" BIGINT NOT NULL,
|
||||||
|
"IS_DELETED" BOOLEAN NOT NULL,
|
||||||
|
"CREATE_BY" BIGINT NOT NULL,
|
||||||
|
"CREATE_TIME" DATETIME NOT NULL,
|
||||||
|
"LAST_UPDATE_BY" BIGINT,
|
||||||
|
"LAST_UPDATE_TIME" DATETIME
|
||||||
|
);
|
@ -0,0 +1,19 @@
|
|||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for VISITOR_RES - 应用资源关系
|
||||||
|
-- Target : SQLite
|
||||||
|
-- Author : wangbing
|
||||||
|
-- Date: : 2020-06-25
|
||||||
|
-- ----------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS SYS_VISITOR_RES (
|
||||||
|
"ID" BIGINT PRIMARY KEY NOT NULL,
|
||||||
|
"APP_ID" BIGINT NOT NULL,
|
||||||
|
"APP_KEY" VARCHAR(50) NOT NULL,
|
||||||
|
"RES_ID" BIGINT NOT NULL,
|
||||||
|
"RES_CODE" VARCHAR(50) NOT NULL,
|
||||||
|
"ROW_VERSION" BIGINT NOT NULL,
|
||||||
|
"IS_DELETED" BOOLEAN NOT NULL,
|
||||||
|
"CREATE_BY" BIGINT NOT NULL,
|
||||||
|
"CREATE_TIME" DATETIME NOT NULL,
|
||||||
|
"LAST_UPDATE_BY" BIGINT,
|
||||||
|
"LAST_UPDATE_TIME" DATETIME
|
||||||
|
);
|
Loading…
Reference in new issue