|
|
|
@ -70,7 +70,7 @@ public class TagController {
|
|
|
|
|
@PostMapping("/del")
|
|
|
|
|
@adminTokenValid
|
|
|
|
|
public Result del(@Validated @RequestBody DelTagParam param) {
|
|
|
|
|
return MybatisPlusUtil.sqlResult(tagService.update(new UpdateWrapper<Tag>().eq("id", param.getId()).set("isDeleted", 1)), "删除");
|
|
|
|
|
return MybatisPlusUtil.sqlResult(tagService.update(new UpdateWrapper<Tag>().eq("id", param.getId()).set("sortWeight",0).set("isDeleted", 1)), "删除");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
@ -96,7 +96,7 @@ public class TagController {
|
|
|
|
|
@adminTokenValid
|
|
|
|
|
public Result list(@RequestBody(required = false) JSONObject obj) {
|
|
|
|
|
QueryWrapper<Tag> qw = new QueryWrapper<>();
|
|
|
|
|
qw.orderByAsc("sortWeight").orderByDesc("updateAt", "creatAt");
|
|
|
|
|
qw.eq("isDelete",0).orderByAsc("sortWeight").orderByDesc("updateAt", "creatAt");
|
|
|
|
|
return Result.success(tagService.pageMaps(MybatisPlusUtil.SetPage(obj), qw));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|