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
7b5ac07c
Commit
7b5ac07c
authored
Nov 11, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
3c8965d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
CartController.java
src/main/java/com/egolm/shop/controller/CartController.java
+1
-1
CartServiceImpl.java
...ain/java/com/egolm/shop/service/impl/CartServiceImpl.java
+2
-3
No files found.
src/main/java/com/egolm/shop/controller/CartController.java
View file @
7b5ac07c
...
@@ -111,7 +111,7 @@ public class CartController {
...
@@ -111,7 +111,7 @@ public class CartController {
@ApiOperation
(
"修改数量(JSON格式)"
)
@ApiOperation
(
"修改数量(JSON格式)"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"data"
,
dataType
=
"String"
,
required
=
false
,
value
=
"JSON格式"
,
defaultValue
=
"{\"shopNO\": \"00029975\", \"idx\": 2,\"saleQty\": \"23\"
, \"setPrice\": \"10.5\"
}"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"data"
,
dataType
=
"String"
,
required
=
false
,
value
=
"JSON格式"
,
defaultValue
=
"{\"shopNO\": \"00029975\", \"idx\": 2,\"saleQty\": \"23\"}"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
...
...
src/main/java/com/egolm/shop/service/impl/CartServiceImpl.java
View file @
7b5ac07c
...
@@ -147,7 +147,6 @@ public class CartServiceImpl implements CartService {
...
@@ -147,7 +147,6 @@ public class CartServiceImpl implements CartService {
String
shopNO
=
obj
.
getString
(
"shopNO"
);
String
shopNO
=
obj
.
getString
(
"shopNO"
);
Integer
idx
=
obj
.
getInteger
(
"idx"
);
Integer
idx
=
obj
.
getInteger
(
"idx"
);
BigDecimal
saleQty
=
obj
.
getBigDecimal
(
"saleQty"
);
BigDecimal
saleQty
=
obj
.
getBigDecimal
(
"saleQty"
);
BigDecimal
setPrice
=
obj
.
getBigDecimal
(
"setPrice"
);
String
langID
=
obj
.
getString
(
"langID"
);
String
langID
=
obj
.
getString
(
"langID"
);
if
(
saleQty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
if
(
saleQty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
JSONObject
removeObj
=
new
JSONObject
();
JSONObject
removeObj
=
new
JSONObject
();
...
@@ -160,8 +159,8 @@ public class CartServiceImpl implements CartService {
...
@@ -160,8 +159,8 @@ public class CartServiceImpl implements CartService {
System
.
out
.
println
(
removeObj
);
System
.
out
.
println
(
removeObj
);
this
.
remove
(
removeObj
,
terminal
);
this
.
remove
(
removeObj
,
terminal
);
}
else
{
}
else
{
String
sql
=
"update tCart set nSaleQty = ?
, nSetPrice = ?
where sOrgNO = ? and sShopNO = ? and nIdx = ?"
;
String
sql
=
"update tCart set nSaleQty = ? where sOrgNO = ? and sShopNO = ? and nIdx = ?"
;
jdbcTemplate
.
executeUpdate
(
sql
,
saleQty
,
setPrice
,
orgNo
,
shopNO
,
idx
);
jdbcTemplate
.
executeUpdate
(
sql
,
saleQty
,
orgNo
,
shopNO
,
idx
);
}
}
return
Rjx
.
jsonOk
().
set
(
"count"
,
count
(
orgNo
,
shopNO
)).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"count"
,
count
(
orgNo
,
shopNO
)).
toJson
();
}
}
...
...
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