|
@@ -3,6 +3,9 @@ package com.zhongzheng.controller.user;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
|
|
+import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
import com.zhongzheng.modules.user.vo.UserDateNoteVo;
|
|
import com.zhongzheng.modules.user.vo.UserDateNoteVo;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@@ -43,6 +46,8 @@ public class UserNoteController extends BaseController {
|
|
|
|
|
|
|
|
private final IUserNoteService iUserNoteService;
|
|
private final IUserNoteService iUserNoteService;
|
|
|
|
|
|
|
|
|
|
+ private final WxTokenService wxTokenService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询用户笔记记录列表
|
|
* 查询用户笔记记录列表
|
|
|
*/
|
|
*/
|
|
@@ -50,6 +55,8 @@ public class UserNoteController extends BaseController {
|
|
|
@GetMapping("/listDate")
|
|
@GetMapping("/listDate")
|
|
|
public TableDataInfo<UserDateNoteVo> listDate(UserNoteQueryBo bo) {
|
|
public TableDataInfo<UserDateNoteVo> listDate(UserNoteQueryBo bo) {
|
|
|
startPage();
|
|
startPage();
|
|
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
List<UserDateNoteVo> list = iUserNoteService.listDate(bo);
|
|
List<UserDateNoteVo> list = iUserNoteService.listDate(bo);
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
|
}
|
|
}
|
|
@@ -62,6 +69,8 @@ public class UserNoteController extends BaseController {
|
|
|
@Log(title = "用户笔记记录", businessType = BusinessType.INSERT)
|
|
@Log(title = "用户笔记记录", businessType = BusinessType.INSERT)
|
|
|
@PostMapping()
|
|
@PostMapping()
|
|
|
public AjaxResult<Void> add(@RequestBody UserNoteAddBo bo) {
|
|
public AjaxResult<Void> add(@RequestBody UserNoteAddBo bo) {
|
|
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
return toAjax(iUserNoteService.insertByAddBo(bo) ? 1 : 0);
|
|
return toAjax(iUserNoteService.insertByAddBo(bo) ? 1 : 0);
|
|
|
}
|
|
}
|
|
|
|
|
|