Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
143021be
Commit
143021be
authored
Dec 16, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付信息
parent
5c52f91b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
0 deletions
+50
-0
ShoppingCartInfoBiz.java
...m/upyuns/platform/rs/website/biz/ShoppingCartInfoBiz.java
+40
-0
ShoppingCartInfoWebController.java
...website/controller/web/ShoppingCartInfoWebController.java
+10
-0
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ShoppingCartInfoBiz.java
View file @
143021be
...
...
@@ -245,4 +245,44 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper,Shopping
orderInfoBiz
.
updateSelectiveByIdRe
(
orderInfo
);
}
/**
* 删除购物车
* @param id
* @return
*/
public
ObjectRestResponse
deleteOne
(
Integer
id
)
{
if
(
id
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
ShoppingCartInfo
shoppingCartInfo
=
selectById
(
id
);
if
(
shoppingCartInfo
==
null
||
shoppingCartInfo
.
getIsDel
()
==
1
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
NOTEXIST_CODE
));
}
shoppingCartInfo
.
setIsDel
(
1
);
updateSelectiveByIdRe
(
shoppingCartInfo
);
return
ObjectRestResponse
.
succ
();
}
/**
* 批量删除
* @param ids
* @return
*/
public
ObjectRestResponse
deleteBatch
(
String
ids
)
{
if
(
StringUtils
.
isBlank
(
ids
))
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
String
[]
idArr
=
ids
.
split
(
","
);
if
(
idArr
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
for
(
String
id
:
idArr
)
{
if
(
StringUtils
.
isNotBlank
(
id
))
{
deleteOne
(
Integer
.
parseInt
(
id
));
}
}
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/ShoppingCartInfoWebController.java
View file @
143021be
...
...
@@ -27,4 +27,14 @@ public class ShoppingCartInfoWebController extends BaseController<ShoppingCartIn
return
baseBiz
.
convertShopCartToOrderInfo
(
cartOrderDto
);
}
@DeleteMapping
(
value
=
"deleteOne"
)
public
ObjectRestResponse
deleteOne
(
Integer
id
)
{
return
baseBiz
.
deleteOne
(
id
);
}
@DeleteMapping
(
value
=
"deleteBatch"
)
public
ObjectRestResponse
deleteBatch
(
String
ids
)
{
return
baseBiz
.
deleteBatch
(
ids
);
}
}
\ 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