|
@@ -108,7 +108,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
IWrapper<CustomerVo> wrapper = IWrapper.getWrapper();
|
|
|
|
|
|
// 客户来源查询
|
|
|
- wrapper.eq("c", Customer::getSource, dto.getSource());
|
|
|
+// wrapper.eq("c", Customer::getSource, dto.getSource());
|
|
|
+ wrapper.apply("FIND_IN_SET( {0}, c.source )", dto.getSource());
|
|
|
// 客户类型查询
|
|
|
wrapper.eq("c", Customer::getStatus, dto.getStatus());
|
|
|
// 国家ID查询
|
|
@@ -316,6 +317,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public void delete(Long id) {
|
|
|
//删除客户表的数据
|
|
|
+ this.update(q -> q.eq(Customer::getId, id).set(Customer::getCompanyId, null));
|
|
|
this.removeById(id);
|
|
|
//删除客户-联系人表的数据
|
|
|
customerUserService.remove(Wrappers.<CustomerUser>lambdaQuery().eq(CustomerUser::getCustomerId, id));
|
|
@@ -557,4 +559,17 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
|
|
|
return customerVos;
|
|
|
}
|
|
|
+
|
|
|
+// /**
|
|
|
+// * 小满绑定/解绑
|
|
|
+// */
|
|
|
+// public void xiaomanBinding(CustomerDto dto) {
|
|
|
+// this.update(q -> q
|
|
|
+// .eq(Customer::getId, dto.getId())
|
|
|
+// .set(Customer::getCompanyId, dto.getCompanyId())
|
|
|
+// .set(BasePo::getUpdateTime, new Date())
|
|
|
+// .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
+// );
|
|
|
+// }
|
|
|
+
|
|
|
}
|