| | |
| | | package com.nq.controller.protol; |
| | | |
| | | |
| | | import com.github.pagehelper.util.StringUtil; |
| | | import com.nq.common.ServerResponse; |
| | | import com.nq.pojo.UserBank; |
| | | import com.nq.service.IUserBankService; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.nq.utils.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @RequestMapping({"add.do"}) |
| | | @ResponseBody |
| | | public ServerResponse add(UserBank bank, HttpServletRequest request) { |
| | | if(StringUtil.isEmpty(bank.getBankNo()) || StringUtil.isEmpty(bank.getBankName()) || StringUtil.isEmpty(bank.getBankCardholderName())){ |
| | | return ServerResponse.createByErrorMsg("银行信息不能有空",request ); |
| | | } |
| | | return this.iUserBankService.addBank(bank, request); |
| | | } |
| | | |
| | |
| | | return this.iUserBankService.updateBank(bank, request); |
| | | } |
| | | |
| | | //修改银行卡信息 |
| | | @RequestMapping({"getById.do"}) |
| | | @ResponseBody |
| | | public ServerResponse getById(@RequestParam("id") String id, HttpServletRequest request) { |
| | | return this.iUserBankService.getById(id, request); |
| | | } |
| | | |
| | | //查询用户银行卡信息 |
| | | @RequestMapping({"getBankInfo.do"}) |
| | | @ResponseBody |