|
@ -0,0 +1,52 @@
|
|
|
package com.yihu.jw.hospital.endpoint.dict;
|
|
|
|
|
|
import com.yihu.jw.dict.service.DiseaseHomepageBannerService;
|
|
|
import com.yihu.jw.entity.hospital.manage.BaseDiseaseHomepageBannerDO;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping(value = BaseHospitalRequestMapping.PatientNoLogin.PREFIX)
|
|
|
@Api(value = "疾病首页图标管理",tags = "疾病首页图标管理")
|
|
|
public class DiseaseHomepageBannerEndPoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
@Autowired
|
|
|
private DiseaseHomepageBannerService diseaseHomepageBannerService;
|
|
|
|
|
|
@ApiOperation("查询疾病首页图标")
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findDiseaseHomepageBanner)
|
|
|
public MixEnvelop findDiseaseHomepageBanner(@ApiParam(name = "id", value = "id", required = false)
|
|
|
@RequestParam(value = "id", required = false) Integer id,
|
|
|
@ApiParam(name = "name", value = "name", required = false)
|
|
|
@RequestParam(value = "name", required = false) String name,
|
|
|
@ApiParam(name = "page", value = "page", required = false)
|
|
|
@RequestParam(value = "page", required = false) Integer page,
|
|
|
@ApiParam(name = "pageSize", value = "pageSize", required = false)
|
|
|
@RequestParam(value = "pageSize", required = false) Integer pageSize) throws Exception {
|
|
|
|
|
|
return diseaseHomepageBannerService.findDiseaseHomepageBanner(id, name, page, pageSize);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("删除疾病首页图标")
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.PatientNoLogin.delDiseaseHomepageBanner)
|
|
|
public Envelop delDiseaseHomepageBanner(@ApiParam(name = "id", value = "id", required = true)
|
|
|
@RequestParam(value = "id", required = true) Integer id) {
|
|
|
diseaseHomepageBannerService.delDiseaseHomepageBanner(id);
|
|
|
return success();
|
|
|
}
|
|
|
|
|
|
@ApiOperation("新增/修改疾病首页图标")
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.PatientNoLogin.updateDiseaseHomepageBanner)
|
|
|
public Envelop updateDiseaseHomepageBanner(@ApiParam(name = "json", value = "json", required = true)
|
|
|
@RequestParam(value = "json", required = true) String json) throws Exception {
|
|
|
BaseDiseaseHomepageBannerDO diseaseHomepageBannerDO = objectMapper.readValue(json, BaseDiseaseHomepageBannerDO.class);
|
|
|
return success(diseaseHomepageBannerService.updateDiseaseHomepageBanner(diseaseHomepageBannerDO));
|
|
|
}
|
|
|
}
|