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);
}
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";
}
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);
}
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);
}
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";
}
Aggregations