20231122.9.06
This commit is contained in:
@@ -12,6 +12,7 @@ import com.peanut.modules.book.dao.BookDao;
|
||||
import com.peanut.modules.book.entity.*;
|
||||
import com.peanut.modules.book.service.*;
|
||||
import com.peanut.modules.book.vo.BookIndexVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -24,6 +25,7 @@ import com.peanut.common.utils.R;
|
||||
* @email yl328572838@163.com
|
||||
* @date 2022-08-04 15:36:59
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("book/book")
|
||||
public class BookController {
|
||||
|
||||
@@ -310,7 +310,7 @@ public class BuyOrderController {
|
||||
return R.error(500, "花生币余额不足!");
|
||||
}
|
||||
}
|
||||
// 2. 微信支付
|
||||
// 2. 微信支付,需要预支付
|
||||
if (Constants.PAYMENT_METHOD_WECHAT_PAY.equals(buyOrder.getPaymentMethod())) {
|
||||
rabbitTemplate.convertAndSend(
|
||||
DelayQueueConfig.ORDER_TO_BE_PAY_EXCHANGE,
|
||||
|
||||
@@ -46,6 +46,9 @@ public class UserAddressController {
|
||||
if ((userAddressService.getUserDefaultAddressCount(userAddress.getUserId()) >= 1) && userAddress.getIsDefault() == 1) {
|
||||
return R.error("已经存在默认地址");
|
||||
}
|
||||
if(userAddress.getRegionCode()==null||userAddress.getRegionCode().equals("")){
|
||||
return R.error("地址异常添加失败!");
|
||||
}
|
||||
userAddressService.save(userAddress);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
return "success";
|
||||
}
|
||||
PayZfbOrderEntity oldPayZfbOrderEntity = payZfbOrderService.getOne(new QueryWrapper<PayZfbOrderEntity>().eq("out_trade_no", aliNotifyDto.getOutTradeNo()));
|
||||
CopyUtils.copyProperties(aliNotifyDto,oldPayZfbOrderEntity);
|
||||
CopyUtils.copyProperties(aliNotifyDto,oldPayZfbOrderEntity);
|
||||
|
||||
payZfbOrderService.updateById(oldPayZfbOrderEntity);
|
||||
|
||||
@@ -181,13 +181,9 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
}
|
||||
if ("order".equals(subject)) {
|
||||
|
||||
System.out.println("=====到order更新字段==================================================================================================================");
|
||||
BuyOrder orderEntity = buyOrderService.getBaseMapper().selectOne(new QueryWrapper<BuyOrder>().eq("order_sn", oldPayZfbOrderEntity.getRelevanceoid()));
|
||||
System.out.println("======orderEntity=========="+orderEntity);
|
||||
BigDecimal realMoney = orderEntity.getRealMoney();
|
||||
System.out.println("======realMoney=========="+realMoney);
|
||||
BigDecimal bigDecimal = new BigDecimal(oldPayZfbOrderEntity.getBuyerPayAmount());
|
||||
System.out.println("======bigDecimal=========="+bigDecimal);
|
||||
//更新 订单 记录
|
||||
if (bigDecimal.compareTo(realMoney) == 0) {
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"0");
|
||||
@@ -216,8 +212,7 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
|
||||
|
||||
//TODO 更新用户优惠券状态
|
||||
|
||||
|
||||
|
||||
|
||||
//TODO 推送一路健康优惠券
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
spring:
|
||||
logging:
|
||||
file:
|
||||
path: d:log/
|
||||
redis:
|
||||
open: false # 是否开启redis缓存 true开启 false关闭
|
||||
database: 0
|
||||
@@ -86,5 +89,7 @@ wxpay:
|
||||
wechatPayCertificateUrl: D:/hs/nuttyreading-java/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
privateKeyUrl: D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||
|
||||
|
||||
|
||||
redisAddress: redis://59.110.212.44:6379
|
||||
redisPassword: Jgll2015
|
||||
@@ -85,5 +85,9 @@ wxpay:
|
||||
wechatPayCertificateUrl: /usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
privateKeyUrl: /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
|
||||
logging:
|
||||
file:
|
||||
path: /usr/local/hs/peanut_book/logs/
|
||||
|
||||
redisAddress: redis://59.110.212.44:6379
|
||||
redisPassword: Jgll2015
|
||||
@@ -86,5 +86,9 @@ wxpay:
|
||||
wechatPayCertificateUrl: /usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
privateKeyUrl: /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
|
||||
logging:
|
||||
file:
|
||||
path: /usr/local/hs/peanut_book/logs/
|
||||
|
||||
redisAddress: redis://59.110.212.44:6379
|
||||
redisPassword: Jgll2015
|
||||
@@ -24,7 +24,7 @@
|
||||
<!-- </springProfile>-->
|
||||
|
||||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
|
||||
<property name="log.path" value="/log/" />
|
||||
<!-- <property name="log.path" value="e:log/" />-->
|
||||
|
||||
<!--0. 日志格式和颜色渲染 -->
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
|
||||
Reference in New Issue
Block a user