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
b8265ac0
Commit
b8265ac0
authored
Sep 20, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
da5ac907
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
CommonController.java
...main/java/com/egolm/shop/controller/CommonController.java
+23
-0
UserServiceImpl.java
...ain/java/com/egolm/shop/service/impl/UserServiceImpl.java
+4
-2
No files found.
src/main/java/com/egolm/shop/controller/CommonController.java
View file @
b8265ac0
...
...
@@ -10,7 +10,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.shop.service.CommonService
;
import
io.swagger.annotations.Api
;
...
...
@@ -23,6 +25,9 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
"common"
)
public
class
CommonController
{
@Autowired
private
JdbcTemplate
jdbcTemplate
;
@Autowired
private
CommonService
commonService
;
...
...
@@ -70,4 +75,22 @@ public class CommonController {
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
}
@ApiOperation
(
"获取省市区数据"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"regionNo"
,
dataType
=
"String"
,
required
=
true
),
@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
=
"/getRegionList"
,
method
=
RequestMethod
.
GET
)
public
String
getCityListByProvince
(
String
regionNo
)
{
if
(
StringUtil
.
isBlank
(
regionNo
))
{
regionNo
=
"000000"
;
}
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
queryForList
(
"select * from tRegion where sUpRegionNO = ?"
,
regionNo
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
}
}
src/main/java/com/egolm/shop/service/impl/UserServiceImpl.java
View file @
b8265ac0
...
...
@@ -431,8 +431,10 @@ public class UserServiceImpl implements UserService {
String
customerName
=
(
String
)
parameters
.
get
(
"customerName"
);
String
email
=
(
String
)
parameters
.
get
(
"email"
);
String
memo
=
(
String
)
parameters
.
get
(
"memo"
);
String
sql
=
"update tCustomer c, tShop s set c.sCustomerName = ?, s.sShopName = ?, s.sProvinceID = ?, s.sCityID = ?, s.sDistrictID = ?, s.sAddress = ?, s.sEmail = ?, s.sMemo = ? where c.sCustNO = s.sCustNO and s.nShopID = ?"
;
jdbcTemplate
.
update
(
sql
,
customerName
,
shopName
,
provinceId
,
cityId
,
districtId
,
address
,
email
,
memo
,
shopId
);
jdbcTemplate
.
update
(
"update tCustomer set sCustomerName = ? where sCustNO = ?"
,
customerName
,
custNo
);
jdbcTemplate
.
update
(
"update tShop set sShopName = ?, sProvinceID = ?, sCityID = ?, sDistrictID = ?, sAddress = ?, sEmail = ?, sMemo = ? where nShopID = ?"
,
shopName
,
provinceId
,
cityId
,
districtId
,
address
,
email
,
memo
,
shopId
);
int
count
=
jdbcTemplate
.
queryForInt
(
"select count(*) from tShopCertif where sShopNO = ? and sCertifTypeID = ? and sCertifNO = ?"
,
new
Object
[]
{
shopNo
,
certifTypeID
,
certifNO
});
if
(
count
==
0
)
{
String
sqlInsert
=
"insert into tShopCertif (sShopNO, sCertifTypeID, sCertifType, sCertifNO, dValidDate, dExpiryDate, nTag, sCreateUser, dCreateDate, dLastUpdateTime) values (?, ?, '', ?, getdate(), ?, 0, '', getdate(), getdate())"
;
...
...
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