| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class MatController extends BaseController { |
| | |
| | | @RequestMapping(value = "/mat/add/auth") |
| | | @ManagerAuth |
| | | public R add(Mat mat) { |
| | | mat.setCreateBy(getUserId()); |
| | | mat.setCreateTime(new Date()); |
| | | mat.setUpdateBy(getUserId()); |
| | | mat.setUpdateTime(new Date()); |
| | | matService.insert(mat); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (Cools.isEmpty(mat) || null==mat.getId()){ |
| | | return R.error(); |
| | | } |
| | | mat.setUpdateBy(getUserId()); |
| | | mat.setUpdateTime(new Date()); |
| | | matService.updateById(mat); |
| | | return R.ok(); |
| | | } |