优化订单详情腾讯key的提示,商品后台JPA关联优化等

This commit is contained in:
hupeng
2020-04-02 15:34:24 +08:00
parent e8e618c459
commit cc1a6b6de8
29 changed files with 182 additions and 146 deletions

View File

@ -41,10 +41,10 @@ import java.util.concurrent.atomic.AtomicInteger;
/**
* <p>
* 商品秒杀产品 前端控制器
* 商品秒杀产品前端控制器
* </p>
*
* @author xuwenbo
* @author hupeng
* @since 2019-12-14
*/
@Slf4j

View File

@ -1459,13 +1459,14 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<YxStoreOrderMapper,
// 积分抵扣
double deductionPrice = 0;
System.out.println("a:"+userInfo.getIntegral().doubleValue());
if(useIntegral > 0 && userInfo.getIntegral().doubleValue() > 0){
Double integralMax = Double.valueOf(cacheDTO.getOther().getIntegralMax());
Double integralFull = Double.valueOf(cacheDTO.getOther().getIntegralFull());
Double integralRatio = Double.valueOf(cacheDTO.getOther().getIntegralRatio());
if(computeDTO.getTotalPrice() >= integralFull){
Double userIntegral = userInfo.getIntegral().doubleValue();
if(userIntegral >= integralMax) userIntegral = integralMax;
if(integralMax > 0 && userIntegral >= integralMax) userIntegral = integralMax;
deductionPrice = NumberUtil.mul(userIntegral, integralRatio);
if(deductionPrice < payPrice){
payPrice = NumberUtil.sub(payPrice.doubleValue(),deductionPrice);

View File

@ -450,10 +450,11 @@ public class StoreOrderController extends BaseController {
if(ObjectUtil.isNull(storeOrder)){
return ApiResult.fail("订单不存在");
}
String mapKey = RedisUtil.get("tengxun_map_key");
if(StrUtil.isBlank(mapKey)) return ApiResult.fail("请配置腾讯地图key");
//门店
if(OrderInfoEnum.SHIPPIING_TYPE_2.getValue().equals(storeOrder.getShippingType())){
String mapKey = RedisUtil.get("tengxun_map_key");
if(StrUtil.isBlank(mapKey)) return ApiResult.fail("请配置腾讯地图key");
String apiUrl = systemConfigService.getData("api_url");
if(StrUtil.isEmpty(apiUrl)){
return ApiResult.fail("未配置api地址");

View File

@ -522,8 +522,10 @@ public class AuthController {
//设置推广关系
if (StrUtil.isNotBlank(param.getInviteCode())) {
YxSystemAttachment systemAttachment = systemAttachmentService.getByCode(param.getInviteCode());
userService.setSpread(systemAttachment.getUid(),
user.getUid());
if(systemAttachment != null){
userService.setSpread(systemAttachment.getUid(),
user.getUid());
}
}
return ApiResult.ok("注册成功");

View File

@ -1,3 +1,11 @@
/**
* Copyright (C) 2018-2019
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用
* 购买后可获得全部源代码禁止转卖、分享、上传到码云、github等开源平台
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
*/
package co.yixiang.modules.shop.service.impl;
import cn.hutool.core.util.NumberUtil;

View File

@ -1,3 +1,11 @@
/**
* Copyright (C) 2018-2019
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用
* 购买后可获得全部源代码禁止转卖、分享、上传到码云、github等开源平台
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
*/
package co.yixiang.modules.shop.service.impl;
import co.yixiang.modules.shop.entity.YxSystemStoreStaff;

View File

@ -4,7 +4,7 @@ spring:
druid:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://localhost:3306/yshop?serverTimezone=Asia/Shanghai&useSSL=false
url: jdbc:log4jdbc:mysql://localhost:3306/yshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username: yshop
password: