package cn.huge.module.cases.controller.wechat; import cn.huge.base.common.utils.ReturnFailUtils; import cn.huge.base.common.utils.ReturnSucUtils; import cn.huge.module.cases.domain.po.CasePerson; import cn.huge.module.cases.service.CasePersonService; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.Map; /** * @title: 纠纷当事人信息表接口api-web端 * @description: 纠纷当事人信息表接口api-web端 * @company: hugeinfo * @author: wangwh * @time: 2024-08-27 10:48:18 * @version: 1.0.0 */ @Slf4j @RestController @RequestMapping("/api/wechat/casePerson") public class CasePersonWechatController { @Autowired(required = false) private HttpServletRequest request; @Autowired private CasePersonService service; /** * 根据编号查询单个 * @url {ctx}/api/wechat/casePerson/getById * @param id 主键编号 * @return Object */ @GetMapping("/getById") public Object getById(@RequestParam(value = "id") String id) { try { return ReturnSucUtils.getRepInfo(service.getById(id)); } catch (Exception e) { return ReturnFailUtils.getRepInfo(); } } }