delVlog
This commit is contained in:
parent
302c7a4ca0
commit
9d2000b2f7
@ -190,7 +190,13 @@ public class VlogController extends BaseInfoProperties {
|
|||||||
@RequestParam String vlogId) {
|
@RequestParam String vlogId) {
|
||||||
return GraceJSONResult.ok(vlogService.getVlogDetailById(userId, vlogId));
|
return GraceJSONResult.ok(vlogService.getVlogDetailById(userId, vlogId));
|
||||||
}
|
}
|
||||||
|
@PostMapping("changeVlogStatus")
|
||||||
|
public GraceJSONResult changeVlogStatus(@RequestParam String userId,
|
||||||
|
@RequestParam String vlogId,
|
||||||
|
@RequestParam Integer status) {
|
||||||
|
vlogService.changeVlogStatus(userId, vlogId,status);
|
||||||
|
return GraceJSONResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("changeToPrivate")
|
@PostMapping("changeToPrivate")
|
||||||
public GraceJSONResult changeToPrivate(@RequestParam String userId,
|
public GraceJSONResult changeToPrivate(@RequestParam String userId,
|
||||||
|
@ -42,6 +42,9 @@ public interface VlogService {
|
|||||||
String vlogId,
|
String vlogId,
|
||||||
Integer yesOrNo);
|
Integer yesOrNo);
|
||||||
|
|
||||||
|
public void changeVlogStatus(String userId,
|
||||||
|
String vlogId,
|
||||||
|
Integer status);
|
||||||
/**
|
/**
|
||||||
* 查询用的公开/私密的视频列表
|
* 查询用的公开/私密的视频列表
|
||||||
*/
|
*/
|
||||||
|
@ -283,6 +283,23 @@ public class VlogServiceImpl extends BaseInfoProperties implements VlogService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public void changeVlogStatus(String userId,
|
||||||
|
String vlogId,
|
||||||
|
Integer status) {
|
||||||
|
Map<String, Object> updates = new HashMap<>();
|
||||||
|
updates.put("status", status);
|
||||||
|
Map<String, Object> conditions = new HashMap<>();
|
||||||
|
conditions.put("id", vlogId);
|
||||||
|
conditions.put("vloger_id", userId);
|
||||||
|
vlogMapper.updateVlogByConditions(
|
||||||
|
updates,
|
||||||
|
conditions
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PagedGridResult queryMyVlogList(String userId,
|
public PagedGridResult queryMyVlogList(String userId,
|
||||||
Integer page,
|
Integer page,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user