|
@@ -144,4 +144,15 @@ public class HistoryController {
|
|
|
service.removeById(id);
|
|
|
return ResponseFormat.success();
|
|
|
}
|
|
|
+
|
|
|
+ /** 根据user_id删除数据 */
|
|
|
+ @PassToken
|
|
|
+ @ApiOperation("清空用户数据")
|
|
|
+ @DeleteMapping("/clear/{user_id}")
|
|
|
+ public Object clear(@PathVariable long user_id) {
|
|
|
+ QueryWrapper qw = new QueryWrapper<>();
|
|
|
+ qw.eq("user_id", user_id);
|
|
|
+ service.remove(qw);
|
|
|
+ return ResponseFormat.success();
|
|
|
+ }
|
|
|
}
|