Commit 3c350e60 authored by 赵啸非's avatar 赵啸非

设备添加产品编码字段,并添加同步更新产品编码字段

parent 85fdee36
...@@ -83,13 +83,49 @@ public class TestSendMsgController { ...@@ -83,13 +83,49 @@ public class TestSendMsgController {
}).filter(f -> f != null).collect(Collectors.toList()); }).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(updateProductCodeList)) { if (!ObjectUtils.isEmpty(updateProductCodeList)) {
log.info("更新设备产品列表,size:{}", updateProductCodeList.size()); log.info("更新设备产品列表,size:{},str:{}", updateProductCodeList.size(), JSON.toJSONString(updateProductCodeList));
deviceService.getDeviceDao().updateBatch(updateProductCodeList); deviceService.getDeviceDao().updateBatch(updateProductCodeList);
} }
return JSON.toJSONString(rsp); return JSON.toJSONString(rsp);
} }
@GetMapping("reDevicePerson")
public String reDevicePerson() {
log.info("刷新人员");
ApiResp<DeviceResp> rsp = new ApiResp<>();
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
List<DeviceEntity> updateList = deviceService.find(new DeviceQuery()).stream().map(device -> {
Boolean bool = false;
if ("周扬".equals(device.getLeadingOfficial())) {
device.setLeadingOfficial("文浩辰");
bool = true;
}
if ("13265985698".equals(device.getLeadingOfficialTelephone())) {
device.setLeadingOfficialTelephone("15775958217");
bool = true;
}
if ("15108243162".equals(device.getLeadingOfficialTelephone())) {
device.setLeadingOfficialTelephone("15775958217");
bool = true;
}
if (bool) {
return device;
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(updateList)) {
log.info("更新设备产品列表,size:{},str:{}", updateList.size(), JSON.toJSONString(updateList));
deviceService.update(updateList, null);
}
return JSON.toJSONString(rsp);
}
public static void main(String[] args) { public static void main(String[] args) {
String resp = HttpUtil.get("http://59.225.206.13:8331/oauth-pro/admin-pro/sys/randomImage/1675827431800?_t=1675827431"); String resp = HttpUtil.get("http://59.225.206.13:8331/oauth-pro/admin-pro/sys/randomImage/1675827431800?_t=1675827431");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment