|
|
@@ -76,14 +76,8 @@ public class ProductUtils {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public static ModelMap updateProductUsersByBatch(List<ProductUsers> productUsers) throws Exception {
|
|
|
- HashMap<String, Object> params = new HashMap<>();
|
|
|
- params.put("data", FlexJsonUtils.toJsonDeep(productUsers));
|
|
|
- Response res = HttpUtil.sendPostRequest(PRODUCT_PUBLIC_SERVICE_URL + "/productuser/save", params);
|
|
|
- if (HttpStatus.OK.value() == res.getStatusCode()) {
|
|
|
- if (null != res.getResponseText()) {
|
|
|
- return new ModelMap("success", "批量保存个人物料成功");
|
|
|
- }
|
|
|
- } else {
|
|
|
+ String res = HttpUtil.doPost(PRODUCT_PUBLIC_SERVICE_URL + "/productuser/save", FlexJsonUtils.toJsonDeep(productUsers));
|
|
|
+ if (null == res) {
|
|
|
throw new RuntimeException("批量保存个人物料失败");
|
|
|
}
|
|
|
return null;
|