Exemplo n.º 1
0
 /**
  * 店铺删除
  *
  * @param id
  * @param response
  */
 @OperationLog("店铺逻辑删除")
 @RequestMapping("/shop/delete")
 @ResponseBody
 public JsonResult deleteShop(Integer id, HttpServletResponse response) throws IOException {
   if (log.isInfoEnabled()) {
     log.info("店铺:删除店铺,id = " + id);
   }
   // 删除店铺
   shopService.deleteShopForLogic(id);
   BusinessLogUtil.bindBusinessLog("店铺ID:%d", id);
   return new JsonResult(true, "删除成功!");
 }
Exemplo n.º 2
0
 /**
  * 店铺更新
  *
  * @param shop
  * @param sessionKey
  */
 @OperationLog("店铺更新")
 @RequestMapping("/shop/update")
 @ResponseBody
 public JsonResult updateShop(@ModelAttribute("id") Shop shop, String sessionKey)
     throws Exception {
   if (log.isInfoEnabled()) {
     log.info("店铺:更新店铺," + shop);
   }
   // 更新店铺
   shopService.updateShop(shop, sessionKey);
   BusinessLogUtil.bindBusinessLog(
       "店铺详情:名称[%s],描述[%s],卖家昵称[%s],session Key[%s]",
       shop.getTitle(), shop.getDescription(), shop.getNick(), sessionKey);
   return new JsonResult(true, "更新成功!");
 }