提交 66839d82 作者: 张小凤

OrderAndUser

上级 89164d74
......@@ -104,7 +104,7 @@ public class OrderRefundServiceImpl implements OrderRefundService {
@Override
public ResultBody refund(BaseAccountDTO currentAccount, RefundYesOrNoVO param) {
if (currentAccount.getPortType() != 0) {
ResultBody.error(ResultEnum.NO_PERMISSION_TEMPORARILY);
return ResultBody.error(ResultEnum.NO_PERMISSION_TEMPORARILY);
}
OrderInfoDO order = rentalOrdersDao.getOrderInfo(param.getOrderInfoId());
OrderRefundDO applicationInformation = rentalOrdersDao.getApplicationInformation(order.getId());
......
......@@ -79,7 +79,7 @@ public class RentalOrdersServiceImpl implements RentalOrdersService {
return ResultBody.error(ResultEnum.THE_CURRENT_ACCOUNT_CANNOT_PLACE_ORDERS);
}
//用户信息的远程调用
ResponseEntity<String> responseEntity = UserId(user.getUserAccountId());
ResponseEntity<String> responseEntity = UserId(user.getUserAccountId(), user.getToken());
UserAccountSimpleDTO account = JSON.parseObject(responseEntity.getBody(), UserAccountSimpleDTO.class);
//优惠券id获取优惠券面值
......@@ -141,14 +141,23 @@ public class RentalOrdersServiceImpl implements RentalOrdersService {
}
private ResponseEntity<String> UserId(Integer repoAccountId) {
private ResponseEntity<String> UserId(Integer repoAccountId, String token) {
HttpHeaders headers = new HttpHeaders();
//封装请求头
headers.add("token", token);
HttpEntity<MultiValueMap<String, Object>> formEntity = new HttpEntity<MultiValueMap<String, Object>>(headers);
ResponseEntity<String> response = restTemplate.exchange(userAppUrl + "user-account/feignGetUserSimpleInfo?userAccountId=" + repoAccountId,
HttpMethod.GET, formEntity, String.class);
// 用户信息
ResponseEntity<String> response =
/* ResponseEntity<String> response =
restTemplate.getForEntity(
userAppUrl
+ "user-account/feignGetUserSimpleInfo?userAccountId="
+ repoAccountId,
String.class);
String.class);*/
return response;
}
......@@ -197,13 +206,16 @@ public class RentalOrdersServiceImpl implements RentalOrdersService {
*/
private BigDecimal getUnitPrice(PriceAcquisition param) {
// 需要支付的价格
/* ResponseEntity<String> responseEntity = restTemplate.postForEntity(pmsUrl + "product/spec/feignGetSpecLeaseUnitPrice"
ResponseEntity<String> responseEntity = restTemplate.postForEntity(pmsUrl + "/product/spec/feignGetSpecLeaseUnitPrice"
, param, String.class);
String body = responseEntity.getBody();
BigDecimal bigDecimal = new BigDecimal(body);*/
if (null == body) {
body = "0";
}
BigDecimal bigDecimal = new BigDecimal(body);
// 模拟
int i = 12;
BigDecimal bigDecimal = BigDecimal.valueOf(i);
// int i = 12;
// BigDecimal bigDecimal = BigDecimal.valueOf(i);
return bigDecimal;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论