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
897f7daa
Commit
897f7daa
authored
Oct 10, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
218ad12b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
AddressController.java
...ain/java/com/egolm/shop/controller/AddressController.java
+4
-4
AddressServiceImpl.java
.../java/com/egolm/shop/service/impl/AddressServiceImpl.java
+19
-1
No files found.
src/main/java/com/egolm/shop/controller/AddressController.java
View file @
897f7daa
...
...
@@ -195,16 +195,16 @@ public class AddressController {
@ApiOperation
(
"获取默认地址"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopN
O
"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"
userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopN
o
"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"
custNo"
,
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
=
"/getDefaultAddress"
,
method
=
RequestMethod
.
GET
)
public
String
getDefaultAddress
(
String
userNO
,
String
shopNO
)
{
Map
<
String
,
Object
>
map
=
addressService
.
getDefaultAddress
(
userNO
,
shopNO
);
public
String
getDefaultAddress
(
String
custNo
,
String
shopNo
)
{
Map
<
String
,
Object
>
map
=
addressService
.
getDefaultAddress
(
custNo
,
shopNo
);
return
Rjx
.
jsonOk
().
setData
(
map
).
toJson
();
}
...
...
src/main/java/com/egolm/shop/service/impl/AddressServiceImpl.java
View file @
897f7daa
...
...
@@ -233,7 +233,25 @@ public class AddressServiceImpl implements AddressService {
@Override
public
Map
<
String
,
Object
>
getDefaultAddress
(
String
custNo
,
String
shopNo
)
{
String
sql
=
"select * from tCustAddress where nTag&1 = 0 and sCustNO = ? and (sShopNO = ? or sShopNO is null or sShopNO = '') order by nTag desc"
;
String
sql
=
""
+
"select "
+
"addrID=t.sAddrID, "
+
"addrName=t.sAddrName, "
+
"contacts=t.sContacts, "
+
"mobile=t.sMobile, "
+
"tel=t.sTel, "
+
"province=t.sProvince, "
+
"city=t.sCity, "
+
"districtID=t.sDistrictID, "
+
"provinceID=t.sProvinceID, "
+
"cityID=t.sCityID, "
+
"district=t.sDistrict, "
+
"address=t.sAddress, "
+
"street=t.sStreet, "
+
"postalcode=t.sPostalcode, "
+
"tag=t.nTag, "
+
"lastUpdateTime = t.dLastUpdateTime "
+
" from tCustAddress where nTag&1 = 0 and sCustNO = ? and (sShopNO = ? or sShopNO is null or sShopNO = '') order by nTag desc"
;
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
queryForList
(
sql
,
custNo
,
shopNo
);
Map
<
String
,
Object
>
defMap
=
null
;
Integer
nTag_Cur
=
0
;
...
...
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