Commit 6c8bd058 authored by ZWT's avatar ZWT

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

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

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent b4b76ad9
...@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import pps.core.common.constant.LoginConstant;
import pps.core.common.session.PpsUserSession; import pps.core.common.session.PpsUserSession;
import pps.core.common.utils.VerificationCode; import pps.core.common.utils.VerificationCode;
import pps.core.system.cache.LoginVerCodeCache; import pps.core.system.cache.LoginVerCodeCache;
...@@ -14,10 +15,7 @@ import pps.core.system.entity.SysUserLoginLogEnt; ...@@ -14,10 +15,7 @@ import pps.core.system.entity.SysUserLoginLogEnt;
import pps.core.system.error.LoginError; import pps.core.system.error.LoginError;
import pps.core.system.mapper.SysUserLoginLogMapper; import pps.core.system.mapper.SysUserLoginLogMapper;
import pps.core.system.mapper.SysUserMapper; import pps.core.system.mapper.SysUserMapper;
import pps.core.system.service.data.sys_login.LoginByAccountInput; import pps.core.system.service.data.sys_login.*;
import pps.core.system.service.data.sys_login.LoginByAccountOutput;
import pps.core.system.service.data.sys_login.LoginBySimulateOutput;
import pps.core.system.service.data.sys_login.VerificationCodeInput;
import xstartup.annotation.XService; import xstartup.annotation.XService;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import xstartup.base.XContext; import xstartup.base.XContext;
...@@ -108,37 +106,38 @@ public class LoginService { ...@@ -108,37 +106,38 @@ public class LoginService {
* @param input 输入 * @param input 输入
* @return {@link XSingleResult}<{@link LoginBySimulateOutput}> * @return {@link XSingleResult}<{@link LoginBySimulateOutput}>
*/ */
// @XText("模拟用户登陆") @XText("模拟用户登陆")
// @XApiGet(anonymous = true) @XApiGet(anonymous = true)
// public XSingleResult<LoginBySimulateOutput> thirdToken(XContext context, LoginBySimulateInput input) { public XSingleResult<LoginBySimulateOutput> thirdToken(XContext context, LoginBySimulateInput input) {
// if (!CharSequenceUtil.equals(input.getAuthKey(), "66b500fcaff049dca77f66733d9bb172")) { if (!CharSequenceUtil.equals(input.getAuthKey(), "66b500fcaff049dca77f66733d9bb172")) {
// return XSingleResult.error(context, Trade_IpWhiteError); return XSingleResult.error(context, LoginError.Trade_IpWhiteError);
// } }
// SysUserMapper mapper = context.getBean(SysUserMapper.class); SysUserMapper mapper = context.getBean(SysUserMapper.class);
// SysUserEnt sysUserEnt = mapper.selectOne( SysUserEnt sysUserEnt = mapper.selectOne(
// new LambdaQueryWrapper<SysUserEnt>() new LambdaQueryWrapper<SysUserEnt>()
// .eq(SysUserEnt::getLoginName, "cqyanshi") .eq(SysUserEnt::getLoginName, "cqyanshi")
// ); );
// if (ObjectUtil.isNull(sysUserEnt)) { if (ObjectUtil.isNull(sysUserEnt)) {
// return XSingleResult.error(context, NotExistUserName); return XSingleResult.error(context, LoginError.NotExistUserName);
// } }
// Integer expiresIn = XConfManager.getConf(XApiCookieConf.class).getExpires(); Integer expiresIn = XConfManager.getConf(XApiCookieConf.class).getExpires();
// XSingleResult<XToken> saveUserResult = XTokenHelper.saveUser(context, XSingleResult<XToken> saveUserResult = XTokenHelper.saveUser(context,
// XUser.createUser(XUser.ENTRY_API, XUser.createUser(XUser.ENTRY_API,
// LOGIN_FLAG_SIMULATE, LoginConstant.LOGIN_FLAG_SIMULATE,
// new Long[]{1L, 1L}, new Long[]{1L, 1L},
// IdWorker.getId(), IdWorker.getId(),
// sysUserEnt.getId(), sysUserEnt.getId(),
// "cqyanshi", "cqyanshi",
// sysUserEnt.getUserName(), sysUserEnt.getUserName(),
// new XSsoAuth(XUuidUtils.randomUUID(), null, null)) new XSsoAuth(XUuidUtils.randomUUID(), null, null))
// , expiresIn); , expiresIn);
// saveUserResult.throwIfFail(); saveUserResult.throwIfFail();
// return XSingleResult.success(LoginBySimulateOutput.builder() return XSingleResult.success(LoginBySimulateOutput.builder()
// .expiresIn(expiresIn) .expiresIn(expiresIn)
// .token(saveUserResult.getResult().getToken()) .token(saveUserResult.getResult().getToken())
// .build()); .build());
// } }
@XText("退出") @XText("退出")
@XApiPost @XApiPost
public XServiceResult logout(XContext context) { public XServiceResult logout(XContext context) {
......
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