huwhois 4 years ago
parent
commit
7601156aba

+ 9 - 1
src/main/java/io/renren/modules/admin/controller/ReportController.java

@ -167,10 +167,18 @@ public class ReportController {
167 167
        return R.ok().put("list", list);
168 168
    }
169 169
170
    @GetMapping("/listbranch/{mid}/{bid}")
171
    @RequiresPermissions("admin:report:list")
172
    public R listByBranch(@PathVariable("mid") Long mid, @PathVariable("bid") Long bid){
173
        List<ReportEntity> list = reportService.listByBranch(mid, bid, null);
174
175
        return R.ok().put("list", list);
176
    }
177
170 178
    @GetMapping("/listbranch/{mid}")
171 179
    @RequiresPermissions("admin:report:list")
172 180
    public R listByBranch(@PathVariable("mid") Long mid){
173
        List<ReportEntity> list = reportService.listByBranch(mid);
181
        List<ReportEntity> list = reportService.listByBranch(mid, null);
174 182
175 183
        return R.ok().put("list", list);
176 184
    }

+ 2 - 1
src/main/java/io/renren/modules/admin/service/ReportService.java

@ -19,7 +19,8 @@ public interface ReportService extends IService<ReportEntity> {
19 19
    PageUtils queryPage(Map<String, Object> params);
20 20
21 21
	List<ReportEntity> listByBranch(Long mid, Long bid, String order);
22
	
23
	List<ReportEntity> listByBranch(Long mid, String order);
22 24
23
	List<ReportEntity> listByBranch(Long mid);
24 25
}
25 26

+ 2 - 2
src/main/java/io/renren/modules/admin/service/impl/ReportServiceImpl.java

@ -37,8 +37,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity> impl
37 37
    }
38 38
39 39
    @Override
40
    public List<ReportEntity> listByBranch(Long mid) {
41
        return this.list(new QueryWrapper<ReportEntity>().eq("meeting_id", mid));
40
    public List<ReportEntity> listByBranch(Long mid, String order) {
41
        return this.list(new QueryWrapper<ReportEntity>().eq("meeting_id", mid).orderByAsc(StringUtils.isNotBlank(order), order));
42 42
    }
43 43
44 44
}

+ 67 - 0
src/main/java/io/renren/modules/app/controller/AppReportController.java

@ -0,0 +1,67 @@
1
package io.renren.modules.app.controller;
2
3
import java.util.List;
4
import java.util.Map;
5
6
import org.apache.shiro.authz.annotation.RequiresPermissions;
7
import org.springframework.beans.factory.annotation.Autowired;
8
import org.springframework.web.bind.annotation.GetMapping;
9
import org.springframework.web.bind.annotation.PathVariable;
10
import org.springframework.web.bind.annotation.PostMapping;
11
import org.springframework.web.bind.annotation.RequestBody;
12
import org.springframework.web.bind.annotation.RequestMapping;
13
import org.springframework.web.bind.annotation.RequestParam;
14
import org.springframework.web.bind.annotation.RestController;
15
16
import io.renren.modules.admin.entity.AttendersEntity;
17
import io.renren.modules.admin.entity.ReportEntity;
18
import io.renren.modules.admin.service.AttendersService;
19
import io.renren.modules.admin.service.ReportService;
20
import io.renren.modules.admin.entity.ScheduleEntity;
21
import io.renren.modules.admin.service.ScheduleService;
22
import io.renren.common.utils.PageUtils;
23
import io.renren.common.utils.R;
24
25
26
/**
27
 * 报告管理
28
 *
29
 * @author huwhois
30
 * @email huwhois@163.com
31
 * @date 2020-12-29 10:27:09
32
 */
33
@RestController
34
@RequestMapping("app/report")
35
public class AppReportController {
36
    @Autowired
37
    private ReportService reportService;
38
39
    /**
40
     * 分会场列表
41
     */
42
    @GetMapping("/listbranch/{mid}/{bid}")
43
    public R listByBranch(@PathVariable("mid") Long mid, @PathVariable("bid") Long bid){
44
        List<ReportEntity> list = reportService.listByBranch(mid, bid, "start_time");
45
46
        return R.ok().put("list", list);
47
    }
48
    
49
    @GetMapping("/listbranch/{mid}")
50
    public R listByBranch(@PathVariable("mid") Long mid){
51
        List<ReportEntity> list = reportService.listByBranch(mid, "bid");
52
53
        return R.ok().put("list", list);
54
    }
55
56
    /**
57
     * 信息
58
     */
59
    @GetMapping("/info/{aid}")
60
    public R info(@PathVariable("aid") Long aid){
61
        ReportEntity report = reportService.getById(aid);
62
63
        return R.ok().put("report", report);
64
    }
65
66
67
}