use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.
the class MemberCardController 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());
model.addAttribute("grantType", CardGrantType.values());
model.addAttribute("state", MemCardState.values());
// 查询会员卡
List<Card> cards = cardService.selectByCondition(condition);
model.addAttribute("cards", cards);
return PREFIX + "memberCard.html";
}
use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.
the class MerchantController method merchantUpdate.
/**
* 跳转到修改商户
*/
@Permission
@RequestMapping("/merchant_update/{merchantId}")
public String merchantUpdate(@PathVariable Long merchantId, Model model) {
log.info("--merchantId---", merchantId);
try {
Merchant merchant = merchantMapper.selectById(merchantId);
model.addAttribute(merchant);
} catch (Exception e) {
e.printStackTrace();
log.info("", e);
}
return PREFIX + "merchant_edit.html";
}
use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.
the class MerchantController method list.
/**
* 获取商户列表
*/
@Permission
@RequestMapping(value = "/list", method = RequestMethod.POST)
@ResponseBody
public Object list(@RequestParam(name = "merName", required = false) String merName) {
Page<Merchant> page = new PageFactory<Merchant>().defaultPage();
List<Map<String, Object>> result = merchantDao.getMerchantList(page, merName, page.getOrderByField(), page.isAsc());
page.setRecords((List<Merchant>) new MerchantWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.
the class MerchantController method detail.
/**
* 商户详情
*/
@Permission
@RequestMapping(value = "/merchant_detail/{merchantId}")
public Object detail(@PathVariable Long merchantId, Model model) {
Merchant merchant = merchantMapper.selectById(merchantId);
model.addAttribute(merchant);
return PREFIX + "merchant_detail.html";
}
use of com.ikoori.vip.common.persistence.model.Merchant in project vip by guangdada.
the class PointTradeController method list.
/**
* 获取积分明细列表
*/
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String nickname, String mobile, Integer inOut, Long pointId, Integer tradeType) {
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 = pointTradeService.getPointTradeList(page, nickname, mobile, inOut, pointId, merchant.getId(), tradeType, page.getOrderByField(), page.isAsc());
page.setRecords((List<Map<String, Object>>) new PointTradeWarpper(result).warp());
return super.packForBT(page);
}
Aggregations