文件名从 mdc-parent/mdc-show/src/main/java/com/qianwen/mdc/controller/PlantEditController.java 修改 |
| | |
| | | package com.qianwen.mdc.controller;
|
| | |
|
| | | import java.util.List;
|
| | | package com.qianwen.mdc.controller.plant;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | |
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.CrossOrigin;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestHeader;
|
| | |
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | |
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.qianwen.mdc.common.OpResult;
|
| | | import com.qianwen.mdc.dto.IdsDTO;
|
| | | import com.qianwen.mdc.dto.PlantDTO;
|
| | | import com.qianwen.mdc.dto.plant.PlantDTO;
|
| | | import com.qianwen.mdc.service.plant.PlantService;
|
| | | import com.qianwen.mdc.vallidate.AddGroup;
|
| | | import com.qianwen.mdc.vallidate.UpdateGroup;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 鍏ㄩ儴杞﹂棿鍒楄〃
|
| | | * @param request
|
| | | * @return
|
| | | */
|
| | | @GetMapping(value = "/list")
|
| | | public OpResult<List<PlantDTO>> list() {
|
| | | |
| | | try {
|
| | | return OpResult.success(plantService.list());
|
| | | }catch(Exception ex) {
|
| | | logger.error("鏌ヨ鍘傛埧鍒楄〃澶辫触",ex);
|
| | | return OpResult.fail(ex.getMessage());
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | }
|