|
|
|
@ -171,4 +171,22 @@ public class RechargeServiceImpl implements RechargeService { |
|
|
|
throw new SystemException(String.format("金币发放失败:类型错误(%S),jwcode=%s", result,rechargeUser.getJwcode())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result addFree(RechargeUser rechargeUser) { |
|
|
|
if (rechargeUser.getJwcode()==null||rechargeUser.getJwcode()<10000000||rechargeUser.getJwcode()>99999999){ |
|
|
|
throw new SystemException("精网号位数小于8位或大于8位"); |
|
|
|
} |
|
|
|
if (rechargeUser.getFreeGold()==null||rechargeUser.getFreeGold().compareTo(BigDecimal.ZERO)<0){ |
|
|
|
throw new SystemException("免费金币不能小于0"); |
|
|
|
} |
|
|
|
String result = GoldTistV2.addDCCoinNew(rechargeUser.getJwcode().toString(),67,rechargeUser.getFreeGold().doubleValue(),"","分享得金币",0,"黄其振","分享得金币"); |
|
|
|
|
|
|
|
String cleanResult = result.replaceAll("\\s+", ""); |
|
|
|
if ("1".equals(cleanResult)) { |
|
|
|
return Result.success(); |
|
|
|
} else { |
|
|
|
throw new SystemException(String.format("金币发放失败:类型错误(%S),jwcode=%s", result,rechargeUser.getJwcode())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |