|
|
@@ -11,10 +11,7 @@ import com.coffee.common.entity.QueryParamEntity;
|
|
|
import com.coffee.common.result.R;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
@@ -47,9 +44,9 @@ public interface BaseQueryController<E, K extends Serializable> extends
|
|
|
}
|
|
|
|
|
|
|
|
|
- @GetMapping("/{id:.+}")
|
|
|
+ @GetMapping("/view")
|
|
|
@Operation(summary = "根据ID查询")
|
|
|
- default R<E> getById(@PathVariable K id) {
|
|
|
+ default R<E> getById(@RequestParam("id") K id) {
|
|
|
queryAuth();
|
|
|
String key=String.valueOf(id);
|
|
|
if(StrUtil.isNullOrUndefined(key)){
|
|
|
@@ -57,5 +54,4 @@ public interface BaseQueryController<E, K extends Serializable> extends
|
|
|
}
|
|
|
return R.success(getService().getById(key));
|
|
|
}
|
|
|
-
|
|
|
}
|