1/20
This commit is contained in:
@@ -63,6 +63,9 @@ public class VegeCellarReserveDetailsService extends MybatisBaseService<VegeCell
|
||||
.eq("goodsSid",goods1.getGoodsSid()).eq("affiliation",dto.getAffiliation())).get(0);
|
||||
double d=Double.valueOf(vegetableCellar.getGoodsNumber());
|
||||
double c=Double.valueOf(goods1.getSelect());
|
||||
if(c>d){
|
||||
return rb.setMsg("预约数量大于库存数量");
|
||||
}
|
||||
if(Double.compare(d,c)==0){
|
||||
vegetableCellarService.deleteBySid(vegetableCellar.getSid());
|
||||
}else{
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -66,6 +67,7 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
||||
// @Autowired
|
||||
// private HttpServletResponse response;
|
||||
//
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ResultBean submission(VegeCellarReserveOrderDto dto) {
|
||||
ResultBean rb = new ResultBean().fail();
|
||||
boolean b=isSatAndSun(dto.getReserveDate());
|
||||
|
||||
Reference in New Issue
Block a user