Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
easy-affair-show
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
easy-affair-show
Commits
9c4547ce
Commit
9c4547ce
authored
Jul 01, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加通过模板id删除客户收藏
parent
54c50177
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
eas-manager/doc/api.md
eas-manager/doc/api.md
+36
-0
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/CustomerWorkCollectService.java
...x/module/customer/service/CustomerWorkCollectService.java
+2
-0
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java
...customer/service/impl/CustomerWorkCollectServiceImpl.java
+8
-0
eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkCollectController.java
...hx/module/customer/web/CustomerWorkCollectController.java
+26
-0
No files found.
eas-manager/doc/api.md
View file @
9c4547ce
...
@@ -4738,6 +4738,42 @@ msg|String|消息|-
...
@@ -4738,6 +4738,42 @@ msg|String|消息|-
```
```
### 通过模板id删除客户收藏信息
**请求URL:**
customer/work/collect/delete/masterplateId
**请求方式:**
GET
**内容类型:**
application/json;charset=utf-8
**简要描述:**
删除客户收藏信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|模板id
**请求样例:**
```
http://localhost:8080/customer/work/collect/delete/masterplateId?id=1
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
### 个人信息
### 个人信息
**请求URL:**
customer/info
**请求URL:**
customer/info
...
...
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/CustomerWorkCollectService.java
View file @
9c4547ce
package
com.mortals.xhx.module.customer.service
;
package
com.mortals.xhx.module.customer.service
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity
;
import
com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity
;
/**
/**
...
@@ -11,4 +12,5 @@ import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
...
@@ -11,4 +12,5 @@ import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
*/
*/
public
interface
CustomerWorkCollectService
extends
ICRUDService
<
CustomerWorkCollectEntity
,
Long
>{
public
interface
CustomerWorkCollectService
extends
ICRUDService
<
CustomerWorkCollectEntity
,
Long
>{
int
removeByMasterplateId
(
Long
masterplateId
,
Context
context
);
}
}
\ No newline at end of file
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java
View file @
9c4547ce
...
@@ -45,4 +45,12 @@ public class CustomerWorkCollectServiceImpl extends AbstractCRUDServiceImpl<Cust
...
@@ -45,4 +45,12 @@ public class CustomerWorkCollectServiceImpl extends AbstractCRUDServiceImpl<Cust
throw
new
AppException
(
"已收藏此模板,请勿重复收藏"
);
throw
new
AppException
(
"已收藏此模板,请勿重复收藏"
);
}
}
}
}
@Override
public
int
removeByMasterplateId
(
Long
masterplateId
,
Context
context
)
{
CustomerWorkCollectEntity
condition
=
new
CustomerWorkCollectEntity
();
condition
.
setMasterplateId
(
masterplateId
);
condition
.
setCustomerId
(
this
.
getContextUserId
(
context
));
return
this
.
dao
.
delete
(
condition
);
}
}
}
\ No newline at end of file
eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkCollectController.java
View file @
9c4547ce
...
@@ -56,4 +56,30 @@ public class CustomerWorkCollectController extends BaseCRUDJsonBodyMappingContro
...
@@ -56,4 +56,30 @@ public class CustomerWorkCollectController extends BaseCRUDJsonBodyMappingContro
query
.
setCustomerId
(
this
.
getCurUser
().
getId
());
query
.
setCustomerId
(
this
.
getCurUser
().
getId
());
}
}
@RequestMapping
(
value
=
{
"delete/masterplateId"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
String
deleteByMasterplateId
(
Long
id
)
{
Context
context
=
this
.
getContext
();
if
(
id
==
null
)
{
return
this
.
createFailJsonResp
(
"请至少选择一条记录"
);
}
else
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
int
code
=
1
;
String
busiDesc
=
"删除"
+
this
.
getModuleDesc
();
try
{
int
iRet
=
this
.
service
.
removeByMasterplateId
(
id
,
context
);
model
.
put
(
"message_info"
,
this
.
getModuleDesc
()
+
"删除成功!删除条数:"
+
iRet
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】 [id:"
+
id
+
"]"
);
}
catch
(
Exception
var7
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var7
);
}
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
"code"
,
Integer
.
valueOf
(
code
));
ret
.
put
(
"msg"
,
model
.
remove
(
"message_info"
));
ret
.
put
(
"data"
,
model
);
return
ret
.
toJSONString
();
}
}
}
}
\ No newline at end of file
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