use of com.ikoori.vip.common.persistence.model.Store in project vip by guangdada.
the class TicketController method index.
/**
* 跳转到小票首页
*/
@Permission
@RequestMapping("")
public String index(Model model) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Map<String, Object> condition = new HashMap<String, Object>();
condition.put("merchantId", merchant.getId());
List<Store> stores = storeService.selectByCondition(condition);
// 查询店铺
model.addAttribute("stores", stores);
/*
* Long userId = Long.valueOf(ShiroKit.getUser().getId()); Ticket
* ticket=ticketMapper.selectById(1); model.addAttribute("ticket",
* ticket);
*/
return PREFIX + "ticket.html";
}
use of com.ikoori.vip.common.persistence.model.Store in project vip by guangdada.
the class TicketController method ticketAdd.
/**
* 跳转到添加小票
*/
@Permission
@RequestMapping("/ticket_add")
public String ticketAdd(Model model) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Map<String, Object> condition = new HashMap<String, Object>();
condition.put("merchantId", merchant.getId());
List<Store> stores = storeService.selectByCondition(condition);
// 查询店铺
model.addAttribute("stores", stores);
model.addAttribute("specType", SpecType.values());
return PREFIX + "ticket_add.html";
}
use of com.ikoori.vip.common.persistence.model.Store in project vip by guangdada.
the class CouponController method couponAdd.
/**
* 跳转到添加优惠券
*/
@Permission
@RequestMapping("/coupon_add")
public String couponAdd(Model model) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Map<String, Object> condition = new HashMap<String, Object>();
condition.put("merchantId", merchant.getId());
// 查询店铺
List<Store> stores = storeService.selectByCondition(condition);
model.addAttribute("stores", stores);
// 查询会员卡
List<Card> cards = cardService.selectByCondition(condition);
model.addAttribute("cards", cards);
model.addAttribute("merchantName", merchant.getName());
return PREFIX + "coupon_add.html";
}
use of com.ikoori.vip.common.persistence.model.Store in project vip by guangdada.
the class OrderController method index.
/**
* 跳转到订单首页
*/
@Permission
@RequestMapping("")
public String index(Model model) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Map<String, Object> condition = new HashMap<String, Object>();
condition.put("merchantId", merchant.getId());
List<Store> stores = storeService.selectByCondition(condition);
// 查询店铺
model.addAttribute("stores", stores);
model.addAttribute("orderSources", OrderSource.values());
return PREFIX + "order.html";
}
use of com.ikoori.vip.common.persistence.model.Store in project vip by guangdada.
the class StoreApiImpl method getStoreDetail.
/**
* <p>Title: getStoreDetail</p>
* <p>Description: 会员门店详情</p>
* @param storeId 门店id
* @return
* @see com.ikoori.vip.api.service.StoreApi#getStoreDetail(java.lang.Long)
*/
@Override
public JSONObject getStoreDetail(Long storeId) {
log.info("进入getStoreDetail>>storeId=" + storeId);
Store store = storeDao.getStoreDetail(storeId);
JSONObject obj = new JSONObject();
List<Picture> pictures = storePhotoDao.selectStorePhoto(storeId);
obj.put("id", store.getId());
obj.put("name", store.getName());
obj.put("address", store.getAddress());
obj.put("latitude", store.getLatitude());
obj.put("longitude", store.getLongitude());
obj.put("servicePhone", store.getServicePhone());
obj.put("openTime", store.getOpenTime());
obj.put("closeTime", store.getCloseTime());
obj.put("pictures", pictures);
log.info("结束getStoreDetail");
return obj;
}
Aggregations