| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | * @author jyy |
| | | */ |
| | | @RequestMapping(value = "/editFormCz") |
| | | public String editFormCz() { |
| | | SysVipInfo info = |
| | | (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(info.getId()); |
| | | public String editFormCz(Long id) { |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(id); |
| | | |
| | | if (cardUseInfo == null) { |
| | | cardUseInfo = new MoneyCardUse(); |
| | | cardUseInfo.setVipId(info.getId()); |
| | | cardUseInfo.setVipId(id); |
| | | cardUseInfo.setCardName("储值卡"); |
| | | cardUseInfo.setIsVipCar(Dictionary.FLAG_YES_Y); |
| | | cardUseInfo.setRealMoney(0D); |
| | |
| | | */ |
| | | @RequestMapping(value = "/cz") |
| | | public @ResponseBody |
| | | AjaxResult cz(CzXkVo czVo) { |
| | | AjaxResult cz(@RequestBody CzXkVo czVo) { |
| | | SysOrder order= orderService.updateAddCardMoney(czVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "充值成功"); |
| | | result.putInMap("orderId",order.getId()); |
| | |
| | | public String toBj(Long id) { |
| | | // 根据id查到对应的订单信息 |
| | | SysOrder order = orderService.findById(id); |
| | | SysOrderItem item = new SysOrderItem(); |
| | | item.setOrderId(order.getId()); |
| | | List<SysOrderItem> items = orderItemService.findByModel(item); |
| | | order.setItems(items); |
| | | WebUtil.getRequest().setAttribute("order", order); |
| | | |
| | | return "admin/hive/beautySalon/bj-form"; |
| | |
| | | */ |
| | | @RequestMapping(value = "/bj") |
| | | public @ResponseBody |
| | | AjaxResult bj(SysOrder order) throws GlobleException { |
| | | AjaxResult bj(@RequestBody SysOrder order) throws GlobleException { |
| | | |
| | | orderService.updateAfterMoney(order); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "补交成功"); |