Parcourir la source

=0 的错误又再现了。。。。

dinglan il y a 2 ans
Parent
commit
22602664b1
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/main/java/com/sw/service/impl/SnatchMaskServiceImpl.java

+ 1 - 1
src/main/java/com/sw/service/impl/SnatchMaskServiceImpl.java

@@ -56,7 +56,7 @@ public class SnatchMaskServiceImpl implements SnatchMaskService {
     public String doSnatch(Integer uid, Integer maskId) {
         //1.get the amount of remaining masks
         TMask mask = maskService.getById(maskId);
-        if (mask.getMaskStock() > amount) {
+        if (mask.getMaskStock() >= amount) {
             //3.create order
             int res = orderService.creatOrder(uid, maskId);
             //4.decrease the stock of mask