Ver Fonte

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

dinglan há 2 anos atrás
pai
commit
22602664b1

+ 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