浏览代码

下单和 游戏

xubh 4 年之前
父节点
当前提交
1140667dde

+ 1 - 1
src/main/java/com/minpay/common/service/impl/DrawServiceImpl.java

@@ -57,7 +57,7 @@ public class DrawServiceImpl implements IDrawService {
             // 支付宝的支付订单号,取后10位+34  进行计算。(加的这个数字,总后台可以更改,或者在系统里面每次随机从1-99选择一个数字加进去)
             //String suijishu = Service.lookup(IPublicService.class).getSysParValue("ZHONGJIANG_SUIJISHU");
             VmGameRuleExample vmGameRuleExample = new VmGameRuleExample();
-            vmGameRuleExample.createCriteria().andTypeEqualTo("1").andMechanismEqualTo(equipmentInf.getBranchid()).andStateEqualTo("0");
+            vmGameRuleExample.createCriteria().andTypeEqualTo("0").andMechanismEqualTo(equipmentInf.getBranchid()).andStateEqualTo("0");
             List<VmGameRule> vmGameRuleList = Service.lookup(IMINDataBaseService.class)
                                                     .getMybatisMapper(VmGameRuleMapper.class)
                                                     .selectByExample(vmGameRuleExample);

+ 5 - 12
src/main/java/com/minpay/common/service/impl/OrderServiceImpl.java

@@ -7,6 +7,7 @@ import com.min.util.CommonUtil;
 import com.minpay.common.bean.User;
 import com.minpay.common.exception.BusinessCodeException;
 import com.minpay.common.service.IOrderService;
+import com.minpay.common.service.IPropertiesService;
 import com.minpay.common.service.IPublicService;
 import com.minpay.common.util.DateUtil;
 import com.minpay.db.table.mapper.*;
@@ -147,30 +148,22 @@ public class OrderServiceImpl implements IOrderService {
 //							}
 							proPrice = String.valueOf(proInf.getSallPrice());
 						}else if("01".equals(proType)){
-							//proNumsAndPayNum = CommonUtil.multiply(proNumsAndPayNum, payNumber);
-
-							/*if(!commonutil.isempty(map.get("proprice"))){
-								//抽奖价格不为空的用抽奖价
-								proprice = string.valueof(map.get("proprice"));
-							}else{
-								//抽奖商品用游戏价
-								proprice = string.valueof(proinf.getgameprice());
-							}*/
-
 							String paymentType = equInf.getPaymentType();
 							String paymentAmt = equInf.getPayment();
 							if(CommonUtil.isEmpty(paymentType) || CommonUtil.isEmpty(paymentAmt) ){
 								throw new MINBusinessException("机器未设置游戏金额,请联系商户");
 							}
-
+							String testVel = Service.lookup(IPropertiesService.class)
+									.getSystemProperties().get("TEST").getKey();
 							if("00".equals(paymentType)){//随机
 								Random aa = new Random();
 								int randomNum = getRandom(85,115);
 								Log.info("=============详情编号:"+detailId+"随机数(比例):"+randomNum);
 								String bili = CommonUtil.divide(String.valueOf(randomNum),"100");
-								proPrice = CommonUtil.multiply(payType,bili);
+								proPrice = CommonUtil.divide(CommonUtil.multiply(payType,bili),testVel);
 
 							}else if("01".equals(paymentType)){ //固定
+								proPrice = CommonUtil.divide(payType,testVel);
 								proPrice = payType;
 							}