|
@@ -9,10 +9,7 @@ import edu.travel.rpc.RPCBaseResponse;
|
|
|
import edu.travel.web.BaseController;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -29,12 +26,16 @@ public class ShopSpecValueController extends BaseController<ShopSpecValue> imple
|
|
|
*/
|
|
|
@Autowired
|
|
|
private ShopSpecValueService shopSpecValueService;
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 获取全部规格值信息(可模糊查询)
|
|
|
+ */
|
|
|
+ @GetMapping("/getSpecValue")
|
|
|
+ public RPCBaseResponse<List<ShopSpecValueVo>> getSpecValue(@RequestParam(required = false) String specValue) {
|
|
|
+ return shopSpecValueService.getSpecValue(specValue);
|
|
|
+ }
|
|
|
/**
|
|
|
* 通过id查找规格值
|
|
|
*
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
*/
|
|
|
@Override
|
|
|
@GetMapping("/getFormId")
|
|
@@ -51,7 +52,8 @@ public class ShopSpecValueController extends BaseController<ShopSpecValue> imple
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public RPCBaseResponse<ShopSpecValueVo> updateTargetFormId(ShopSpecValueDto entity) {
|
|
|
+ @PostMapping("/updateTargetFormId")
|
|
|
+ public RPCBaseResponse<ShopSpecValueVo> updateTargetFormId(@RequestBody ShopSpecValueDto entity) {
|
|
|
ShopSpecValue shopSpecValue = new ShopSpecValue();
|
|
|
BeanUtils.copyProperties(entity, shopSpecValue);
|
|
|
RPCBaseResponse<ShopSpecValue> shopSpecValueRPCBaseResponse = super.updateTargetById(shopSpecValue);
|
|
@@ -66,7 +68,8 @@ public class ShopSpecValueController extends BaseController<ShopSpecValue> imple
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public RPCBaseResponse<ShopSpecValueVo> saveFormTarget(ShopSpecValueDto entity) {
|
|
|
+ @PostMapping("/saveFormTarget")
|
|
|
+ public RPCBaseResponse<ShopSpecValueVo> saveFormTarget(@RequestBody ShopSpecValueDto entity) {
|
|
|
ShopSpecValue shopSpecValue = new ShopSpecValue();
|
|
|
BeanUtils.copyProperties(entity, shopSpecValue);
|
|
|
RPCBaseResponse<ShopSpecValue> shopSpecValueRPCBaseResponse = super.saveTarget(shopSpecValue);
|
|
@@ -81,7 +84,8 @@ public class ShopSpecValueController extends BaseController<ShopSpecValue> imple
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public RPCBaseResponse<ShopSpecValueVo> deleteTargetFormId(List<String> ids) {
|
|
|
+ @PostMapping("/deleteTargetFormId")
|
|
|
+ public RPCBaseResponse<ShopSpecValueVo> deleteTargetFormId(@RequestBody List<String> ids) {
|
|
|
RPCBaseResponse<ShopSpecValue> shopSpecValueRPCBaseResponse = super.deleteTargetById(ids);
|
|
|
RPCBaseResponse<ShopSpecValueVo> shopSpecValueVoRPCBaseResponse = new RPCBaseResponse<>();
|
|
|
BeanUtils.copyProperties(shopSpecValueRPCBaseResponse, shopSpecValueVoRPCBaseResponse);
|
|
@@ -93,6 +97,7 @@ public class ShopSpecValueController extends BaseController<ShopSpecValue> imple
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
+ @GetMapping("/getAllForm")
|
|
|
public RPCBaseResponse<List<ShopSpecValueVo>> getAllForm() {
|
|
|
RPCBaseResponse<List<ShopSpecValue>> shopSpecValueRPCBaseResponse = super.listAll();
|
|
|
RPCBaseResponse<List<ShopSpecValueVo>> shopSpecValueVoRPCBaseResponse = new RPCBaseResponse<>();
|