Browse Source

fix:修改状态和删除传参方式

liujunchi 3 years ago
parent
commit
633f7d651c

+ 4 - 0
cooleshow-mall/mall-admin/pom.xml

@@ -40,6 +40,10 @@
             <groupId>com.yonge.cooleshow</groupId>
             <artifactId>mall-security</artifactId>
         </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.yonge.cooleshow</groupId>-->
+<!--            <artifactId>auth-api</artifactId>-->
+<!--        </dependency>-->
         <dependency>
             <groupId>com.aliyun.oss</groupId>
             <artifactId>aliyun-sdk-oss</artifactId>

+ 2 - 2
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/MusicAlbumController.java

@@ -97,9 +97,9 @@ public class MusicAlbumController extends BaseController {
     /**
      * 启用/停用
      */
-    @PostMapping("/state")
+    @PostMapping("/state/{id}")
     @ApiOperation(value = "启用/停用", notes = "传入id")
-    public HttpResponseResult<Boolean> state(@ApiParam(value = "专辑编号", required = true) @RequestParam Long id) {
+    public HttpResponseResult<Boolean> state(@ApiParam(value = "专辑编号", required = true)  @PathVariable Long id) {
         if (StringUtil.isEmpty(id)) {
             return failed("参数不能为空");
         }

+ 2 - 2
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetController.java

@@ -172,9 +172,9 @@ public class MusicSheetController extends BaseController {
     /**
      * 启用/停用
      */
-    @PostMapping("/state")
+    @PostMapping("/state/{id}")
     @ApiOperation(value = "启用/停用", notes = "传入id")
-    public HttpResponseResult<Boolean> state(@ApiParam(value = "曲目编号", required = true) @RequestParam Long id) {
+    public HttpResponseResult<Boolean> state(@ApiParam(value = "曲目编号", required = true)  @PathVariable Long id) {
         if (StringUtil.isEmpty(id)) {
             return failed("参数不能为空");
         }

+ 4 - 4
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/MusicTagController.java

@@ -92,9 +92,9 @@ public class MusicTagController extends BaseController {
  	/**
 	 * 删除
 	 */
-	@PostMapping("/remove")
+	@PostMapping("/remove/{id}")
 	@ApiOperation(value = "逻辑删除", notes = "传入id")
-	public HttpResponseResult<Boolean> remove(@ApiParam(value = "标签编号", required = true) @RequestParam Long id) {
+	public HttpResponseResult<Boolean> remove(@ApiParam(value = "标签编号", required = true) @PathVariable Long id) {
         if (StringUtil.isEmpty(id)) {
 			return failed("参数不能为空");
 		}
@@ -104,9 +104,9 @@ public class MusicTagController extends BaseController {
 	/**
 	 * 启用/停用
 	 */
-	@PostMapping("/state")
+	@PostMapping("/state/{id}")
 	@ApiOperation(value = "启用/停用", notes = "传入id")
-	public HttpResponseResult<Boolean> state(@ApiParam(value = "标签编号", required = true) @RequestParam Long id) {
+	public HttpResponseResult<Boolean> state(@ApiParam(value = "标签编号", required = true)  @PathVariable Long id) {
 		if (StringUtil.isEmpty(id)) {
 			return failed("参数不能为空");
 		}