Commit 7960f1f0 authored by MyName's avatar MyName
parents 7645e206 fa6c022a
......@@ -7,7 +7,6 @@ import com.dsk.common.annotation.Log;
import com.dsk.common.annotation.RepeatSubmit;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.SysRole;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.enums.BusinessType;
import com.dsk.common.utils.poi.ExcelUtil;
......@@ -18,13 +17,11 @@ import com.dsk.system.service.ICustomerService;
import com.dsk.web.controller.search.service.BusinessOpportunityRadarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......
......@@ -47,5 +47,14 @@ public class CustomerFollowRecordController extends BaseController {
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));
}
}
......@@ -7,7 +7,7 @@
<i slot="prefix" class="el-input__icon el-icon-search" @click="handleSearch"></i>
</el-input>
<el-menu
default-active="1"
:default-active="routeIndex"
class="detail-menu"
@open="handleOpen">
<template v-for="(item, index) in sideRoute">
......@@ -31,6 +31,10 @@ export default {
type: Number,
default: null
},
pathName: {
type: String,
default: null
},
},
data() {
return {
......@@ -93,6 +97,23 @@ export default {
sideHeight = null
}
return sideHeight
},
routeIndex(){
let idx = '0-0', sideArr = this.sideRoute
for(let i=0; i < sideArr.length; i++){
if(sideArr[i].pathName == this.pathName){
idx = i.toString()
break
}else if(sideArr[i].children){
for(let j=0; j< sideArr[i].children.length ; j++){
if(sideArr[i].children.pathName == this.pathName){
idx = i+'-'+j
break
}
}
}
}
return idx
}
},
created() {
......
......@@ -3,7 +3,7 @@
<Header :company-id="companyId" v-if="companyId" />
<div class="flex-box part-main">
<div class="part-left">
<side-bar @currentPath="showPartPage" :partBoxHeight="partBoxHeight" />
<side-bar @currentPath="showPartPage" :pathName="currentPath.pathName" :partBoxHeight="partBoxHeight" />
</div>
<div class="part-right">
<div id="partBox" v-if="companyId">
......
......@@ -18,7 +18,7 @@ import java.util.List;
@Mapper
public interface CustomerFollowRecordMapper extends BaseMapper<CustomerFollowRecord> {
List<CustomerFollowRecord> selectList(@Param("dto") CustomerFollowRecordSearchDto dto);
List<CustomerFollowRecord> selectAuthList(@Param("dto") CustomerFollowRecordSearchDto dto);
}
......@@ -18,4 +18,6 @@ public interface ICustomerFollowRecordService {
boolean add(CustomerFollowRecord followRecord);
boolean del(Long id);
}
......@@ -35,13 +35,14 @@ public class CustomerFollowRecordServiceImpl implements ICustomerFollowRecordSer
LambdaQueryWrapper<CustomerFollowRecord> wrapper = Wrappers.lambdaQuery();
if (!ObjectUtils.isEmpty(dto.getCustomerId())) {
wrapper.eq(CustomerFollowRecord::getCustomerId, dto.getCustomerId());
} else {
wrapper.eq(CustomerFollowRecord::getUserId, SecurityUtils.getUserId());
}
wrapper.eq(CustomerFollowRecord::getUserId, SecurityUtils.getUserId())
.orderByDesc(CustomerFollowRecord::getCreateTime);
wrapper.orderByDesc(CustomerFollowRecord::getCreateTime);
return baseMapper.selectList(wrapper);
// dto.setUserId(SecurityUtils.getUserId());
// return baseMapper.selectList(dto);
// return baseMapper.selectAuthList(dto);
}
@Override
......@@ -51,4 +52,9 @@ public class CustomerFollowRecordServiceImpl implements ICustomerFollowRecordSer
followRecord.setUserId(SecurityUtils.getUserId());
return baseMapper.insert(followRecord) != 0;
}
@Override
public boolean del(Long id) {
return baseMapper.deleteById(id) != 0;
}
}
......@@ -7,7 +7,7 @@
cfr.content, cfr.create_time
</sql>
<select id="selectList" resultType="com.dsk.system.domain.customer.CustomerFollowRecord">
<select id="selectAuthList" resultType="com.dsk.system.domain.customer.CustomerFollowRecord">
select
<include refid="Base_Bean"></include>
from customer_follow_record cfr
......
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