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
776ae624
Commit
776ae624
authored
Apr 25, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
33daa5da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
CartServiceImpl.java
...java/com/egolm/shop/api/service/impl/CartServiceImpl.java
+14
-0
No files found.
src/main/java/com/egolm/shop/api/service/impl/CartServiceImpl.java
View file @
776ae624
...
...
@@ -16,6 +16,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.shop.api.service.CartQueryService
;
import
com.egolm.shop.api.service.CartService
;
import
com.jcraft.jsch.Logger
;
@Service
public
class
CartServiceImpl
implements
CartService
{
...
...
@@ -29,6 +30,15 @@ public class CartServiceImpl implements CartService {
System
.
out
.
println
(
Util
.
objTo
(
"190.0999"
,
BigDecimal
.
class
,
null
));
}
public
void
CartToCartTempItem
(
String
shopNO
)
{
try
{
jdbcTemplate
.
executeUpdate
(
"EXEC up_B2BCartToCartTempItem ?"
,
shopNO
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
String
append
(
JSONObject
obj
,
String
terminal
)
{
String
shopNO
=
obj
.
getString
(
"shopNO"
);
String
orgNo
=
obj
.
getString
(
"orgNo"
);
...
...
@@ -80,6 +90,7 @@ public class CartServiceImpl implements CartService {
}
}
this
.
CartToCartTempItem
(
shopNO
);
return
Rjx
.
jsonOk
().
set
(
"count"
,
count
(
orgNo
,
shopNO
)).
toJson
();
}
...
...
@@ -164,6 +175,7 @@ public class CartServiceImpl implements CartService {
String
sql
=
"update tCart set nSaleQty = ? where sOrgNO = ? and sShopNO = ? and nIdx = ?"
;
jdbcTemplate
.
executeUpdate
(
sql
,
saleQty
,
orgNo
,
shopNO
,
idx
);
}
this
.
CartToCartTempItem
(
shopNO
);
return
Rjx
.
jsonOk
().
set
(
"count"
,
count
(
orgNo
,
shopNO
)).
toJson
();
}
...
...
@@ -176,6 +188,7 @@ public class CartServiceImpl implements CartService {
BigDecimal
setPrice
=
obj
.
getBigDecimal
(
"setPrice"
);
String
sql
=
"update tCart set nSetPrice = ? where sOrgNO = ? and sShopNO = ? and nIdx = ?"
;
jdbcTemplate
.
executeUpdate
(
sql
,
setPrice
,
orgNo
,
shopNO
,
idx
);
this
.
CartToCartTempItem
(
shopNO
);
return
Rjx
.
jsonOk
().
toJson
();
}
...
...
@@ -202,6 +215,7 @@ public class CartServiceImpl implements CartService {
@Override
public
void
clear
(
String
orgNo
,
String
shopNo
)
{
jdbcTemplate
.
executeUpdate
(
"delete from tCart where sOrgNO = ? and sShopNO = ?"
,
orgNo
,
shopNo
);
jdbcTemplate
.
executeUpdate
(
"delete from tCartTempItem 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