Commit ff1b8a72a574bf55cf43b2a924c15b0ad62bee0f
Merge branch 'minhang' into pudong
Showing
1 changed file
with
16 additions
and
0 deletions
src/main/java/com/bsth/controller/LineController.java
| ... | ... | @@ -77,6 +77,22 @@ public class LineController extends BaseController<Line, Integer> { |
| 77 | 77 | return service.save(t); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | + /** | |
| 81 | + * | |
| 82 | + * 更改 | |
| 83 | + * | |
| 84 | + */ | |
| 85 | + @RequestMapping(value="/update", method = RequestMethod.POST) | |
| 86 | + public Map<String, Object> update(Line l){ | |
| 87 | + Map<String, Object> map = new HashMap<>(); | |
| 88 | + if((l.getId().toString().length()) > 6 || service.lineCodeVerification(l.getLineCode()).equals("true") ) { | |
| 89 | + | |
| 90 | + map.put("status", ResponseCode.ERROR); | |
| 91 | + return map; | |
| 92 | + } | |
| 93 | + return service.save(l); | |
| 94 | + } | |
| 95 | + | |
| 80 | 96 | @RequestMapping(value ="/findById" , method = RequestMethod.GET) |
| 81 | 97 | Line findByID(@RequestParam(defaultValue = "id") Integer id){ |
| 82 | 98 | return service.findById(id); | ... | ... |