Commit e68e9fcd authored by ZWT's avatar ZWT

feat(零碳): 长庆演示系统新增功能

1.修改第三方日累计数据推送表表结构,增加日累计储能放电量字段,同时修改代码对应实体及mapper文件,修改相关接口增加储能日累计放电量接收逻辑;
2.修改首页井场收益分析模块接口,修改获取储能累计放电量逻辑;
3.设计并创建井口日用电趋势表,生成对应实体类及mapper文件;
4.统计分析模块,新增本月累计节电经济效益查询接口,添加线上接口文档并完成接口冒烟测试;
5.统计分析模块,新增本月累计减碳量查询接口,添加线上接口文档并完成接口冒烟测试;
6.统计分析模块,新增光伏发电趋势查询接口,添加线上接口文档并完成接口冒烟测试;
7.统计分析模块,新增月度总览查询接口,添加线上接口文档并完成接口冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent c2d91725
package pps.core.common.cache;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.util.CollectionUtils;
import pps.core.common.entity.SysTradeInterfaceWhiteEnt;
import pps.core.common.mapper.SysTradeInterfaceWhiteMapper;
import xstartup.base.XContext;
import xstartup.base.util.XCopyUtils;
import xstartup.cache.XCacheLife;
import xstartup.cache.XCacheObject;
import xstartup.cache.XListCache;
import java.util.List;
/**
* 交易平台用户权限缓存
* 优先判断 用户权限,为空时判断角色权限
*/
public class TradeUserPermissionCache implements XCacheObject, XCacheLife {
private String serviceName;
private String methodName;
public TradeUserPermissionCache() {
}
public TradeUserPermissionCache(String serviceName, String methodName) {
this.serviceName = serviceName;
this.methodName = methodName;
}
/**
* 检查缓存是否存在指定的code
*
* @param context
* @param roleId
* @param serviceName
* @param methodName
* @return
*/
public static boolean exist(XContext context, Long roleId, String serviceName, String methodName) {
return Tool.get(Tool.class).exist(context, roleId.toString(), serviceName + "#" + methodName, TradeUserPermissionCache.class);
}
/**
* 从缓存中读取
*
* @param context
* @param roleId
* @return
*/
public static List<TradeUserPermissionCache> list(XContext context, Long roleId) {
return Tool.get(Tool.class).list(context, roleId.toString(), TradeUserPermissionCache.class);
}
/**
* 设置缓存
*
* @param context
* @param roleId
* @param caches
*/
public static void set(XContext context, Long roleId, List<TradeUserPermissionCache> caches) {
Tool.get(Tool.class).set(context, roleId.toString(), caches);
}
/**
* 删除缓存
*
* @param context
* @param roleId
*/
public static void delete(XContext context, Long roleId) {
Tool.get(Tool.class).delete(context, roleId.toString(), TradeUserPermissionCache.class);
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getMethodName() {
return methodName;
}
public void setMethodName(String methodName) {
this.methodName = methodName;
}
@Override
public String getCacheKey() {
return this.serviceName + "#" + this.methodName;
}
@Override
public Integer getDuration() {
//过期时间(秒)
// 1天
// return 24 * 3600;
// 5分钟
return 5 * 60;
}
static class Tool extends XListCache<TradeUserPermissionCache> {
@Override
protected List<TradeUserPermissionCache> restore(XContext context, String listKey) {
SysTradeInterfaceWhiteMapper whiteMapper = context.getBean(SysTradeInterfaceWhiteMapper.class);
QueryWrapper<SysTradeInterfaceWhiteEnt> whiteEntQueryWrapper = new QueryWrapper<>();
List<SysTradeInterfaceWhiteEnt> whiteEntList = whiteMapper.selectList(whiteEntQueryWrapper);
if (!CollectionUtils.isEmpty(whiteEntList)) {
return XCopyUtils.copyNewList(whiteEntList, TradeUserPermissionCache.class);
}
return null;
}
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
@TableName("base_sys_config")
public class BaseSysConfigEnt implements Serializable {
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("配置名称")
@TableField
private String name;
@XText("配置key")
@TableField
private String mainKeys;
@XText("配置值")
@TableField
private String value;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("组织机构id")
@TableField
private String ouId;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getMainKeys() {
return mainKeys;
}
public void setMainKeys(String mainKeys) {
this.mainKeys = mainKeys;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public String getOuId() {
return ouId;
}
public void setOuId(String ouId) {
this.ouId = ouId;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import java.io.Serializable;
public class BaseSysConfigView implements Serializable {
@TableField
private String id;
@XText("配置名称")
@TableField
private String name;
@XText("配置key")
@TableField
private String mainKeys;
@XText("配置值")
@TableField
private String value;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("组织机构id")
@TableField
private String ouId;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getMainKeys() {
return mainKeys;
}
public void setMainKeys(String mainKeys) {
this.mainKeys = mainKeys;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public String getOuId() {
return ouId;
}
public void setOuId(String ouId) {
this.ouId = ouId;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("base_sys_log")
public class BaseSysLogEnt implements Serializable {
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("系统名称")
@TableField
private String systemName;
@XText("作用域名称")
@TableField
private String scopeName;
@XText("模块名称")
@TableField
private String moduleName;
@XText("服务名称")
@TableField
private String serviceName;
@XText("方法名称")
@TableField
private String actionName;
@XText("请求方式")
@TableField
private String requestMethod;
@XText("请求ip")
@TableField
private String requestIp;
@XText("浏览器信息")
@TableField
private String browserInfo;
@TableField
private String source;
@XText("请求参数-json格式")
@TableField
private String requestValue;
@XText("响应参数-json格式")
@TableField
private String responseValue;
@XText("用户id")
@TableField
private String userId;
@XText("执行时间")
@TableField
private Date executionTime;
@XText("异常信息")
@TableField
private String exceptionInfo;
@XText("是否异常")
@TableField
private Boolean isException;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getSystemName() {
return this.systemName;
}
public void setSystemName(String value) {
this.systemName = value;
}
public String getScopeName() {
return this.scopeName;
}
public void setScopeName(String value) {
this.scopeName = value;
}
public String getModuleName() {
return this.moduleName;
}
public void setModuleName(String value) {
this.moduleName = value;
}
public String getServiceName() {
return this.serviceName;
}
public void setServiceName(String value) {
this.serviceName = value;
}
public String getActionName() {
return this.actionName;
}
public void setActionName(String value) {
this.actionName = value;
}
public String getRequestMethod() {
return this.requestMethod;
}
public void setRequestMethod(String value) {
this.requestMethod = value;
}
public String getRequestIp() {
return this.requestIp;
}
public void setRequestIp(String value) {
this.requestIp = value;
}
public String getBrowserInfo() {
return this.browserInfo;
}
public void setBrowserInfo(String value) {
this.browserInfo = value;
}
public String getSource() {
return this.source;
}
public void setSource(String value) {
this.source = value;
}
public String getRequestValue() {
return this.requestValue;
}
public void setRequestValue(String value) {
this.requestValue = value;
}
public String getResponseValue() {
return this.responseValue;
}
public void setResponseValue(String value) {
this.responseValue = value;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String value) {
this.userId = value;
}
public Date getExecutionTime() {
return this.executionTime;
}
public void setExecutionTime(Date value) {
this.executionTime = value;
}
public String getExceptionInfo() {
return this.exceptionInfo;
}
public void setExceptionInfo(String value) {
this.exceptionInfo = value;
}
public Boolean getIsException() {
return this.isException;
}
public void setIsException(Boolean value) {
this.isException = value;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
public class BaseSysLogView implements Serializable {
@TableField
private String id;
@XText("系统名称")
@TableField
private String systemName;
@XText("作用域名称")
@TableField
private String scopeName;
@XText("模块名称")
@TableField
private String moduleName;
@XText("服务名称")
@TableField
private String serviceName;
@XText("方法名称")
@TableField
private String actionName;
@XText("请求方式")
@TableField
private String requestMethod;
@XText("请求ip")
@TableField
private String requestIp;
@XText("浏览器信息")
@TableField
private String browserInfo;
@TableField
private String source;
@XText("请求参数-json格式")
@TableField
private String requestValue;
@XText("响应参数-json格式")
@TableField
private String responseValue;
@XText("用户id")
@TableField
private String userId;
@XText("执行时间")
@TableField
private Date executionTime;
@XText("异常信息")
@TableField
private String exceptionInfo;
@XText("是否异常")
@TableField
private Boolean isException;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getSystemName() {
return this.systemName;
}
public void setSystemName(String value) {
this.systemName = value;
}
public String getScopeName() {
return this.scopeName;
}
public void setScopeName(String value) {
this.scopeName = value;
}
public String getModuleName() {
return this.moduleName;
}
public void setModuleName(String value) {
this.moduleName = value;
}
public String getServiceName() {
return this.serviceName;
}
public void setServiceName(String value) {
this.serviceName = value;
}
public String getActionName() {
return this.actionName;
}
public void setActionName(String value) {
this.actionName = value;
}
public String getRequestMethod() {
return this.requestMethod;
}
public void setRequestMethod(String value) {
this.requestMethod = value;
}
public String getRequestIp() {
return this.requestIp;
}
public void setRequestIp(String value) {
this.requestIp = value;
}
public String getBrowserInfo() {
return this.browserInfo;
}
public void setBrowserInfo(String value) {
this.browserInfo = value;
}
public String getSource() {
return this.source;
}
public void setSource(String value) {
this.source = value;
}
public String getRequestValue() {
return this.requestValue;
}
public void setRequestValue(String value) {
this.requestValue = value;
}
public String getResponseValue() {
return this.responseValue;
}
public void setResponseValue(String value) {
this.responseValue = value;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String value) {
this.userId = value;
}
public Date getExecutionTime() {
return this.executionTime;
}
public void setExecutionTime(Date value) {
this.executionTime = value;
}
public String getExceptionInfo() {
return this.exceptionInfo;
}
public void setExceptionInfo(String value) {
this.exceptionInfo = value;
}
public Boolean getIsException() {
return this.isException;
}
public void setIsException(Boolean value) {
this.isException = value;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("base_transfer_log")
public class BaseTransferLogEnt implements Serializable {
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("topic")
@TableField
private String topicName;
@XText("作用域名称")
@TableField
private String mqMessage;
@XText("执行时间")
@TableField
private Date createTime;
@XText("异常信息")
@TableField
private String exceptionInfo;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getTopicName() {
return topicName;
}
public void setTopicName(String topicName) {
this.topicName = topicName;
}
public String getMqMessage() {
return mqMessage;
}
public void setMqMessage(String mqMessage) {
this.mqMessage = mqMessage;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getExceptionInfo() {
return exceptionInfo;
}
public void setExceptionInfo(String exceptionInfo) {
this.exceptionInfo = exceptionInfo;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_file_attachment")
public class SysFileAttachmentEnt implements Serializable {
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("业务id")
@TableField
private String bsnsId;
@XText("文件夹名称")
@TableField
private String folderName;
@XText("附件名称")
@TableField
private String attachName;
@XText("附件类型")
@TableField
private String attachType;
@XText("附件大小")
@TableField
private Integer attachSize;
@XText("fileKey")
@TableField
private String fileKey;
@TableField
private String createById;
@TableField
private String createByName;
@TableField
private Date createTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getBsnsId() {
return this.bsnsId;
}
public void setBsnsId(String value) {
this.bsnsId = value;
}
public String getFolderName() {
return folderName;
}
public void setFolderName(String folderName) {
this.folderName = folderName;
}
public String getAttachName() {
return this.attachName;
}
public void setAttachName(String value) {
this.attachName = value;
}
public String getAttachType() {
return this.attachType;
}
public void setAttachType(String value) {
this.attachType = value;
}
public Integer getAttachSize() {
return this.attachSize;
}
public void setAttachSize(Integer value) {
this.attachSize = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getFileKey() {
return fileKey;
}
public void setFileKey(String fileKey) {
this.fileKey = fileKey;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
public class SysFileAttachmentView implements Serializable {
@TableField
private String id;
@XText("业务id")
@TableField
private String bsnsId;
@XText("文件夹名称")
@TableField
private String folderName;
@XText("附件名称")
@TableField
private String attachName;
@XText("附件类型")
@TableField
private String attachType;
@XText("附件大小")
@TableField
private Integer attachSize;
@TableField
private String createById;
@TableField
private String createByName;
@TableField
private Date createTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getBsnsId() {
return this.bsnsId;
}
public void setBsnsId(String value) {
this.bsnsId = value;
}
public String getFolderName() {
return folderName;
}
public void setFolderName(String folderName) {
this.folderName = folderName;
}
public String getAttachName() {
return this.attachName;
}
public void setAttachName(String value) {
this.attachName = value;
}
public String getAttachType() {
return this.attachType;
}
public void setAttachType(String value) {
this.attachType = value;
}
public Integer getAttachSize() {
return this.attachSize;
}
public void setAttachSize(Integer value) {
this.attachSize = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_file_middle_attachment")
public class SysFileMiddleAttachmentEnt implements Serializable {
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("附件")
@TableField
private String fileKey;
@XText("业务id")
@TableField
private String bsnsId;
@XText("业务类型")
@TableField
private String bsnsType;
@XText("附件名称")
@TableField
private String attachName;
@XText("附件类型")
@TableField
private String attachType;
@XText("附件大小")
@TableField
private Integer attachSize;
@TableField
private String createById;
@TableField
private String createByName;
@TableField
private Date createTime;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getFileKey() {
return fileKey;
}
public void setFileKey(String fileKey) {
this.fileKey = fileKey;
}
public String getBsnsId() {
return bsnsId;
}
public void setBsnsId(String bsnsId) {
this.bsnsId = bsnsId;
}
public String getBsnsType() {
return bsnsType;
}
public void setBsnsType(String bsnsType) {
this.bsnsType = bsnsType;
}
public String getCreateById() {
return createById;
}
public void setCreateById(String createById) {
this.createById = createById;
}
public String getCreateByName() {
return createByName;
}
public void setCreateByName(String createByName) {
this.createByName = createByName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getAttachName() {
return attachName;
}
public void setAttachName(String attachName) {
this.attachName = attachName;
}
public String getAttachType() {
return attachType;
}
public void setAttachType(String attachType) {
this.attachType = attachType;
}
public Integer getAttachSize() {
return attachSize;
}
public void setAttachSize(Integer attachSize) {
this.attachSize = attachSize;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
@TableName("sys_trade_interface_white")
public class SysTradeInterfaceWhiteEnt implements Serializable {
@XText("主键")
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("服务名(全路径)")
@TableField
private String serviceName;
@XText("方法名(驼峰格式)")
@TableField
private String methodName;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getServiceName() {
return this.serviceName;
}
public void setServiceName(String value) {
this.serviceName = value;
}
public String getMethodName() {
return this.methodName;
}
public void setMethodName(String value) {
this.methodName = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import java.io.Serializable;
public class SysTradeInterfaceWhiteView implements Serializable {
@XText("主键")
@TableField
private String id;
@XText("服务名(全路径)")
@TableField
private String serviceName;
@XText("方法名(驼峰格式)")
@TableField
private String methodName;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getServiceName() {
return this.serviceName;
}
public void setServiceName(String value) {
this.serviceName = value;
}
public String getMethodName() {
return this.methodName;
}
public void setMethodName(String value) {
this.methodName = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.BaseSysConfigEnt;
@Repository(value = "pps.core.common.mapper.BaseSysConfigMapper")
public interface BaseSysConfigMapper extends BaseMapper<BaseSysConfigEnt> {
}
package pps.core.common.mapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.BaseSysConfigView;
import java.util.List;
@Repository(value = "pps.core.common.mapper.BaseSysConfigViewMapper")
public interface BaseSysConfigViewMapper {
BaseSysConfigView selectOne(BaseSysConfigView record);
List<BaseSysConfigView> selectList(BaseSysConfigView record);
}
package pps.core.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.BaseSysLogEnt;
@Repository(value = "pps.core.common.mapper.BaseSysLogMapper")
public interface BaseSysLogMapper extends BaseMapper<BaseSysLogEnt> {
}
package pps.core.common.mapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.BaseSysLogView;
import java.util.List;
@Repository(value = "pps.core.common.mapper.BaseSysLogViewMapper")
public interface BaseSysLogViewMapper {
BaseSysLogView selectOne(BaseSysLogView record);
List<BaseSysLogView> selectList(BaseSysLogView record);
}
package pps.core.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.BaseTransferLogEnt;
@Repository(value = "pps.core.common.mapper.BaseTransferLogMapper")
public interface BaseTransferLogMapper extends BaseMapper<BaseTransferLogEnt> {
}
package pps.core.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.SysFileAttachmentEnt;
@Repository(value = "pps.core.common.mapper.SysFileAttachmentMapper")
public interface SysFileAttachmentMapper extends BaseMapper<SysFileAttachmentEnt> {
}
package pps.core.common.mapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.SysFileAttachmentView;
import java.util.List;
@Repository(value = "pps.core.common.mapper.SysFileAttachmentViewMapper")
public interface SysFileAttachmentViewMapper {
SysFileAttachmentView selectOne(SysFileAttachmentView record);
List<SysFileAttachmentView> selectList(SysFileAttachmentView record);
}
package pps.core.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.SysFileMiddleAttachmentEnt;
@Repository(value = "pps.core.common.mapper.SysFileMiddleAttachmentMapper")
public interface SysFileMiddleAttachmentMapper extends BaseMapper<SysFileMiddleAttachmentEnt> {
}
package pps.core.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.SysTradeInterfaceWhiteEnt;
@Repository(value = "pps.core.common.mapper.SysTradeInterfaceWhiteMapper")
public interface SysTradeInterfaceWhiteMapper extends BaseMapper<SysTradeInterfaceWhiteEnt> {
}
package pps.core.common.mapper;
import org.springframework.stereotype.Repository;
import pps.core.common.entity.SysTradeInterfaceWhiteView;
import java.util.List;
@Repository(value = "pps.core.common.mapper.SysTradeInterfaceWhiteViewMapper")
public interface SysTradeInterfaceWhiteViewMapper {
SysTradeInterfaceWhiteView selectOne(SysTradeInterfaceWhiteView record);
List<SysTradeInterfaceWhiteView> selectList(SysTradeInterfaceWhiteView record);
}
package pps.core.common.provider.impl;
import pps.core.common.config.MqConfig;
import pps.core.common.mq.AccessLogMqMessage;
import xstartup.annotation.XImplement;
import xstartup.base.XContext;
import xstartup.base.mq.XMqFactory;
import xstartup.base.mq.XMqProduceQueue;
import xstartup.base.mq.XMqProducer;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XServiceResult;
import xstartup.feature.api.provider.data.XSaveApiAccessLogParam;
import xstartup.feature.api.provider.impl.async.XAsyncApiAccessLogProvider;
import xstartup.feature.api.provider.impl.async.XAsyncApiAccessLogSaveThread;
@XImplement
public class PpsApiAccessLogProviderImpl extends XAsyncApiAccessLogProvider {
@Override
protected <T extends XAsyncApiAccessLogSaveThread> Class<T> getThreadClass() {
return (Class<T>) SaveThread.class;
}
public static class SaveThread extends XAsyncApiAccessLogSaveThread {
@Override
protected XServiceResult saveBatch(XContext context, Batch batch) {
final String logTopic = MqConfig.accessLogMq.getValue(context);
if (logTopic == null) {
context.getLogger().warn("未配置访问日志topic");
return XServiceResult.OK;
}
for (XSaveApiAccessLogParam item : batch.getItems()) {
context.log().info("save access log:{}", item);
//todo:记录接口访问日志
XMqProduceQueue queue = new XMqProduceQueue.Builder()
.queue(logTopic)
.build();
XMqProducer<AccessLogMqMessage> producer = XMqFactory.createProducer(context, queue, AccessLogMqMessage.class);
AccessLogMqMessage message = new AccessLogMqMessage();
XCopyUtils.copyObject(item, message);
message.setUserId(item.getUser().getCode());
message.setResponseValue(message.getResponseValue());
producer.publish(context, message).logIfFail(context);
}
return XServiceResult.OK;
}
}
}
......@@ -3,15 +3,8 @@ package pps.core.common.provider.impl;
import com.google.common.base.Strings;
import pps.core.common.cache.ConfigCache;
import pps.core.common.utils.CounterBuilder;
import pps.core.common.utils.TraceHelper;
import pps.core.system.service.ConfigService;
import pps.core.system.service.data.GetConfigInput;
import pps.core.system.service.data.GetConfigOutput;
import xstartup.annotation.XImplement;
import xstartup.base.XContext;
import xstartup.base.util.XJsonUtils;
import xstartup.core.base.model.XNaming;
import xstartup.data.XSingleResult;
import xstartup.kernel.system.provider.spec.XConfigProvider;
/**
......@@ -20,7 +13,6 @@ import xstartup.kernel.system.provider.spec.XConfigProvider;
*/
@XImplement
public class PpsConfigProviderCommonImpl implements XConfigProvider {
//private static Map<String,String> configMap = new ConcurrentHashMap();
@Override
public String findValue(XContext context, String config, String app, String key) {
......@@ -32,34 +24,19 @@ public class PpsConfigProviderCommonImpl implements XConfigProvider {
if (Strings.isNullOrEmpty(configValue)) {
configValue = context.getProperty(configKey);
}
//加载缓存
final String configValue_ = configValue;
ConfigCache configCache = ConfigCache.get(context, configKey, false, () -> {
try {
ConfigService configService = context.getBean(XNaming.build("pps-base-info"), ConfigService.class);
GetConfigInput input = new GetConfigInput();
input.setConfigKey(configKey);
TraceHelper.appendTraceLog(context, "配置加载(服务)", "[INPUT]" + XJsonUtils.toJson(input));
XSingleResult<GetConfigOutput> config1 = configService.getConfig(context, input);
TraceHelper.appendTraceLog(context, "", "[RESULT]" + XJsonUtils.toJson(config1));
if (config1.isSuccess()) {
CounterBuilder.globalCounterBuilder.addCounter("getConfig-Success");
// 从配置服务中加载
return config1.getResult().getConfigValue();
} else {
CounterBuilder.globalCounterBuilder.addCounter("getConfig-Failed-" + configKey);
// 使用Properties配置文件配置
return configValue_;
}
} catch (Exception ex) {
CounterBuilder.globalCounterBuilder.addCounter(ex, this.getClass());
return configValue_;
}
});
//返回缓存缺省值
return configCache == null ? configValue_ : configCache.getConfigValue();
}
}
package pps.core.common.provider.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.base.Strings;
import pps.core.common.cache.ConfigCache;
import pps.core.common.entity.BaseSysConfigEnt;
import pps.core.common.mapper.BaseSysConfigMapper;
import xstartup.base.XContext;
import xstartup.kernel.system.provider.spec.XConfigProvider;
import java.util.List;
/**
* @author lixueyan
* @date 2022/8/5 0005 17:11
*/
//@XImplement
public class PpsConfigProviderImpl implements XConfigProvider {
//private static Map<String,String> configMap = new ConcurrentHashMap();
@Override
public String findValue(XContext context, String config, String app, String key) {
//todo 实现自定义配置逻辑, 优先级 从低到高 数据库->缓存->properties
//从Properties文件中加载配置值
String configKeyWithAppName = config + "." + app + "." + key;
String configKey = config + "." + key;
String configValueFromProperties = context.getProperty(configKeyWithAppName);
if (Strings.isNullOrEmpty(configValueFromProperties)) {
configValueFromProperties = context.getProperty(configKey);
}
//加载缓存
final String configValueFromProperties_ = configValueFromProperties;
ConfigCache configCache = ConfigCache.get(context, configKey, false, () -> {
try {
BaseSysConfigMapper configMapper = context.getBean(BaseSysConfigMapper.class);
QueryWrapper<BaseSysConfigEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysConfigEnt::getMainKeys, configKey);
List<BaseSysConfigEnt> baseSysConfigEnts = configMapper.selectList(queryWrapper);
if (!baseSysConfigEnts.isEmpty()) {
return baseSysConfigEnts.get(0).getValue();
} else {
return configValueFromProperties_;
}
} catch (Exception ex) {
return configValueFromProperties_;
}
});
//返回缓存缺省值
return configCache == null ? configValueFromProperties_ : configCache.getConfigValue();
}
}
//package pps.core.common.provider.impl;
//
//import pps.core.common.cache.TradeUserPermissionCache;
//import xstartup.annotation.XImplement;
//import xstartup.base.XContext;
//import xstartup.base.XUser;
//import xstartup.base.metadata.XActionDefine;
//import xstartup.core.base.provider.spec.XDynamicPermissionProvider;
//import xstartup.data.XServiceResult;
//import xstartup.error.XError;
//
//import static pps.core.common.constant.LoginConstant.LOGIN_FLAG_TRADE;
//
///**
// * @author lixueyan
// * @date 2023/2/21 0021 13:52
// */
//@XImplement
//public class PpsDynamicPermissionProviderImpl implements XDynamicPermissionProvider {
// @Override
// public XServiceResult checkDynamicPermission(XContext context, XActionDefine actionDefine, XUser xUser) {
// Long orgId = xUser.getOrgId();
// String serviceName = actionDefine.getMethod().getDeclaringClass().getName();
// String actionName = actionDefine.getMethod().getName();
// boolean tradePermissionFlag = false;
// if(orgId.equals(LOGIN_FLAG_TRADE)) {
// tradePermissionFlag = TradeUserPermissionCache.exist(context, orgId, serviceName, actionName);
// }
// if ((orgId!=null && !orgId.equals(LOGIN_FLAG_TRADE))||(tradePermissionFlag && orgId.equals(LOGIN_FLAG_TRADE))) {
// context.getLogger().debug("permission none,result ok");
// return XServiceResult.OK;
// }
// if(!tradePermissionFlag && orgId.equals(LOGIN_FLAG_TRADE)){
// context.getLogger().debug("permission any,not exist:{},{}", serviceName,actionName);
// return XServiceResult.error(context, XError.Deny);
// }
// return XServiceResult.OK;
// }
//}
package pps.core.common.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pps.core.common.entity.BaseSysConfigEnt;
import pps.core.common.entity.BaseSysConfigView;
import pps.core.common.mapper.BaseSysConfigMapper;
import pps.core.common.mapper.BaseSysConfigViewMapper;
import pps.core.common.service.data.base_sys_config.*;
import xstartup.annotation.XService;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiAnonymous;
import xstartup.feature.api.annotation.XApiGet;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
@XService
public class BaseSysConfigService {
@XApiAnonymous
@XApiPost
public XServiceResult createBaseSysConfig(XContext context, CreateBaseSysConfigInput input) {
BaseSysConfigMapper mapper = context.getBean(BaseSysConfigMapper.class);
BaseSysConfigEnt entity = new BaseSysConfigEnt();
XCopyUtils.copyObject(input, entity);
mapper.insert(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiPost
public XServiceResult updateBaseSysConfig(XContext context, UpdateBaseSysConfigInput input) {
BaseSysConfigMapper mapper = context.getBean(BaseSysConfigMapper.class);
QueryWrapper<BaseSysConfigEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysConfigEnt::getId, input.getId());
BaseSysConfigEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiPost
public XServiceResult deleteBaseSysConfig(XContext context, DeleteBaseSysConfigInput input) {
BaseSysConfigMapper mapper = context.getBean(BaseSysConfigMapper.class);
QueryWrapper<BaseSysConfigEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysConfigEnt::getId, input.getId());
BaseSysConfigEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiGet
public XSingleResult<GetBaseSysConfigOutput> getBaseSysConfig(XContext context, GetBaseSysConfigInput input) {
BaseSysConfigMapper mapper = context.getBean(BaseSysConfigMapper.class);
QueryWrapper<BaseSysConfigEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysConfigEnt::getId, input.getId());
BaseSysConfigEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBaseSysConfigOutput output = new GetBaseSysConfigOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBaseSysConfigOutput> queryBaseSysConfig(XContext context, QueryBaseSysConfigInput input) {
BaseSysConfigMapper mapper = context.getBean(BaseSysConfigMapper.class);
QueryWrapper<BaseSysConfigEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(BaseSysConfigEnt::getId, input.getId())
.like(BaseSysConfigEnt::getName, input.getName())
.like(BaseSysConfigEnt::getMainKeys, input.getKey())
.like(BaseSysConfigEnt::getValue, input.getValue())
.like(BaseSysConfigEnt::getCreateById, input.getCreateById())
.like(BaseSysConfigEnt::getCreateByName, input.getCreateByName())
.like(BaseSysConfigEnt::getModifyById, input.getModifyById())
.like(BaseSysConfigEnt::getModifyByName, input.getModifyByName());
return XMapperHelper.query(mapper, input, queryWrapper, QueryBaseSysConfigOutput.class);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBaseSysConfigOutput> dynamicQueryBaseSysConfig(XContext context, CustomQueryInput input) {
BaseSysConfigMapper mapper = context.getBean(BaseSysConfigMapper.class);
return XMapperHelper.query(mapper, input, BaseSysConfigEnt.class, QueryBaseSysConfigOutput.class);
}
@XApiAnonymous
@XApiGet
public XSingleResult<GetBaseSysConfigViewOutput> getBaseSysConfigView(XContext context, GetBaseSysConfigViewInput input) {
BaseSysConfigViewMapper mapper = context.getBean(BaseSysConfigViewMapper.class);
BaseSysConfigView record = new BaseSysConfigView();
XCopyUtils.copyObject(input, record);
BaseSysConfigView view = mapper.selectOne(record);
if (view == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBaseSysConfigViewOutput output = new GetBaseSysConfigViewOutput();
XCopyUtils.copyObject(view, output);
return XSingleResult.success(output);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBaseSysConfigViewOutput> queryBaseSysConfigView(XContext context, QueryBaseSysConfigViewInput input) {
BaseSysConfigViewMapper mapper = context.getBean(BaseSysConfigViewMapper.class);
BaseSysConfigView record = new BaseSysConfigView();
XCopyUtils.copyObject(input, record);
PageHelper.startPage(input.getPage(), input.getLimit());
List<BaseSysConfigView> list = mapper.selectList(record);
PageInfo<BaseSysConfigView> pageInfo = new PageInfo<>(list);
List<QueryBaseSysConfigViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QueryBaseSysConfigViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
package pps.core.common.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pps.core.common.entity.BaseSysLogEnt;
import pps.core.common.entity.BaseSysLogView;
import pps.core.common.mapper.BaseSysLogMapper;
import pps.core.common.mapper.BaseSysLogViewMapper;
import pps.core.common.service.data.base_sys_log.*;
import xstartup.annotation.XService;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiGet;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
@XService
public class BaseSysLogService {
@XApiPost
public XServiceResult createBaseSysLog(XContext context, CreateBaseSysLogInput input) {
BaseSysLogMapper mapper = context.getBean(BaseSysLogMapper.class);
BaseSysLogEnt entity = new BaseSysLogEnt();
XCopyUtils.copyObject(input, entity);
mapper.insert(entity);
return XServiceResult.OK;
}
@XApiPost
public XServiceResult updateBaseSysLog(XContext context, UpdateBaseSysLogInput input) {
BaseSysLogMapper mapper = context.getBean(BaseSysLogMapper.class);
QueryWrapper<BaseSysLogEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysLogEnt::getId, input.getId());
BaseSysLogEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
}
@XApiPost
public XServiceResult deleteBaseSysLog(XContext context, DeleteBaseSysLogInput input) {
BaseSysLogMapper mapper = context.getBean(BaseSysLogMapper.class);
QueryWrapper<BaseSysLogEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysLogEnt::getId, input.getId());
BaseSysLogEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
return XServiceResult.OK;
}
@XApiGet
public XSingleResult<GetBaseSysLogOutput> getBaseSysLog(XContext context, GetBaseSysLogInput input) {
BaseSysLogMapper mapper = context.getBean(BaseSysLogMapper.class);
QueryWrapper<BaseSysLogEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysLogEnt::getId, input.getId());
BaseSysLogEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBaseSysLogOutput output = new GetBaseSysLogOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XApiGet
public XPageResult<QueryBaseSysLogOutput> queryBaseSysLog(XContext context, QueryBaseSysLogInput input) {
BaseSysLogMapper mapper = context.getBean(BaseSysLogMapper.class);
QueryWrapper<BaseSysLogEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BaseSysLogEnt::getId, input.getId())
.like(BaseSysLogEnt::getSystemName, input.getSystemName())
.like(BaseSysLogEnt::getScopeName, input.getScopeName())
.like(BaseSysLogEnt::getModuleName, input.getModuleName())
.like(BaseSysLogEnt::getServiceName, input.getServiceName())
.like(BaseSysLogEnt::getActionName, input.getActionName())
.like(BaseSysLogEnt::getRequestMethod, input.getRequestMethod())
.like(BaseSysLogEnt::getRequestIp, input.getRequestIp())
.like(BaseSysLogEnt::getBrowserInfo, input.getBrowserInfo())
.like(BaseSysLogEnt::getSource, input.getSource())
.like(BaseSysLogEnt::getRequestValue, input.getRequestValue())
.like(BaseSysLogEnt::getResponseValue, input.getResponseValue())
.eq(BaseSysLogEnt::getUserId, input.getUserId())
.eq(BaseSysLogEnt::getExecutionTime, input.getExecutionTime())
.like(BaseSysLogEnt::getExceptionInfo, input.getExceptionInfo())
.eq(BaseSysLogEnt::getIsException, input.getIsException());
return XMapperHelper.query(mapper, input, queryWrapper, QueryBaseSysLogOutput.class);
}
@XApiGet
public XPageResult<QueryBaseSysLogOutput> dynamicQueryBaseSysLog(XContext context, CustomQueryInput input) {
BaseSysLogMapper mapper = context.getBean(BaseSysLogMapper.class);
return XMapperHelper.query(mapper, input, BaseSysLogEnt.class, QueryBaseSysLogOutput.class);
}
@XApiGet
public XSingleResult<GetBaseSysLogViewOutput> getBaseSysLogView(XContext context, GetBaseSysLogViewInput input) {
BaseSysLogViewMapper mapper = context.getBean(BaseSysLogViewMapper.class);
BaseSysLogView record = new BaseSysLogView();
XCopyUtils.copyObject(input, record);
BaseSysLogView view = mapper.selectOne(record);
if (view == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBaseSysLogViewOutput output = new GetBaseSysLogViewOutput();
XCopyUtils.copyObject(view, output);
return XSingleResult.success(output);
}
@XApiGet
public XPageResult<QueryBaseSysLogViewOutput> queryBaseSysLogView(XContext context, QueryBaseSysLogViewInput input) {
BaseSysLogViewMapper mapper = context.getBean(BaseSysLogViewMapper.class);
BaseSysLogView record = new BaseSysLogView();
XCopyUtils.copyObject(input, record);
PageHelper.startPage(input.getPage(), input.getLimit());
List<BaseSysLogView> list = mapper.selectList(record);
PageInfo<BaseSysLogView> pageInfo = new PageInfo<>(list);
List<QueryBaseSysLogViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QueryBaseSysLogViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
package pps.core.common.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.commons.lang3.StringUtils;
import pps.core.common.entity.SysFileAttachmentEnt;
import pps.core.common.mapper.SysFileAttachmentMapper;
import pps.core.common.service.data.sys_file_attachment.*;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
@XText("附件接口")
@XService
public class SysFileAttachmentService {
@XText("删除附件")
@XApiPost
public XServiceResult deleteSysFileAttachment(XContext context, DeleteSysFileAttachmentInput input) {
SysFileAttachmentMapper mapper = context.getBean(SysFileAttachmentMapper.class);
QueryWrapper<SysFileAttachmentEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysFileAttachmentEnt::getId, input.getId());
SysFileAttachmentEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
return XServiceResult.OK;
}
@XText("更新附件业务id")
@XApiPost
public XServiceResult updateDispTaskPlanAttach(XContext context, UpdateSysFileAttachmentInput input) {
SysFileAttachmentMapper mapper = context.getBean(SysFileAttachmentMapper.class);
QueryWrapper<SysFileAttachmentEnt> queryWrapper = new QueryWrapper<>();
List<String> fileKeyList = input.getFileKeyList();
for (String fileKey : fileKeyList) {
queryWrapper.lambda().eq(SysFileAttachmentEnt::getFileKey, fileKey);
SysFileAttachmentEnt entity = mapper.selectOne(queryWrapper);
if (entity != null && StringUtils.isBlank(entity.getBsnsId())) {
entity.setBsnsId(input.getBsnsId());
mapper.updateById(entity);
}
}
return XServiceResult.OK;
}
@XText("获取单个附件")
@XApiPost
public XSingleResult<GetSysFileAttachmentOutput> getSysFileAttachment(XContext context, GetSysFileAttachmentInput input) {
SysFileAttachmentMapper mapper = context.getBean(SysFileAttachmentMapper.class);
QueryWrapper<SysFileAttachmentEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysFileAttachmentEnt::getId, input.getId());
SysFileAttachmentEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetSysFileAttachmentOutput output = new GetSysFileAttachmentOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XText("获取业务附件")
@XApiPost
public XPageResult<QuerySysFileAttachmentOutput> querySysFileAttachment(XContext context, QuerySysFileAttachmentInput input) {
SysFileAttachmentMapper mapper = context.getBean(SysFileAttachmentMapper.class);
QueryWrapper<SysFileAttachmentEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysFileAttachmentEnt::getBsnsId, input.getBsnsId());
return XMapperHelper.query(mapper, input, queryWrapper, QuerySysFileAttachmentOutput.class);
}
@XText("获取指定附件")
@XApiPost
public XPageResult<QuerySysFileAttachmentByIdsOutput> querySysFileAttachmentByIds(XContext context, QuerySysFileAttachmentByIdsInput input) {
SysFileAttachmentMapper mapper = context.getBean(SysFileAttachmentMapper.class);
QueryWrapper<SysFileAttachmentEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(SysFileAttachmentEnt::getFileKey, input.getFileKeyList());
queryWrapper.lambda().orderByAsc(SysFileAttachmentEnt::getCreateTime);
input.setLimit(100);
return XMapperHelper.query(mapper, input, queryWrapper, QuerySysFileAttachmentByIdsOutput.class);
}
}
package pps.core.common.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.util.CollectionUtils;
import pps.core.common.entity.SysFileAttachmentEnt;
import pps.core.common.entity.SysFileMiddleAttachmentEnt;
import pps.core.common.mapper.SysFileAttachmentMapper;
import pps.core.common.mapper.SysFileMiddleAttachmentMapper;
import pps.core.common.service.data.sys_file_middle_attachment.CreateSysFileMiddleAttachmentInput;
import pps.core.common.service.data.sys_file_middle_attachment.DeleteSysFileMiddleAttachmentInput;
import pps.core.common.service.data.sys_file_middle_attachment.GetSysFileMiddleAttachmentInput;
import pps.core.common.service.data.sys_file_middle_attachment.GetSysFileMiddleAttachmentOutput;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XListResult;
import xstartup.data.XServiceResult;
import xstartup.feature.api.annotation.XApiPost;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
@XText("附件中间表接口")
@XService
public class SysFileMiddleAttachmentService {
@XText("删除中间附件")
@XApiPost
public XServiceResult deleteSysFileMiddleAttachmentByBsnsId(XContext context, DeleteSysFileMiddleAttachmentInput input) {
SysFileMiddleAttachmentMapper mapper = context.getBean(SysFileMiddleAttachmentMapper.class);
QueryWrapper<SysFileMiddleAttachmentEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysFileMiddleAttachmentEnt::getBsnsId, input.getBsnsId());
List<SysFileMiddleAttachmentEnt> list = mapper.selectList(queryWrapper);
if (!CollectionUtils.isEmpty(list)) {
List<String> ids = list.stream().map(SysFileMiddleAttachmentEnt::getId).collect(Collectors.toList());
mapper.deleteBatchIds(ids);
}
return XServiceResult.OK;
}
@XText("添加中间附件")
@XApiPost
public XServiceResult createSysFileMiddleAttachment(XContext context, CreateSysFileMiddleAttachmentInput input) {
SysFileMiddleAttachmentMapper mapper = context.getBean(SysFileMiddleAttachmentMapper.class);
List<String> fileKeyList = input.getFileKeyList();
SysFileAttachmentMapper attachmentMapper = context.getBean(SysFileAttachmentMapper.class);
for (String fileKey : fileKeyList) {
QueryWrapper<SysFileAttachmentEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysFileAttachmentEnt::getFileKey, fileKey);
SysFileAttachmentEnt attachmentEnt = attachmentMapper.selectOne(queryWrapper);
if (attachmentEnt == null) {
continue;
}
SysFileMiddleAttachmentEnt entity = XCopyUtils.copyNewObject(attachmentEnt, SysFileMiddleAttachmentEnt.class);
entity.setId(UUID.randomUUID().toString());
entity.setBsnsId(input.getBsnsId());
entity.setBsnsType(input.getBsnsType());
entity.setFileKey(fileKey);
mapper.insert(entity);
}
return XServiceResult.OK;
}
@XText("获取业务附件")
@XApiPost
public XListResult<GetSysFileMiddleAttachmentOutput> getSysFileAttachmentList(XContext context, GetSysFileMiddleAttachmentInput input) {
SysFileMiddleAttachmentMapper mapper = context.getBean(SysFileMiddleAttachmentMapper.class);
QueryWrapper<SysFileMiddleAttachmentEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysFileMiddleAttachmentEnt::getBsnsId, input.getBsnsId());
List<SysFileMiddleAttachmentEnt> list = mapper.selectList(queryWrapper);
List<GetSysFileMiddleAttachmentOutput> outputs = XCopyUtils.copyNewList(list, GetSysFileMiddleAttachmentOutput.class);
return XListResult.success(outputs);
}
}
package pps.core.common.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pps.core.common.entity.SysTradeInterfaceWhiteEnt;
import pps.core.common.entity.SysTradeInterfaceWhiteView;
import pps.core.common.mapper.SysTradeInterfaceWhiteMapper;
import pps.core.common.mapper.SysTradeInterfaceWhiteViewMapper;
import pps.core.common.service.data.sys_trade_interface_white.*;
import xstartup.annotation.XService;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiGet;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
@XService
public class SysTradeInterfaceWhiteService {
@XApiPost
public XServiceResult createSysTradeInterfaceWhite(XContext context, CreateSysTradeInterfaceWhiteInput input) {
SysTradeInterfaceWhiteMapper mapper = context.getBean(SysTradeInterfaceWhiteMapper.class);
SysTradeInterfaceWhiteEnt entity = new SysTradeInterfaceWhiteEnt();
XCopyUtils.copyObject(input, entity);
mapper.insert(entity);
return XServiceResult.OK;
}
@XApiPost
public XServiceResult updateSysTradeInterfaceWhite(XContext context, UpdateSysTradeInterfaceWhiteInput input) {
SysTradeInterfaceWhiteMapper mapper = context.getBean(SysTradeInterfaceWhiteMapper.class);
QueryWrapper<SysTradeInterfaceWhiteEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysTradeInterfaceWhiteEnt::getId, input.getId());
SysTradeInterfaceWhiteEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
}
@XApiPost
public XServiceResult deleteSysTradeInterfaceWhite(XContext context, DeleteSysTradeInterfaceWhiteInput input) {
SysTradeInterfaceWhiteMapper mapper = context.getBean(SysTradeInterfaceWhiteMapper.class);
QueryWrapper<SysTradeInterfaceWhiteEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysTradeInterfaceWhiteEnt::getId, input.getId());
SysTradeInterfaceWhiteEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
return XServiceResult.OK;
}
@XApiGet
public XSingleResult<GetSysTradeInterfaceWhiteOutput> getSysTradeInterfaceWhite(XContext context, GetSysTradeInterfaceWhiteInput input) {
SysTradeInterfaceWhiteMapper mapper = context.getBean(SysTradeInterfaceWhiteMapper.class);
QueryWrapper<SysTradeInterfaceWhiteEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SysTradeInterfaceWhiteEnt::getId, input.getId());
SysTradeInterfaceWhiteEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetSysTradeInterfaceWhiteOutput output = new GetSysTradeInterfaceWhiteOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XApiGet
public XPageResult<QuerySysTradeInterfaceWhiteOutput> querySysTradeInterfaceWhite(XContext context, QuerySysTradeInterfaceWhiteInput input) {
SysTradeInterfaceWhiteMapper mapper = context.getBean(SysTradeInterfaceWhiteMapper.class);
QueryWrapper<SysTradeInterfaceWhiteEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(SysTradeInterfaceWhiteEnt::getId, input.getId())
.like(SysTradeInterfaceWhiteEnt::getServiceName, input.getServiceName())
.like(SysTradeInterfaceWhiteEnt::getMethodName, input.getMethodName())
.like(SysTradeInterfaceWhiteEnt::getCreateById, input.getCreateById())
.like(SysTradeInterfaceWhiteEnt::getCreateByName, input.getCreateByName())
.like(SysTradeInterfaceWhiteEnt::getModifyById, input.getModifyById())
.like(SysTradeInterfaceWhiteEnt::getModifyByName, input.getModifyByName());
return XMapperHelper.query(mapper, input, queryWrapper, QuerySysTradeInterfaceWhiteOutput.class);
}
@XApiGet
public XPageResult<QuerySysTradeInterfaceWhiteOutput> dynamicQuerySysTradeInterfaceWhite(XContext context, CustomQueryInput input) {
SysTradeInterfaceWhiteMapper mapper = context.getBean(SysTradeInterfaceWhiteMapper.class);
return XMapperHelper.query(mapper, input, SysTradeInterfaceWhiteEnt.class, QuerySysTradeInterfaceWhiteOutput.class);
}
@XApiGet
public XSingleResult<GetSysTradeInterfaceWhiteViewOutput> getSysTradeInterfaceWhiteView(XContext context, GetSysTradeInterfaceWhiteViewInput input) {
SysTradeInterfaceWhiteViewMapper mapper = context.getBean(SysTradeInterfaceWhiteViewMapper.class);
SysTradeInterfaceWhiteView record = new SysTradeInterfaceWhiteView();
XCopyUtils.copyObject(input, record);
SysTradeInterfaceWhiteView view = mapper.selectOne(record);
if (view == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetSysTradeInterfaceWhiteViewOutput output = new GetSysTradeInterfaceWhiteViewOutput();
XCopyUtils.copyObject(view, output);
return XSingleResult.success(output);
}
@XApiGet
public XPageResult<QuerySysTradeInterfaceWhiteViewOutput> querySysTradeInterfaceWhiteView(XContext context, QuerySysTradeInterfaceWhiteViewInput input) {
SysTradeInterfaceWhiteViewMapper mapper = context.getBean(SysTradeInterfaceWhiteViewMapper.class);
SysTradeInterfaceWhiteView record = new SysTradeInterfaceWhiteView();
XCopyUtils.copyObject(input, record);
PageHelper.startPage(input.getPage(), input.getLimit());
List<SysTradeInterfaceWhiteView> list = mapper.selectList(record);
PageInfo<SysTradeInterfaceWhiteView> pageInfo = new PageInfo<>(list);
List<QuerySysTradeInterfaceWhiteViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysTradeInterfaceWhiteViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
package pps.core.common.service.data;
public class CommonIDInput {
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
package pps.core.common.service.data;
public class CommonIDNameInput {
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package pps.core.common.service.data;
public class CommonIDNameOutput {
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package pps.core.common.service.data;
public class CommonIDOutput {
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
package pps.core.common.service.data;
public class CommonNameInput {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package pps.core.common.service.data;
public class CommonNameOutput {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class CreateBaseSysConfigInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class CreateBaseSysConfigOutput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class DeleteBaseSysConfigInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class DeleteBaseSysConfigOutput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class DynamicQueryBaseSysConfigInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class DynamicQueryBaseSysConfigOutput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class DynamicQueryBaseSysConfigViewOutput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class GetBaseSysConfigInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class GetBaseSysConfigOutput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class GetBaseSysConfigViewInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class GetBaseSysConfigViewOutput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
public class QueryBaseSysConfigInput extends XPageInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
public class QueryBaseSysConfigOutput extends XPageInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
public class QueryBaseSysConfigViewInput extends XPageInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
public class QueryBaseSysConfigViewOutput extends XPageInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class UpdateBaseSysConfigInput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_config;
import xstartup.annotation.XText;
public class UpdateBaseSysConfigOutput {
private String id;
@XText("配置名称")
private String name;
@XText("配置key")
private String key;
@XText("配置值")
private String value;
@XText("介质类型")
private String mediaType;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getName() {
return this.name;
}
public void setName(String value) {
this.name = value;
}
public String getKey() {
return this.key;
}
public void setKey(String value) {
this.key = value;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getMediaType() {
return this.mediaType;
}
public void setMediaType(String value) {
this.mediaType = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
}
package pps.core.common.service.data.base_sys_log;
import xstartup.annotation.XText;
import java.util.Date;
public class CreateBaseSysLogInput {
private String id;
@XText("系统名称")
private String systemName;
@XText("作用域名称")
private String scopeName;
@XText("模块名称")
private String moduleName;
@XText("服务名称")
private String serviceName;
@XText("方法名称")
private String actionName;
@XText("请求方式")
private String requestMethod;
@XText("请求ip")
private String requestIp;
@XText("浏览器信息")
private String browserInfo;
private String source;
@XText("请求参数-json格式")
private String requestValue;
@XText("响应参数-json格式")
private String responseValue;
@XText("用户id")
private String userId;
@XText("执行时间")
private Date executionTime;
@XText("异常信息")
private String exceptionInfo;
@XText("是否异常")
private Boolean isException;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getSystemName() {
return this.systemName;
}
public void setSystemName(String value) {
this.systemName = value;
}
public String getScopeName() {
return this.scopeName;
}
public void setScopeName(String value) {
this.scopeName = value;
}
public String getModuleName() {
return this.moduleName;
}
public void setModuleName(String value) {
this.moduleName = value;
}
public String getServiceName() {
return this.serviceName;
}
public void setServiceName(String value) {
this.serviceName = value;
}
public String getActionName() {
return this.actionName;
}
public void setActionName(String value) {
this.actionName = value;
}
public String getRequestMethod() {
return this.requestMethod;
}
public void setRequestMethod(String value) {
this.requestMethod = value;
}
public String getRequestIp() {
return this.requestIp;
}
public void setRequestIp(String value) {
this.requestIp = value;
}
public String getBrowserInfo() {
return this.browserInfo;
}
public void setBrowserInfo(String value) {
this.browserInfo = value;
}
public String getSource() {
return this.source;
}
public void setSource(String value) {
this.source = value;
}
public String getRequestValue() {
return this.requestValue;
}
public void setRequestValue(String value) {
this.requestValue = value;
}
public String getResponseValue() {
return this.responseValue;
}
public void setResponseValue(String value) {
this.responseValue = value;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String value) {
this.userId = value;
}
public Date getExecutionTime() {
return this.executionTime;
}
public void setExecutionTime(Date value) {
this.executionTime = value;
}
public String getExceptionInfo() {
return this.exceptionInfo;
}
public void setExceptionInfo(String value) {
this.exceptionInfo = value;
}
public Boolean getIsException() {
return this.isException;
}
public void setIsException(Boolean value) {
this.isException = value;
}
}
package pps.core.common.service.data.base_sys_log;
import xstartup.annotation.XText;
import java.util.Date;
public class CreateBaseSysLogOutput {
private String id;
@XText("系统名称")
private String systemName;
@XText("作用域名称")
private String scopeName;
@XText("模块名称")
private String moduleName;
@XText("服务名称")
private String serviceName;
@XText("方法名称")
private String actionName;
@XText("请求方式")
private String requestMethod;
@XText("请求ip")
private String requestIp;
@XText("浏览器信息")
private String browserInfo;
private String source;
@XText("请求参数-json格式")
private String requestValue;
@XText("响应参数-json格式")
private String responseValue;
@XText("用户id")
private String userId;
@XText("执行时间")
private Date executionTime;
@XText("异常信息")
private String exceptionInfo;
@XText("是否异常")
private Boolean isException;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getSystemName() {
return this.systemName;
}
public void setSystemName(String value) {
this.systemName = value;
}
public String getScopeName() {
return this.scopeName;
}
public void setScopeName(String value) {
this.scopeName = value;
}
public String getModuleName() {
return this.moduleName;
}
public void setModuleName(String value) {
this.moduleName = value;
}
public String getServiceName() {
return this.serviceName;
}
public void setServiceName(String value) {
this.serviceName = value;
}
public String getActionName() {
return this.actionName;
}
public void setActionName(String value) {
this.actionName = value;
}
public String getRequestMethod() {
return this.requestMethod;
}
public void setRequestMethod(String value) {
this.requestMethod = value;
}
public String getRequestIp() {
return this.requestIp;
}
public void setRequestIp(String value) {
this.requestIp = value;
}
public String getBrowserInfo() {
return this.browserInfo;
}
public void setBrowserInfo(String value) {
this.browserInfo = value;
}
public String getSource() {
return this.source;
}
public void setSource(String value) {
this.source = value;
}
public String getRequestValue() {
return this.requestValue;
}
public void setRequestValue(String value) {
this.requestValue = value;
}
public String getResponseValue() {
return this.responseValue;
}
public void setResponseValue(String value) {
this.responseValue = value;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String value) {
this.userId = value;
}
public Date getExecutionTime() {
return this.executionTime;
}
public void setExecutionTime(Date value) {
this.executionTime = value;
}
public String getExceptionInfo() {
return this.exceptionInfo;
}
public void setExceptionInfo(String value) {
this.exceptionInfo = value;
}
public Boolean getIsException() {
return this.isException;
}
public void setIsException(Boolean value) {
this.isException = value;
}
}
package pps.core.common.service.data.file;
import jakarta.validation.constraints.NotNull;
import xstartup.annotation.XText;
/**
* @author lixueyan
* @date 2022/8/22 0022 14:31
*/
public class Base64UploadInput {
@XText("文件base64编码")
@NotNull
private String base64Str;
@XText("文件夹")
private String folderName;
@XText("业务id")
private String bsnsId;
@XText("后缀")
@NotNull
private String suffix;
@XText("文件名")
@NotNull
private String fileName;
public String getBase64Str() {
return base64Str;
}
public void setBase64Str(String base64Str) {
this.base64Str = base64Str;
}
public String getFolderName() {
return folderName;
}
public void setFolderName(String folderName) {
this.folderName = folderName;
}
public String getBsnsId() {
return bsnsId;
}
public void setBsnsId(String bsnsId) {
this.bsnsId = bsnsId;
}
public String getSuffix() {
return suffix;
}
public void setSuffix(String suffix) {
this.suffix = suffix;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment