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
fdd89976
Commit
fdd89976
authored
Sep 17, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
3246c22c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
32 deletions
+4
-32
UserController.java
src/main/java/com/egolm/shop/controller/UserController.java
+4
-16
UserService.java
src/main/java/com/egolm/shop/service/UserService.java
+0
-2
UserServiceImpl.java
...ain/java/com/egolm/shop/service/impl/UserServiceImpl.java
+0
-14
No files found.
src/main/java/com/egolm/shop/controller/UserController.java
View file @
fdd89976
...
...
@@ -291,21 +291,9 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/queryUserInfoByOpenId"
,
method
=
RequestMethod
.
GET
)
public
String
queryUserInfoByOpenId
(
String
openId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
TCustomer
tCustomer
=
userService
.
getCustomerByOpenId
(
openId
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<
String
,
Object
>();
if
(
tCustomer
!=
null
)
{
resultMap
.
put
(
"custNO"
,
tCustomer
.
getsCustNO
());
resultMap
.
put
(
"custName"
,
tCustomer
.
getsCustName
());
resultMap
.
put
(
"custLevelTypeId"
,
tCustomer
.
getsCustLeveTypeID
());
resultMap
.
put
(
"custLevelType"
,
tCustomer
.
getsCustLeveType
()+
""
);
resultMap
.
put
(
"point"
,
tCustomer
.
getnPoint
()+
""
);
resultMap
.
put
(
"mobile"
,
tCustomer
.
getsMobile
()+
""
);
resultMap
.
put
(
"custTypeID"
,
tCustomer
.
getsCustTypeID
()+
""
);
resultMap
.
put
(
"openID"
,
tCustomer
.
getsOpenID
());
resultMap
.
put
(
"shopList"
,
tCustomer
.
gettShops
());
}
return
Rjx
.
jsonOk
().
setData
(
resultMap
).
toJson
();
public
String
queryUserInfoByOpenId
(
String
openId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
customerMap
=
userService
.
queryCustomerByOpenId
(
openId
);
List
<
Map
<
String
,
Object
>>
shopList
=
userService
.
queryShopList
((
String
)
customerMap
.
get
(
"sCustNO"
));
return
Rjx
.
jsonOk
().
set
(
"customer"
,
customerMap
).
set
(
"shopList"
,
shopList
).
setMessage
(
I18NUtils
.
getMessage
(
langID
,
"Msg_Login_success"
)).
toJson
();
}
}
src/main/java/com/egolm/shop/service/UserService.java
View file @
fdd89976
...
...
@@ -35,8 +35,6 @@ public interface UserService {
public
Map
<
String
,
Object
>
createShop
(
String
orgNo
,
Map
<
String
,
Object
>
customerMap
);
public
TCustomer
getCustomerByOpenId
(
String
openId
);
public
void
deleteOpenId
(
String
openId
);
}
src/main/java/com/egolm/shop/service/impl/UserServiceImpl.java
View file @
fdd89976
...
...
@@ -547,20 +547,6 @@ public class UserServiceImpl implements UserService {
return
map
;
}
public
TCustomer
getCustomerByOpenId
(
String
openId
)
{
try
{
String
sql
=
"SELECT * FROM tCustomer WHERE sOpenID = ? AND nTag&1=0"
;
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
TCustomer
tcustomer
=
jdbcTemplate
.
queryForBean
(
sql
,
TCustomer
.
class
,
openId
);
String
shopSql
=
"SELECT * FROM tShop WHERE nTag&1=0 and sCustNO =? "
;
List
<
TShop
>
shops
=
jdbcTemplate
.
queryForBeans
(
shopSql
,
TShop
.
class
,
tcustomer
.
getsCustNO
());
tcustomer
.
settShops
(
shops
);
return
tcustomer
;
}
catch
(
Exception
e
)
{
return
null
;
}
}
@Override
public
void
deleteOpenId
(
String
openId
)
{
jdbcTemplate
.
update
(
"update tCustomer set sOpenID = ? where sOpenID = ?"
,
null
,
openId
);
...
...
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