| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class PlanTypeController extends BaseController { |
| | |
| | | @RequestMapping(value = "/planType/add/auth") |
| | | @ManagerAuth |
| | | public R add(PlanType planType) { |
| | | planType.setHostId(getHostId()); |
| | | planType.setCreateBy(getUserId()); |
| | | planType.setCreateTime(new Date()); |
| | | planType.setUpdateBy(getUserId()); |
| | | planType.setUpdateTime(new Date()); |
| | | planType.setStatus(1); |
| | | planTypeService.insert(planType); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (Cools.isEmpty(planType) || null==planType.getId()){ |
| | | return R.error(); |
| | | } |
| | | planType.setUpdateBy(getUserId()); |
| | | planType.setUpdateTime(new Date()); |
| | | planTypeService.updateById(planType); |
| | | return R.ok(); |
| | | } |