|
@@ -22,8 +22,8 @@ import java.util.List;
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping(Constants.OPEN_PREFIX + "/birthday/log")
|
|
@RequestMapping(Constants.OPEN_PREFIX + "/birthday/log")
|
|
-@Api(tags={"【app-查询记录】"})
|
|
|
|
-public class BirthdayLogController extends BaseController{
|
|
|
|
|
|
+@Api(tags = {"【app-查询记录】"})
|
|
|
|
+public class BirthdayLogController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IBirthdayLogService birthdayLogService;
|
|
private IBirthdayLogService birthdayLogService;
|
|
|
|
|
|
@@ -32,12 +32,16 @@ public class BirthdayLogController extends BaseController{
|
|
*/
|
|
*/
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
@ApiOperation("查询查询记录列表")
|
|
@ApiOperation("查询查询记录列表")
|
|
- @ApiImplicitParams({
|
|
|
|
- @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
|
|
|
|
- @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
|
|
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
|
|
+ @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
})
|
|
})
|
|
- public ResponsePageInfo<BirthdayLog> list(@ModelAttribute BirthdayLog birthdayLog){
|
|
|
|
|
|
+ public ResponsePageInfo<BirthdayLog> list(@ModelAttribute BirthdayLog birthdayLog) {
|
|
startPage();
|
|
startPage();
|
|
|
|
+ Long bbq = SecurityUtils.getLoginUser().getStudent().getId();
|
|
|
|
+ Long bbq2 = SecurityUtils.getLoginUser().getUser().getUserId();
|
|
|
|
+ System.out.println(bbq);
|
|
|
|
+ System.out.println(bbq2);
|
|
birthdayLog.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
birthdayLog.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
List<BirthdayLog> list = birthdayLogService.selectBirthdayLogList(birthdayLog);
|
|
List<BirthdayLog> list = birthdayLogService.selectBirthdayLogList(birthdayLog);
|
|
return toResponsePageInfo(list);
|
|
return toResponsePageInfo(list);
|
|
@@ -51,18 +55,17 @@ public class BirthdayLogController extends BaseController{
|
|
public Response<BirthdayLog> getInfo(
|
|
public Response<BirthdayLog> getInfo(
|
|
@ApiParam(name = "id", value = "查询记录参数", required = true)
|
|
@ApiParam(name = "id", value = "查询记录参数", required = true)
|
|
@PathVariable("id") Long id
|
|
@PathVariable("id") Long id
|
|
- ){
|
|
|
|
|
|
+ ) {
|
|
return Response.success(birthdayLogService.getById(id));
|
|
return Response.success(birthdayLogService.getById(id));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 新增查询记录
|
|
* 新增查询记录
|
|
|
|
|
|
- @PostMapping
|
|
|
|
- @ApiOperation("新增查询记录")
|
|
|
|
- public Response<Integer> add(@RequestBody BirthdayLog birthdayLog){
|
|
|
|
- return toResponse(birthdayLogService.save(birthdayLog) ? 1 : 0);
|
|
|
|
- }
|
|
|
|
|
|
+ @PostMapping
|
|
|
|
+ @ApiOperation("新增查询记录") public Response<Integer> add(@RequestBody BirthdayLog birthdayLog){
|
|
|
|
+ return toResponse(birthdayLogService.save(birthdayLog) ? 1 : 0);
|
|
|
|
+ }
|
|
*/
|
|
*/
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -70,31 +73,30 @@ public class BirthdayLogController extends BaseController{
|
|
*/
|
|
*/
|
|
@PostMapping
|
|
@PostMapping
|
|
@ApiOperation("新增查询记录")
|
|
@ApiOperation("新增查询记录")
|
|
- public Response<Integer> add(@RequestBody BirthdayLog birthdayLog){
|
|
|
|
|
|
+ public Response<Integer> add(@RequestBody BirthdayLog birthdayLog) {
|
|
birthdayLog.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
birthdayLog.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
return toResponse(birthdayLogService.saveBirthdayLog(birthdayLog) ? 1 : 0);
|
|
return toResponse(birthdayLogService.saveBirthdayLog(birthdayLog) ? 1 : 0);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 修改查询记录
|
|
* 修改查询记录
|
|
*/
|
|
*/
|
|
@PutMapping
|
|
@PutMapping
|
|
@ApiOperation("修改查询记录")
|
|
@ApiOperation("修改查询记录")
|
|
- public Response<Integer> edit(@RequestBody BirthdayLog birthdayLog){
|
|
|
|
|
|
+ public Response<Integer> edit(@RequestBody BirthdayLog birthdayLog) {
|
|
return toResponse(birthdayLogService.updateById(birthdayLog) ? 1 : 0);
|
|
return toResponse(birthdayLogService.updateById(birthdayLog) ? 1 : 0);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 删除查询记录
|
|
* 删除查询记录
|
|
*/
|
|
*/
|
|
- @DeleteMapping("/{ids}")
|
|
|
|
|
|
+ @DeleteMapping("/{ids}")
|
|
@ApiOperation("删除查询记录")
|
|
@ApiOperation("删除查询记录")
|
|
- public Response<Integer> remove(
|
|
|
|
|
|
+ public Response<Integer> remove(
|
|
@ApiParam(name = "ids", value = "查询记录ids参数", required = true)
|
|
@ApiParam(name = "ids", value = "查询记录ids参数", required = true)
|
|
@PathVariable Long[] ids
|
|
@PathVariable Long[] ids
|
|
- ){
|
|
|
|
|
|
+ ) {
|
|
return toResponse(birthdayLogService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
return toResponse(birthdayLogService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
}
|
|
}
|
|
}
|
|
}
|