Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
0d84b0df
Commit
0d84b0df
authored
Jun 12, 2020
by
dengshichuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dsc' into 'develop'
删除优化 See merge request 8timerv2/8timerapiv200!171
parents
ab828eb7
20a07dd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
src/main/java/cn/timer/api/controller/crm/CrmController.java
+15
-6
No files found.
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
0d84b0df
...
...
@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -47,6 +48,7 @@ import cn.timer.api.bean.crm.CrmSeaRule;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.crm.CrmClientContactsMapper
;
import
cn.timer.api.dao.crm.CrmClientDataMapper
;
import
cn.timer.api.utils.CheckUtil
;
import
cn.timer.api.utils.Result
;
...
...
@@ -71,6 +73,9 @@ public class CrmController {
@Autowired
private
CrmClientDataMapper
crmClientDataMapper
;
@Autowired
private
CrmClientContactsMapper
crmClientContactsMapper
;
private
Integer
getEmpNum
(
UserBean
userBean
)
{
return
userBean
.
getEmpNum
();
...
...
@@ -581,15 +586,15 @@ public class CrmController {
@DeleteMapping
(
"delCilentLinkMan"
)
@Transactional
@ApiOperation
(
value
=
"删除客户联系人"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
public
Result
<
Void
>
delCilentLinkMan
(
@CurrentUser
UserBean
userBean
,
CrmClientContacts
crmClientContacts
)
{
Integer
cid
=
crmClientContacts
.
getCid
();
public
Result
<
Void
>
delCilentLinkMan
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
id
,
@RequestParam
Integer
cid
)
{
if
(
cid
==
null
)
return
ResultUtil
.
error
(
"
编辑
失败,请传入客户id"
);
return
ResultUtil
.
error
(
"
删除
失败,请传入客户id"
);
Integer
num
=
CrmClientData
.
builder
().
id
(
cid
).
build
().
selectById
().
getContactsNum
();
CrmClientData
.
builder
().
id
(
c
rmClientContacts
.
getCid
()
).
contactsNum
(--
num
).
build
().
updateById
();
if
(
crmClientContacts
.
deleteById
()
)
CrmClientData
.
builder
().
id
(
c
id
).
contactsNum
(--
num
).
build
().
updateById
();
if
(
crmClientContacts
Mapper
.
deleteById
(
id
)
>
0
)
return
ResultUtil
.
success
(
"删除成功"
);
return
ResultUtil
.
success
(
"删除失败"
);
return
ResultUtil
.
error
(
"删除失败"
);
}
...
...
@@ -999,5 +1004,9 @@ public class CrmController {
}
// TODO 导入客户
@PostMapping
(
"importexcel"
)
public
Object
importWatchExcel
(
@RequestParam
(
"excelFile"
)
MultipartFile
xlsFile
)
{
return
xlsFile
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment