1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
//package cn.wisenergy.chnmuseum.party.web.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import cn.wisenergy.chnmuseum.party.web.controller.base.BaseController;
//import cn.wisenergy.chnmuseum.party.model.TDistrictBoardStatistic;
//import cn.wisenergy.chnmuseum.party.service.TDistrictBoardStatisticService;
//import cn.wisenergy.chnmuseum.party.common.enums.AuditStatusEnum;
//import cn.wisenergy.chnmuseum.party.common.validator.groups.Add;
//import cn.wisenergy.chnmuseum.party.common.validator.groups.Update;
//import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//
//import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.lang3.StringUtils;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.stereotype.Controller;
//
//import javax.annotation.Resource;
//import javax.validation.constraints.NotNull;
//import java.util.List;
//import java.util.Map;
//
///**
// * <pre>
// * 地区看板播放统计 前端控制器
// * </pre>
// *
// * @author Danny Lee
// * @since 2021-03-26
// */
//@Slf4j
//@RestController
//@RequestMapping("/tDistrictBoardStatistic")
//@Api(tags = {"地区看板播放统计操作接口"})
//public class TDistrictBoardStatisticController extends BaseController {
//
// @Resource
// private TDistrictBoardStatisticService tDistrictBoardStatisticService;
//
// @PostMapping("/batchSave")
// @RequiresPermissions("t:district:board:statistic:batch:save")
// @ApiOperation(value = "批量添加地区看板播放统计", notes = "批量添加地区看板播放统计")
// public Map<String, Object> batchSaveTDistrictBoardStatistic(@Validated(value = {Add.class}) List<TDistrictBoardStatistic> tDistrictBoardStatisticList) {
// // 保存业务节点信息
// boolean result = tDistrictBoardStatisticService.saveBatch(tDistrictBoardStatisticList);
// // 返回操作结果
// if (result) {
// return getSuccessResult();
// } else {
// // 保存失败
// return getFailResult();
// }
// }
//
// @PostMapping("/save")
// @RequiresPermissions("t:district:board:statistic:save")
// @ApiOperation(value = "添加地区看板播放统计", notes = "添加地区看板播放统计")
// public Map<String, Object> saveTDistrictBoardStatistic(@Validated(value = {Add.class}) TDistrictBoardStatistic tDistrictBoardStatistic) {
// // 保存业务节点信息
// boolean result = tDistrictBoardStatisticService.save(tDistrictBoardStatistic);
// // 返回操作结果
// if (result) {
// return getSuccessResult();
// } else {
// // 保存失败
// return getFailResult();
// }
// }
//
// @PutMapping("/update")
// @RequiresPermissions("t:district:board:statistic:update")
// @ApiOperation(value = "修改地区看板播放统计信息", notes = "修改地区看板播放统计信息")
// public Map<String, Object> updateTDistrictBoardStatistic(@Validated(value = {Update.class}) TDistrictBoardStatistic tDistrictBoardStatistic) {
// boolean flag = tDistrictBoardStatisticService.updateById(tDistrictBoardStatistic);
// if (flag) {
// return getSuccessResult();
// }
// return getFailResult();
// }
//
//// @PutMapping("/updateAuditStatus/{id}")
//// @RequiresPermissions("t:district:board:statistic:update:audit:status")
//// @ApiOperation(value = "更新地区看板播放统计审核状态", notes = "更新地区看板播放统计审核状态")
//// @ApiImplicitParams(value = {
//// @ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path"),
//// @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataType = "String")
//// })
//// public Map<String, Object> updateStatus(@NotNull(message = "地区看板播放统计ID不能为空") @PathVariable("id") String id, @RequestParam("status") AuditStatusEnum status) {
//// UpdateWrapper<TDistrictBoardStatistic> updateWrapper = new UpdateWrapper<>();
//// updateWrapper.eq("id", id);
//// updateWrapper.eq("audit_status", status.name());
//// boolean flag = tDistrictBoardStatisticService.update(updateWrapper);
//// if (flag) {
//// return getSuccessResult();
//// }
//// return getFailResult();
//// }
//
// @DeleteMapping("/delete/{id}")
// @RequiresPermissions("t:district:board:statistic:delete")
// @ApiOperation(value = "根据ID删除地区看板播放统计", notes = "根据ID删除地区看板播放统计")
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
// })
// public Map<String, Object> deleteTDistrictBoardStatistic(@PathVariable("id") String id) {
// boolean result = tDistrictBoardStatisticService.removeById(id);
// if (result) {
// return getSuccessResult();
// }
// return getFailResult();
// }
//
// @GetMapping("/getList")
// @RequiresPermissions("t:district:board:statistic:list")
// @ApiOperation(value = "获取地区看板播放统计全部列表(无分页)", notes = "获取地区看板播放统计全部列表(无分页)")
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "auditStatus", value = "审核状态", paramType = "query", dataType = "String")
// })
// public Map<String, Object> getTDistrictBoardStatisticList(@RequestParam(value = "auditStatus", defaultValue = "APPROVED_FINAL", required = false) AuditStatusEnum auditStatus) {
// List<TDistrictBoardStatistic> tDistrictBoardStatisticList = tDistrictBoardStatisticService.list();
// return getResult(tDistrictBoardStatisticList);
// }
//
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
// @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
// @ApiImplicitParam(name = "nameOrCode", value = "名称或编码", paramType = "query", dataType = "String"),
// @ApiImplicitParam(name = "startDate", value = "创建时间-开始", paramType = "query", dataType = "String"),
// @ApiImplicitParam(name = "endDate", value = "创建时间-结束", paramType = "query", dataType = "String")
// })
// @PostMapping("/getPageList")
// @RequiresPermissions("t:district:board:statistic:page")
// @ApiOperation(value = "获取地区看板播放统计分页列表", notes = "获取地区看板播放统计分页列表")
// public Map<String, Object> getTDistrictBoardStatisticPageList(GenericPageParam genericPageParam) {
// LambdaQueryWrapper<TDistrictBoardStatistic> queryWrapper = new LambdaQueryWrapper<>();
// // 对名称或编码模糊查询
//// if (StringUtils.isNotBlank(genericPageParam.getNameOrCode())) {
//// queryWrapper.like(TDistrictBoardStatistic::getName, genericPageParam.getNameOrCode());
//// }
//// // 根据创建时间区间检索
//// if (genericPageParam.getStartDate() != null && genericPageParam.getEndDate() != null) {
//// queryWrapper.ge(TDistrictBoardStatistic::getCreateTime, genericPageParam.getStartDate().atTime(0, 0, 0))
//// .le(TDistrictBoardStatistic::getCreateTime, genericPageParam.getEndDate().atTime(23, 59, 59));
//// }
//// // 设置排序规则
//// queryWrapper.orderByDesc(TDistrictBoardStatistic::getCreateTime);
//// // 设置查询内容
//// queryWrapper.select(
//// TDistrictBoardStatistic::getId,
//// TDistrictBoardStatistic::getName,
//// TDistrictBoardStatistic::getAuditStatus,
//// TDistrictBoardStatistic::getCreateTime,
//// TDistrictBoardStatistic::getUpdateTime);
// Page<TDistrictBoardStatistic> page = this.tDistrictBoardStatisticService.page(getPage(), queryWrapper);
// for (TDistrictBoardStatistic tDistrictBoardStatistic : page.getRecords()) {
//
// }
// return getResult(page);
// }
//
// @ApiOperation(value = "获取地区看板播放统计详情", notes = "获取地区看板播放统计详情")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path")
// })
// @GetMapping("/get/{id}")
// @RequiresPermissions("t:district:board:statistic:get:id")
// public Map<String, Object> getById(@PathVariable("id") String id) {
// TDistrictBoardStatistic tDistrictBoardStatistic = tDistrictBoardStatisticService.getById(id);
// return getResult(tDistrictBoardStatistic);
// }
//
//}
//