提交 81f6174a authored 作者: 艾庆国's avatar 艾庆国

代码优化

上级 9959b73b
...@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -52,7 +53,7 @@ public class TempController { ...@@ -52,7 +53,7 @@ public class TempController {
@ApiOperation(value = "test", notes = "<br>By:艾庆国") @ApiOperation(value = "test", notes = "<br>By:艾庆国")
@RequestMapping(value = "/test", method = RequestMethod.POST) @RequestMapping(value = "/test", method = RequestMethod.POST)
public Result test(@RequestBody List<String> mobileList, String warnName, String truckNo, String childNo) { public Result test( String mobile, String warnName, String truckNo, String childNo) {
//触发{指定预警名称}预警;车牌号{车牌号};运单{运单号};请尽快核实情况 //触发{指定预警名称}预警;车牌号{车牌号};运单{运单号};请尽快核实情况
ClinkBatchMessageReq req = new ClinkBatchMessageReq(); ClinkBatchMessageReq req = new ClinkBatchMessageReq();
...@@ -67,8 +68,9 @@ public class TempController { ...@@ -67,8 +68,9 @@ public class TempController {
String content = sb.toString(); String content = sb.toString();
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
for (String mobile : mobileList) { List<String> mobileList = Arrays.asList(mobile);
params.put(mobile, content); for (String mobile1 : mobileList) {
params.put(mobile1, content);
} }
req.setChannelId(clxMessageConfig.getChannelId()); req.setChannelId(clxMessageConfig.getChannelId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论