Search in sources :

Example 81 with Permission

use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.

the class PictureTypeController method pictureTypeUpdate.

/**
 * 跳转到修改图片类型
 */
@Permission
@RequestMapping("/pictureType_update/{pictureTypeId}")
public String pictureTypeUpdate(@PathVariable Long pictureTypeId, Model model) {
    PictureType pictureType = pictureTypeService.selectById(pictureTypeId);
    model.addAttribute(pictureType);
    return PREFIX + "pictureType_edit.html";
}
Also used : PictureType(com.ikoori.vip.common.persistence.model.PictureType) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 82 with Permission

use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.

the class PictureController method list.

/**
 * 获取图片列表
 */
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String condition) {
    Page<Picture> page = new PageFactory<Picture>().defaultPage();
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    List<Map<String, Object>> result = pictureService.getPictureList(page, condition, page.getOrderByField(), page.isAsc(), merchant.getId());
    page.setRecords((List<Picture>) new PictureWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Picture(com.ikoori.vip.common.persistence.model.Picture) PictureWarpper(com.ikoori.vip.server.modular.biz.warpper.PictureWarpper) 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 83 with Permission

use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.

the class PointController method list.

/**
 * 获取积分管理列表
 */
@RequestMapping(value = "/list")
@Permission
@ResponseBody
public Object list(String condition) {
    Page<Point> page = new PageFactory<Point>().defaultPage();
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    List<Map<String, Object>> result = pointService.getPointList(page, condition, page.getOrderByField(), page.isAsc(), merchant.getId());
    page.setRecords((List<Point>) new PointWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Point(com.ikoori.vip.common.persistence.model.Point) Map(java.util.Map) PointWarpper(com.ikoori.vip.server.modular.biz.warpper.PointWarpper) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 84 with Permission

use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.

the class PointController method pointUpdate.

/**
 * 跳转到修改积分管理
 */
@Permission
@RequestMapping("/point_update/{pointId}")
public String pointUpdate(@PathVariable Integer pointId, Model model) {
    Point point = pointMapper.selectById(pointId);
    if (point.getRuleType().intValue() == PointType.PAY_ORDER.getCode()) {
        model.addAttribute("pointsLimit1", point.getPointsLimit());
    } else if (point.getRuleType().intValue() == PointType.PAY_MONEY.getCode()) {
        model.addAttribute("pointsLimit2", point.getPointsLimit() / 100);
    }
    model.addAttribute(point);
    return PREFIX + "point_edit.html";
}
Also used : Point(com.ikoori.vip.common.persistence.model.Point) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 85 with Permission

use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.

the class RedpackController method add.

/**
 * 新增红包
 */
@RequestMapping(value = "/add")
@Permission
@ResponseBody
public Object add(Redpack redpack) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    redpack.setMerchantId(merchant.getId());
    redpackService.saveRedPack(redpack);
    return super.SUCCESS_TIP;
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

Permission (com.ikoori.vip.common.annotion.Permission)93 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)92 Merchant (com.ikoori.vip.common.persistence.model.Merchant)55 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)47 HashMap (java.util.HashMap)31 Map (java.util.Map)23 BussinessException (com.ikoori.vip.common.exception.BussinessException)18 Store (com.ikoori.vip.common.persistence.model.Store)12 Coupon (com.ikoori.vip.common.persistence.model.Coupon)11 Card (com.ikoori.vip.common.persistence.model.Card)9 MemberCard (com.ikoori.vip.common.persistence.model.MemberCard)6 StoreCoupon (com.ikoori.vip.common.persistence.model.StoreCoupon)6 User (com.ikoori.vip.common.persistence.model.User)6 ShiroUser (com.ikoori.vip.server.core.shiro.ShiroUser)4 LinkedHashMap (java.util.LinkedHashMap)4 BussinessLog (com.ikoori.vip.common.annotion.log.BussinessLog)3 OperationLog (com.ikoori.vip.common.persistence.model.OperationLog)3 WxConfig (com.ikoori.vip.common.persistence.model.WxConfig)3 LogWarpper (com.ikoori.vip.server.modular.system.warpper.LogWarpper)3 EntityWrapper (com.baomidou.mybatisplus.mapper.EntityWrapper)2