|
|
@@ -20,7 +20,6 @@ import com.zd.common.response.ResultData;
|
|
|
import com.zd.common.security.annotation.PreAuthorize;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import org.apache.hadoop.security.SecurityUtil;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -28,7 +27,6 @@ import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -47,6 +45,8 @@ public class UseRecordController extends BaseController<UseRecord> {
|
|
|
@Resource
|
|
|
private UseRecordService useRecordService;
|
|
|
|
|
|
+ private static final String ORDER_BY_DESC="descending";
|
|
|
+
|
|
|
/**
|
|
|
* 查询使用记录列表(学生端)
|
|
|
*/
|
|
|
@@ -54,7 +54,7 @@ public class UseRecordController extends BaseController<UseRecord> {
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperation(value = "查询使用记录列表")
|
|
|
public TableDataInfo<UseRecordVo> list(UseRecord useRecord) {
|
|
|
- startPage("use_time","descending");
|
|
|
+ startPage("use_time",ORDER_BY_DESC);
|
|
|
useRecord.setUserId(SecurityUtils.getUserId());
|
|
|
List<UseRecord> records =useRecordService.getList(useRecord);
|
|
|
TableDataInfo<UseRecord> dataTable = getDataTable(records);
|
|
|
@@ -75,7 +75,7 @@ public class UseRecordController extends BaseController<UseRecord> {
|
|
|
@GetMapping("/listByAdmin")
|
|
|
@ApiOperation(value = "查询使用记录列表")
|
|
|
public TableDataInfo<UseRecordVo> listByAdmin(UseRecord useRecord) {
|
|
|
- startPage("use_time","descending");
|
|
|
+ startPage("use_time",ORDER_BY_DESC);
|
|
|
List<UseRecord> records =useRecordService.getList(useRecord);
|
|
|
TableDataInfo<UseRecord> dataTable = getDataTable(records);
|
|
|
TableDataInfo<UseRecordVo> info = new TableDataInfo<>();
|
|
|
@@ -101,7 +101,6 @@ public class UseRecordController extends BaseController<UseRecord> {
|
|
|
/**
|
|
|
* 导出使用记录列表(学生端)
|
|
|
*/
|
|
|
- @PreAuthorize(hasPermi = PerPrefix.BOTTLE_USERECORD + PerFun.EXPORT)
|
|
|
@ApiOperation(value = "导出使用记录列表")
|
|
|
@Log(title = "使用记录", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
@@ -265,7 +264,7 @@ public class UseRecordController extends BaseController<UseRecord> {
|
|
|
@ApiOperation(value = "查询使用记录")
|
|
|
@GetMapping(value = "/getUseDetails")
|
|
|
public TableDataInfo<UseRecord> getUseDetails(UseRecord useRecord) {
|
|
|
- startPage("create_time","descending");
|
|
|
+ startPage("create_time",ORDER_BY_DESC);
|
|
|
useRecord.setUserId(SecurityUtils.getUserId());
|
|
|
List<UseRecord> records =useRecordService.getList(useRecord);
|
|
|
return getDataTable(records);
|
|
|
@@ -279,7 +278,7 @@ public class UseRecordController extends BaseController<UseRecord> {
|
|
|
@ApiOperation(value = "查询使用记录")
|
|
|
@GetMapping(value = "/getUseDetailsByAdmin")
|
|
|
public TableDataInfo<UseRecord> getUseDetailsByAdmin(UseRecord useRecord) {
|
|
|
- startPage("create_time","descending");
|
|
|
+ startPage("create_time",ORDER_BY_DESC);
|
|
|
List<UseRecord> records =useRecordService.getList(useRecord);
|
|
|
return getDataTable(records);
|
|
|
}
|