dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/controller/web/ThirdCauseWebController.java
File was renamed from dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/controller/web/SyCauseThirdWebController.java @@ -2,8 +2,8 @@ import cn.huge.base.common.utils.ReturnFailUtils; import cn.huge.base.common.utils.ReturnSucUtils; import cn.huge.module.kind.domain.po.SyCauseThird; import cn.huge.module.kind.service.SyCauseThirdService; import cn.huge.module.kind.domain.po.ThirdCause; import cn.huge.module.kind.service.ThirdCauseService; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -15,8 +15,6 @@ import javax.servlet.http.HttpServletRequest; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; /** * @title: 第三方纠纷类型映射表接口api-web端 @@ -29,13 +27,13 @@ @Slf4j @RestController @RequestMapping("/api/web/syCauseThird") public class SyCauseThirdWebController { public class ThirdCauseWebController { @Autowired(required = false) private HttpServletRequest request; @Autowired private SyCauseThirdService service; private ThirdCauseService service; /** * 获取请求URL参数 @@ -128,7 +126,7 @@ Map<String, Object> terms = getParameter(); Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); PageRequest pageRequest = PageRequest.of(page-1, size, sort); Page<SyCauseThird> syCauseThirdPage = service.pageQuery(pageRequest, terms); Page<ThirdCause> syCauseThirdPage = service.pageQuery(pageRequest, terms); return ReturnSucUtils.getRepInfo( "处理成功", syCauseThirdPage); } catch (Exception e) { return ReturnFailUtils.getRepInfo(); @@ -169,13 +167,13 @@ /** * 新增或更新对象 * @url {ctx}/api/web/syCauseThird/saveSyCauseThird * @param syCauseThird 实体对象 * @param thirdCause 实体对象 * @return Object */ @PostMapping("/saveSyCauseThird") public Object saveSyCauseThird(@RequestBody SyCauseThird syCauseThird) { public Object saveSyCauseThird(@RequestBody ThirdCause thirdCause) { try { service.saveSyCauseThird(syCauseThird); service.saveSyCauseThird(thirdCause); return ReturnSucUtils.getRepInfo(); } catch (Exception e) { return ReturnFailUtils.getRepInfo(); dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/dao/mapper/ThirdCauseMapper.java
File was renamed from dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/dao/mapper/SyCauseThirdMapper.java @@ -1,6 +1,6 @@ package cn.huge.module.kind.dao.mapper; import cn.huge.module.kind.domain.po.SyCauseThird; import cn.huge.module.kind.domain.po.ThirdCause; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.springframework.data.domain.PageRequest; @@ -18,20 +18,20 @@ * @version 1.0.0 */ @Repository public interface SyCauseThirdMapper extends BaseMapper<SyCauseThird>{ public interface ThirdCauseMapper extends BaseMapper<ThirdCause>{ /** * 更新对象 * @param entity 对象 */ void updateSyCauseThird(@Param("entity") SyCauseThird entity); void updateSyCauseThird(@Param("entity") ThirdCause entity); /** * 条件更新对象 * @param entity 对象 * @param terms 条件 */ void updateSyCauseThirdTerms(@Param("entity") SyCauseThird entity, @Param("terms") Map<String, Object> terms); void updateSyCauseThirdTerms(@Param("entity") ThirdCause entity, @Param("terms") Map<String, Object> terms); /** * 根据编号物理删除 @@ -44,7 +44,7 @@ * @param terms 查询条件集合 * @return List<SyCauseThird> */ List<SyCauseThird> listTerms(@Param("terms") Map<String, Object> terms); List<ThirdCause> listTerms(@Param("terms") Map<String, Object> terms); /** * 按条件查询实体总数 @@ -59,6 +59,6 @@ * @param terms 查询条件集合 * @return List<SyCauseThird> */ List<SyCauseThird> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); List<ThirdCause> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); } dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/dao/mapper/xml/ThirdCauseMapper.xml
File was renamed from dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/dao/mapper/xml/SyCauseThirdMapper.xml @@ -8,9 +8,9 @@ * @time:2024-09-09 14:31:22 * @version 1.0.0 --> <mapper namespace="cn.huge.module.kind.dao.mapper.SyCauseThirdMapper"> <mapper namespace="cn.huge.module.kind.dao.mapper.ThirdCauseMapper"> <!-- 结果集 --> <resultMap id="dataResult" type="cn.huge.module.kind.domain.po.SyCauseThird"> <resultMap id="dataResult" type="cn.huge.module.kind.domain.po.ThirdCause"> <result property="id" column="id"/> <result property="thirdSysId" column="third_sys_id"/> <result property="thirdSysName" column="third_sys_name"/> @@ -23,7 +23,7 @@ <result property="updateTime" column="update_time"/> </resultMap> <!-- 表 --> <sql id='table-name'>dyh_sy_cause_third</sql> <sql id='table-name'>dyh_th_third_cause</sql> <!-- 字段 --> <sql id="column-part"> id, dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/domain/bo/ThirdCauseBO.java
File was renamed from dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/domain/bo/SyCauseThirdBO.java @@ -1,6 +1,6 @@ package cn.huge.module.kind.domain.bo; import cn.huge.module.kind.domain.po.SyCauseThird; import cn.huge.module.kind.domain.po.ThirdCause; /** * @title: 第三方纠纷类型映射表业务扩展类 @@ -9,9 +9,9 @@ * @author: liyj * @time: 2024-09-09 14:31:22 * @version: 1.0.0 * @see cn.huge.module.kind.domain.po.SyCauseThird * @see ThirdCause */ public class SyCauseThirdBO extends SyCauseThird { public class ThirdCauseBO extends ThirdCause { } dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/domain/po/ThirdCause.java
File was renamed from dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/domain/po/SyCauseThird.java @@ -16,9 +16,9 @@ * @time: 2024-09-09 14:31:22 * @version 1.0.0 */ @TableName(value = "dyh_sy_cause_third") @TableName(value = "dyh_th_third_cause") @Data public class SyCauseThird { public class ThirdCause { /** * 主键编号 dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/service/ThirdCauseService.java
File was renamed from dyh-service/dyh-sys/src/main/java/cn/huge/module/kind/service/SyCauseThirdService.java @@ -4,19 +4,17 @@ 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 cn.huge.module.kind.dao.mapper.ThirdCauseMapper; import cn.huge.module.kind.domain.po.ThirdCause; 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; @@ -32,10 +30,10 @@ @Slf4j @Service @Transactional(rollbackFor = Exception.class) public class SyCauseThirdService extends ServiceImpl<SyCauseThirdMapper, SyCauseThird>{ public class ThirdCauseService extends ServiceImpl<ThirdCauseMapper, ThirdCause>{ @Autowired private SyCauseThirdMapper mapper; private ThirdCauseMapper mapper; @Autowired private UtilsClientImpl utilsClient; @@ -44,7 +42,7 @@ * 更新对象 * @param entity 对象 */ public void updateSyCauseThird(SyCauseThird entity){ public void updateSyCauseThird(ThirdCause entity){ try{ mapper.updateSyCauseThird(entity); }catch (Exception e){ @@ -58,7 +56,7 @@ * @param entity 对象 * @param terms 条件 */ public void updateSyCauseThirdTerms(SyCauseThird entity, Map<String, Object> terms){ public void updateSyCauseThirdTerms(ThirdCause entity, Map<String, Object> terms){ try{ mapper.updateSyCauseThirdTerms(entity, terms); }catch (Exception e){ @@ -85,7 +83,7 @@ * @param terms 条件 * @return List */ public List<SyCauseThird> listTerms(Map<String, Object> terms){ public List<ThirdCause> listTerms(Map<String, Object> terms){ return mapper.listTerms(terms); } @@ -104,26 +102,26 @@ * @param terms 条件 * @return Page */ public Page<SyCauseThird> pageQuery(PageRequest page, Map<String, Object> terms){ public Page<ThirdCause> 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); List<ThirdCause> content = mapper.pageTerms(page, terms); return new PageImpl<ThirdCause>(content, page, total); } /** * 新增或更新对象 * @param syCauseThird 实体对象 * @param thirdCause 实体对象 */ public void saveSyCauseThird(SyCauseThird syCauseThird){ public void saveSyCauseThird(ThirdCause thirdCause){ try{ Date nowDate = DateUtils.getNowDate(); // 判断是否新增 if (IdUtils.checkNewId(syCauseThird.getId())){ syCauseThird.setId(utilsClient.getNewTimeId()); syCauseThird.setCreateTime(nowDate); if (IdUtils.checkNewId(thirdCause.getId())){ thirdCause.setId(utilsClient.getNewTimeId()); thirdCause.setCreateTime(nowDate); } syCauseThird.setUpdateTime(nowDate); this.saveOrUpdate(syCauseThird); thirdCause.setUpdateTime(nowDate); this.saveOrUpdate(thirdCause); }catch (Exception e){ log.error("[SyCauseThirdService.saveSyCauseThird]调用失败,异常信息:"+e, e); throw new ServiceException("SyCauseThirdService.saveSyCauseThird", e);