From ded5474fee83be9e5cdefa5c499252080e9df37a Mon Sep 17 00:00:00 2001 From: muzi <2098333240@qq.com> Date: Fri, 13 Jan 2023 23:16:53 +0800 Subject: [PATCH] CRUD --- ruoyi-common/ruoyi-common-core/pom.xml | 4 + ruoyi-modules/pom.xml | 1 + ruoyi-modules/ruoyi-potenza/pom.xml | 106 ++++++++++++++++ .../potenza/RuoYiPotenzaApplication.java | 34 +++++ .../controller/BorrowerController.java | 116 ++++++++++++++++++ .../controller/BorrowerPeriodsController.java | 107 ++++++++++++++++ .../controller/BorrowerPlanController.java | 107 ++++++++++++++++ .../com/ruoyi/potenza/domain/TbBorrower.java | 96 +++++++++++++++ .../potenza/domain/TbBorrowerPeriods.java | 56 +++++++++ .../ruoyi/potenza/domain/TbBorrowerPlan.java | 81 ++++++++++++ .../com/ruoyi/potenza/domain/vo/IdVo.java | 17 +++ .../potenza/mapper/TbBorrowerMapper.java | 60 +++++++++ .../mapper/TbBorrowerPeriodsMapper.java | 66 ++++++++++ .../potenza/mapper/TbBorrowerPlanMapper.java | 66 ++++++++++ .../service/TbBorrowerPeriodsService.java | 61 +++++++++ .../service/TbBorrowerPlanService.java | 61 +++++++++ .../potenza/service/TbBorrowerService.java | 55 +++++++++ .../impl/TbBorrowerPeriodsServiceImpl.java | 102 +++++++++++++++ .../impl/TbBorrowerPlanServiceImpl.java | 101 +++++++++++++++ .../service/impl/TbBorrowerServiceImpl.java | 98 +++++++++++++++ .../src/main/resources/bootstrap.yml | 25 ++++ .../src/main/resources/logback.xml | 74 +++++++++++ .../resources/mapper/TbBorrowerMapper.xml | 108 ++++++++++++++++ .../mapper/TbBorrowerPeriodsMapper.xml | 76 ++++++++++++ .../resources/mapper/TbBorrowerPlanMapper.xml | 104 ++++++++++++++++ 25 files changed, 1782 insertions(+) create mode 100644 ruoyi-modules/ruoyi-potenza/pom.xml create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/RuoYiPotenzaApplication.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerController.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPeriodsController.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPlanController.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrower.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPeriods.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPlan.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/vo/IdVo.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerMapper.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPeriodsMapper.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPlanMapper.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPeriodsService.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPlanService.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerService.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPeriodsServiceImpl.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPlanServiceImpl.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerServiceImpl.java create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/resources/bootstrap.yml create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/resources/logback.xml create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerMapper.xml create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPeriodsMapper.xml create mode 100644 ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPlanMapper.xml diff --git a/ruoyi-common/ruoyi-common-core/pom.xml b/ruoyi-common/ruoyi-common-core/pom.xml index efe0e0cd..38c219a4 100644 --- a/ruoyi-common/ruoyi-common-core/pom.xml +++ b/ruoyi-common/ruoyi-common-core/pom.xml @@ -16,6 +16,10 @@ + + org.projectlombok + lombok + diff --git a/ruoyi-modules/pom.xml b/ruoyi-modules/pom.xml index b8b532f8..91177839 100644 --- a/ruoyi-modules/pom.xml +++ b/ruoyi-modules/pom.xml @@ -13,6 +13,7 @@ ruoyi-gen ruoyi-job ruoyi-file + ruoyi-potenza ruoyi-modules diff --git a/ruoyi-modules/ruoyi-potenza/pom.xml b/ruoyi-modules/ruoyi-potenza/pom.xml new file mode 100644 index 00000000..2c63b051 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/pom.xml @@ -0,0 +1,106 @@ + + + + ruoyi-modules + com.ruoyi + 3.6.1 + + 4.0.0 + + com.ruoyi.potenza + com.ruoyi.potenza + + + 8 + 8 + + + + com.baomidou + mybatis-plus-boot-starter + 3.4.2 + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + mysql + mysql-connector-java + + + + + com.ruoyi + ruoyi-common-datasource + + + + + com.ruoyi + ruoyi-common-datascope + + + + + com.ruoyi + ruoyi-common-log + + + + + com.ruoyi + ruoyi-common-swagger + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/RuoYiPotenzaApplication.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/RuoYiPotenzaApplication.java new file mode 100644 index 00000000..4693c3d4 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/RuoYiPotenzaApplication.java @@ -0,0 +1,34 @@ +package com.ruoyi.potenza; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import com.ruoyi.common.security.annotation.EnableCustomConfig; +import com.ruoyi.common.security.annotation.EnableRyFeignClients; +import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; + +/** + * @author 木子 + * @version 1.0 + * @description: TODO + * @date 2023/1/12 20:33 + */ +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableRyFeignClients +@SpringBootApplication +public class RuoYiPotenzaApplication { + public static void main(String[] args) + { + SpringApplication.run(RuoYiPotenzaApplication.class, args); + System.out.println("(♥◠‿◠)ノ゙ 系统模块启动成功 ლ(´ڡ`ლ)゙ \n" + + " .-------. ____ __ \n" + + " | _ _ \\ \\ \\ / / \n" + + " | ( ' ) | \\ _. / ' \n" + + " |(_ o _) / _( )_ .' \n" + + " | (_,_).' __ ___(_ o _)' \n" + + " | |\\ \\ | || |(_,_)' \n" + + " | | \\ `' /| `-' / \n" + + " | | \\ / \\ / \n" + + " ''-' `'-' `-..-' "); + } +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerController.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerController.java new file mode 100644 index 00000000..860685d2 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerController.java @@ -0,0 +1,116 @@ +package com.ruoyi.potenza.controller; + +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.web.page.TableDataInfo; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.potenza.domain.TbBorrower; +import com.ruoyi.potenza.domain.vo.IdVo; +import com.ruoyi.potenza.service.TbBorrowerService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.core.utils.poi.ExcelUtil; + + +/** + * @author 木子 + * @version 1.0 + * @description: TODO + * @date 2023/1/13 16:00 + */ +@RequestMapping("/Borrower") +@RestController +@Slf4j +public class BorrowerController extends BaseController { + + @Autowired + private TbBorrowerService tbBorrowerService; + + @PostMapping("/pageList") + public TableDataInfo pageList(@RequestBody TbBorrower tbBorrower){ + startPage(); + return getDataTable(tbBorrowerService.pageList(tbBorrower)); + } + + //贷款申请 + @PostMapping("/save") + public AjaxResult save(@RequestBody TbBorrower tbBorrower){ + boolean save = tbBorrowerService.save(tbBorrower); + return AjaxResult.success(save); + } + + //逻辑删除 + @PostMapping("/BorrowerDele") + public AjaxResult save(@RequestBody IdVo idVo){ + return tbBorrowerService.borrowerDele(idVo); + } + + @RequiresPermissions("potenza:borrower:list") + @GetMapping("/list") + public TableDataInfo list(TbBorrower tbBorrower) + { + startPage(); + List list = tbBorrowerService.selectTbBorrowerList(tbBorrower); + return getDataTable(list); + } + + /** + * 导出贷款列表 + */ + @RequiresPermissions("potenza:borrower:export") + @Log(title = "贷款", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TbBorrower tbBorrower) + { + List list = tbBorrowerService.selectTbBorrowerList(tbBorrower); + ExcelUtil util = new ExcelUtil(TbBorrower.class); + util.exportExcel(response, list, "贷款数据"); + } + + /** + * 获取贷款详细信息 + */ + @RequiresPermissions("potenza:borrower:query") + @GetMapping(value = "/{borrowerId}") + public AjaxResult getInfo(@PathVariable("borrowerId") Long borrowerId) + { + return success(tbBorrowerService.selectTbBorrowerByBorrowerId(borrowerId)); + } + + /** + * 新增贷款 + */ + @RequiresPermissions("potenza:borrower:add") + @Log(title = "贷款", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TbBorrower tbBorrower) + { + return toAjax(tbBorrowerService.insertTbBorrower(tbBorrower)); + } + + /** + * 修改贷款 + */ + @RequiresPermissions("potenza:borrower:edit") + @Log(title = "贷款", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TbBorrower tbBorrower) + { + return toAjax(tbBorrowerService.updateTbBorrower(tbBorrower)); + } + + + +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPeriodsController.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPeriodsController.java new file mode 100644 index 00000000..2089a3f1 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPeriodsController.java @@ -0,0 +1,107 @@ +package com.ruoyi.potenza.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.potenza.domain.TbBorrowerPeriods; +import com.ruoyi.potenza.service.TbBorrowerPeriodsService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * @author 木子 + * @version 1.0 + * @description: TODO + * @date 2023/1/13 16:00 + */ +@RequestMapping("periods") +@RestController +@Slf4j +public class BorrowerPeriodsController extends BaseController{ + @Autowired + private TbBorrowerPeriodsService tbBorrowerPeriodsService; + + /** + * 查询贷款周期列表 + */ + @RequiresPermissions("potenza:periods:list") + @GetMapping("/list") + public TableDataInfo list(TbBorrowerPeriods tbBorrowerPeriods) + { + startPage(); + List list = tbBorrowerPeriodsService.selectTbBorrowerPeriodsList(tbBorrowerPeriods); + return getDataTable(list); + } + + /** + * 导出贷款周期列表 + */ + @RequiresPermissions("potenza:periods:export") + @Log(title = "贷款周期", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TbBorrowerPeriods tbBorrowerPeriods) + { + List list = tbBorrowerPeriodsService.selectTbBorrowerPeriodsList(tbBorrowerPeriods); + ExcelUtil util = new ExcelUtil(TbBorrowerPeriods.class); + util.exportExcel(response, list, "贷款周期数据"); + } + + /** + * 获取贷款周期详细信息 + */ + @RequiresPermissions("potenza:periods:query") + @GetMapping(value = "/{periodsId}") + public AjaxResult getInfo(@PathVariable("periodsId") Long periodsId) + { + return success(tbBorrowerPeriodsService.selectTbBorrowerPeriodsByPeriodsId(periodsId)); + } + + /** + * 新增贷款周期 + */ + @RequiresPermissions("potenza:periods:add") + @Log(title = "贷款周期", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TbBorrowerPeriods tbBorrowerPeriods) + { + return toAjax(tbBorrowerPeriodsService.insertTbBorrowerPeriods(tbBorrowerPeriods)); + } + + /** + * 修改贷款周期 + */ + @RequiresPermissions("potenza:periods:edit") + @Log(title = "贷款周期", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TbBorrowerPeriods tbBorrowerPeriods) + { + return toAjax(tbBorrowerPeriodsService.updateTbBorrowerPeriods(tbBorrowerPeriods)); + } + + /** + * 删除贷款周期 + */ + @RequiresPermissions("potenza:periods:remove") + @Log(title = "贷款周期", businessType = BusinessType.DELETE) + @DeleteMapping("/{periodsIds}") + public AjaxResult remove(@PathVariable Long[] periodsIds) + { + return toAjax(tbBorrowerPeriodsService.deleteTbBorrowerPeriodsByPeriodsIds(periodsIds)); + } +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPlanController.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPlanController.java new file mode 100644 index 00000000..e139655a --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/controller/BorrowerPlanController.java @@ -0,0 +1,107 @@ +package com.ruoyi.potenza.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.potenza.domain.TbBorrowerPlan; +import com.ruoyi.potenza.service.TbBorrowerPlanService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * @author 木子 + * @version 1.0 + * @description: TODO + * @date 2023/1/13 16:01 + */ +@RequestMapping("plan") +@RestController +@Slf4j +public class BorrowerPlanController extends BaseController{ + + @Autowired + private TbBorrowerPlanService tbBorrowerPlanService; + + /** + * 查询计划列表 + */ + @RequiresPermissions("potenza:plan:list") + @GetMapping("/list") + public TableDataInfo list(TbBorrowerPlan tbBorrowerPlan) + { + startPage(); + List list = tbBorrowerPlanService.selectTbBorrowerPlanList(tbBorrowerPlan); + return getDataTable(list); + } + + /** + * 导出计划列表 + */ + @RequiresPermissions("potenza:plan:export") + @Log(title = "计划", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TbBorrowerPlan tbBorrowerPlan) + { + List list = tbBorrowerPlanService.selectTbBorrowerPlanList(tbBorrowerPlan); + ExcelUtil util = new ExcelUtil(TbBorrowerPlan.class); + util.exportExcel(response, list, "计划数据"); + } + + /** + * 获取计划详细信息 + */ + @RequiresPermissions("potenza:plan:query") + @GetMapping(value = "/{planId}") + public AjaxResult getInfo(@PathVariable("planId") Long planId) + { + return success(tbBorrowerPlanService.selectTbBorrowerPlanByPlanId(planId)); + } + + /** + * 新增计划 + */ + @RequiresPermissions("potenza:plan:add") + @Log(title = "计划", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TbBorrowerPlan tbBorrowerPlan) + { + return toAjax(tbBorrowerPlanService.insertTbBorrowerPlan(tbBorrowerPlan)); + } + + /** + * 修改计划 + */ + @RequiresPermissions("potenza:plan:edit") + @Log(title = "计划", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TbBorrowerPlan tbBorrowerPlan) + { + return toAjax(tbBorrowerPlanService.updateTbBorrowerPlan(tbBorrowerPlan)); + } + + /** + * 删除计划 + */ + @RequiresPermissions("potenza:plan:remove") + @Log(title = "计划", businessType = BusinessType.DELETE) + @DeleteMapping("/{planIds}") + public AjaxResult remove(@PathVariable Long[] planIds) + { + return toAjax(tbBorrowerPlanService.deleteTbBorrowerPlanByPlanIds(planIds)); + } +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrower.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrower.java new file mode 100644 index 00000000..aa6b06d5 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrower.java @@ -0,0 +1,96 @@ +package com.ruoyi.potenza.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 贷款表 + * @TableName tb_borrower + */ +@TableName(value ="tb_borrower") +@Data +public class TbBorrower implements Serializable { + /** + * + */ + @TableId(type = IdType.AUTO) + private Integer borrowerId; + + /** + * 用户ID + */ + private Integer userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 产品ID + */ + private Integer productId; + + /** + * 默认为最高可以借款金额 + */ + private Double borrowerMoney; + + /** + * 贷款周期ID + */ + private Integer periodsId; + + /** + * 贷款方式ID 0:等额本息 6000 1:等额本金 6000 1000 第一个月60000*利率 第二个月 5000*利率 + */ + private Integer wayId; + + /** + * 借款用途 + */ + private String borrowerPurpose; + + /** + * 1: 待审核 2:贷款成功 3:贷款失败 + */ + private Integer borrowerState; + + /** + * 放款人 + */ + private Integer loanerId; + + /** + * 创建者 + */ + private String createBy; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 删除状态0:存在,2:删除 + */ + private Integer delFlag; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPeriods.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPeriods.java new file mode 100644 index 00000000..4e0162bb --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPeriods.java @@ -0,0 +1,56 @@ +package com.ruoyi.potenza.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 贷款周期表 + * @TableName tb_borrower_periods + */ +@TableName(value ="tb_borrower_periods") +@Data +public class TbBorrowerPeriods implements Serializable { + /** + * ID + */ + @TableId(type = IdType.AUTO) + private Integer periodsId; + + /** + * 周期:3 6 9 12 24 + */ + private Integer periodsName; + + /** + * 创建者 + */ + private String createBy; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 删除状态0:存在,2:删除 + */ + private Integer delFlag; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPlan.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPlan.java new file mode 100644 index 00000000..1702059c --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/TbBorrowerPlan.java @@ -0,0 +1,81 @@ +package com.ruoyi.potenza.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 计划表 + * @TableName tb_borrower_plan + */ +@TableName(value ="tb_borrower_plan") +@Data +public class TbBorrowerPlan implements Serializable { + /** + * 还款结果ID + */ + @TableId(type = IdType.AUTO) + private Integer planId; + + /** + * 用户ID + */ + private Integer userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 共几期 + */ + private Integer borrowerPeriods; + + /** + * 每期应还金额 + */ + private Double periodsMoney; + + /** + * 月供本金 + */ + private Double periodsCapital; + + /** + * 月供利息 + */ + private Double periodsInterests; + + /** + * 计划还款日期 + */ + private Date planDate; + + /** + * 0:本月未还 1:提前还款 2:按时还款 3:逾期还款 + */ + private Integer planState; + + /** + * 删除状态0:存在,2:删除 + */ + private Integer delFlag; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/vo/IdVo.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/vo/IdVo.java new file mode 100644 index 00000000..c943b6e3 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/domain/vo/IdVo.java @@ -0,0 +1,17 @@ +package com.ruoyi.potenza.domain.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author 木子 + * @version 1.0 + * @description: TODO + * @date 2023/1/13 16:45 + */ +@Data +public class IdVo implements Serializable { + + private Integer id; +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerMapper.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerMapper.java new file mode 100644 index 00000000..68118e5f --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerMapper.java @@ -0,0 +1,60 @@ +package com.ruoyi.potenza.mapper; + +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.potenza.domain.TbBorrower; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower(贷款表)】的数据库操作Mapper +* @createDate 2023-01-13 15:56:37 +* @Entity com.ruoyi.potenza.domain.TbBorrower +*/ +public interface TbBorrowerMapper extends BaseMapper { + + List pageList(); + + + + /** + * 查询贷款 + * + * @param borrowerId 贷款主键 + * @return 贷款 + */ + public TbBorrower selectTbBorrowerByBorrowerId(Long borrowerId); + + /** + * 查询贷款列表 + * + * @param tbBorrower 贷款 + * @return 贷款集合 + */ + public List selectTbBorrowerList(TbBorrower tbBorrower); + + /** + * 新增贷款 + * + * @param tbBorrower 贷款 + * @return 结果 + */ + public int insertTbBorrower(TbBorrower tbBorrower); + + /** + * 修改贷款 + * + * @param tbBorrower 贷款 + * @return 结果 + */ + public int updateTbBorrower(TbBorrower tbBorrower); + + + + +} + + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPeriodsMapper.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPeriodsMapper.java new file mode 100644 index 00000000..e4d7795d --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPeriodsMapper.java @@ -0,0 +1,66 @@ +package com.ruoyi.potenza.mapper; + +import com.ruoyi.potenza.domain.TbBorrowerPeriods; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower_periods(贷款周期表)】的数据库操作Mapper +* @createDate 2023-01-13 15:56:37 +* @Entity com.ruoyi.potenza.domain.TbBorrowerPeriods +*/ +public interface TbBorrowerPeriodsMapper extends BaseMapper { + /** + * 查询贷款周期 + * + * @param periodsId 贷款周期主键 + * @return 贷款周期 + */ + public TbBorrowerPeriods selectTbBorrowerPeriodsByPeriodsId(Long periodsId); + + /** + * 查询贷款周期列表 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 贷款周期集合 + */ + public List selectTbBorrowerPeriodsList(TbBorrowerPeriods tbBorrowerPeriods); + + /** + * 新增贷款周期 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 结果 + */ + public int insertTbBorrowerPeriods(TbBorrowerPeriods tbBorrowerPeriods); + + /** + * 修改贷款周期 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 结果 + */ + public int updateTbBorrowerPeriods(TbBorrowerPeriods tbBorrowerPeriods); + + /** + * 删除贷款周期 + * + * @param periodsId 贷款周期主键 + * @return 结果 + */ + public int deleteTbBorrowerPeriodsByPeriodsId(Long periodsId); + + /** + * 批量删除贷款周期 + * + * @param periodsIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTbBorrowerPeriodsByPeriodsIds(Long[] periodsIds); +} + + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPlanMapper.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPlanMapper.java new file mode 100644 index 00000000..c418af1e --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/mapper/TbBorrowerPlanMapper.java @@ -0,0 +1,66 @@ +package com.ruoyi.potenza.mapper; + +import com.ruoyi.potenza.domain.TbBorrowerPlan; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower_plan(计划表)】的数据库操作Mapper +* @createDate 2023-01-13 15:56:37 +* @Entity com.ruoyi.potenza.domain.TbBorrowerPlan +*/ +public interface TbBorrowerPlanMapper extends BaseMapper { + /** + * 查询计划 + * + * @param planId 计划主键 + * @return 计划 + */ + public TbBorrowerPlan selectTbBorrowerPlanByPlanId(Long planId); + + /** + * 查询计划列表 + * + * @param tbBorrowerPlan 计划 + * @return 计划集合 + */ + public List selectTbBorrowerPlanList(TbBorrowerPlan tbBorrowerPlan); + + /** + * 新增计划 + * + * @param tbBorrowerPlan 计划 + * @return 结果 + */ + public int insertTbBorrowerPlan(TbBorrowerPlan tbBorrowerPlan); + + /** + * 修改计划 + * + * @param tbBorrowerPlan 计划 + * @return 结果 + */ + public int updateTbBorrowerPlan(TbBorrowerPlan tbBorrowerPlan); + + /** + * 删除计划 + * + * @param planId 计划主键 + * @return 结果 + */ + public int deleteTbBorrowerPlanByPlanId(Long planId); + + /** + * 批量删除计划 + * + * @param planIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTbBorrowerPlanByPlanIds(Long[] planIds); +} + + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPeriodsService.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPeriodsService.java new file mode 100644 index 00000000..7e3a82b3 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPeriodsService.java @@ -0,0 +1,61 @@ +package com.ruoyi.potenza.service; + +import com.ruoyi.potenza.domain.TbBorrowerPeriods; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower_periods(贷款周期表)】的数据库操作Service +* @createDate 2023-01-13 15:56:37 +*/ +public interface TbBorrowerPeriodsService extends IService { + /** + * 查询贷款周期 + * + * @param periodsId 贷款周期主键 + * @return 贷款周期 + */ + public TbBorrowerPeriods selectTbBorrowerPeriodsByPeriodsId(Long periodsId); + + /** + * 查询贷款周期列表 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 贷款周期集合 + */ + public List selectTbBorrowerPeriodsList(TbBorrowerPeriods tbBorrowerPeriods); + + /** + * 新增贷款周期 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 结果 + */ + public int insertTbBorrowerPeriods(TbBorrowerPeriods tbBorrowerPeriods); + + /** + * 修改贷款周期 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 结果 + */ + public int updateTbBorrowerPeriods(TbBorrowerPeriods tbBorrowerPeriods); + + /** + * 批量删除贷款周期 + * + * @param periodsIds 需要删除的贷款周期主键集合 + * @return 结果 + */ + public int deleteTbBorrowerPeriodsByPeriodsIds(Long[] periodsIds); + + /** + * 删除贷款周期信息 + * + * @param periodsId 贷款周期主键 + * @return 结果 + */ + public int deleteTbBorrowerPeriodsByPeriodsId(Long periodsId); +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPlanService.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPlanService.java new file mode 100644 index 00000000..e7fe07a2 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerPlanService.java @@ -0,0 +1,61 @@ +package com.ruoyi.potenza.service; + +import com.ruoyi.potenza.domain.TbBorrowerPlan; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower_plan(计划表)】的数据库操作Service +* @createDate 2023-01-13 15:56:37 +*/ +public interface TbBorrowerPlanService extends IService { + /** + * 查询计划 + * + * @param planId 计划主键 + * @return 计划 + */ + public TbBorrowerPlan selectTbBorrowerPlanByPlanId(Long planId); + + /** + * 查询计划列表 + * + * @param tbBorrowerPlan 计划 + * @return 计划集合 + */ + public List selectTbBorrowerPlanList(TbBorrowerPlan tbBorrowerPlan); + + /** + * 新增计划 + * + * @param tbBorrowerPlan 计划 + * @return 结果 + */ + public int insertTbBorrowerPlan(TbBorrowerPlan tbBorrowerPlan); + + /** + * 修改计划 + * + * @param tbBorrowerPlan 计划 + * @return 结果 + */ + public int updateTbBorrowerPlan(TbBorrowerPlan tbBorrowerPlan); + + /** + * 批量删除计划 + * + * @param planIds 需要删除的计划主键集合 + * @return 结果 + */ + public int deleteTbBorrowerPlanByPlanIds(Long[] planIds); + + /** + * 删除计划信息 + * + * @param planId 计划主键 + * @return 结果 + */ + public int deleteTbBorrowerPlanByPlanId(Long planId); +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerService.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerService.java new file mode 100644 index 00000000..ab007948 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/TbBorrowerService.java @@ -0,0 +1,55 @@ +package com.ruoyi.potenza.service; + +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.potenza.domain.TbBorrower; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.potenza.domain.vo.IdVo; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower(贷款表)】的数据库操作Service +* @createDate 2023-01-13 15:56:37 +*/ +public interface TbBorrowerService extends IService { + + List pageList(TbBorrower tbBorrower); + + AjaxResult borrowerDele(IdVo idVo); + + /** + * 查询贷款 + * + * @param borrowerId 贷款主键 + * @return 贷款 + */ + public TbBorrower selectTbBorrowerByBorrowerId(Long borrowerId); + + /** + * 查询贷款列表 + * + * @param tbBorrower 贷款 + * @return 贷款集合 + */ + public List selectTbBorrowerList(TbBorrower tbBorrower); + + /** + * 新增贷款 + * + * @param tbBorrower 贷款 + * @return 结果 + */ + public int insertTbBorrower(TbBorrower tbBorrower); + + /** + * 修改贷款 + * + * @param tbBorrower 贷款 + * @return 结果 + */ + public int updateTbBorrower(TbBorrower tbBorrower); + + + +} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPeriodsServiceImpl.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPeriodsServiceImpl.java new file mode 100644 index 00000000..0bddb453 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPeriodsServiceImpl.java @@ -0,0 +1,102 @@ +package com.ruoyi.potenza.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.potenza.domain.TbBorrowerPeriods; +import com.ruoyi.potenza.service.TbBorrowerPeriodsService; +import com.ruoyi.potenza.mapper.TbBorrowerPeriodsMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower_periods(贷款周期表)】的数据库操作Service实现 +* @createDate 2023-01-13 15:56:37 +*/ +@Service +public class TbBorrowerPeriodsServiceImpl extends ServiceImpl + implements TbBorrowerPeriodsService{ + @Autowired + private TbBorrowerPeriodsMapper tbBorrowerPeriodsMapper; + + /** + * 查询贷款周期 + * + * @param periodsId 贷款周期主键 + * @return 贷款周期 + */ + @Override + public TbBorrowerPeriods selectTbBorrowerPeriodsByPeriodsId(Long periodsId) + { + return tbBorrowerPeriodsMapper.selectTbBorrowerPeriodsByPeriodsId(periodsId); + } + + /** + * 查询贷款周期列表 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 贷款周期 + */ + @Override + public List selectTbBorrowerPeriodsList(TbBorrowerPeriods tbBorrowerPeriods) + { + return tbBorrowerPeriodsMapper.selectTbBorrowerPeriodsList(tbBorrowerPeriods); + } + + /** + * 新增贷款周期 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 结果 + */ + @Override + public int insertTbBorrowerPeriods(TbBorrowerPeriods tbBorrowerPeriods) + { + tbBorrowerPeriods.setCreateTime(DateUtils.getNowDate()); + return tbBorrowerPeriodsMapper.insertTbBorrowerPeriods(tbBorrowerPeriods); + } + + /** + * 修改贷款周期 + * + * @param tbBorrowerPeriods 贷款周期 + * @return 结果 + */ + @Override + public int updateTbBorrowerPeriods(TbBorrowerPeriods tbBorrowerPeriods) + { + tbBorrowerPeriods.setUpdateTime(DateUtils.getNowDate()); + return tbBorrowerPeriodsMapper.updateTbBorrowerPeriods(tbBorrowerPeriods); + } + + /** + * 批量删除贷款周期 + * + * @param periodsIds 需要删除的贷款周期主键 + * @return 结果 + */ + @Override + public int deleteTbBorrowerPeriodsByPeriodsIds(Long[] periodsIds) + { + return tbBorrowerPeriodsMapper.deleteTbBorrowerPeriodsByPeriodsIds(periodsIds); + } + + /** + * 删除贷款周期信息 + * + * @param periodsId 贷款周期主键 + * @return 结果 + */ + @Override + public int deleteTbBorrowerPeriodsByPeriodsId(Long periodsId) + { + return tbBorrowerPeriodsMapper.deleteTbBorrowerPeriodsByPeriodsId(periodsId); + } + +} + + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPlanServiceImpl.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPlanServiceImpl.java new file mode 100644 index 00000000..9d03eb03 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerPlanServiceImpl.java @@ -0,0 +1,101 @@ +package com.ruoyi.potenza.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.potenza.domain.TbBorrowerPlan; +import com.ruoyi.potenza.service.TbBorrowerPlanService; +import com.ruoyi.potenza.mapper.TbBorrowerPlanMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower_plan(计划表)】的数据库操作Service实现 +* @createDate 2023-01-13 15:56:37 +*/ +@Service +public class TbBorrowerPlanServiceImpl extends ServiceImpl + implements TbBorrowerPlanService{ + @Autowired + private TbBorrowerPlanMapper tbBorrowerPlanMapper; + + /** + * 查询计划 + * + * @param planId 计划主键 + * @return 计划 + */ + @Override + public TbBorrowerPlan selectTbBorrowerPlanByPlanId(Long planId) + { + return tbBorrowerPlanMapper.selectTbBorrowerPlanByPlanId(planId); + } + + /** + * 查询计划列表 + * + * @param tbBorrowerPlan 计划 + * @return 计划 + */ + @Override + public List selectTbBorrowerPlanList(TbBorrowerPlan tbBorrowerPlan) + { + return tbBorrowerPlanMapper.selectTbBorrowerPlanList(tbBorrowerPlan); + } + + /** + * 新增计划 + * + * @param tbBorrowerPlan 计划 + * @return 结果 + */ + @Override + public int insertTbBorrowerPlan(TbBorrowerPlan tbBorrowerPlan) + { + tbBorrowerPlan.setCreateTime(DateUtils.getNowDate()); + return tbBorrowerPlanMapper.insertTbBorrowerPlan(tbBorrowerPlan); + } + + /** + * 修改计划 + * + * @param tbBorrowerPlan 计划 + * @return 结果 + */ + @Override + public int updateTbBorrowerPlan(TbBorrowerPlan tbBorrowerPlan) + { + tbBorrowerPlan.setUpdateTime(DateUtils.getNowDate()); + return tbBorrowerPlanMapper.updateTbBorrowerPlan(tbBorrowerPlan); + } + + /** + * 批量删除计划 + * + * @param planIds 需要删除的计划主键 + * @return 结果 + */ + @Override + public int deleteTbBorrowerPlanByPlanIds(Long[] planIds) + { + return tbBorrowerPlanMapper.deleteTbBorrowerPlanByPlanIds(planIds); + } + + /** + * 删除计划信息 + * + * @param planId 计划主键 + * @return 结果 + */ + @Override + public int deleteTbBorrowerPlanByPlanId(Long planId) + { + return tbBorrowerPlanMapper.deleteTbBorrowerPlanByPlanId(planId); + } +} + + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerServiceImpl.java b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerServiceImpl.java new file mode 100644 index 00000000..6a4b4e92 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/java/com/ruoyi/potenza/service/impl/TbBorrowerServiceImpl.java @@ -0,0 +1,98 @@ +package com.ruoyi.potenza.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.potenza.domain.TbBorrower; +import com.ruoyi.potenza.domain.vo.IdVo; +import com.ruoyi.potenza.service.TbBorrowerService; +import com.ruoyi.potenza.mapper.TbBorrowerMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** +* @author 86155 +* @description 针对表【tb_borrower(贷款表)】的数据库操作Service实现 +* @createDate 2023-01-13 15:56:37 +*/ +@Service +public class TbBorrowerServiceImpl extends ServiceImpl + implements TbBorrowerService{ + + @Autowired + private TbBorrowerMapper tbBorrowerMapper; + + @Override + public List pageList(TbBorrower tbBorrower) { + List list= tbBorrowerMapper.pageList(); + return list; + } + + @Override + public AjaxResult borrowerDele(IdVo idVo) { + tbBorrowerMapper.deleteById(idVo.getId()); + return AjaxResult.success("删除成功"); + } + + + + /** + * 查询贷款 + * + * @param borrowerId 贷款主键 + * @return 贷款 + */ + @Override + public TbBorrower selectTbBorrowerByBorrowerId(Long borrowerId) + { + return tbBorrowerMapper.selectTbBorrowerByBorrowerId(borrowerId); + } + + /** + * 查询贷款列表 + * + * @param tbBorrower 贷款 + * @return 贷款 + */ + @Override + public List selectTbBorrowerList(TbBorrower tbBorrower) + { + return tbBorrowerMapper.selectTbBorrowerList(tbBorrower); + } + + /** + * 新增贷款 + * + * @param tbBorrower 贷款 + * @return 结果 + */ + @Override + public int insertTbBorrower(TbBorrower tbBorrower) + { + tbBorrower.setCreateTime(DateUtils.getNowDate()); + return tbBorrowerMapper.insertTbBorrower(tbBorrower); + } + + /** + * 修改贷款 + * + * @param tbBorrower 贷款 + * @return 结果 + */ + @Override + public int updateTbBorrower(TbBorrower tbBorrower) + { + tbBorrower.setUpdateTime(DateUtils.getNowDate()); + return tbBorrowerMapper.updateTbBorrower(tbBorrower); + } + + + + +} + + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-potenza/src/main/resources/bootstrap.yml new file mode 100644 index 00000000..4a64873b --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/resources/bootstrap.yml @@ -0,0 +1,25 @@ +# Tomcat +server: + port: 9301 + +# Spring +spring: + application: + # 应用名称 + name: ruoyi-potenza + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/ruoyi-modules/ruoyi-potenza/src/main/resources/logback.xml b/ruoyi-modules/ruoyi-potenza/src/main/resources/logback.xml new file mode 100644 index 00000000..c57c927c --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerMapper.xml b/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerMapper.xml new file mode 100644 index 00000000..717348f1 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerMapper.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + select borrower_id, user_id, user_name, product_id, borrower_money, periods_id, way_id, borrower_purpose, borrower_state, loaner_id, create_by, update_by, del_flag, create_time, update_time from tb_borrower where del_flag=0 + + + + + + + + insert into tb_borrower + + user_id, + user_name, + product_id, + borrower_money, + periods_id, + way_id, + borrower_purpose, + borrower_state, + loaner_id, + create_by, + update_by, + del_flag, + create_time, + update_time, + + + #{userId}, + #{userName}, + #{productId}, + #{borrowerMoney}, + #{periodsId}, + #{wayId}, + #{borrowerPurpose}, + #{borrowerState}, + #{loanerId}, + #{createBy}, + #{updateBy}, + #{delFlag}, + #{createTime}, + #{updateTime}, + + + + + update tb_borrower + + user_id = #{userId}, + user_name = #{userName}, + product_id = #{productId}, + borrower_money = #{borrowerMoney}, + periods_id = #{periodsId}, + way_id = #{wayId}, + borrower_purpose = #{borrowerPurpose}, + borrower_state = #{borrowerState}, + loaner_id = #{loanerId}, + create_by = #{createBy}, + update_by = #{updateBy}, + del_flag = #{delFlag}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where borrower_id = #{borrowerId} + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPeriodsMapper.xml b/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPeriodsMapper.xml new file mode 100644 index 00000000..c8760ec7 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPeriodsMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + select periods_id, periods_name, create_by, update_by, del_flag, create_time, update_time from tb_borrower_periods + + + + + + + + insert into tb_borrower_periods + + periods_name, + create_by, + update_by, + del_flag, + create_time, + update_time, + + + #{periodsName}, + #{createBy}, + #{updateBy}, + #{delFlag}, + #{createTime}, + #{updateTime}, + + + + + update tb_borrower_periods + + periods_name = #{periodsName}, + create_by = #{createBy}, + update_by = #{updateBy}, + del_flag = #{delFlag}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where periods_id = #{periodsId} + + + + delete from tb_borrower_periods where periods_id = #{periodsId} + + + + delete from tb_borrower_periods where periods_id in + + #{periodsId} + + + diff --git a/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPlanMapper.xml b/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPlanMapper.xml new file mode 100644 index 00000000..41491377 --- /dev/null +++ b/ruoyi-modules/ruoyi-potenza/src/main/resources/mapper/TbBorrowerPlanMapper.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + select plan_id, user_id, user_name, borrower_periods, periods_money, periods_capital, periods_interests, plan_date, plan_state, del_flag, create_time, update_time from tb_borrower_plan + + + + + + + + insert into tb_borrower_plan + + user_id, + user_name, + borrower_periods, + periods_money, + periods_capital, + periods_interests, + plan_date, + plan_state, + del_flag, + create_time, + update_time, + + + #{userId}, + #{userName}, + #{borrowerPeriods}, + #{periodsMoney}, + #{periodsCapital}, + #{periodsInterests}, + #{planDate}, + #{planState}, + #{delFlag}, + #{createTime}, + #{updateTime}, + + + + + update tb_borrower_plan + + user_id = #{userId}, + user_name = #{userName}, + borrower_periods = #{borrowerPeriods}, + periods_money = #{periodsMoney}, + periods_capital = #{periodsCapital}, + periods_interests = #{periodsInterests}, + plan_date = #{planDate}, + plan_state = #{planState}, + del_flag = #{delFlag}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where plan_id = #{planId} + + + + delete from tb_borrower_plan where plan_id = #{planId} + + + + delete from tb_borrower_plan where plan_id in + + #{planId} + + +