Commit 83b6e4e1 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-admin, litemall-admin-api]: 团购活动查询

parent 77f88982
...@@ -48,12 +48,12 @@ public class AdminGrouponController { ...@@ -48,12 +48,12 @@ public class AdminGrouponController {
@RequiresPermissions("admin:groupon:read") @RequiresPermissions("admin:groupon:read")
@RequiresPermissionsDesc(menu = {"推广管理", "团购管理"}, button = "详情") @RequiresPermissionsDesc(menu = {"推广管理", "团购管理"}, button = "详情")
@GetMapping("/listRecord") @GetMapping("/listRecord")
public Object listRecord(String grouponId, public Object listRecord(String grouponRuleId,
@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "10") Integer limit,
@Sort @RequestParam(defaultValue = "add_time") String sort, @Sort @RequestParam(defaultValue = "add_time") String sort,
@Order @RequestParam(defaultValue = "desc") String order) { @Order @RequestParam(defaultValue = "desc") String order) {
List<LitemallGroupon> grouponList = grouponService.querySelective(grouponId, page, limit, sort, order); List<LitemallGroupon> grouponList = grouponService.querySelective(grouponRuleId, page, limit, sort, order);
List<Map<String, Object>> groupons = new ArrayList<>(); List<Map<String, Object>> groupons = new ArrayList<>();
for (LitemallGroupon groupon : grouponList) { for (LitemallGroupon groupon : grouponList) {
......
...@@ -3,14 +3,15 @@ ...@@ -3,14 +3,15 @@
<!-- 查询和其他操作 --> <!-- 查询和其他操作 -->
<div class="filter-container"> <div class="filter-container">
<el-input v-model="listQuery.goodsId" clearable class="filter-item" style="width: 200px;" placeholder="请输入商品编号"/> <el-input v-model="listQuery.grouponRuleId" clearable class="filter-item" style="width: 200px;" placeholder="请输入团购规则ID" />
<el-button v-permission="['GET /admin/groupon/listRecord']" class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查找</el-button> <el-button v-permission="['GET /admin/groupon/listRecord']" class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button <el-button
:loading="downloadLoading" :loading="downloadLoading"
class="filter-item" class="filter-item"
type="primary" type="primary"
icon="el-icon-download" icon="el-icon-download"
@click="handleDownload">导出 @click="handleDownload"
>导出
</el-button> </el-button>
</div> </div>
...@@ -20,21 +21,21 @@ ...@@ -20,21 +21,21 @@
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<el-table :data="scope.row.subGroupons" border style="width: 100%"> <el-table :data="scope.row.subGroupons" border style="width: 100%">
<el-table-column align="center" label="订单ID" prop="orderId"/> <el-table-column align="center" label="订单ID" prop="orderId" />
<el-table-column align="center" label="用户ID" prop="userId"/> <el-table-column align="center" label="用户ID" prop="userId" />
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="订单ID" prop="groupon.orderId"/> <el-table-column align="center" label="订单ID" prop="groupon.orderId" />
<el-table-column align="center" label="用户ID" prop="groupon.userId"/> <el-table-column align="center" label="用户ID" prop="groupon.userId" />
<el-table-column align="center" label="参与人数" prop="subGroupons.length"/> <el-table-column align="center" label="参与人数" prop="subGroupons.length" />
<el-table-column align="center" label="团购折扣" prop="rules.discount"/> <el-table-column align="center" label="团购折扣" prop="rules.discount" />
<el-table-column align="center" label="团购要求" prop="rules.discountMember"/> <el-table-column align="center" label="团购要求" prop="rules.discountMember" />
<el-table-column align="center" property="iconUrl" label="分享图片"> <el-table-column align="center" property="iconUrl" label="分享图片">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -42,15 +43,15 @@ ...@@ -42,15 +43,15 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="开始时间" prop="rules.addTime"/> <el-table-column align="center" label="开始时间" prop="rules.addTime" />
<el-table-column align="center" label="结束时间" prop="rules.expireTime"/> <el-table-column align="center" label="结束时间" prop="rules.expireTime" />
</el-table> </el-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
<el-tooltip placement="top" content="返回顶部"> <el-tooltip placement="top" content="返回顶部">
<back-to-top :visibility-height="100"/> <back-to-top :visibility-height="100" />
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -93,7 +94,7 @@ export default { ...@@ -93,7 +94,7 @@ export default {
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20, limit: 20,
goodsId: undefined, grouponRuleId: undefined,
sort: 'add_time', sort: 'add_time',
order: 'desc' order: 'desc'
}, },
......
Supports Markdown
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