| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.http.HttpEntity; |
| | | import org.apache.http.client.ClientProtocolException; |
| | | import org.apache.http.client.entity.UrlEncodedFormEntity; |
| | | import org.apache.http.client.methods.CloseableHttpResponse; |
| | | import org.apache.http.client.methods.HttpGet; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.client.utils.URIBuilder; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClients; |
| | | import org.apache.http.message.BasicNameValuePair; |
| | | import org.apache.http.util.EntityUtils; |
| | | import org.json.JSONObject; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | import org.springblade.modules.permit.service.IPermitService; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import sun.net.www.http.HttpClient; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URI; |
| | | import java.net.URL; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-permit/permit") |
| | | @RequestMapping("/permit") |
| | | @Api(value = "", tags = "接口") |
| | | public class PermitController extends BladeController { |
| | | |
| | |
| | | public R save(@Valid @RequestBody Permit permit) { |
| | | permit.setType("2"); |
| | | permit.setPermitime(new Date()); |
| | | Map<String, String> param = null; |
| | | return R.status(permitService.save(permit)); |
| | | } |
| | | |
| | |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(permitService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |