File was renamed from dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/controller/web/SyCauseThirdWebController.java |
| | |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.kind.domain.po.SyCauseThird; |
| | | import cn.huge.module.kind.service.SyCauseThirdService; |
| | | import cn.huge.module.kind.domain.po.ThirdCause; |
| | | import cn.huge.module.kind.service.ThirdCauseService; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 第三方纠纷类型映射表接口api-web端 |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/syCauseThird") |
| | | public class SyCauseThirdWebController { |
| | | public class ThirdCauseWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyCauseThirdService service; |
| | | private ThirdCauseService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<SyCauseThird> syCauseThirdPage = service.pageQuery(pageRequest, terms); |
| | | Page<ThirdCause> syCauseThirdPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syCauseThirdPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/syCauseThird/saveSyCauseThird |
| | | * @param syCauseThird 实体对象 |
| | | * @param thirdCause 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyCauseThird") |
| | | public Object saveSyCauseThird(@RequestBody SyCauseThird syCauseThird) { |
| | | public Object saveSyCauseThird(@RequestBody ThirdCause thirdCause) { |
| | | try { |
| | | service.saveSyCauseThird(syCauseThird); |
| | | service.saveSyCauseThird(thirdCause); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |