Commit fa6c022a authored by lcl's avatar lcl

接口补充-客户跟进记录删除

parent 6024ebac
...@@ -47,5 +47,14 @@ public class CustomerFollowRecordController extends BaseController { ...@@ -47,5 +47,14 @@ public class CustomerFollowRecordController extends BaseController {
return AjaxResult.success(baseService.add(followRecord)); return AjaxResult.success(baseService.add(followRecord));
} }
/**
* 删除客户跟进记录
*/
// @PreAuthorize("@ss.hasPermi('customer:follow:record:del')")
@DeleteMapping("/{id}")
@RepeatSubmit
public AjaxResult del(@PathVariable("id") Long id){
return AjaxResult.success(baseService.del(id));
}
} }
...@@ -18,4 +18,6 @@ public interface ICustomerFollowRecordService { ...@@ -18,4 +18,6 @@ public interface ICustomerFollowRecordService {
boolean add(CustomerFollowRecord followRecord); boolean add(CustomerFollowRecord followRecord);
boolean del(Long id);
} }
...@@ -31,13 +31,14 @@ public class CustomerFollowRecordServiceImpl implements ICustomerFollowRecordSer ...@@ -31,13 +31,14 @@ public class CustomerFollowRecordServiceImpl implements ICustomerFollowRecordSer
@Override @Override
// @DataScope(deptAlias = "d",userAlias = "u") // @DataScope(deptAlias = "d",userAlias = "u")
public List<CustomerFollowRecord> selectList(CustomerFollowRecordSearchDto dto){ public List<CustomerFollowRecord> selectList(CustomerFollowRecordSearchDto dto) {
LambdaQueryWrapper<CustomerFollowRecord> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<CustomerFollowRecord> wrapper = Wrappers.lambdaQuery();
if (!ObjectUtils.isEmpty(dto.getCustomerId())) { if (!ObjectUtils.isEmpty(dto.getCustomerId())) {
wrapper.eq(CustomerFollowRecord::getCustomerId, dto.getCustomerId()); wrapper.eq(CustomerFollowRecord::getCustomerId, dto.getCustomerId());
} else {
wrapper.eq(CustomerFollowRecord::getUserId, SecurityUtils.getUserId());
} }
wrapper.eq(CustomerFollowRecord::getUserId, SecurityUtils.getUserId()) wrapper.orderByDesc(CustomerFollowRecord::getCreateTime);
.orderByDesc(CustomerFollowRecord::getCreateTime);
return baseMapper.selectList(wrapper); return baseMapper.selectList(wrapper);
// dto.setUserId(SecurityUtils.getUserId()); // dto.setUserId(SecurityUtils.getUserId());
...@@ -51,4 +52,9 @@ public class CustomerFollowRecordServiceImpl implements ICustomerFollowRecordSer ...@@ -51,4 +52,9 @@ public class CustomerFollowRecordServiceImpl implements ICustomerFollowRecordSer
followRecord.setUserId(SecurityUtils.getUserId()); followRecord.setUserId(SecurityUtils.getUserId());
return baseMapper.insert(followRecord) != 0; return baseMapper.insert(followRecord) != 0;
} }
@Override
public boolean del(Long id) {
return baseMapper.deleteById(id) != 0;
}
} }
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