Skip to content

Commit

Permalink
提交代码
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallHamster committed Apr 24, 2016
1 parent d64b481 commit eeb5abd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,18 @@ public Long save(HttpServletRequest request, Long addressId, String name, String

return 0L;
}

@RequestMapping("delete")
@ResponseBody
public int delete(Long addressId) {
try {
service.deleteById(addressId);

return 1;
} catch (Exception e) {
e.printStackTrace();
}

return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.leoman.entity.KUser;
import com.leoman.entity.Payrecord;
import com.leoman.service.CoinlogService;
import com.leoman.service.KUserService;
import com.leoman.service.PayrecordService;
import com.leoman.utils.WebUtil;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -38,9 +39,14 @@ public class WeixinCoinlogController extends CommonController {
@Autowired
private PayrecordService payrecordService;

@Autowired
private KUserService userService;

@RequestMapping("/index")
public String index(HttpServletRequest request, Model model) {
KUser user = (KUser) request.getSession().getAttribute(Constant.SESSION_WEIXIN_USER);
user = userService.getById(user.getId());
request.getSession().setAttribute(Constant.SESSION_WEIXIN_USER, user);
model.addAttribute("user", user);
return "weixin/recharge-online";
}
Expand Down

0 comments on commit eeb5abd

Please sign in to comment.