Search in sources :

Example 1 with Merchant

use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.

the class WxConfigServiceImpl method saveWxConfig.

@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
public void saveWxConfig(WxConfig wxConfig) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    wxConfig.setMerchantId(merchant == null ? null : merchant.getId());
    WxConfigMapper.insert(wxConfig);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Transactional(org.springframework.transaction.annotation.Transactional)

Example 2 with Merchant

use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.

the class RedpackLogController method index.

/**
 * 跳转到红包记录首页
 */
@RequestMapping("")
@Permission
public String index(Model model) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    List<Redpack> redpacks = redpackService.selectByMerchantId(merchant.getId());
    model.addAttribute("sendStatus", RedPackSendStatus.values());
    model.addAttribute("redpacks", redpacks);
    return PREFIX + "redpackLog.html";
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Redpack(com.ikoori.vip.common.persistence.model.Redpack) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 3 with Merchant

use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.

the class ShareLogController method list.

/**
 * 获取分享日志列表
 */
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String shareName, String receiveName, String mobile, Integer receiveStatus) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
    List<Map<String, Object>> result = shareLogService.getShareLogList(page, shareName, receiveName, receiveStatus, mobile, merchant.getId(), page.getOrderByField(), page.isAsc());
    page.setRecords(result);
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Map(java.util.Map) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 4 with Merchant

use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.

the class SignLogController method list.

/**
 * 获取签到记录列表
 */
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String uname, String nickname, String mobile, String signS, String signE) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
    List<Map<String, Object>> result = signLogService.getSignLogList(page, uname, nickname, mobile, signS, signE, merchant.getId(), page.getOrderByField(), page.isAsc());
    page.setRecords(result);
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Map(java.util.Map) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 5 with Merchant

use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.

the class StoreEmployeeController method storeEmployeeAdd.

/**
 * 跳转到添加员工管理
 */
@Permission
@RequestMapping("/storeEmployee_add")
public String storeEmployeeAdd(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("roles", RoleType.values());
    // 查询店铺
    model.addAttribute("stores", stores);
    return PREFIX + "storeEmployee_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)

Aggregations

Merchant (com.ikoori.vip.common.persistence.model.Merchant)66 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)59 Permission (com.ikoori.vip.common.annotion.Permission)55 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)35 HashMap (java.util.HashMap)29 Map (java.util.Map)20 Store (com.ikoori.vip.common.persistence.model.Store)12 Card (com.ikoori.vip.common.persistence.model.Card)11 BussinessException (com.ikoori.vip.common.exception.BussinessException)8 Coupon (com.ikoori.vip.common.persistence.model.Coupon)7 MemberCard (com.ikoori.vip.common.persistence.model.MemberCard)7 LinkedHashMap (java.util.LinkedHashMap)4 JSONObject (com.alibaba.fastjson.JSONObject)3 Ticket (com.ikoori.vip.common.persistence.model.Ticket)3 User (com.ikoori.vip.common.persistence.model.User)3 Transactional (org.springframework.transaction.annotation.Transactional)3 Member (com.ikoori.vip.common.persistence.model.Member)2 Picture (com.ikoori.vip.common.persistence.model.Picture)2 StoreCoupon (com.ikoori.vip.common.persistence.model.StoreCoupon)2 CouponCodeWarpper (com.ikoori.vip.server.modular.biz.warpper.CouponCodeWarpper)2