Beispiel #1
0
 public Map<String, Object> getShop(ShopReq shopReq) {
   Map<String, Object> map = null;
   if (4 == shopReq.getOrderType()) {
     map = shopMapper.getLeaseOne(shopReq);
   } else if (3 == shopReq.getOrderType()) {
     map = shopMapper.getShopOne(shopReq);
   } else if (5 == shopReq.getOrderType()) {
     map = shopMapper.getPurchaseOne(shopReq);
     map.put(
         "price",
         goodService.setPurchasePrice(
             shopReq.getAgentId(),
             shopReq.getGoodId(),
             SysUtils.Object2int(map.get("price")),
             SysUtils.Object2int(map.get("floor_price"))));
   }
   if (map == null) {
     return map;
   }
   int goodId = Integer.valueOf("" + map.get("goodId"));
   // 图片
   List<String> goodPics = goodMapper.getgoodPics(goodId);
   if (null != goodPics && goodPics.size() > 0) {
     map.put("url_path", filePath + goodPics.get(0));
   }
   return map;
 }
 public Map<String, Object> getShop(CartReq cartreq) {
   Map<String, Object> map = null;
   if (2 == cartreq.getType()) {
     map = shopCartMapper.getLeaseOne(cartreq);
   } else {
     map = shopCartMapper.getShopOne(cartreq);
   }
   if (map == null) {
     return null;
   }
   int goodId = Integer.valueOf("" + map.get("goodId"));
   // 图片
   List<String> goodPics = goodMapper.getgoodPics(goodId);
   if (null != goodPics && goodPics.size() > 0) {
     map.put("url_path", filePath + goodPics.get(0));
   }
   return map;
 }