feat: add dashboard and virtual pay enhancements
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import com.ruoyi.app.service.IAppDashboardService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 首页业务指标接口。
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/dashboard")
|
||||
public class AppDashboardController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppDashboardService appDashboardService;
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('app:virtualOrder:list,app:order:list,system:user:list')")
|
||||
@GetMapping("/summary")
|
||||
public AjaxResult summary()
|
||||
{
|
||||
return success(appDashboardService.selectDashboardSummary());
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.service.PermissionService;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -46,6 +47,8 @@ public class AppIntegralRecordController extends BaseController
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Resource
|
||||
private AppResourceMapper appResourceMapper;
|
||||
@Resource
|
||||
private PermissionService permissionService;
|
||||
@Autowired
|
||||
private IAppLotteryGoodsService appLotteryGoodsService;
|
||||
@Autowired
|
||||
@@ -54,14 +57,30 @@ public class AppIntegralRecordController extends BaseController
|
||||
/**
|
||||
* 查询积分记录列表
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppIntegralRecord appIntegralRecord)
|
||||
{
|
||||
startPage();
|
||||
if (!permissionService.hasPermi("app:appIntegra:list"))
|
||||
{
|
||||
return getDataTable(appIntegralRecordMapper.selectMyIntegralRecordList(getUserId()));
|
||||
}
|
||||
List<AppIntegralRecord> list = appIntegralRecordService.selectAppIntegralRecordList(appIntegralRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序“积分记录”,只查询当前登录用户的积分增减,不包含现金购买记录。
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping("/my")
|
||||
public TableDataInfo myList()
|
||||
{
|
||||
startPage();
|
||||
return getDataTable(appIntegralRecordMapper.selectMyIntegralRecordList(getUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出积分记录列表
|
||||
*/
|
||||
|
||||
@@ -6,11 +6,13 @@ import com.ruoyi.app.domain.request.CreateVirtualOrderRequest;
|
||||
import com.ruoyi.app.service.IAppVirtualPayService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -44,6 +46,14 @@ public class AppVirtualPayController extends BaseController
|
||||
return success(virtualPayService.createOrder(request));
|
||||
}
|
||||
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping("/resource-orders")
|
||||
public TableDataInfo listMyOrders()
|
||||
{
|
||||
startPage();
|
||||
return getDataTable(virtualPayService.listMyOrders());
|
||||
}
|
||||
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping("/resource-orders/{orderNo}")
|
||||
public AjaxResult queryOrder(@PathVariable String orderNo,
|
||||
@@ -52,6 +62,14 @@ public class AppVirtualPayController extends BaseController
|
||||
return success(virtualPayService.queryOrder(orderNo, sync));
|
||||
}
|
||||
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@DeleteMapping("/resource-orders/{orderNo}")
|
||||
public AjaxResult cancelOrder(@PathVariable String orderNo)
|
||||
{
|
||||
virtualPayService.cancelOrder(orderNo);
|
||||
return success("订单已取消");
|
||||
}
|
||||
|
||||
/**
|
||||
* 在小程序后台保存消息推送配置时使用。
|
||||
*/
|
||||
|
||||
@@ -9,8 +9,8 @@ ruoyi:
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: /home/upload
|
||||
# profilee: D:/ruoyi/uploadPath
|
||||
# profile: /home/upload
|
||||
profilee: D:/ruoyi/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
@@ -42,10 +42,10 @@ wx:
|
||||
appid: wx17b46f75e762c184 # 微信小程序appid
|
||||
secret: 1fa844dc33e70f7d813f24cd2af7678b # 微信小程序密钥
|
||||
merchantId: 1704387455 # 商户号
|
||||
# privateKeyPath: D:\wxcert\WXCertUtil\cert\1704387455_20250112_cert\apiclient_key.pem # 商户API私钥路径(测试环境)
|
||||
# publicKeyPath: D:\wxcert\WXCertUtil\cert\1704387455_20250112_cert\pub_key.pem # 商户API公钥路径(测试环境)
|
||||
privateKeyPath: /home/cert/apiclient_key.pem # 商户API私钥路径(正式环境)
|
||||
publicKeyPath: /home/cert/pub_key.pem # 商户API公钥路径(正式环境)
|
||||
privateKeyPath: D:\wxcert\WXCertUtil\cert\1704387455_20250112_cert\apiclient_key.pem # 商户API私钥路径(测试环境)
|
||||
publicKeyPath: D:\wxcert\WXCertUtil\cert\1704387455_20250112_cert\pub_key.pem # 商户API公钥路径(测试环境)
|
||||
# privateKeyPath: /home/cert/apiclient_key.pem # 商户API私钥路径(正式环境)
|
||||
# publicKeyPath: /home/cert/pub_key.pem # 商户API公钥路径(正式环境)
|
||||
publicKeyId: PUB_KEY_ID_0117043874552025011100188700000234
|
||||
merchantSerialNumber: 743FBCB9F5DFD76104A468C6AC6EDD41268634A3 # 商户API证书序列号
|
||||
apiV3Key: G7kL2mN8pQ4rT1vX9yZ3bC5dF6hJ0sW1 # 商户APIV3密钥
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<!-- <property name="log.path" value="D:/ruoyi/log" />-->
|
||||
<property name="log.path" value="/home/ruoyi/logs" />
|
||||
<property name="log.path" value="D:/ruoyi/log" />
|
||||
<!-- <property name="log.path" value="/home/ruoyi/logs" />-->
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user