|
@@ -39,37 +39,6 @@ public class CustomerLeadsController extends BaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ICustomerLeadsService customerLeadsService;
|
|
private ICustomerLeadsService customerLeadsService;
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 保存客户线索数据
|
|
|
|
|
- * 根据手机号先查询we_user表,如果不存在则查询local_app_user表
|
|
|
|
|
- * 将查询结果保存到customer_leads表
|
|
|
|
|
- *
|
|
|
|
|
- * @param params 包含phone参数的请求体
|
|
|
|
|
- * @return AjaxResult 保存结果
|
|
|
|
|
- */
|
|
|
|
|
- @ApiOperation(value = "保存客户线索", notes = "根据手机号保存客户线索数据")
|
|
|
|
|
- @Log(title = "保存客户线索", businessType = BusinessType.INSERT)
|
|
|
|
|
- @PostMapping("/save")
|
|
|
|
|
- public AjaxResult saveCustomerLeads(@RequestBody Map<String, String> params) {
|
|
|
|
|
- try {
|
|
|
|
|
- String phone = params.get("phone");
|
|
|
|
|
- if (phone == null || phone.trim().isEmpty()) {
|
|
|
|
|
- return AjaxResult.error("手机号码不能为空");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- boolean result = customerLeadsService.saveCustomerLeads(phone.trim());
|
|
|
|
|
- if (result) {
|
|
|
|
|
- return AjaxResult.success("客户线索保存成功");
|
|
|
|
|
- } else {
|
|
|
|
|
- return AjaxResult.error("客户线索保存失败");
|
|
|
|
|
- }
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- log.error("保存客户线索异常: {}", e.getMessage(), e);
|
|
|
|
|
- return AjaxResult.error("保存客户线索异常:" + e.getMessage());
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询客户线索列表
|
|
* 查询客户线索列表
|
|
|
*
|
|
*
|