|
|
@@ -1388,9 +1388,9 @@ public class DistributeController {
|
|
|
* 已有平台分销比例 统一编辑比例
|
|
|
*/
|
|
|
@PutMapping("/unified/set/ds/rate")
|
|
|
- public Result<String> unifiedSetDsRate(Map<String, Object> params) {
|
|
|
- Long goodsId = (Long) params.get("goodsId");
|
|
|
- Integer rate = (Integer) params.get("rate");
|
|
|
+ public Result<String> unifiedSetDsRate(@RequestBody Map<String, Object> params) {
|
|
|
+ Long goodsId = Long.valueOf(params.get("goodsId").toString());
|
|
|
+ Integer rate = Integer.parseInt(params.get("rate").toString());
|
|
|
if (rate < 0 || rate > 30) {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
@@ -1404,9 +1404,9 @@ public class DistributeController {
|
|
|
* 已有平台规格分销比例 统一编辑规格比例
|
|
|
*/
|
|
|
@PutMapping("/unified/set/ds/sku/rate")
|
|
|
- public Result<String> unifiedSetDsSkuRate(Map<String, Object> params) {
|
|
|
- Long skuId = (Long) params.get("skuId");
|
|
|
- Integer rate = (Integer) params.get("rate");
|
|
|
+ public Result<String> unifiedSetDsSkuRate(@RequestBody Map<String, Object> params) {
|
|
|
+ Long skuId = Long.valueOf(params.get("skuId").toString());
|
|
|
+ Integer rate = Integer.parseInt(params.get("rate").toString());
|
|
|
if (rate < 0 || rate > 30) {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|