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