Commit a0979d18 authored by zhangc's avatar zhangc

Merge branch 'dm_dev' of http://gitlab.ioubuy.cn/yaobenzhang/dm_project into dm_dev

parents 48a9ce55 d85b43d7
......@@ -107,10 +107,10 @@ public class MallCustomerServiceImpl implements MallCustomerService {
String telephone = customerRequest.getTelephone();
// 从redis获取验证码
// String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone;
String key = "18179617425";
// String codeInRedis = (String) redisTemplate.opsForValue().get(key);
String codeInRedis = "147826";
String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone;
// String key = "18179617425";
String codeInRedis = (String) redisTemplate.opsForValue().get(key);
// String codeInRedis = "147826";
if (codeInRedis.equals(vailCode)) {
mallCustomer.setCustomerAccount(username);
mallCustomer.setPassword(customerRequest.getPassword());
......
......@@ -18,6 +18,7 @@ import com.jz.dm.mall.moduls.mapper.*;
import com.jz.dm.mall.moduls.service.PayService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
......@@ -56,6 +57,10 @@ public class PayServiceImpl implements PayService {
@Autowired
private RestTemplate restTemplate;
@Value("${domain.apigateway}")
private String apiGateway;
/**
* 新增订单
*
......@@ -126,7 +131,7 @@ public class PayServiceImpl implements PayService {
}
BigDecimal subtract = bigDecimal.subtract(bigDecima2);
String uri = "http://47.115.53.1:8088/api/auth/mall-user-auth-api"; // TODO
AuthMallUserApiReq apiReq = new AuthMallUserApiReq();
if ("04".equals(payDto.getPurchaseMethod())) {
apiReq.setAuthMode(AuthModeEnum.RECORD_TIME_MODE);
......@@ -140,7 +145,7 @@ public class PayServiceImpl implements PayService {
apiReq.setUserId(payDto.getCustomerId() + "");
apiReq.setValidStartTime(order.getTakeEffectTime());
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);
if (!params.get("code").equals(200) || StringUtils.isEmpty(params.get("data"))){
......
# 测试环境配置
server:
port: 8081
#contextPath: /resource
contextPath: /mall
management:
port: 54001
......@@ -45,18 +45,18 @@ spring:
public-key: rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
redis:
# database: 0
host: 47.115.53.1
port: 6379
password: 123456
# host: 47.115.53.1
# port: 6379
# password: 123456
# timeout: 5000
# cluster:
# nodes:
# - 192.168.31.167:6379
# - 192.168.31.167:6380
# - 192.168.31.167:6381
# - 192.168.31.167:6382
# - 192.168.31.167:6383
# - 192.168.31.167:6384
cluster:
nodes:
- 192.168.1.146:6379
- 192.168.1.146:6380
- 192.168.1.146:6381
- 192.168.1.146:6382
- 192.168.1.146:6383
- 192.168.1.146:6384
#mybatis的配置
mybatis:
......@@ -68,3 +68,6 @@ mybatis:
logging:
level:
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
......@@ -67,7 +67,7 @@ public class FinanceCustomerBalanceController extends BaseController {
* @author Bellamy
* @since 2020-12-06
*/
@PostMapping(value = "/balanceInfoById")
@GetMapping(value = "/balanceInfoById")
@ApiOperation(value = "充值管理--充值详情", notes = "充值详情")
public Result<BalanceInfoDto> getFinanceBalanceInfoById(@RequestParam(value = "customerBalanceId") String customerBalanceId, HttpServletRequest httpRequest) throws Exception {
Result<BalanceInfoDto> result = new Result<>();
......
......@@ -45,4 +45,5 @@ public class DataGoodsApiController extends BaseController {
return new Result<>(false, "查询商品详情失败!", StatusCode.ERROR);
}
}
\ No newline at end of file
......@@ -57,6 +57,8 @@ public class DataGoodsController extends BaseController {
}
/**主键查询数据商品
* @param DataGoodsRequest
* @return
......
......@@ -39,6 +39,7 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
......@@ -69,6 +70,10 @@ public class DataGoodsServiceImpl implements DataGoodsService {
@Autowired
private HttpsUtils httpsUtils;
@Value("${domain.apigateway}")
private String apiGateway;
/**
* 条件分页查询数据列表
*
......@@ -297,10 +302,10 @@ public class DataGoodsServiceImpl implements DataGoodsService {
}
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 post = httpsUtils.submitPost(url, JSON.toJSONString(apiReq));
String post = httpsUtils.submitPost(apiGateway, JSON.toJSONString(apiReq));
System.out.println(post);
JSONObject result = JSON.parseObject(post);
if (!result.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(result.get("data"))){
......
# 测试环境配置
server:
port: 8082
#contextPath: /resource
contextPath: /manage
management:
port: 54001
port: 54002
health:
mail:
enabled: false
......@@ -45,18 +45,18 @@ spring:
public-key: rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
redis:
#database: 0
host: 47.115.53.1
port: 6379
timeout: 5000
password: 123456
# cluster:
# nodes:
# - 192.168.31.167:6379
# - 192.168.31.167:6380
# - 192.168.31.167:6381
# - 192.168.31.167:6382
# - 192.168.31.167:6383
# - 192.168.31.167:6384
# host: 47.115.53.1
# port: 6379
# timeout: 5000
# password: 123456
cluster:
nodes:
- 192.168.1.146:6379
- 192.168.1.146:6380
- 192.168.1.146:6381
- 192.168.1.146:6382
- 192.168.1.146:6383
- 192.168.1.146:6384
#使用redis管理session设置为redis,否则none
session:
store-type: none
......@@ -70,3 +70,6 @@ mybatis:
logging:
level:
com.jz.manage: debug
domain:
apigateway: http://47.115.53.1:8088/api/producer/addDataBankApiInfo
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment