Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
f0ada315
Commit
f0ada315
authored
Jan 14, 2025
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改、删除笔记
parent
4eb8fd56
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
2 deletions
+77
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserServiceImpl.java
...n/java/com/wwdz/ch/wx/impl/qiandao/QdUserServiceImpl.java
+0
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInNoteServiceImpl.java
.../wwdz/ch/wx/impl/qiandao/QdUserSignInNoteServiceImpl.java
+37
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/qiandao/QdUserSignInNoteService.java
...m/wwdz/ch/wx/service/qiandao/QdUserSignInNoteService.java
+17
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/qiandao/QdUserSignInNoteController.java
...om/wwdz/ch/wx/web/qiandao/QdUserSignInNoteController.java
+23
-0
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserServiceImpl.java
View file @
f0ada315
...
@@ -82,8 +82,6 @@ public class QdUserServiceImpl implements QdUserService {
...
@@ -82,8 +82,6 @@ public class QdUserServiceImpl implements QdUserService {
@Autowired
@Autowired
StorageService
storageService
;
StorageService
storageService
;
@Override
@Override
public
Result
regCaptcha
(
QdUserRequestDto
dto
)
{
public
Result
regCaptcha
(
QdUserRequestDto
dto
)
{
try
{
try
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInNoteServiceImpl.java
View file @
f0ada315
...
@@ -8,6 +8,7 @@ import com.wwdz.ch.db.domain.qiandao.QdUser;
...
@@ -8,6 +8,7 @@ import com.wwdz.ch.db.domain.qiandao.QdUser;
import
com.wwdz.ch.db.domain.qiandao.QdUserSignInNote
;
import
com.wwdz.ch.db.domain.qiandao.QdUserSignInNote
;
import
com.wwdz.ch.db.domain.qiandao.SignInTask
;
import
com.wwdz.ch.db.domain.qiandao.SignInTask
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto
;
import
com.wwdz.ch.wx.entity.vo.qiandao.QdSignInNoteVo
;
import
com.wwdz.ch.wx.entity.vo.qiandao.QdSignInNoteVo
;
import
com.wwdz.ch.wx.service.qiandao.QdUserSignInNoteService
;
import
com.wwdz.ch.wx.service.qiandao.QdUserSignInNoteService
;
import
com.xxdxxs.utils.EntityMapper
;
import
com.xxdxxs.utils.EntityMapper
;
...
@@ -137,4 +138,40 @@ public class QdUserSignInNoteServiceImpl implements QdUserSignInNoteService {
...
@@ -137,4 +138,40 @@ public class QdUserSignInNoteServiceImpl implements QdUserSignInNoteService {
}
}
return
Result
.
failed
();
return
Result
.
failed
();
}
}
@Override
public
Result
delete
(
QdUserSignInNoteRequestDto
dto
)
{
try
{
QdUserSignInNote
qdUserSignInNote
=
new
QdUserSignInNote
();
qdUserSignInNote
.
setId
(
dto
.
getId
());
qdUserSignInNote
.
setUpdateTime
(
new
Date
());
qdUserSignInNote
.
setIsDeleted
(
true
);
qdUserSignInNoteDao
.
updateByPrimaryKey
(
qdUserSignInNote
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除笔记 error:{}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
update
(
QdUserSignInRequestDto
dto
)
{
try
{
//保存签到笔记
QdUserSignInNote
qdUserSignInNote
=
new
QdUserSignInNote
();
qdUserSignInNote
.
setTitle
(
dto
.
getTitle
());
qdUserSignInNote
.
setContent
(
dto
.
getContent
());
qdUserSignInNote
.
setImage
(
String
.
join
(
";"
,
dto
.
getImages
()));
qdUserSignInNote
.
setAudio
(
dto
.
getAudio
());
qdUserSignInNote
.
setUpdateTime
(
new
Date
());
qdUserSignInNote
.
setIsPrivate
(
dto
.
getIsPrivate
());
qdUserSignInNoteDao
.
updateByPrimaryKey
(
qdUserSignInNote
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"修改笔记 error:{}"
,
e
);
}
return
Result
.
failed
();
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/qiandao/QdUserSignInNoteService.java
View file @
f0ada315
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.service.qiandao;
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.service.qiandao;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto
;
/**
/**
* 用户签到笔记
* 用户签到笔记
...
@@ -21,4 +22,20 @@ public interface QdUserSignInNoteService {
...
@@ -21,4 +22,20 @@ public interface QdUserSignInNoteService {
* @return
* @return
*/
*/
Result
findDetail
(
QdUserSignInNoteRequestDto
dto
);
Result
findDetail
(
QdUserSignInNoteRequestDto
dto
);
/**
* 删除笔记
* @param dto
* @return
*/
Result
delete
(
QdUserSignInNoteRequestDto
dto
);
/**
* 修改笔记
* @param dto
* @return
*/
Result
update
(
QdUserSignInRequestDto
dto
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/qiandao/QdUserSignInNoteController.java
View file @
f0ada315
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto
;
import
com.wwdz.ch.wx.entity.request.QdHomePageRequestDto
;
import
com.wwdz.ch.wx.entity.request.QdHomePageRequestDto
;
import
com.wwdz.ch.wx.service.qiandao.QdHomePageService
;
import
com.wwdz.ch.wx.service.qiandao.QdHomePageService
;
import
com.wwdz.ch.wx.service.qiandao.QdUserSignInNoteService
;
import
com.wwdz.ch.wx.service.qiandao.QdUserSignInNoteService
;
...
@@ -44,4 +45,26 @@ public class QdUserSignInNoteController {
...
@@ -44,4 +45,26 @@ public class QdUserSignInNoteController {
return
qdUserSignInNoteService
.
findDetail
(
dto
);
return
qdUserSignInNoteService
.
findDetail
(
dto
);
}
}
@ApiOperation
(
value
=
"删除笔记"
)
@PostMapping
(
"/delete"
)
public
Result
delete
(
@RequestBody
QdUserSignInNoteRequestDto
dto
)
{
logger
.
info
(
"【请求开始】删除笔记,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
qdUserSignInNoteService
.
delete
(
dto
);
}
@ApiOperation
(
value
=
"修改笔记"
)
@PostMapping
(
"/update"
)
public
Result
update
(
@RequestBody
QdUserSignInRequestDto
dto
)
{
logger
.
info
(
"【请求开始】修改笔记,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
qdUserSignInNoteService
.
update
(
dto
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment