Compare commits
2 Commits
67375892b6
...
599110d1a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
599110d1a1 | ||
|
|
186ec80530 |
@@ -138,5 +138,6 @@ hikari:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -601,18 +601,11 @@ public class AudioManagementController {
|
|||||||
|
|
||||||
// 根据 customerId,把客户 customer_management 表的 recording_count 录音数加 1
|
// 根据 customerId,把客户 customer_management 表的 recording_count 录音数加 1
|
||||||
try {
|
try {
|
||||||
Integer recordingCount = customer.getRecordingCount();
|
|
||||||
if (recordingCount == null) {
|
|
||||||
recordingCount = 1;
|
|
||||||
} else {
|
|
||||||
recordingCount = recordingCount + 1;
|
|
||||||
}
|
|
||||||
CustomerManagement customerForUpdate = new CustomerManagement();
|
CustomerManagement customerForUpdate = new CustomerManagement();
|
||||||
customerForUpdate.setId(customer.getId());
|
customerForUpdate.setId(customer.getId());
|
||||||
customerForUpdate.setRecordingCount(recordingCount);
|
|
||||||
customerForUpdate.setUpdateTime(LocalDateTime.now());
|
customerForUpdate.setUpdateTime(LocalDateTime.now());
|
||||||
customerManagementService.updateById(customerForUpdate);
|
customerManagementService.updateById(customerForUpdate);
|
||||||
log.info("更新客户录音数成功,客户ID: {}, 录音数: {}", customerId, recordingCount);
|
log.info("更新客户录音数成功,客户ID: {} ", customerId );
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 客户录音数更新失败不影响录音服务结束的结果,只记录日志
|
// 客户录音数更新失败不影响录音服务结束的结果,只记录日志
|
||||||
log.error("更新客户录音数时发生异常: {}", e.getMessage(), e);
|
log.error("更新客户录音数时发生异常: {}", e.getMessage(), e);
|
||||||
|
|||||||
@@ -64,11 +64,13 @@ public class CustomerManagementController {
|
|||||||
result.put("message", "客户不存在,无法更新");
|
result.put("message", "客户不存在,无法更新");
|
||||||
return ResponseEntity.badRequest().body(result);
|
return ResponseEntity.badRequest().body(result);
|
||||||
}
|
}
|
||||||
customerManagement.setCreateTime(existing.getCreateTime());
|
// customerManagement.setCreateTime(existing.getCreateTime());
|
||||||
customerManagement.setUpdateTime(now);
|
customerManagement.setUpdateTime(now);
|
||||||
|
customerManagement.setRecordingCount(customerManagement.getRecordingCount()+1);
|
||||||
} else {
|
} else {
|
||||||
customerManagement.setCreateTime(now);
|
customerManagement.setCreateTime(now);
|
||||||
customerManagement.setUpdateTime(now);
|
customerManagement.setUpdateTime(now);
|
||||||
|
customerManagement.setRecordingCount(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean success = customerManagementService.saveOrUpdate(customerManagement);
|
boolean success = customerManagementService.saveOrUpdate(customerManagement);
|
||||||
@@ -363,7 +365,7 @@ public class CustomerManagementController {
|
|||||||
AudioManagement audio = new AudioManagement();
|
AudioManagement audio = new AudioManagement();
|
||||||
audio.setId(UUID.randomUUID().toString());
|
audio.setId(UUID.randomUUID().toString());
|
||||||
String recordingName = customer.getCustomerName() != null && !customer.getCustomerName().trim().isEmpty()
|
String recordingName = customer.getCustomerName() != null && !customer.getCustomerName().trim().isEmpty()
|
||||||
? customer.getCustomerName() + "接待记录"
|
? customer.getCustomerName() + "的接待记录"
|
||||||
: "客户接待记录";
|
: "客户接待记录";
|
||||||
audio.setRecordingName(recordingName);
|
audio.setRecordingName(recordingName);
|
||||||
audio.setRecordingTime(now);
|
audio.setRecordingTime(now);
|
||||||
@@ -382,6 +384,7 @@ public class CustomerManagementController {
|
|||||||
audio.setRemarks(customer.getDetailedAddress());
|
audio.setRemarks(customer.getDetailedAddress());
|
||||||
audio.setInfoCarddescription(customer.getInfoCard());
|
audio.setInfoCarddescription(customer.getInfoCard());
|
||||||
audio.setCompanyType(customer.getCustomerSource());
|
audio.setCompanyType(customer.getCustomerSource());
|
||||||
|
audio.setScenario(customer.getScenario());
|
||||||
audio.setServiceStatus(AudioManagementConstants.SERVICE_STATUS_IN_SERVICE);
|
audio.setServiceStatus(AudioManagementConstants.SERVICE_STATUS_IN_SERVICE);
|
||||||
return audio;
|
return audio;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,5 +101,6 @@ public class CustomerManagement implements Serializable {
|
|||||||
@TableField("customer_source")
|
@TableField("customer_source")
|
||||||
private String customerSource;
|
private String customerSource;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String scenario;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user