Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
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
姚本章
dm_project
Commits
a0979d18
Commit
a0979d18
authored
Jan 07, 2021
by
zhangc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dm_dev' of
http://gitlab.ioubuy.cn/yaobenzhang/dm_project
into dm_dev
parents
48a9ce55
d85b43d7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
38 deletions
+57
-38
MallCustomerServiceImpl.java
.../dm/mall/moduls/service/impl/MallCustomerServiceImpl.java
+4
-4
PayServiceImpl.java
...va/com/jz/dm/mall/moduls/service/impl/PayServiceImpl.java
+7
-2
application-test.yml
jz-dm-mall/src/main/resources/application-test.yml
+15
-12
FinanceCustomerBalanceController.java
.../controller/finance/FinanceCustomerBalanceController.java
+1
-1
DataGoodsApiController.java
...anage/moduls/controller/goods/DataGoodsApiController.java
+1
-0
DataGoodsController.java
...z/manage/moduls/controller/goods/DataGoodsController.java
+4
-2
DataGoodsServiceImpl.java
...m/jz/manage/moduls/service/impl/DataGoodsServiceImpl.java
+7
-2
application-test.yml
jz-dm-manage/src/main/resources/application-test.yml
+18
-15
No files found.
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/MallCustomerServiceImpl.java
View file @
a0979d18
...
@@ -107,10 +107,10 @@ public class MallCustomerServiceImpl implements MallCustomerService {
...
@@ -107,10 +107,10 @@ public class MallCustomerServiceImpl implements MallCustomerService {
String
telephone
=
customerRequest
.
getTelephone
();
String
telephone
=
customerRequest
.
getTelephone
();
// 从redis获取验证码
// 从redis获取验证码
//
String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone;
String
key
=
RedisMessageConstant
.
SENDTYPE_LOGIN
+
"_"
+
telephone
;
String
key
=
"18179617425"
;
//
String key = "18179617425";
//
String codeInRedis = (String) redisTemplate.opsForValue().get(key);
String
codeInRedis
=
(
String
)
redisTemplate
.
opsForValue
().
get
(
key
);
String
codeInRedis
=
"147826"
;
//
String codeInRedis = "147826";
if
(
codeInRedis
.
equals
(
vailCode
))
{
if
(
codeInRedis
.
equals
(
vailCode
))
{
mallCustomer
.
setCustomerAccount
(
username
);
mallCustomer
.
setCustomerAccount
(
username
);
mallCustomer
.
setPassword
(
customerRequest
.
getPassword
());
mallCustomer
.
setPassword
(
customerRequest
.
getPassword
());
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/PayServiceImpl.java
View file @
a0979d18
...
@@ -18,6 +18,7 @@ import com.jz.dm.mall.moduls.mapper.*;
...
@@ -18,6 +18,7 @@ import com.jz.dm.mall.moduls.mapper.*;
import
com.jz.dm.mall.moduls.service.PayService
;
import
com.jz.dm.mall.moduls.service.PayService
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -56,6 +57,10 @@ public class PayServiceImpl implements PayService {
...
@@ -56,6 +57,10 @@ public class PayServiceImpl implements PayService {
@Autowired
@Autowired
private
RestTemplate
restTemplate
;
private
RestTemplate
restTemplate
;
@Value
(
"${domain.apigateway}"
)
private
String
apiGateway
;
/**
/**
* 新增订单
* 新增订单
*
*
...
@@ -126,7 +131,7 @@ public class PayServiceImpl implements PayService {
...
@@ -126,7 +131,7 @@ public class PayServiceImpl implements PayService {
}
}
BigDecimal
subtract
=
bigDecimal
.
subtract
(
bigDecima2
);
BigDecimal
subtract
=
bigDecimal
.
subtract
(
bigDecima2
);
String
uri
=
"http://47.115.53.1:8088/api/auth/mall-user-auth-api"
;
// TODO
AuthMallUserApiReq
apiReq
=
new
AuthMallUserApiReq
();
AuthMallUserApiReq
apiReq
=
new
AuthMallUserApiReq
();
if
(
"04"
.
equals
(
payDto
.
getPurchaseMethod
()))
{
if
(
"04"
.
equals
(
payDto
.
getPurchaseMethod
()))
{
apiReq
.
setAuthMode
(
AuthModeEnum
.
RECORD_TIME_MODE
);
apiReq
.
setAuthMode
(
AuthModeEnum
.
RECORD_TIME_MODE
);
...
@@ -140,7 +145,7 @@ public class PayServiceImpl implements PayService {
...
@@ -140,7 +145,7 @@ public class PayServiceImpl implements PayService {
apiReq
.
setUserId
(
payDto
.
getCustomerId
()
+
""
);
apiReq
.
setUserId
(
payDto
.
getCustomerId
()
+
""
);
apiReq
.
setValidStartTime
(
order
.
getTakeEffectTime
());
apiReq
.
setValidStartTime
(
order
.
getTakeEffectTime
());
apiReq
.
setValidEndTime
(
order
.
getInvalidTime
());
apiReq
.
setValidEndTime
(
order
.
getInvalidTime
());
String
post
=
RestTemplateUtils
.
post
(
uri
,
JSON
.
toJSONString
(
apiReq
));
String
post
=
RestTemplateUtils
.
post
(
apiGateway
,
JSON
.
toJSONString
(
apiReq
));
JSONObject
params
=
JSONObject
.
parseObject
(
post
);
JSONObject
params
=
JSONObject
.
parseObject
(
post
);
if
(!
params
.
get
(
"code"
).
equals
(
200
)
||
StringUtils
.
isEmpty
(
params
.
get
(
"data"
))){
if
(!
params
.
get
(
"code"
).
equals
(
200
)
||
StringUtils
.
isEmpty
(
params
.
get
(
"data"
))){
...
...
jz-dm-mall/src/main/resources/application-test.yml
View file @
a0979d18
# 测试环境配置
# 测试环境配置
server
:
server
:
port
:
8081
port
:
8081
#contextPath: /resource
contextPath
:
/mall
management
:
management
:
port
:
54001
port
:
54001
...
@@ -45,18 +45,18 @@ spring:
...
@@ -45,18 +45,18 @@ spring:
public-key
:
rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
public-key
:
rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
redis
:
redis
:
# database: 0
# database: 0
host
:
47.115.53.1
#
host: 47.115.53.1
port
:
6379
#
port: 6379
password
:
123456
#
password: 123456
# timeout: 5000
# timeout: 5000
#
cluster:
cluster
:
#
nodes:
nodes
:
# - 192.168.31.167
:6379
-
192.168.1.146
:6379
# - 192.168.31.167
:6380
-
192.168.1.146
:6380
# - 192.168.31.167
:6381
-
192.168.1.146
:6381
# - 192.168.31.167
:6382
-
192.168.1.146
:6382
# - 192.168.31.167
:6383
-
192.168.1.146
:6383
# - 192.168.31.167
:6384
-
192.168.1.146
:6384
#mybatis的配置
#mybatis的配置
mybatis
:
mybatis
:
...
@@ -68,3 +68,6 @@ mybatis:
...
@@ -68,3 +68,6 @@ mybatis:
logging
:
logging
:
level
:
level
:
com.jz.dm.mall
:
debug
com.jz.dm.mall
:
debug
domain
:
apigateway
:
http://47.115.53.1:8088/api/auth/mall-user-auth-api
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/FinanceCustomerBalanceController.java
View file @
a0979d18
...
@@ -67,7 +67,7 @@ public class FinanceCustomerBalanceController extends BaseController {
...
@@ -67,7 +67,7 @@ public class FinanceCustomerBalanceController extends BaseController {
* @author Bellamy
* @author Bellamy
* @since 2020-12-06
* @since 2020-12-06
*/
*/
@
Pos
tMapping
(
value
=
"/balanceInfoById"
)
@
Ge
tMapping
(
value
=
"/balanceInfoById"
)
@ApiOperation
(
value
=
"充值管理--充值详情"
,
notes
=
"充值详情"
)
@ApiOperation
(
value
=
"充值管理--充值详情"
,
notes
=
"充值详情"
)
public
Result
<
BalanceInfoDto
>
getFinanceBalanceInfoById
(
@RequestParam
(
value
=
"customerBalanceId"
)
String
customerBalanceId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
Result
<
BalanceInfoDto
>
getFinanceBalanceInfoById
(
@RequestParam
(
value
=
"customerBalanceId"
)
String
customerBalanceId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
Result
<
BalanceInfoDto
>
result
=
new
Result
<>();
Result
<
BalanceInfoDto
>
result
=
new
Result
<>();
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/goods/DataGoodsApiController.java
View file @
a0979d18
...
@@ -45,4 +45,5 @@ public class DataGoodsApiController extends BaseController {
...
@@ -45,4 +45,5 @@ public class DataGoodsApiController extends BaseController {
return
new
Result
<>(
false
,
"查询商品详情失败!"
,
StatusCode
.
ERROR
);
return
new
Result
<>(
false
,
"查询商品详情失败!"
,
StatusCode
.
ERROR
);
}
}
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/goods/DataGoodsController.java
View file @
a0979d18
...
@@ -55,8 +55,10 @@ public class DataGoodsController extends BaseController {
...
@@ -55,8 +55,10 @@ public class DataGoodsController extends BaseController {
return
pageInfo
;
return
pageInfo
;
}
}
/**主键查询数据商品
/**主键查询数据商品
* @param DataGoodsRequest
* @param DataGoodsRequest
* @return
* @return
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DataGoodsServiceImpl.java
View file @
a0979d18
...
@@ -39,6 +39,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -39,6 +39,7 @@ import javax.servlet.http.HttpServletRequest;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
...
@@ -69,6 +70,10 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -69,6 +70,10 @@ public class DataGoodsServiceImpl implements DataGoodsService {
@Autowired
@Autowired
private
HttpsUtils
httpsUtils
;
private
HttpsUtils
httpsUtils
;
@Value
(
"${domain.apigateway}"
)
private
String
apiGateway
;
/**
/**
* 条件分页查询数据列表
* 条件分页查询数据列表
*
*
...
@@ -297,10 +302,10 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -297,10 +302,10 @@ public class DataGoodsServiceImpl implements DataGoodsService {
}
}
apiReq
.
setApiExample
(
dataApiUpReq
.
getReturnDataExample
());
apiReq
.
setApiExample
(
dataApiUpReq
.
getReturnDataExample
());
String
url
=
"http://47.115.53.1:8088/api/producer/addDataBankApiInfo"
;
//
String url= "http://47.115.53.1:8088/api/producer/addDataBankApiInfo";
// String url= "http://127.0.0.1:8088/api/producer/addDataBankApiInfo";
// String url= "http://127.0.0.1:8088/api/producer/addDataBankApiInfo";
String
post
=
httpsUtils
.
submitPost
(
url
,
JSON
.
toJSONString
(
apiReq
));
String
post
=
httpsUtils
.
submitPost
(
apiGateway
,
JSON
.
toJSONString
(
apiReq
));
System
.
out
.
println
(
post
);
System
.
out
.
println
(
post
);
JSONObject
result
=
JSON
.
parseObject
(
post
);
JSONObject
result
=
JSON
.
parseObject
(
post
);
if
(!
result
.
get
(
"code"
).
equals
(
200
)
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
result
.
get
(
"data"
))){
if
(!
result
.
get
(
"code"
).
equals
(
200
)
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
result
.
get
(
"data"
))){
...
...
jz-dm-manage/src/main/resources/application-test.yml
View file @
a0979d18
# 测试环境配置
# 测试环境配置
server
:
server
:
port
:
8082
port
:
8082
#contextPath: /resourc
e
contextPath
:
/manag
e
management
:
management
:
port
:
5400
1
port
:
5400
2
health
:
health
:
mail
:
mail
:
enabled
:
false
enabled
:
false
...
@@ -45,18 +45,18 @@ spring:
...
@@ -45,18 +45,18 @@ spring:
public-key
:
rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
public-key
:
rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
redis
:
redis
:
#database: 0
#database: 0
host
:
47.115.53.1
#
host: 47.115.53.1
port
:
6379
#
port: 6379
timeout
:
5000
#
timeout: 5000
password
:
123456
#
password: 123456
#
cluster:
cluster
:
#
nodes:
nodes
:
# - 192.168.31.167
:6379
-
192.168.1.146
:6379
# - 192.168.31.167
:6380
-
192.168.1.146
:6380
# - 192.168.31.167
:6381
-
192.168.1.146
:6381
# - 192.168.31.167
:6382
-
192.168.1.146
:6382
# - 192.168.31.167
:6383
-
192.168.1.146
:6383
# - 192.168.31.167
:6384
-
192.168.1.146
:6384
#使用redis管理session设置为redis,否则none
#使用redis管理session设置为redis,否则none
session
:
session
:
store-type
:
none
store-type
:
none
...
@@ -69,4 +69,7 @@ mybatis:
...
@@ -69,4 +69,7 @@ mybatis:
logging
:
logging
:
level
:
level
:
com.jz.manage
:
debug
com.jz.manage
:
debug
\ No newline at end of file
domain
:
apigateway
:
http://47.115.53.1:8088/api/producer/addDataBankApiInfo
\ 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