Search in sources :

Example 11 with Store

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";
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) HashMap(java.util.HashMap) Store(com.ikoori.vip.common.persistence.model.Store) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 12 with Store

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";
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) HashMap(java.util.HashMap) Store(com.ikoori.vip.common.persistence.model.Store) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 13 with Store

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";
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) HashMap(java.util.HashMap) Store(com.ikoori.vip.common.persistence.model.Store) Card(com.ikoori.vip.common.persistence.model.Card) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 14 with Store

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";
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) HashMap(java.util.HashMap) Store(com.ikoori.vip.common.persistence.model.Store) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 15 with Store

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;
}
Also used : JSONObject(com.alibaba.fastjson.JSONObject) Picture(com.ikoori.vip.common.persistence.model.Picture) Store(com.ikoori.vip.common.persistence.model.Store)

Aggregations

Store (com.ikoori.vip.common.persistence.model.Store)16 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)14 Permission (com.ikoori.vip.common.annotion.Permission)12 Merchant (com.ikoori.vip.common.persistence.model.Merchant)12 HashMap (java.util.HashMap)12 JSONObject (com.alibaba.fastjson.JSONObject)3 Card (com.ikoori.vip.common.persistence.model.Card)3 Ticket (com.ikoori.vip.common.persistence.model.Ticket)3 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)3 Coupon (com.ikoori.vip.common.persistence.model.Coupon)2 ApiOperation (io.swagger.annotations.ApiOperation)2 CouponPayDo (com.ikoori.vip.common.dto.CouponPayDo)1 OrderItemPayDo (com.ikoori.vip.common.dto.OrderItemPayDo)1 BussinessException (com.ikoori.vip.common.exception.BussinessException)1 CouponFetch (com.ikoori.vip.common.persistence.model.CouponFetch)1 CouponTrade (com.ikoori.vip.common.persistence.model.CouponTrade)1 Member (com.ikoori.vip.common.persistence.model.Member)1 Order (com.ikoori.vip.common.persistence.model.Order)1 OrderItem (com.ikoori.vip.common.persistence.model.OrderItem)1 Picture (com.ikoori.vip.common.persistence.model.Picture)1