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
3c3834bb
Commit
3c3834bb
authored
Oct 15, 2018
by
zhangyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0649971d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
21 deletions
+54
-21
UserController.java
src/main/java/com/egolm/shop/controller/UserController.java
+1
-1
TCustomer.java
src/main/java/com/egolm/shop/pojo/TCustomer.java
+45
-12
GoodsServiceImpl.java
...in/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
+4
-4
GoodsSql.java
src/main/java/com/egolm/shop/service/impl/GoodsSql.java
+1
-1
SystemCtrlServiceImpl.java
...va/com/egolm/shop/service/impl/SystemCtrlServiceImpl.java
+1
-1
UserServiceImpl.java
...ain/java/com/egolm/shop/service/impl/UserServiceImpl.java
+2
-2
No files found.
src/main/java/com/egolm/shop/controller/UserController.java
View file @
3c3834bb
...
...
@@ -101,7 +101,7 @@ public class UserController {
resultMap
.
put
(
"mobile"
,
tCustomer
.
getsMobile
()+
""
);
resultMap
.
put
(
"custTypeID"
,
tCustomer
.
getsCustTypeID
()+
""
);
resultMap
.
put
(
"openID"
,
tCustomer
.
getsOpenID
());
resultMap
.
put
(
"shopList"
,
tCustomer
.
get
Ts
hops
());
resultMap
.
put
(
"shopList"
,
tCustomer
.
get
tS
hops
());
}
return
Rjx
.
jsonOk
().
setData
(
resultMap
).
toJson
();
...
...
src/main/java/com/egolm/shop/pojo/TCustomer.java
View file @
3c3834bb
...
...
@@ -9,7 +9,7 @@ import javax.persistence.Id;
/**
* @author 曲欣亮
* @since 2018-10-
09
* @since 2018-10-
15
* @version v-1.0
*/
@Entity
(
name
=
"tCustomer"
)
...
...
@@ -25,12 +25,16 @@ public class TCustomer implements java.io.Serializable {
private
String
sPassword
;
private
String
sBindOpenID
;
private
String
sOpenID
;
private
String
sMobile
;
private
String
sCustTypeID
;
private
String
sMiniOpenID
;
private
String
sTel
;
@Id
...
...
@@ -62,12 +66,13 @@ public class TCustomer implements java.io.Serializable {
private
BigDecimal
nPoint
;
private
String
sWxUuid
;
private
String
sCreateUser
;
private
String
sFax
;
private
List
<
TShop
>
tshops
;
private
List
<
TShop
>
tShops
;
/**
* 无参数构造方法
...
...
@@ -82,9 +87,11 @@ public class TCustomer implements java.io.Serializable {
* @param sEmail
* @param dCreateDate
* @param sPassword
* @param sBindOpenID
* @param sOpenID
* @param sMobile
* @param sCustTypeID
* @param sMiniOpenID
* @param sTel
* @param sCustNO
* @param sHeadImgUrl
...
...
@@ -100,17 +107,20 @@ public class TCustomer implements java.io.Serializable {
* @param dConfirmDate
* @param sSalesmanNO2
* @param nPoint
* @param sWxUuid
* @param sCreateUser
* @param sFax
*/
public
TCustomer
(
String
token
,
String
sEmail
,
Date
dCreateDate
,
String
sPassword
,
String
s
OpenID
,
String
sMobile
,
String
sCustTypeID
,
String
sTel
,
String
sCustNO
,
String
sHeadImgUrl
,
Date
dLastUpdateTime
,
String
sSalesmanNO1
,
String
sCustLeveTypeID
,
Integer
nStep
,
Integer
nTag
,
String
sCustLeveType
,
String
sCustType
,
String
sConfirmUser
,
String
sCustName
,
Date
dConfirmDate
,
String
sSalesmanNO2
,
BigDecimal
nPoint
,
String
sCreateUser
,
String
sFax
)
{
public
TCustomer
(
String
token
,
String
sEmail
,
Date
dCreateDate
,
String
sPassword
,
String
s
BindOpenID
,
String
sOpenID
,
String
sMobile
,
String
sCustTypeID
,
String
sMiniOpenID
,
String
sTel
,
String
sCustNO
,
String
sHeadImgUrl
,
Date
dLastUpdateTime
,
String
sSalesmanNO1
,
String
sCustLeveTypeID
,
Integer
nStep
,
Integer
nTag
,
String
sCustLeveType
,
String
sCustType
,
String
sConfirmUser
,
String
sCustName
,
Date
dConfirmDate
,
String
sSalesmanNO2
,
BigDecimal
nPoint
,
String
sWxUuid
,
String
sCreateUser
,
String
sFax
)
{
this
.
token
=
token
;
this
.
sEmail
=
sEmail
;
this
.
dCreateDate
=
dCreateDate
;
this
.
sPassword
=
sPassword
;
this
.
sBindOpenID
=
sBindOpenID
;
this
.
sOpenID
=
sOpenID
;
this
.
sMobile
=
sMobile
;
this
.
sCustTypeID
=
sCustTypeID
;
this
.
sMiniOpenID
=
sMiniOpenID
;
this
.
sTel
=
sTel
;
this
.
sCustNO
=
sCustNO
;
this
.
sHeadImgUrl
=
sHeadImgUrl
;
...
...
@@ -126,20 +136,19 @@ public class TCustomer implements java.io.Serializable {
this
.
dConfirmDate
=
dConfirmDate
;
this
.
sSalesmanNO2
=
sSalesmanNO2
;
this
.
nPoint
=
nPoint
;
this
.
sWxUuid
=
sWxUuid
;
this
.
sCreateUser
=
sCreateUser
;
this
.
sFax
=
sFax
;
}
public
List
<
TShop
>
get
Ts
hops
()
{
return
t
s
hops
;
public
List
<
TShop
>
get
tS
hops
()
{
return
t
S
hops
;
}
public
void
set
Tshops
(
List
<
TShop
>
ts
hops
)
{
this
.
t
shops
=
ts
hops
;
public
void
set
tShops
(
List
<
TShop
>
tS
hops
)
{
this
.
t
Shops
=
tS
hops
;
}
public
void
setToken
(
String
token
)
{
...
...
@@ -174,6 +183,14 @@ public class TCustomer implements java.io.Serializable {
return
sPassword
;
}
public
void
setsBindOpenID
(
String
sBindOpenID
)
{
this
.
sBindOpenID
=
sBindOpenID
;
}
public
String
getsBindOpenID
()
{
return
sBindOpenID
;
}
public
void
setsOpenID
(
String
sOpenID
)
{
this
.
sOpenID
=
sOpenID
;
}
...
...
@@ -198,6 +215,14 @@ public class TCustomer implements java.io.Serializable {
return
sCustTypeID
;
}
public
void
setsMiniOpenID
(
String
sMiniOpenID
)
{
this
.
sMiniOpenID
=
sMiniOpenID
;
}
public
String
getsMiniOpenID
()
{
return
sMiniOpenID
;
}
public
void
setsTel
(
String
sTel
)
{
this
.
sTel
=
sTel
;
}
...
...
@@ -318,6 +343,14 @@ public class TCustomer implements java.io.Serializable {
return
nPoint
;
}
public
void
setsWxUuid
(
String
sWxUuid
)
{
this
.
sWxUuid
=
sWxUuid
;
}
public
String
getsWxUuid
()
{
return
sWxUuid
;
}
public
void
setsCreateUser
(
String
sCreateUser
)
{
this
.
sCreateUser
=
sCreateUser
;
}
...
...
src/main/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
View file @
3c3834bb
...
...
@@ -194,8 +194,8 @@ public class GoodsServiceImpl implements GoodsService {
}
if
(
StringUtil
.
isEmpty
(
districtID
)){
TCustomer
customer
=
userService
.
getCustomer
(
userNO
,
shopNO
);
if
(
customer
!=
null
&&
customer
.
get
Tshops
()
!=
null
&&
customer
.
getTs
hops
().
size
()>
0
)
{
TShop
tshop
=
customer
.
get
Ts
hops
().
get
(
0
);
if
(
customer
!=
null
&&
customer
.
get
tShops
()
!=
null
&&
customer
.
gettS
hops
().
size
()>
0
)
{
TShop
tshop
=
customer
.
get
tS
hops
().
get
(
0
);
districtID
=
tshop
.
getsDistrictID
();
}
}
...
...
@@ -391,7 +391,7 @@ public class GoodsServiceImpl implements GoodsService {
//正式用户保存浏览记录
if
(!
customer
.
getsCustLeveTypeID
().
equals
(
ShopContstrant
.
GUEST_LEVEL_TYPE_ID
))
{
commonService
.
saveViewHistory
(
customer
.
get
Ts
hops
().
get
(
0
).
getsOrgNO
(),
terminal
,
shopNO
,
"1"
,
goodsID
);
commonService
.
saveViewHistory
(
customer
.
get
tS
hops
().
get
(
0
).
getsOrgNO
(),
terminal
,
shopNO
,
"1"
,
goodsID
);
}
Map
<
String
,
Object
>
goodsDetailMap
=
jdbcTemplate
.
queryForMap
(
goodsInfoSql
);
...
...
@@ -458,7 +458,7 @@ public class GoodsServiceImpl implements GoodsService {
if
(
customer
==
null
)
{
return
Rjx
.
jsonErr
().
setMessage
(
"用户不存在"
).
toJson
();
}
TShop
shop
=
customer
.
get
Ts
hops
().
get
(
0
);
TShop
shop
=
customer
.
get
tS
hops
().
get
(
0
);
String
districtID
=
shop
.
getsDistrictID
();
...
...
src/main/java/com/egolm/shop/service/impl/GoodsSql.java
View file @
3c3834bb
...
...
@@ -23,7 +23,7 @@ public class GoodsSql {
public
static
String
goodsInfoSql
(
TCustomer
customer
,
Map
<
String
,
Object
>
map
)
{
String
goodsID
=(
String
)
map
.
get
(
"goodsID"
);
String
contractNO
=(
String
)
map
.
get
(
"contractNO"
);
TShop
tshop
=
customer
.
get
Ts
hops
().
get
(
0
);
TShop
tshop
=
customer
.
get
tS
hops
().
get
(
0
);
String
goodInfoSql
=
""
;
if
(
customer
.
getsCustLeveTypeID
().
equals
(
ShopContstrant
.
GUEST_LEVEL_TYPE_ID
))
{
//游客
goodInfoSql
=
"SELECT TOP 1 "
...
...
src/main/java/com/egolm/shop/service/impl/SystemCtrlServiceImpl.java
View file @
3c3834bb
...
...
@@ -22,7 +22,7 @@ public class SystemCtrlServiceImpl implements SystemCtrlService {
public
Map
<
String
,
Object
>
queryTSystemCtrlByCode
(
String
sCode
,
String
langID
)
{
try
{
String
sql
=
"select sDesc, sSysTypeID, sSysType, sValue1, sValue2, sValue3, sMemo from tSystemCtrl where sCode = ? and nTag&1 = 0"
;
String
sql
=
"select sDesc, sSysTypeID, sSysType, sValue1, sValue2, sValue3, sMemo
,sValue4,sValue5
from tSystemCtrl where sCode = ? and nTag&1 = 0"
;
Map
<
String
,
Object
>
mapRsult
=
jdbcTemplate
.
queryForMap
(
sql
,
sCode
);
return
mapRsult
;
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/egolm/shop/service/impl/UserServiceImpl.java
View file @
3c3834bb
...
...
@@ -71,7 +71,7 @@ public class UserServiceImpl implements UserService {
shops
=
jdbcTemplate
.
queryForBeans
(
shopSql
,
TShop
.
class
,
custNO
.
trim
());
}
tcustomer
.
set
Ts
hops
(
shops
);
tcustomer
.
set
tS
hops
(
shops
);
return
tcustomer
;
}
catch
(
Exception
e
)
{
...
...
@@ -148,7 +148,7 @@ public class UserServiceImpl implements UserService {
List
<
TShop
>
listShop
=
new
ArrayList
<
TShop
>();
listShop
.
add
(
tshop
);
customer
.
set
Ts
hops
(
listShop
);
customer
.
set
tS
hops
(
listShop
);
redisTemplate
.
opsForHash
().
put
(
guestRedisKey
,
custNO
,
customer
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
...
...
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