| | |
| | | import com.moral.api.entity.DeviceAdjustValue; |
| | | import com.moral.api.service.DeviceAdjustValueService; |
| | | import com.moral.constant.ResultMessage; |
| | | import com.moral.util.WebUtils; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | |
| | | return ResultMessage.fail(Integer.parseInt(resultMap.get("code").toString()),resultMap.get("msg").toString()); |
| | | } |
| | | |
| | | @RequestMapping(value = "getDeviceAdjustValueByCondition", method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public ResultMessage getDeviceAdjustValueByCondition(HttpServletRequest request) { |
| | | Map<String,Object> parameters = WebUtils.getParametersStartingWith(request,null); |
| | | Map<String,Object> resultMap = deviceAdjustValueService.getDataByCondition(parameters); |
| | | if (!resultMap.containsKey("code")){ |
| | | return ResultMessage.ok(resultMap); |
| | | } |
| | | return ResultMessage.fail(Integer.parseInt(resultMap.get("code").toString()),resultMap.get("msg").toString()); |
| | | } |
| | | |
| | | } |