|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.ruoyi.database.controller;
|
|
|
|
package com.ruoyi.database.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
@ -34,24 +35,22 @@ public class MetaHuntersInfoController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
private final MetaHuntersInfoService metaHuntersInfoService;
|
|
|
|
private final MetaHuntersInfoService metaHuntersInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping
|
|
|
|
@GetMapping
|
|
|
|
@ApiOperation("查询非法狩猎人员信息表")
|
|
|
|
@ApiOperation("查询非法狩猎人员信息表")
|
|
|
|
public TableDataInfo<MetaHuntersInfo> list(MetaHuntersInfo metaHuntersInfo) {
|
|
|
|
public TableDataInfo<MetaHuntersInfo> list(MetaHuntersInfo metaHuntersInfo) {
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
|
|
|
|
LambdaQueryWrapper<MetaHuntersInfo> queryWrapper = new LambdaQueryWrapper<>(metaHuntersInfo);
|
|
|
|
List<MetaHuntersInfo> list = new ArrayList<>();
|
|
|
|
if (metaHuntersInfo.getFirstTime() != null && metaHuntersInfo.getEndTime() != null) {
|
|
|
|
if(metaHuntersInfo.getFirstTime() != null && metaHuntersInfo.getEndTime() != null){
|
|
|
|
queryWrapper.between(MetaHuntersInfo::getRegistrationTime, metaHuntersInfo.getFirstTime(), metaHuntersInfo.getEndTime());
|
|
|
|
list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo)
|
|
|
|
|
|
|
|
.between("registration_time", metaHuntersInfo.getFirstTime(), metaHuntersInfo.getEndTime())
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 添加排序条件:根据 userPic 倒序排序
|
|
|
|
// List<MetaHuntersInfo> list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo));
|
|
|
|
queryWrapper.orderByDesc(MetaHuntersInfo::getUserPic);
|
|
|
|
|
|
|
|
List<MetaHuntersInfo> list = metaHuntersInfoService.list(queryWrapper);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
@ApiOperation("新增非法狩猎人员信息表")
|
|
|
|
@ApiOperation("新增非法狩猎人员信息表")
|
|
|
|
@Log(title = "非法狩猎人员信息表", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "非法狩猎人员信息表", businessType = BusinessType.INSERT)
|
|
|
|