申请部分/全额退款

This commit is contained in:
lu7213 committed 2026-10-31 20:46:07 -04:00
1 parent acf461cec4
commit 285d08b00d
2 files changed
+25 -4

No files matched your search

@@ -109,8 +109,11 @@ public class RentalController {
@GetMapping("/mine/{resource}")
@PreAuthorize("@ss.hasPermi('rent:portal:view')")
public AjaxResult mine(
@PathVariable String resource, @RequestParam(defaultValue = "1") int page) {
return AjaxResult.success(queries.list(resource, user(), page));
@PathVariable String resource, @RequestParam(defaultValue = "1") int page,
@RequestParam(required = false) String status, @RequestParam(required = false) String network,
@RequestParam(required = false, name = "resource_type") String resourceType,
@RequestParam(required = false) String keyword) {
return AjaxResult.success(queries.list(resource, user(), page, status, network, resourceType, keyword));
}
/** 本人应用详情;显式选列,禁止返回明文或加密 Secret。 */
@@ -151,8 +154,11 @@ public class RentalController {
@GetMapping("/manage/{resource}")
@PreAuthorize("@ss.hasPermi('rent:manage:list')")
public AjaxResult manage(
@PathVariable String resource, @RequestParam(defaultValue = "1") int page) {
return AjaxResult.success(queries.list(resource, null, page));
@PathVariable String resource, @RequestParam(defaultValue = "1") int page,
@RequestParam(required = false) String status, @RequestParam(required = false) String network,
@RequestParam(required = false, name = "resource_type") String resourceType,
@RequestParam(required = false) String keyword) {
return AjaxResult.success(queries.list(resource, null, page, status, network, resourceType, keyword));
}
@PostMapping("/register/{resource}")
@@ -18,6 +18,11 @@ public class RentalQueries {
}
public List<Map<String, Object>> list(String type, Long user, int page) {
return list(type, user, page, null, null, null, null);
}
public List<Map<String, Object>> list(String type, Long user, int page, String status,
String network, String resourceType, String keyword) {
String table = store.table(type);
String where = "1=1";
List<Object> args = new ArrayList<>();
@@ -72,6 +77,16 @@ public class RentalQueries {
args.add(user);
}
}
if ("order".equals(type)) {
if (status != null && !status.trim().isEmpty()) { where += " AND r.status=?"; args.add(status.trim()); }
if (network != null && !network.trim().isEmpty()) { where += " AND r.network=?"; args.add(network.trim()); }
if (resourceType != null && !resourceType.trim().isEmpty()) { where += " AND r.resource_type=?"; args.add(resourceType.trim()); }
if (keyword != null && !keyword.trim().isEmpty()) {
String like = "%" + keyword.trim() + "%";
where += " AND (r.order_no LIKE ? OR r.merchant_order_no LIKE ? OR r.receiver_address LIKE ?)";
args.add(like); args.add(like); args.add(like);
}
}
require(page > 0 && page <= 10000, "页码不合法");
args.add((page - 1) * 50);
// 资金账户列表补充所属用户名;左连接保留关联用户缺失的账户,归属过滤仍使用账户的user_id。