Browse Source

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

dinglan 2 years ago
parent
commit
22602664b1
1 changed files with 1 additions and 1 deletions
  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