mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 18:56:39 +08:00
adding 2 more coupon type ID calculation
This commit is contained in:
parent
8c352508cd
commit
4e53691ef5
@ -216,14 +216,21 @@ public class OrderService {
|
|||||||
royalcaninOperateLogEntity.setAcceptTime(dateformat.format(acceptTime));
|
royalcaninOperateLogEntity.setAcceptTime(dateformat.format(acceptTime));
|
||||||
royalcaninOperateLogService.add(royalcaninOperateLogEntity);
|
royalcaninOperateLogService.add(royalcaninOperateLogEntity);
|
||||||
return ResponseDTO.succ();
|
return ResponseDTO.succ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double couponTotal(String couponTypeId,double discount,double total,int buyCount){
|
public double couponTotal(String couponTypeId,double discount,double total,int buyCount){
|
||||||
double endTotal = 0;
|
double endTotal = 0;
|
||||||
switch (couponTypeId)
|
switch (couponTypeId)
|
||||||
{
|
{
|
||||||
case "5" :
|
// case "5" :
|
||||||
endTotal = (total * (buyCount-1)) + (total * discount);
|
// endTotal = (total * (buyCount-1)) + (total * discount);
|
||||||
|
// break;
|
||||||
|
case "2":
|
||||||
|
endTotal = total * buyCount - discount;
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
endTotal = (total * buyCount) * discount;
|
||||||
break;
|
break;
|
||||||
case "1" :
|
case "1" :
|
||||||
endTotal = total * buyCount - discount;
|
endTotal = total * buyCount - discount;
|
||||||
|
Loading…
Reference in New Issue
Block a user