wangpengfei 1 year ago
parent
commit
79ced90940
  1. 15
      src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java
  2. 6
      src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderService.java
  3. 3
      src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java
  4. 8
      src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderService.java
  5. 3
      src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarService.java

15
src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java

@ -214,6 +214,12 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
public ResultBean vegeCellarList(LpkGoodsQuery query) { public ResultBean vegeCellarList(LpkGoodsQuery query) {
ResultBean rb=new ResultBean().fail(); ResultBean rb=new ResultBean().fail();
if(StringUtils.isBlank(query.getCustomerSid())){
return rb.setMsg("参数不全");
}
if(StringUtils.isBlank(query.getAffiliation())){
return rb.setMsg("参数不全");
}
List<MyGoodsVo> vo =baseMapper.getGoodsApplet(query); List<MyGoodsVo> vo =baseMapper.getGoodsApplet(query);
vo.forEach(s->{ vo.forEach(s->{
double i=Double.valueOf(s.getGoodsNumber()); double i=Double.valueOf(s.getGoodsNumber());
@ -224,6 +230,12 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
} }
public ResultBean vegeCellarTypeList(LpkGoodsQuery query) { public ResultBean vegeCellarTypeList(LpkGoodsQuery query) {
ResultBean rb=new ResultBean().fail(); ResultBean rb=new ResultBean().fail();
if(StringUtils.isBlank(query.getCustomerSid())){
return rb.setMsg("参数不全");
}
if(StringUtils.isBlank(query.getAffiliation())){
return rb.setMsg("参数不全");
}
List<GoodsTypeVo> vo =new ArrayList<>(); List<GoodsTypeVo> vo =new ArrayList<>();
List<BrandVo> list1= IPmsBrandService.getList().getData(); List<BrandVo> list1= IPmsBrandService.getList().getData();
for (BrandVo brandVo : list1) { for (BrandVo brandVo : list1) {
@ -259,6 +271,9 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
public ResultBean getGoodsByTypeSid(LpkGiftCardQuery query) { public ResultBean getGoodsByTypeSid(LpkGiftCardQuery query) {
ResultBean rb=new ResultBean().fail(); ResultBean rb=new ResultBean().fail();
if(StringUtils.isBlank(query.getCustomerSid())){
return rb.setMsg("参数不全");
}
List<GiftBagGoodss> giftBagGoodss=baseMapper.getAllGoodsApplets(query); List<GiftBagGoodss> giftBagGoodss=baseMapper.getAllGoodsApplets(query);
ShoppingCartQuery query1=new ShoppingCartQuery(); ShoppingCartQuery query1=new ShoppingCartQuery();
query1.setBrandId(query.getBrandId()); query1.setBrandId(query.getBrandId());

6
src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderService.java

@ -197,7 +197,7 @@ public class OrdOrderService extends MybatisBaseService<OrdOrderMapper, OrdOrder
order.setTotalTee(dto.getTotalTee());//实付金额 order.setTotalTee(dto.getTotalTee());//实付金额
order.setMeet(removeZeros(String.valueOf(totalAmount)));//应付金额 order.setMeet(removeZeros(String.valueOf(totalAmount)));//应付金额
if(dto.getOrdOrderDetailsVoList().size()>1){ if(dto.getOrdOrderDetailsVoList().size()>1){
order.setName(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"等"+(dto.getOrdOrderDetailsVoList().size()-1)+"件商品"); order.setName(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"等"+(dto.getOrdOrderDetailsVoList().size())+"件商品");
}else{ }else{
order.setName(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"商品"); order.setName(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"商品");
} }
@ -220,7 +220,7 @@ public class OrdOrderService extends MybatisBaseService<OrdOrderMapper, OrdOrder
String [] sids=strings.toArray(new String [0]); String [] sids=strings.toArray(new String [0]);
shoppingCartService.delBySids(sids); shoppingCartService.delBySids(sids);
if(dto.getOrdOrderDetailsVoList().size()>1){ if(dto.getOrdOrderDetailsVoList().size()>1){
result.setGoods(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"等"+(dto.getOrdOrderDetailsVoList().size()-1)+"件商品"); result.setGoods(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"等"+(dto.getOrdOrderDetailsVoList().size())+"件商品");
}else{ }else{
result.setGoods(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"商品"); result.setGoods(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"商品");
} }
@ -367,7 +367,7 @@ public class OrdOrderService extends MybatisBaseService<OrdOrderMapper, OrdOrder
//拼接base参数 //拼接base参数
String name =""; String name ="";
if(detailVos.size()>1){ if(detailVos.size()>1){
name=detailVos.get(0).getGoodsName().toString()+"等"+(detailVos.size()-1)+"件商品"; name=detailVos.get(0).getGoodsName().toString()+"等"+(detailVos.size())+"件商品";
}else{ }else{
name =detailVos.get(0).getGoodsName().toString()+"商品"; name =detailVos.get(0).getGoodsName().toString()+"商品";
} }

3
src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java

@ -86,6 +86,9 @@ public class TransferRecordsService extends MybatisBaseService<TransferRecordsMa
ResultBean rb = new ResultBean().fail(); ResultBean rb = new ResultBean().fail();
TransferRecordsQuery query = pq.getParams(); TransferRecordsQuery query = pq.getParams();
QueryWrapper<VegeCellarReserveOrder> qw = new QueryWrapper<>(); QueryWrapper<VegeCellarReserveOrder> qw = new QueryWrapper<>();
if(StringUtils.isBlank(query.getCustomerSid())){
return rb.setMsg("参数不全");
}
qw.eq("o.customerSid", query.getCustomerSid()); qw.eq("o.customerSid", query.getCustomerSid());
IPage<TransferRecords> page = PagerUtil.queryToPage(pq); IPage<TransferRecords> page = PagerUtil.queryToPage(pq);
IPage<TransferRecordsVo> pagging =new Page<>(); IPage<TransferRecordsVo> pagging =new Page<>();

8
src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderService.java

@ -291,10 +291,10 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
for (VegeCellarReserveDetails goods1 : goods) { for (VegeCellarReserveDetails goods1 : goods) {
LpkGoods lpkGoods = lpkGoodsService.getOne(new QueryWrapper<LpkGoods>().eq("sid", goods1.getGoodsSid())); LpkGoods lpkGoods = lpkGoodsService.getOne(new QueryWrapper<LpkGoods>().eq("sid", goods1.getGoodsSid()));
OrderGoodsVo orderGoodsVo=new OrderGoodsVo(); OrderGoodsVo orderGoodsVo=new OrderGoodsVo();
// orderGoodsVo.setGoodName(lpkGoods.getName()); orderGoodsVo.setGoodName(lpkGoods.getName());
// orderGoodsVo.setNum(Integer.parseInt(goods1.getNum())); orderGoodsVo.setNum(Integer.parseInt(goods1.getNum()));
// orderGoodsVo.setUnitName(lpkGoods.getUnitName()); orderGoodsVo.setUnitName(lpkGoods.getUnitName());
// goodsVo.add(orderGoodsVo); goodsVo.add(orderGoodsVo);
if (StringUtils.isBlank(vo.getGoodss())) { if (StringUtils.isBlank(vo.getGoodss())) {
vo.setGoodss(lpkGoods.getName() + ":" + goods1.getNum() + lpkGoods.getUnitName()); vo.setGoodss(lpkGoods.getName() + ":" + goods1.getNum() + lpkGoods.getUnitName());
} else { } else {

3
src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarService.java

@ -169,6 +169,9 @@ public class VegetableCellarService extends MybatisBaseService<VegetableCellarMa
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResultBean receiveTransferGoods(VegetableCellarDto dto) { public ResultBean receiveTransferGoods(VegetableCellarDto dto) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
if(StringUtils.isBlank(dto.getCustomerSid())){
return rb.setMsg("参数不全");
}
TransferRecords transferRecords=transferRecordsService.getOne(new QueryWrapper<TransferRecords>().eq("sid",dto.getTransferSid()).eq("state","1")); TransferRecords transferRecords=transferRecordsService.getOne(new QueryWrapper<TransferRecords>().eq("sid",dto.getTransferSid()).eq("state","1"));
if(transferRecords==null){ if(transferRecords==null){
return rb.setMsg("已经被领取"); return rb.setMsg("已经被领取");

Loading…
Cancel
Save