|
@@ -37,11 +37,12 @@ public class CooperatorProductController {
|
|
|
}
|
|
|
|
|
|
// 获取合作产品字段
|
|
|
- @GetMapping("findCooperatorProductFieldByNum")
|
|
|
- public Result findCooperatorProductFieldByNum(String productNum) {
|
|
|
+ @GetMapping("findCooperatorProductFieldByNum/{productNum}")
|
|
|
+ public Result findCooperatorProductFieldByNum(@PathVariable("productNum") String productNum) {
|
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
- List<CooperatorField> list = CooperatorProductService.findCooperatorProductFieldByNum();
|
|
|
+ System.out.println(productNum);
|
|
|
+ List<CooperatorField> list = CooperatorProductService.findCooperatorProductFieldByNum(productNum);
|
|
|
result.put("cooperator_product_field",list);
|
|
|
System.out.println(list);
|
|
|
|
|
@@ -64,9 +65,24 @@ public class CooperatorProductController {
|
|
|
|
|
|
CooperatorProductService.Apply(cooperatorNo, cooperatorName, productNo, productName, modelId, createTime);
|
|
|
|
|
|
-
|
|
|
return Result.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("updateProductFieldNo/{productNum}/{fieldNo}")
|
|
|
+ public Result updateProductFieldNo(@PathVariable("productNum") String productNum,@PathVariable("fieldNo") String fieldNo) {
|
|
|
+ JSONObject result = new JSONObject();
|
|
|
+ CooperatorProductService.updateProductFieldNo(productNum,fieldNo);
|
|
|
+ return Result.success("ok", result);
|
|
|
+ }
|
|
|
|
|
|
+ @GetMapping("findCooperatorFieldsByName/{cooperatorName}")
|
|
|
+ public Result findCooperatorFieldsByName(@PathVariable("cooperatorName") String cooperatorName){
|
|
|
+ JSONObject resJson=new JSONObject();
|
|
|
+ List<CooperatorField> list=CooperatorProductService.findCooperatorFieldsByName(cooperatorName);
|
|
|
+ resJson.put("cooperator_fields_by_name",list);
|
|
|
+ System.out.println(list);
|
|
|
+
|
|
|
+ return Result.success("ok",resJson);
|
|
|
}
|
|
|
|
|
|
}
|