|
@@ -34,6 +34,7 @@ import com.pj.project.tb_fee_statistics.TbFeeStatisticsService;
|
|
|
import com.pj.project.tb_order.TbOrderService;
|
|
|
import com.pj.project.tb_pay_record.TbPayRecord;
|
|
|
import com.pj.project.tb_pay_record.TbPayRecordService;
|
|
|
+import com.pj.project4sp.global.BusinessException;
|
|
|
import com.pj.utils.cache.RedisUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
@@ -84,6 +85,9 @@ public class WxService {
|
|
|
public Map<String, String> prePay(HttpServletRequest request) throws Exception {
|
|
|
String tradeType = request.getParameter("tradeType");
|
|
|
String money = request.getParameter("money");
|
|
|
+ if (Double.valueOf(money)<=0){
|
|
|
+ throw new BusinessException("金额不正确");
|
|
|
+ }
|
|
|
String openid = request.getParameter("openid");
|
|
|
String desc = request.getParameter("desc");
|
|
|
// String openid = "oDWvn5w-hVkzUuKeY7OBXBV_l1rU";
|
|
@@ -200,6 +204,10 @@ public class WxService {
|
|
|
for (PriceBO bo1 : cars) {
|
|
|
TbBusinessCar car = tbBusinessCarService.getById(bo1.getId());
|
|
|
BigDecimal price = bo1.getP();
|
|
|
+ if (price.doubleValue()<=0){
|
|
|
+ log.error("付款金额不正确:{}",JSONUtil.toJsonStr(notifyBO));
|
|
|
+ continue;
|
|
|
+ }
|
|
|
car.setPay(1).setMoney(car.getMoney().add(price)).setPayTime(now);
|
|
|
tbBusinessCarService.updateById(car);
|
|
|
TbBusiness business = tbBusinessService.getById(car.getBusinessId());
|