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