@RequestMapping(value = "/returnReason/list", method = RequestMethod.GET)
 public Map<?, ?> selectList(WebRequest request) throws BadRequestException {
   Map<String, Object> mParam = Util.GetRequestMap(request);
   Map<String, Object> result = new HashMap<>();
   result.put("list", returnReasonDao.selectList(mParam));
   result.put("count", returnReasonDao.count(mParam));
   return result;
 }
 @RequestMapping(value = "/returnReason/{id}", method = RequestMethod.PUT)
 public ReturnReason update(@RequestBody ReturnReason returnReason) throws BadRequestException {
   if (returnReasonDao.update(returnReason) != 1) {
     throw new BadRequestException("保存失败!");
   } else {
     return returnReason;
   }
 }
 @RequestMapping(value = "/returnReason", method = RequestMethod.POST)
 public ReturnReason insert(@RequestBody ReturnReason returnReason) throws BadRequestException {
   if (returnReasonDao.insert(returnReason) != 1) {
     throw new BadRequestException("保存失败!");
   } else {
     return returnReason;
   }
 }
 @RequestMapping(value = "/returnReason/{id}", method = RequestMethod.DELETE)
 public void delete(@PathVariable(value = "id") int id) throws BadRequestException {
   if (returnReasonDao.delete(id) <= 0) throw new BadRequestException("删除失败");
 }
 @RequestMapping(value = "/kv/returnReason.do", method = RequestMethod.GET)
 public Collection<Map<Integer, String>> selectReturnReasonKV() throws BadRequestException {
   return returnReasonDao.selectKV();
 }
 @RequestMapping(value = "/returnReason/{id}", method = RequestMethod.GET)
 public ReturnReason selectOne(@PathVariable(value = "id") int id) throws BadRequestException {
   return returnReasonDao.selectOne(id);
 }