bug
This commit is contained in:
parent
5c4922d656
commit
6a7af98bec
@ -647,7 +647,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
|
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
for (JSONObject jsonObject : jsonObjects) {
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
Integer gasolineRule1 = jsonObject.getInteger("gasolineRule1");
|
Integer gasolineRule1 = jsonObject.getInteger("gasolineRule1");
|
||||||
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
||||||
@ -658,11 +658,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
BigDecimal multiply = divide.multiply(bigDecimal2);
|
BigDecimal multiply = divide.multiply(bigDecimal2);
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}else {
|
}else {
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
for (JSONObject jsonObject : jsonObjects) {
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
Integer gasolineRule1 = jsonObject.getInteger("gasolineRule1");
|
Integer gasolineRule1 = jsonObject.getInteger("gasolineRule1");
|
||||||
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
||||||
@ -671,7 +670,6 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (oilTypebyId.equals("柴油")){
|
if (oilTypebyId.equals("柴油")){
|
||||||
@ -680,7 +678,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
|
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
|
||||||
String gasolineRule = ljUserGrade.getDieselRule();
|
String gasolineRule = ljUserGrade.getDieselRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
for (JSONObject jsonObject : jsonObjects) {
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
Integer gasolineRule1 = jsonObject.getInteger("dieselRule1");
|
Integer gasolineRule1 = jsonObject.getInteger("dieselRule1");
|
||||||
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
||||||
@ -691,11 +689,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
BigDecimal multiply = divide.multiply(bigDecimal2);
|
BigDecimal multiply = divide.multiply(bigDecimal2);
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}else {
|
}else {
|
||||||
String gasolineRule = ljUserGrade.getDieselRule();
|
String gasolineRule = ljUserGrade.getDieselRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
for (JSONObject jsonObject : jsonObjects) {
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
Integer gasolineRule1 = jsonObject.getInteger("dieselRule1");
|
Integer gasolineRule1 = jsonObject.getInteger("dieselRule1");
|
||||||
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
||||||
@ -704,7 +701,6 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -714,7 +710,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
|
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
|
||||||
String gasolineRule = ljUserGrade.getNaturalGasRule();
|
String gasolineRule = ljUserGrade.getNaturalGasRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
for (JSONObject jsonObject : jsonObjects) {
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
Integer gasolineRule1 = jsonObject.getInteger("naturalGas1");
|
Integer gasolineRule1 = jsonObject.getInteger("naturalGas1");
|
||||||
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
||||||
@ -725,11 +721,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
BigDecimal multiply = divide.multiply(bigDecimal2);
|
BigDecimal multiply = divide.multiply(bigDecimal2);
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}else {
|
}else {
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
for (JSONObject jsonObject : jsonObjects) {
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
Integer gasolineRule1 = jsonObject.getInteger("naturalGas1");
|
Integer gasolineRule1 = jsonObject.getInteger("naturalGas1");
|
||||||
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
|
||||||
@ -738,11 +733,8 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return paymentActiveVO;
|
return paymentActiveVO;
|
||||||
|
Loading…
Reference in New Issue
Block a user