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
3b68e1c6
Commit
3b68e1c6
authored
Oct 12, 2018
by
zhangyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
26d95675
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1100 additions
and
22 deletions
+1100
-22
pom.xml
pom.xml
+5
-0
SystemCtrlController.java
.../java/com/egolm/shop/controller/SystemCtrlController.java
+6
-2
UserController.java
src/main/java/com/egolm/shop/controller/UserController.java
+99
-0
EgoPasswordEncoder.java
src/main/java/com/egolm/shop/encrypt/EgoPasswordEncoder.java
+29
-0
EgoShopPasswordEncoder.java
...n/java/com/egolm/shop/encrypt/EgoShopPasswordEncoder.java
+443
-0
TCommon.java
src/main/java/com/egolm/shop/pojo/TCommon.java
+182
-0
TCustomer.java
src/main/java/com/egolm/shop/pojo/TCustomer.java
+7
-5
CommonService.java
src/main/java/com/egolm/shop/service/CommonService.java
+6
-0
SystemCtrlService.java
src/main/java/com/egolm/shop/service/SystemCtrlService.java
+3
-1
UserService.java
src/main/java/com/egolm/shop/service/UserService.java
+8
-0
CategoryServiceImpl.java
...java/com/egolm/shop/service/impl/CategoryServiceImpl.java
+1
-1
CommonServiceImpl.java
...n/java/com/egolm/shop/service/impl/CommonServiceImpl.java
+20
-0
GoodsServiceImpl.java
...in/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
+5
-5
GoodsSql.java
src/main/java/com/egolm/shop/service/impl/GoodsSql.java
+1
-1
SystemCtrlServiceImpl.java
...va/com/egolm/shop/service/impl/SystemCtrlServiceImpl.java
+3
-3
UserServiceImpl.java
...ain/java/com/egolm/shop/service/impl/UserServiceImpl.java
+272
-3
ShopContstrant.java
src/main/java/com/egolm/shop/util/ShopContstrant.java
+6
-0
application-dev.properties
src/main/resources/application-dev.properties
+4
-1
No files found.
pom.xml
View file @
3b68e1c6
...
...
@@ -26,6 +26,11 @@
<artifactId>
spring-boot-devtools
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-core
</artifactId>
<version>
4.0.4.RELEASE
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
...
...
src/main/java/com/egolm/shop/controller/SystemCtrlController.java
View file @
3b68e1c6
...
...
@@ -38,7 +38,11 @@ public class SystemCtrlController {
String
code
=
request
.
getParameter
(
"code"
);
String
langID
=
request
.
getParameter
(
"langID"
);
return
systemCtrlService
.
queryTSystemCtrlByCode
(
code
,
langID
);
Map
<
String
,
Object
>
result
=
systemCtrlService
.
queryTSystemCtrlByCode
(
code
,
langID
);
if
(
result
!=
null
)
{
return
Rjx
.
jsonOk
().
setData
(
result
).
toJson
();
}
else
{
return
Rjx
.
jsonErr
().
setCode
(-
1
).
setMessage
(
"数据字典查询出错"
).
toJson
();
}
}
}
src/main/java/com/egolm/shop/controller/UserController.java
View file @
3b68e1c6
...
...
@@ -11,7 +11,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.shop.pojo.TCustomer
;
import
com.egolm.shop.service.UserService
;
import
io.swagger.annotations.Api
;
...
...
@@ -31,6 +33,7 @@ public class UserController {
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"districtID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"区域编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
"SHBS"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
...
...
@@ -47,4 +50,100 @@ public class UserController {
}
@ApiOperation
(
"登陆"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"账号(账号/名称/手机号)"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"password"
,
dataType
=
"String"
,
required
=
false
,
value
=
"密码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"openID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"openID(优先级小于账号)"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
})
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
public
String
login
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
userNO
=
request
.
getParameter
(
"userNO"
)==
null
?
""
:
request
.
getParameter
(
"userNO"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
String
openID
=
request
.
getParameter
(
"openID"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"userNO"
,
userNO
);
params
.
put
(
"password"
,
password
);
params
.
put
(
"openID"
,
openID
);
return
userService
.
login
(
params
);
}
@ApiOperation
(
"获取店铺信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"账号编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"店铺编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
})
@RequestMapping
(
value
=
"/userInfo"
,
method
=
RequestMethod
.
GET
)
public
String
userInfo
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
custNO
=
request
.
getParameter
(
"custNO"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
)==
null
?
""
:
request
.
getParameter
(
"shopNO"
);
System
.
out
.
println
(
"shopNO===="
+
StringUtil
.
isNotEmpty
(
shopNO
));
TCustomer
tCustomer
=
userService
.
getCustomer
(
custNO
,
shopNO
);
return
Rjx
.
jsonOk
().
setData
(
tCustomer
).
toJson
();
}
@ApiOperation
(
"修改密码"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"mobile"
,
dataType
=
"String"
,
required
=
true
,
value
=
"手机号码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"password"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"smsCode"
,
dataType
=
"String"
,
required
=
true
,
value
=
"短信验证码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"smsTmpID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"短信模板ID"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
})
@RequestMapping
(
value
=
"/modifyPwd"
,
method
=
RequestMethod
.
GET
)
public
String
modifyPwd
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
String
smsCode
=
request
.
getParameter
(
"smsCode"
)==
null
?
""
:
request
.
getParameter
(
"smsCode"
);
String
langID
=
request
.
getParameter
(
"langID"
)==
null
?
"936"
:
request
.
getParameter
(
"langID"
);
String
smsTmpID
=
request
.
getParameter
(
"smsTmpID"
)==
null
?
"936"
:
request
.
getParameter
(
"smsTmpID"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"mobile"
,
mobile
);
params
.
put
(
"password"
,
password
);
params
.
put
(
"smsCode"
,
smsCode
);
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"smsTmpID"
,
smsTmpID
);
return
userService
.
modifyPwd
(
params
);
}
@ApiOperation
(
"发短信"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"mobile"
,
dataType
=
"String"
,
required
=
true
,
value
=
"手机号码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"smsTmpID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"短信模板ID"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"content"
,
dataType
=
"String"
,
required
=
true
,
value
=
"内容,按模板上的参数填值,以,分隔"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
})
@RequestMapping
(
value
=
"/sendSms"
,
method
=
RequestMethod
.
GET
)
public
String
sendSms
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
smsTmpID
=
request
.
getParameter
(
"smsTmpID"
);
String
content
=
request
.
getParameter
(
"content"
);
String
langID
=
request
.
getParameter
(
"langID"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"mobile"
,
mobile
);
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"smsTmpID"
,
smsTmpID
);
params
.
put
(
"content"
,
content
);
return
userService
.
sendSms
(
params
);
}
}
src/main/java/com/egolm/shop/encrypt/EgoPasswordEncoder.java
0 → 100644
View file @
3b68e1c6
package
com
.
egolm
.
shop
.
encrypt
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.stereotype.Component
;
@Component
(
"passwordEncoder"
)
public
class
EgoPasswordEncoder
implements
PasswordEncoder
{
@Override
public
String
encode
(
CharSequence
rawPassword
)
{
return
EgoShopPasswordEncoder
.
encode
(
rawPassword
.
toString
());
}
public
String
decode
(
CharSequence
rawPassword
)
{
return
EgoShopPasswordEncoder
.
decode
(
rawPassword
.
toString
());
}
@Override
public
boolean
matches
(
CharSequence
rawPassword
,
String
encodedPassword
)
{
return
encode
(
rawPassword
.
toString
()).
equals
(
encodedPassword
);
}
public
static
void
main
(
String
[]
args
)
{
EgoPasswordEncoder
e
=
new
EgoPasswordEncoder
();
System
.
out
.
println
(
e
.
decode
(
"zLnXcPGqQ/2iE2YwfoVkqXb1Ufb0bDYm"
));
System
.
out
.
println
(
e
.
encode
(
"13654804000123456"
));
}
}
src/main/java/com/egolm/shop/encrypt/EgoShopPasswordEncoder.java
0 → 100644
View file @
3b68e1c6
This diff is collapsed.
Click to expand it.
src/main/java/com/egolm/shop/pojo/TCommon.java
0 → 100644
View file @
3b68e1c6
package
com
.
egolm
.
shop
.
pojo
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
java.util.Date
;
import
java.math.BigDecimal
;
/**
* @author 曲欣亮
* @since 2018-10-09
* @version v-1.0
*/
@Entity
(
name
=
"tCommon"
)
public
class
TCommon
implements
java
.
io
.
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
Date
dCreateDate
;
private
String
sComDesc
;
private
Date
dLastUpdateTime
;
private
String
sMemo
;
private
Integer
nTag
;
@Id
private
String
sCommonNO
;
private
String
sConfirmUser
;
private
BigDecimal
nNum1
;
private
String
sText1
;
@Id
private
String
sComID
;
private
Date
dConfirmDate
;
private
String
sCreateUser
;
/**
* 无参数构造方法
*/
public
TCommon
()
{
super
();
}
/**
* 全参数构造方法
* @param dCreateDate
* @param sComDesc
* @param dLastUpdateTime
* @param sMemo
* @param nTag
* @param sCommonNO
* @param sConfirmUser
* @param nNum1
* @param sText1
* @param sComID
* @param dConfirmDate
* @param sCreateUser
*/
public
TCommon
(
Date
dCreateDate
,
String
sComDesc
,
Date
dLastUpdateTime
,
String
sMemo
,
Integer
nTag
,
String
sCommonNO
,
String
sConfirmUser
,
BigDecimal
nNum1
,
String
sText1
,
String
sComID
,
Date
dConfirmDate
,
String
sCreateUser
)
{
this
.
dCreateDate
=
dCreateDate
;
this
.
sComDesc
=
sComDesc
;
this
.
dLastUpdateTime
=
dLastUpdateTime
;
this
.
sMemo
=
sMemo
;
this
.
nTag
=
nTag
;
this
.
sCommonNO
=
sCommonNO
;
this
.
sConfirmUser
=
sConfirmUser
;
this
.
nNum1
=
nNum1
;
this
.
sText1
=
sText1
;
this
.
sComID
=
sComID
;
this
.
dConfirmDate
=
dConfirmDate
;
this
.
sCreateUser
=
sCreateUser
;
}
public
void
setdCreateDate
(
Date
dCreateDate
)
{
this
.
dCreateDate
=
dCreateDate
;
}
public
Date
getdCreateDate
()
{
return
dCreateDate
;
}
public
void
setsComDesc
(
String
sComDesc
)
{
this
.
sComDesc
=
sComDesc
;
}
public
String
getsComDesc
()
{
return
sComDesc
;
}
public
void
setdLastUpdateTime
(
Date
dLastUpdateTime
)
{
this
.
dLastUpdateTime
=
dLastUpdateTime
;
}
public
Date
getdLastUpdateTime
()
{
return
dLastUpdateTime
;
}
public
void
setsMemo
(
String
sMemo
)
{
this
.
sMemo
=
sMemo
;
}
public
String
getsMemo
()
{
return
sMemo
;
}
public
void
setnTag
(
Integer
nTag
)
{
this
.
nTag
=
nTag
;
}
public
Integer
getnTag
()
{
return
nTag
;
}
public
void
setsCommonNO
(
String
sCommonNO
)
{
this
.
sCommonNO
=
sCommonNO
;
}
public
String
getsCommonNO
()
{
return
sCommonNO
;
}
public
void
setsConfirmUser
(
String
sConfirmUser
)
{
this
.
sConfirmUser
=
sConfirmUser
;
}
public
String
getsConfirmUser
()
{
return
sConfirmUser
;
}
public
void
setnNum1
(
BigDecimal
nNum1
)
{
this
.
nNum1
=
nNum1
;
}
public
BigDecimal
getnNum1
()
{
return
nNum1
;
}
public
void
setsText1
(
String
sText1
)
{
this
.
sText1
=
sText1
;
}
public
String
getsText1
()
{
return
sText1
;
}
public
void
setsComID
(
String
sComID
)
{
this
.
sComID
=
sComID
;
}
public
String
getsComID
()
{
return
sComID
;
}
public
void
setdConfirmDate
(
Date
dConfirmDate
)
{
this
.
dConfirmDate
=
dConfirmDate
;
}
public
Date
getdConfirmDate
()
{
return
dConfirmDate
;
}
public
void
setsCreateUser
(
String
sCreateUser
)
{
this
.
sCreateUser
=
sCreateUser
;
}
public
String
getsCreateUser
()
{
return
sCreateUser
;
}
}
src/main/java/com/egolm/shop/pojo/TCustomer.java
View file @
3b68e1c6
...
...
@@ -67,7 +67,7 @@ public class TCustomer implements java.io.Serializable {
private
String
sFax
;
private
List
<
TShop
>
tshop
;
private
List
<
TShop
>
tshop
s
;
/**
* 无参数构造方法
...
...
@@ -132,12 +132,14 @@ public class TCustomer implements java.io.Serializable {
public
List
<
TShop
>
getTshop
()
{
return
tshop
;
public
List
<
TShop
>
getTshops
()
{
return
tshops
;
}
public
void
setTshop
(
List
<
TShop
>
tshop
)
{
this
.
tshop
=
tshop
;
public
void
setTshop
s
(
List
<
TShop
>
tshops
)
{
this
.
tshop
s
=
tshops
;
}
public
void
setToken
(
String
token
)
{
...
...
src/main/java/com/egolm/shop/service/CommonService.java
View file @
3b68e1c6
package
com
.
egolm
.
shop
.
service
;
import
java.util.List
;
import
com.egolm.shop.pojo.TCommon
;
public
interface
CommonService
{
/**
* 保存浏览记录
...
...
@@ -10,4 +14,6 @@ public interface CommonService {
* @param values
*/
public
void
saveViewHistory
(
String
zone
,
String
terminalTypeID
,
String
shopNO
,
String
viewTypeID
,
String
values
);
public
List
<
TCommon
>
getTCommon
(
String
commonNO
,
String
comID
);
}
src/main/java/com/egolm/shop/service/SystemCtrlService.java
View file @
3b68e1c6
package
com
.
egolm
.
shop
.
service
;
import
java.util.Map
;
public
interface
SystemCtrlService
{
public
String
queryTSystemCtrlByCode
(
String
sCode
,
String
langID
);
public
Map
<
String
,
Object
>
queryTSystemCtrlByCode
(
String
sCode
,
String
langID
);
}
src/main/java/com/egolm/shop/service/UserService.java
View file @
3b68e1c6
...
...
@@ -8,7 +8,15 @@ import com.egolm.shop.pojo.TShop;
public
interface
UserService
{
public
TCustomer
getCustomer
(
String
custNO
,
String
shopNO
);
public
TCustomer
getCustomer
(
String
mobile
);
public
TShop
getShop
(
String
shopNO
);
public
Map
<
String
,
Object
>
createGuest
(
Map
<
String
,
Object
>
params
);
public
String
login
(
Map
<
String
,
Object
>
params
)
;
public
String
modifyPwd
(
Map
<
String
,
Object
>
params
);
public
String
sendSms
(
Map
<
String
,
Object
>
params
);
}
src/main/java/com/egolm/shop/service/impl/CategoryServiceImpl.java
View file @
3b68e1c6
...
...
@@ -59,7 +59,7 @@ public class CategoryServiceImpl implements CategoryService {
}
return
Rjx
.
jsonOk
().
setData
(
list1
).
toJson
();
}
catch
(
Exception
e
)
{
return
Rjx
.
jsonErr
().
setMessage
(
"分类查询出错"
).
toJson
();
return
Rjx
.
jsonErr
().
set
Code
(-
1
).
set
Message
(
"分类查询出错"
).
toJson
();
}
}
...
...
src/main/java/com/egolm/shop/service/impl/CommonServiceImpl.java
View file @
3b68e1c6
package
com
.
egolm
.
shop
.
service
.
impl
;
import
java.util.List
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.dialect.SqlServerDialect
;
import
com.egolm.shop.pojo.TCommon
;
import
com.egolm.shop.service.CommonService
;
@Service
...
...
@@ -25,6 +30,7 @@ public class CommonServiceImpl implements CommonService{
*/
public
void
saveViewHistory
(
String
zone
,
String
terminalTypeID
,
String
shopNO
,
String
viewTypeID
,
String
values
){
try
{
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
String
checkSql
=
"SELECT "
+
" COUNT(1) "
+
"FROM "
...
...
@@ -57,4 +63,18 @@ public class CommonServiceImpl implements CommonService{
logger
.
error
(
"浏览记录保存失败"
+
e
);
}
}
public
List
<
TCommon
>
getTCommon
(
String
commonNO
,
String
comID
){
List
<
TCommon
>
commList
=
null
;
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
String
sql
=
" SELECT * FROM tCommon WHERE nTag&1=0 AND sCommonNO = ? "
;
if
(
StringUtil
.
isNotEmpty
(
comID
))
{
sql
+=
" and sComID = ? "
;
commList
=
jdbcTemplate
.
queryForBeans
(
sql
,
TCommon
.
class
,
commonNO
,
comID
);
}
else
{
commList
=
jdbcTemplate
.
queryForBeans
(
sql
,
TCommon
.
class
,
commonNO
);
}
return
commList
;
}
}
src/main/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
View file @
3b68e1c6
...
...
@@ -210,7 +210,7 @@ public class GoodsServiceImpl implements GoodsService {
//正式用户保存浏览记录
if
(!
customer
.
getsCustLeveTypeID
().
equals
(
ShopContstrant
.
GUEST_LEVEL_TYPE_ID
))
{
commonService
.
saveViewHistory
(
customer
.
getTshop
().
get
(
0
).
getsOrgNO
(),
terminal
,
shopNO
,
"1"
,
goodsID
);
commonService
.
saveViewHistory
(
customer
.
getTshop
s
().
get
(
0
).
getsOrgNO
(),
terminal
,
shopNO
,
"1"
,
goodsID
);
}
Map
<
String
,
Object
>
goodsDetailMap
=
jdbcTemplate
.
queryForMap
(
goodsInfoSql
);
...
...
@@ -277,7 +277,7 @@ public class GoodsServiceImpl implements GoodsService {
if
(
customer
==
null
)
{
return
Rjx
.
jsonErr
().
setMessage
(
"用户不存在"
).
toJson
();
}
TShop
shop
=
customer
.
getTshop
().
get
(
0
);
TShop
shop
=
customer
.
getTshop
s
().
get
(
0
);
String
districtID
=
shop
.
getsDistrictID
();
...
...
@@ -313,7 +313,7 @@ public class GoodsServiceImpl implements GoodsService {
return
Rjx
.
jsonOk
().
setMessage
(
"取消收藏成功"
).
toJson
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
Rjx
.
jsonErr
().
setMessage
(
"取消收藏失败"
).
toJson
();
return
Rjx
.
jsonErr
().
set
Code
(-
1
).
set
Message
(
"取消收藏失败"
).
toJson
();
}
}
else
if
(
"1"
.
equals
(
override
))
{
try
{
...
...
@@ -321,9 +321,9 @@ public class GoodsServiceImpl implements GoodsService {
return
Rjx
.
jsonOk
().
setMessage
(
"收藏成功"
).
toJson
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
Rjx
.
jsonErr
().
setMessage
(
"收藏失败"
).
toJson
();
return
Rjx
.
jsonErr
().
set
Code
(-
1
).
set
Message
(
"收藏失败"
).
toJson
();
}
}
return
Rjx
.
jsonErr
().
setMessage
(
"操作失败"
).
toJson
();
return
Rjx
.
jsonErr
().
set
Code
(-
1
).
set
Message
(
"操作失败"
).
toJson
();
}
}
src/main/java/com/egolm/shop/service/impl/GoodsSql.java
View file @
3b68e1c6
...
...
@@ -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
.
getTshop
().
get
(
0
);
TShop
tshop
=
customer
.
getTshop
s
().
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 @
3b68e1c6
...
...
@@ -20,14 +20,14 @@ public class SystemCtrlServiceImpl implements SystemCtrlService {
private
JdbcTemplate
jdbcTemplate
;
public
String
queryTSystemCtrlByCode
(
String
sCode
,
String
langID
)
{
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"
;
Map
<
String
,
Object
>
mapRsult
=
jdbcTemplate
.
queryForMap
(
sql
,
sCode
);
return
Rjx
.
jsonOk
().
setData
(
mapRsult
).
toJson
()
;
return
mapRsult
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"数据字典查询出错: "
+
e
.
getMessage
());
return
Rjx
.
jsonErr
().
setMessage
(
"数据字典查询出错"
).
toJson
()
;
return
null
;
}
}
}
src/main/java/com/egolm/shop/service/impl/UserServiceImpl.java
View file @
3b68e1c6
This diff is collapsed.
Click to expand it.
src/main/java/com/egolm/shop/util/ShopContstrant.java
View file @
3b68e1c6
...
...
@@ -5,4 +5,10 @@ public class ShopContstrant {
public
static
final
String
CUST_SIGN
=
"T_"
;
//游客账号标记
public
static
final
String
GUEST_LEVEL_TYPE_ID
=
"-1"
;
// 游客 custLevelTypeID 状态
//短信
public
static
final
String
CHOICE_SMS_KEY
=
"ChoiceSmsKey"
;
// 短信选择器
public
static
final
String
SMS_TEMPLATE_CODE
=
"SmsTemplate"
;
//模板字典 code tcommon表
}
src/main/resources/application-dev.properties
View file @
3b68e1c6
...
...
@@ -32,4 +32,7 @@ spring.redis.pool.max-wait=2000
spring.redis.pool.max-idle
=
5
spring.redis.pool.min-idle
=
0
redis.guest.key
=
B2B_Guest
\ No newline at end of file
### 游客 用户生成用户的前缀
redis.guest.key
=
B2B_Guest
#### 用户验证码存储的前缀
redis.sms.code.key
=
B2B_Sms
\ No newline at end of file
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