New file |
| | |
| | | package cn.huge.module.kind.controller.web; |
| | | |
| | | 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 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; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 第三方纠纷类型映射表接口api-web端 |
| | | * @description: 第三方纠纷类型映射表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/syCauseThird") |
| | | public class SyCauseThirdWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyCauseThirdService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | private Map<String, Object> getParameter(){ |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 主键编号 |
| | | String id = request.getParameter("id"); |
| | | if (StringUtils.isNotBlank(id)){ |
| | | terms.put("id", id); |
| | | } |
| | | // 第三方平台编号 |
| | | String thirdSysId = request.getParameter("thirdSysId"); |
| | | if (StringUtils.isNotBlank(thirdSysId)){ |
| | | terms.put("thirdSysId", thirdSysId); |
| | | } |
| | | // 第三方平台名称 |
| | | String thirdSysName = request.getParameter("thirdSysName"); |
| | | if (StringUtils.isNotBlank(thirdSysName)){ |
| | | terms.put("thirdSysName", thirdSysName); |
| | | } |
| | | // 第三方纠纷类型代码 |
| | | String thirdCode = request.getParameter("thirdCode"); |
| | | if (StringUtils.isNotBlank(thirdCode)){ |
| | | terms.put("thirdCode", thirdCode); |
| | | } |
| | | // 第三方纠纷类型名称 |
| | | String thirdName = request.getParameter("thirdName"); |
| | | if (StringUtils.isNotBlank(thirdName)){ |
| | | terms.put("thirdName", thirdName); |
| | | } |
| | | // 第三方纠纷类型父级代码 |
| | | String thirdParentCode = request.getParameter("thirdParentCode"); |
| | | if (StringUtils.isNotBlank(thirdParentCode)){ |
| | | terms.put("thirdParentCode", thirdParentCode); |
| | | } |
| | | // 本平台纠纷类型代码 |
| | | String causeCode = request.getParameter("causeCode"); |
| | | if (StringUtils.isNotBlank(causeCode)){ |
| | | terms.put("causeCode", causeCode); |
| | | } |
| | | // 层级 |
| | | String level = request.getParameter("level"); |
| | | if (StringUtils.isNotBlank(level)){ |
| | | terms.put("level", level); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/syCauseThird/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/syCauseThird/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | 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); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syCauseThirdPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/syCauseThird/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(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/syCauseThird/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/syCauseThird/saveSyCauseThird |
| | | * @param syCauseThird 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyCauseThird") |
| | | public Object saveSyCauseThird(@RequestBody SyCauseThird syCauseThird) { |
| | | try { |
| | | service.saveSyCauseThird(syCauseThird); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.kind.domain.po.SyCause; |
| | | import cn.huge.module.kind.service.SyCauseService; |
| | | 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; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 纠纷类型表接口api-web端 |
| | | * @description: 纠纷类型表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/syCause") |
| | | public class SyCauseWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyCauseService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | private Map<String, Object> getParameter(){ |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 纠纷类型代码 |
| | | String id = request.getParameter("id"); |
| | | if (StringUtils.isNotBlank(id)){ |
| | | terms.put("id", id); |
| | | } |
| | | // 纠纷类型名称 |
| | | String name = request.getParameter("name"); |
| | | if (StringUtils.isNotBlank(name)){ |
| | | terms.put("name", name); |
| | | } |
| | | // 层级 |
| | | String level = request.getParameter("level"); |
| | | if (StringUtils.isNotBlank(level)){ |
| | | terms.put("level", level); |
| | | } |
| | | // 所属父级代码,根级默认root |
| | | String parentId = request.getParameter("parentId"); |
| | | if (StringUtils.isNotBlank(parentId)){ |
| | | terms.put("parentId", parentId); |
| | | } |
| | | // 所属调解类型编号 |
| | | String issueId = request.getParameter("issueId"); |
| | | if (StringUtils.isNotBlank(issueId)){ |
| | | terms.put("issueId", issueId); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/syCause/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/syCause/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<SyCause> syCausePage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syCausePage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/syCause/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(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/syCause/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/syCause/saveSyCause |
| | | * @param syCause 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyCause") |
| | | public Object saveSyCause(@RequestBody SyCause syCause) { |
| | | try { |
| | | service.saveSyCause(syCause); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.kind.domain.po.SyIssue; |
| | | import cn.huge.module.kind.service.SyIssueService; |
| | | 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; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 调解类型表接口api-web端 |
| | | * @description: 调解类型表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/syIssue") |
| | | public class SyIssueWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyIssueService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | private Map<String, Object> getParameter(){ |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 调解类型代码 |
| | | String id = request.getParameter("id"); |
| | | if (StringUtils.isNotBlank(id)){ |
| | | terms.put("id", id); |
| | | } |
| | | // 调解类型名称 |
| | | String name = request.getParameter("name"); |
| | | if (StringUtils.isNotBlank(name)){ |
| | | terms.put("name", name); |
| | | } |
| | | // 所属父级代码,根级默认root |
| | | String parentId = request.getParameter("parentId"); |
| | | if (StringUtils.isNotBlank(parentId)){ |
| | | terms.put("parentId", parentId); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/syIssue/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/syIssue/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<SyIssue> syIssuePage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syIssuePage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/syIssue/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(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/syIssue/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/syIssue/saveSyIssue |
| | | * @param syIssue 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyIssue") |
| | | public Object saveSyIssue(@RequestBody SyIssue syIssue) { |
| | | try { |
| | | service.saveSyIssue(syIssue); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.kind.domain.po.SyKind; |
| | | import cn.huge.module.kind.service.SyKindService; |
| | | 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; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 数据字典表接口api-web端 |
| | | * @description: 数据字典表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/syKind") |
| | | public class SyKindWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyKindService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | private Map<String, Object> getParameter(){ |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 字典编号 |
| | | String id = request.getParameter("id"); |
| | | if (StringUtils.isNotBlank(id)){ |
| | | terms.put("id", id); |
| | | } |
| | | // 字典标题 |
| | | String title = request.getParameter("title"); |
| | | if (StringUtils.isNotBlank(title)){ |
| | | terms.put("title", title); |
| | | } |
| | | // 字典类 |
| | | String kind = request.getParameter("kind"); |
| | | if (StringUtils.isNotBlank(kind)){ |
| | | terms.put("kind", kind); |
| | | } |
| | | // 字典代码值 |
| | | String code = request.getParameter("code"); |
| | | if (StringUtils.isNotBlank(code)){ |
| | | terms.put("code", code); |
| | | } |
| | | // 字典名称 |
| | | String name = request.getParameter("name"); |
| | | if (StringUtils.isNotBlank(name)){ |
| | | terms.put("name", name); |
| | | } |
| | | // 层级 |
| | | String level = request.getParameter("level"); |
| | | if (StringUtils.isNotBlank(level)){ |
| | | terms.put("level", level); |
| | | } |
| | | // 所属父级编号,根级默认root |
| | | String parentId = request.getParameter("parentId"); |
| | | if (StringUtils.isNotBlank(parentId)){ |
| | | terms.put("parentId", parentId); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/syKind/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/syKind/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<SyKind> syKindPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syKindPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/syKind/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(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/syKind/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/syKind/saveSyKind |
| | | * @param syKind 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyKind") |
| | | public Object saveSyKind(@RequestBody SyKind syKind) { |
| | | try { |
| | | service.saveSyKind(syKind); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.kind.domain.po.SyRegion; |
| | | import cn.huge.module.kind.service.SyRegionService; |
| | | 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; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 地域字典表接口api-web端 |
| | | * @description: 地域字典表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/syRegion") |
| | | public class SyRegionWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyRegionService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | private Map<String, Object> getParameter(){ |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 地区代码 |
| | | String id = request.getParameter("id"); |
| | | if (StringUtils.isNotBlank(id)){ |
| | | terms.put("id", id); |
| | | } |
| | | // 地区类型,0:省,1:市,2:区,3:街道,4:社区 |
| | | String kind = request.getParameter("kind"); |
| | | if (StringUtils.isNotBlank(kind)){ |
| | | terms.put("kind", kind); |
| | | } |
| | | // 地区名称 |
| | | String name = request.getParameter("name"); |
| | | if (StringUtils.isNotBlank(name)){ |
| | | terms.put("name", name); |
| | | } |
| | | // 层级 |
| | | String level = request.getParameter("level"); |
| | | if (StringUtils.isNotBlank(level)){ |
| | | terms.put("level", level); |
| | | } |
| | | // 所属父级代码,根级默认root |
| | | String parentId = request.getParameter("parentId"); |
| | | if (StringUtils.isNotBlank(parentId)){ |
| | | terms.put("parentId", parentId); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/syRegion/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/syRegion/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<SyRegion> syRegionPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syRegionPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/syRegion/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(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/syRegion/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/syRegion/saveSyRegion |
| | | * @param syRegion 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyRegion") |
| | | public Object saveSyRegion(@RequestBody SyRegion syRegion) { |
| | | try { |
| | | service.saveSyRegion(syRegion); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.dao.mapper; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyCause; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 纠纷类型表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface SyCauseMapper extends BaseMapper<SyCause>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateSyCause(@Param("entity") SyCause entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateSyCauseTerms(@Param("entity") SyCause entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteSyCause(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyCause> |
| | | */ |
| | | List<SyCause> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyCause> |
| | | */ |
| | | List<SyCause> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.dao.mapper; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyCauseThird; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 第三方纠纷类型映射表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface SyCauseThirdMapper extends BaseMapper<SyCauseThird>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateSyCauseThird(@Param("entity") SyCauseThird entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateSyCauseThirdTerms(@Param("entity") SyCauseThird entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteSyCauseThird(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyCauseThird> |
| | | */ |
| | | List<SyCauseThird> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyCauseThird> |
| | | */ |
| | | List<SyCauseThird> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.dao.mapper; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyIssue; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 调解类型表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface SyIssueMapper extends BaseMapper<SyIssue>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateSyIssue(@Param("entity") SyIssue entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateSyIssueTerms(@Param("entity") SyIssue entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteSyIssue(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyIssue> |
| | | */ |
| | | List<SyIssue> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyIssue> |
| | | */ |
| | | List<SyIssue> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.dao.mapper; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyKind; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 数据字典表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface SyKindMapper extends BaseMapper<SyKind>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateSyKind(@Param("entity") SyKind entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateSyKindTerms(@Param("entity") SyKind entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteSyKind(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyKind> |
| | | */ |
| | | List<SyKind> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyKind> |
| | | */ |
| | | List<SyKind> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.dao.mapper; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyRegion; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 地域字典表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface SyRegionMapper extends BaseMapper<SyRegion>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateSyRegion(@Param("entity") SyRegion entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateSyRegionTerms(@Param("entity") SyRegion entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteSyRegion(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyRegion> |
| | | */ |
| | | List<SyRegion> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyRegion> |
| | | */ |
| | | List<SyRegion> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 纠纷类型表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.kind.dao.mapper.SyCauseMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.kind.domain.po.SyCause"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="level" column="level"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="issueId" column="issue_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_sy_cause</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | name, |
| | | level, |
| | | parent_id, |
| | | issue_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.name != null">name = #{entity.name},</if> |
| | | <if test="entity.level != null">level = #{entity.level},</if> |
| | | <if test="entity.parentId != null">parent_id = #{entity.parentId},</if> |
| | | <if test="entity.issueId != null">issue_id = #{entity.issueId},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.name != null and terms.name !=''"> |
| | | and name = #{terms.name} |
| | | </if> |
| | | <if test="terms.level != null and terms.level !=''"> |
| | | and level = #{terms.level} |
| | | </if> |
| | | <if test="terms.parentId != null and terms.parentId !=''"> |
| | | and parent_id = #{terms.parentId} |
| | | </if> |
| | | <if test="terms.issueId != null and terms.issueId !=''"> |
| | | and issue_id = #{terms.issueId} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateSyCause"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateSyCauseTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteSyCause"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 第三方纠纷类型映射表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.kind.dao.mapper.SyCauseThirdMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.kind.domain.po.SyCauseThird"> |
| | | <result property="id" column="id"/> |
| | | <result property="thirdSysId" column="third_sys_id"/> |
| | | <result property="thirdSysName" column="third_sys_name"/> |
| | | <result property="thirdCode" column="third_code"/> |
| | | <result property="thirdName" column="third_name"/> |
| | | <result property="thirdParentCode" column="third_parent_code"/> |
| | | <result property="causeCode" column="cause_code"/> |
| | | <result property="level" column="level"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_sy_cause_third</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | third_sys_id, |
| | | third_sys_name, |
| | | third_code, |
| | | third_name, |
| | | third_parent_code, |
| | | cause_code, |
| | | level, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.thirdSysId != null">third_sys_id = #{entity.thirdSysId},</if> |
| | | <if test="entity.thirdSysName != null">third_sys_name = #{entity.thirdSysName},</if> |
| | | <if test="entity.thirdCode != null">third_code = #{entity.thirdCode},</if> |
| | | <if test="entity.thirdName != null">third_name = #{entity.thirdName},</if> |
| | | <if test="entity.thirdParentCode != null">third_parent_code = #{entity.thirdParentCode},</if> |
| | | <if test="entity.causeCode != null">cause_code = #{entity.causeCode},</if> |
| | | <if test="entity.level != null">level = #{entity.level},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.thirdSysId != null and terms.thirdSysId !=''"> |
| | | and third_sys_id = #{terms.thirdSysId} |
| | | </if> |
| | | <if test="terms.thirdSysName != null and terms.thirdSysName !=''"> |
| | | and third_sys_name = #{terms.thirdSysName} |
| | | </if> |
| | | <if test="terms.thirdCode != null and terms.thirdCode !=''"> |
| | | and third_code = #{terms.thirdCode} |
| | | </if> |
| | | <if test="terms.thirdName != null and terms.thirdName !=''"> |
| | | and third_name = #{terms.thirdName} |
| | | </if> |
| | | <if test="terms.thirdParentCode != null and terms.thirdParentCode !=''"> |
| | | and third_parent_code = #{terms.thirdParentCode} |
| | | </if> |
| | | <if test="terms.causeCode != null and terms.causeCode !=''"> |
| | | and cause_code = #{terms.causeCode} |
| | | </if> |
| | | <if test="terms.level != null and terms.level !=''"> |
| | | and level = #{terms.level} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateSyCauseThird"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateSyCauseThirdTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteSyCauseThird"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 调解类型表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.kind.dao.mapper.SyIssueMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.kind.domain.po.SyIssue"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_sy_issue</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | name, |
| | | parent_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.name != null">name = #{entity.name},</if> |
| | | <if test="entity.parentId != null">parent_id = #{entity.parentId},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.name != null and terms.name !=''"> |
| | | and name = #{terms.name} |
| | | </if> |
| | | <if test="terms.parentId != null and terms.parentId !=''"> |
| | | and parent_id = #{terms.parentId} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateSyIssue"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateSyIssueTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteSyIssue"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 数据字典表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.kind.dao.mapper.SyKindMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.kind.domain.po.SyKind"> |
| | | <result property="id" column="id"/> |
| | | <result property="title" column="title"/> |
| | | <result property="kind" column="kind"/> |
| | | <result property="code" column="code"/> |
| | | <result property="name" column="name"/> |
| | | <result property="level" column="level"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_sy_kind</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | title, |
| | | kind, |
| | | code, |
| | | name, |
| | | level, |
| | | parent_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.title != null">title = #{entity.title},</if> |
| | | <if test="entity.kind != null">kind = #{entity.kind},</if> |
| | | <if test="entity.code != null">code = #{entity.code},</if> |
| | | <if test="entity.name != null">name = #{entity.name},</if> |
| | | <if test="entity.level != null">level = #{entity.level},</if> |
| | | <if test="entity.parentId != null">parent_id = #{entity.parentId},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.title != null and terms.title !=''"> |
| | | and title = #{terms.title} |
| | | </if> |
| | | <if test="terms.kind != null and terms.kind !=''"> |
| | | and kind = #{terms.kind} |
| | | </if> |
| | | <if test="terms.code != null and terms.code !=''"> |
| | | and code = #{terms.code} |
| | | </if> |
| | | <if test="terms.name != null and terms.name !=''"> |
| | | and name = #{terms.name} |
| | | </if> |
| | | <if test="terms.level != null and terms.level !=''"> |
| | | and level = #{terms.level} |
| | | </if> |
| | | <if test="terms.parentId != null and terms.parentId !=''"> |
| | | and parent_id = #{terms.parentId} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateSyKind"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateSyKindTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteSyKind"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 地域字典表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.kind.dao.mapper.SyRegionMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.kind.domain.po.SyRegion"> |
| | | <result property="id" column="id"/> |
| | | <result property="kind" column="kind"/> |
| | | <result property="name" column="name"/> |
| | | <result property="level" column="level"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_sy_region</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | kind, |
| | | name, |
| | | level, |
| | | parent_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.kind != null">kind = #{entity.kind},</if> |
| | | <if test="entity.name != null">name = #{entity.name},</if> |
| | | <if test="entity.level != null">level = #{entity.level},</if> |
| | | <if test="entity.parentId != null">parent_id = #{entity.parentId},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.kind != null and terms.kind !=''"> |
| | | and kind = #{terms.kind} |
| | | </if> |
| | | <if test="terms.name != null and terms.name !=''"> |
| | | and name = #{terms.name} |
| | | </if> |
| | | <if test="terms.level != null and terms.level !=''"> |
| | | and level = #{terms.level} |
| | | </if> |
| | | <if test="terms.parentId != null and terms.parentId !=''"> |
| | | and parent_id = #{terms.parentId} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateSyRegion"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateSyRegionTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteSyRegion"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package cn.huge.module.kind.domain.bo; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyCause; |
| | | |
| | | /** |
| | | * @title: 纠纷类型表业务扩展类 |
| | | * @description: 纠纷类型表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.kind.domain.po.SyCause |
| | | */ |
| | | public class SyCauseBO extends SyCause { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.bo; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyCauseThird; |
| | | |
| | | /** |
| | | * @title: 第三方纠纷类型映射表业务扩展类 |
| | | * @description: 第三方纠纷类型映射表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.kind.domain.po.SyCauseThird |
| | | */ |
| | | public class SyCauseThirdBO extends SyCauseThird { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.bo; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyIssue; |
| | | |
| | | /** |
| | | * @title: 调解类型表业务扩展类 |
| | | * @description: 调解类型表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.kind.domain.po.SyIssue |
| | | */ |
| | | public class SyIssueBO extends SyIssue { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.bo; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyKind; |
| | | |
| | | /** |
| | | * @title: 数据字典表业务扩展类 |
| | | * @description: 数据字典表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.kind.domain.po.SyKind |
| | | */ |
| | | public class SyKindBO extends SyKind { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.bo; |
| | | |
| | | import cn.huge.module.kind.domain.po.SyRegion; |
| | | |
| | | /** |
| | | * @title: 地域字典表业务扩展类 |
| | | * @description: 地域字典表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.kind.domain.po.SyRegion |
| | | */ |
| | | public class SyRegionBO extends SyRegion { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 纠纷类型表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_sy_cause") |
| | | @Data |
| | | public class SyCause { |
| | | |
| | | /** |
| | | * 纠纷类型代码 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷类型名称 |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | |
| | | /** |
| | | * 层级 |
| | | */ |
| | | @TableField(value = "level") |
| | | private Integer level; |
| | | |
| | | /** |
| | | * 所属父级代码,根级默认root |
| | | */ |
| | | @TableField(value = "parent_id") |
| | | private String parentId; |
| | | |
| | | /** |
| | | * 所属调解类型编号 |
| | | */ |
| | | @TableField(value = "issue_id") |
| | | private String issueId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 第三方纠纷类型映射表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_sy_cause_third") |
| | | @Data |
| | | public class SyCauseThird { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 第三方平台编号 |
| | | */ |
| | | @TableField(value = "third_sys_id") |
| | | private String thirdSysId; |
| | | |
| | | /** |
| | | * 第三方平台名称 |
| | | */ |
| | | @TableField(value = "third_sys_name") |
| | | private String thirdSysName; |
| | | |
| | | /** |
| | | * 第三方纠纷类型代码 |
| | | */ |
| | | @TableField(value = "third_code") |
| | | private String thirdCode; |
| | | |
| | | /** |
| | | * 第三方纠纷类型名称 |
| | | */ |
| | | @TableField(value = "third_name") |
| | | private String thirdName; |
| | | |
| | | /** |
| | | * 第三方纠纷类型父级代码 |
| | | */ |
| | | @TableField(value = "third_parent_code") |
| | | private String thirdParentCode; |
| | | |
| | | /** |
| | | * 本平台纠纷类型代码 |
| | | */ |
| | | @TableField(value = "cause_code") |
| | | private String causeCode; |
| | | |
| | | /** |
| | | * 层级 |
| | | */ |
| | | @TableField(value = "level") |
| | | private Integer level; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 调解类型表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_sy_issue") |
| | | @Data |
| | | public class SyIssue { |
| | | |
| | | /** |
| | | * 调解类型代码 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 调解类型名称 |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | |
| | | /** |
| | | * 所属父级代码,根级默认root |
| | | */ |
| | | @TableField(value = "parent_id") |
| | | private String parentId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 数据字典表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_sy_kind") |
| | | @Data |
| | | public class SyKind { |
| | | |
| | | /** |
| | | * 字典编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 字典标题 |
| | | */ |
| | | @TableField(value = "title") |
| | | private String title; |
| | | |
| | | /** |
| | | * 字典类 |
| | | */ |
| | | @TableField(value = "kind") |
| | | private String kind; |
| | | |
| | | /** |
| | | * 字典代码值 |
| | | */ |
| | | @TableField(value = "code") |
| | | private String code; |
| | | |
| | | /** |
| | | * 字典名称 |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | |
| | | /** |
| | | * 层级 |
| | | */ |
| | | @TableField(value = "level") |
| | | private Integer level; |
| | | |
| | | /** |
| | | * 所属父级编号,根级默认root |
| | | */ |
| | | @TableField(value = "parent_id") |
| | | private String parentId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 地域字典表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_sy_region") |
| | | @Data |
| | | public class SyRegion { |
| | | |
| | | /** |
| | | * 地区代码 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 地区类型,0:省,1:市,2:区,3:街道,4:社区 |
| | | */ |
| | | @TableField(value = "kind") |
| | | private Integer kind; |
| | | |
| | | /** |
| | | * 地区名称 |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | |
| | | /** |
| | | * 层级 |
| | | */ |
| | | @TableField(value = "level") |
| | | private Integer level; |
| | | |
| | | /** |
| | | * 所属父级代码,根级默认root |
| | | */ |
| | | @TableField(value = "parent_id") |
| | | private String parentId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.service; |
| | | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.kind.dao.mapper.SyCauseMapper; |
| | | import cn.huge.module.kind.domain.po.SyCause; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 纠纷类型表业务逻辑处理 |
| | | * @Description 纠纷类型表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SyCauseService extends ServiceImpl<SyCauseMapper, SyCause>{ |
| | | |
| | | @Autowired |
| | | private SyCauseMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateSyCause(SyCause entity){ |
| | | try{ |
| | | mapper.updateSyCause(entity); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseService.updateSyCause]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseService.updateSyCause", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateSyCauseTerms(SyCause entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateSyCauseTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseService.updateSyCauseTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseService.updateSyCauseTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteSyCause(String id){ |
| | | try{ |
| | | mapper.deleteSyCause(id); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseService.deleteSyCause]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseService.deleteSyCause", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<SyCause> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<SyCause> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<SyCause> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<SyCause>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param syCause 实体对象 |
| | | */ |
| | | public void saveSyCause(SyCause syCause){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(syCause.getId())){ |
| | | syCause.setId(utilsClient.getNewTimeId()); |
| | | syCause.setCreateTime(nowDate); |
| | | } |
| | | syCause.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(syCause); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseService.saveSyCause]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseService.saveSyCause", e); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.service; |
| | | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.kind.dao.mapper.SyCauseThirdMapper; |
| | | import cn.huge.module.kind.domain.po.SyCauseThird; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 第三方纠纷类型映射表业务逻辑处理 |
| | | * @Description 第三方纠纷类型映射表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SyCauseThirdService extends ServiceImpl<SyCauseThirdMapper, SyCauseThird>{ |
| | | |
| | | @Autowired |
| | | private SyCauseThirdMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateSyCauseThird(SyCauseThird entity){ |
| | | try{ |
| | | mapper.updateSyCauseThird(entity); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseThirdService.updateSyCauseThird]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseThirdService.updateSyCauseThird", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateSyCauseThirdTerms(SyCauseThird entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateSyCauseThirdTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseThirdService.updateSyCauseThirdTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseThirdService.updateSyCauseThirdTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteSyCauseThird(String id){ |
| | | try{ |
| | | mapper.deleteSyCauseThird(id); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseThirdService.deleteSyCauseThird]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseThirdService.deleteSyCauseThird", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<SyCauseThird> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<SyCauseThird> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<SyCauseThird> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<SyCauseThird>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param syCauseThird 实体对象 |
| | | */ |
| | | public void saveSyCauseThird(SyCauseThird syCauseThird){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(syCauseThird.getId())){ |
| | | syCauseThird.setId(utilsClient.getNewTimeId()); |
| | | syCauseThird.setCreateTime(nowDate); |
| | | } |
| | | syCauseThird.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(syCauseThird); |
| | | }catch (Exception e){ |
| | | log.error("[SyCauseThirdService.saveSyCauseThird]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyCauseThirdService.saveSyCauseThird", e); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.service; |
| | | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.kind.dao.mapper.SyIssueMapper; |
| | | import cn.huge.module.kind.domain.po.SyIssue; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 调解类型表业务逻辑处理 |
| | | * @Description 调解类型表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SyIssueService extends ServiceImpl<SyIssueMapper, SyIssue>{ |
| | | |
| | | @Autowired |
| | | private SyIssueMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateSyIssue(SyIssue entity){ |
| | | try{ |
| | | mapper.updateSyIssue(entity); |
| | | }catch (Exception e){ |
| | | log.error("[SyIssueService.updateSyIssue]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyIssueService.updateSyIssue", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateSyIssueTerms(SyIssue entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateSyIssueTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[SyIssueService.updateSyIssueTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyIssueService.updateSyIssueTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteSyIssue(String id){ |
| | | try{ |
| | | mapper.deleteSyIssue(id); |
| | | }catch (Exception e){ |
| | | log.error("[SyIssueService.deleteSyIssue]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyIssueService.deleteSyIssue", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<SyIssue> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<SyIssue> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<SyIssue> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<SyIssue>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param syIssue 实体对象 |
| | | */ |
| | | public void saveSyIssue(SyIssue syIssue){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(syIssue.getId())){ |
| | | syIssue.setId(utilsClient.getNewTimeId()); |
| | | syIssue.setCreateTime(nowDate); |
| | | } |
| | | syIssue.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(syIssue); |
| | | }catch (Exception e){ |
| | | log.error("[SyIssueService.saveSyIssue]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyIssueService.saveSyIssue", e); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.service; |
| | | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.kind.dao.mapper.SyKindMapper; |
| | | import cn.huge.module.kind.domain.po.SyKind; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 数据字典表业务逻辑处理 |
| | | * @Description 数据字典表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SyKindService extends ServiceImpl<SyKindMapper, SyKind>{ |
| | | |
| | | @Autowired |
| | | private SyKindMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateSyKind(SyKind entity){ |
| | | try{ |
| | | mapper.updateSyKind(entity); |
| | | }catch (Exception e){ |
| | | log.error("[SyKindService.updateSyKind]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyKindService.updateSyKind", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateSyKindTerms(SyKind entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateSyKindTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[SyKindService.updateSyKindTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyKindService.updateSyKindTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteSyKind(String id){ |
| | | try{ |
| | | mapper.deleteSyKind(id); |
| | | }catch (Exception e){ |
| | | log.error("[SyKindService.deleteSyKind]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyKindService.deleteSyKind", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<SyKind> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<SyKind> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<SyKind> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<SyKind>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param syKind 实体对象 |
| | | */ |
| | | public void saveSyKind(SyKind syKind){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(syKind.getId())){ |
| | | syKind.setId(utilsClient.getNewTimeId()); |
| | | syKind.setCreateTime(nowDate); |
| | | } |
| | | syKind.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(syKind); |
| | | }catch (Exception e){ |
| | | log.error("[SyKindService.saveSyKind]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyKindService.saveSyKind", e); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.kind.service; |
| | | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.kind.dao.mapper.SyRegionMapper; |
| | | import cn.huge.module.kind.domain.po.SyRegion; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 地域字典表业务逻辑处理 |
| | | * @Description 地域字典表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-08-28 20:06:20 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SyRegionService extends ServiceImpl<SyRegionMapper, SyRegion>{ |
| | | |
| | | @Autowired |
| | | private SyRegionMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateSyRegion(SyRegion entity){ |
| | | try{ |
| | | mapper.updateSyRegion(entity); |
| | | }catch (Exception e){ |
| | | log.error("[SyRegionService.updateSyRegion]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyRegionService.updateSyRegion", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateSyRegionTerms(SyRegion entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateSyRegionTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[SyRegionService.updateSyRegionTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyRegionService.updateSyRegionTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteSyRegion(String id){ |
| | | try{ |
| | | mapper.deleteSyRegion(id); |
| | | }catch (Exception e){ |
| | | log.error("[SyRegionService.deleteSyRegion]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyRegionService.deleteSyRegion", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<SyRegion> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<SyRegion> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<SyRegion> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<SyRegion>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param syRegion 实体对象 |
| | | */ |
| | | public void saveSyRegion(SyRegion syRegion){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(syRegion.getId())){ |
| | | syRegion.setId(utilsClient.getNewTimeId()); |
| | | syRegion.setCreateTime(nowDate); |
| | | } |
| | | syRegion.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(syRegion); |
| | | }catch (Exception e){ |
| | | log.error("[SyRegionService.saveSyRegion]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyRegionService.saveSyRegion", e); |
| | | } |
| | | } |
| | | |
| | | } |