!13 2022-1-14 Carl

Merge pull request !13 from Admin/sit-Carl-V3
This commit is contained in:
Admin 2022-01-14 10:34:46 +00:00 committed by Gitee
commit 2d9968c3c0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 10 additions and 3 deletions

View File

@ -41,7 +41,7 @@ public class SMSController {
String hash = MD5Utils.getMD5Code(KEY + "@" + currentTime + "@" + randomNum);//生成MD5值 String hash = MD5Utils.getMD5Code(KEY + "@" + currentTime + "@" + randomNum);//生成MD5值
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
resultMap.put("hash", hash); resultMap.put("hash", hash);
resultMap.put("msgNum",randomNum); // resultMap.put("msgNum",randomNum);
resultMap.put("tamp", currentTime); resultMap.put("tamp", currentTime);
return resultMap; //将hash值和tamp时间返回给前端 return resultMap; //将hash值和tamp时间返回给前端
} }

View File

@ -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;