Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
01737795
Commit
01737795
authored
Oct 07, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
9de84864
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
CartController.java
src/main/java/com/egolm/shop/controller/CartController.java
+17
-0
CartService.java
src/main/java/com/egolm/shop/service/CartService.java
+2
-0
CartServiceImpl.java
...ain/java/com/egolm/shop/service/impl/CartServiceImpl.java
+5
-0
No files found.
src/main/java/com/egolm/shop/controller/CartController.java
View file @
01737795
...
...
@@ -125,4 +125,21 @@ public class CartController {
String
terminal
=
request
.
getParameter
(
"terminal"
);
return
cartService
.
updateQty
(
jsonObj
,
terminal
);
}
@ApiOperation
(
"清空购物车"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/clear"
,
method
=
RequestMethod
.
GET
)
public
String
clear
(
String
orgNo
,
String
shopNo
)
{
cartService
.
clear
(
orgNo
,
shopNo
);
return
Rjx
.
jsonOk
().
toJson
();
}
}
src/main/java/com/egolm/shop/service/CartService.java
View file @
01737795
...
...
@@ -15,4 +15,6 @@ public interface CartService {
public
String
query
(
Map
<
String
,
Object
>
params
);
public
Integer
count
(
String
orgNo
,
String
shopNO
);
public
void
clear
(
String
orgNo
,
String
shopNo
);
}
src/main/java/com/egolm/shop/service/impl/CartServiceImpl.java
View file @
01737795
...
...
@@ -184,4 +184,9 @@ public class CartServiceImpl implements CartService {
return
Rjx
.
jsonOk
().
setData
(
queryMap
).
toJson
();
}
@Override
public
void
clear
(
String
orgNo
,
String
shopNo
)
{
jdbcTemplate
.
executeUpdate
(
"delete from tCart where sOrgNO = ? and sShopNO = ?"
,
orgNo
,
shopNo
);
}
}
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