Merge remote-tracking branch 'origin/dev' into dev

pull/320/head
admin 3 years ago
commit 938fa2e9ae

@ -16,6 +16,10 @@
</description> </description>
<dependencies> <dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- SpringCloud Openfeign --> <!-- SpringCloud Openfeign -->
<dependency> <dependency>

@ -13,6 +13,7 @@
<module>ruoyi-gen</module> <module>ruoyi-gen</module>
<module>ruoyi-job</module> <module>ruoyi-job</module>
<module>ruoyi-file</module> <module>ruoyi-file</module>
<module>ruoyi-potenza</module>
</modules> </modules>
<artifactId>ruoyi-modules</artifactId> <artifactId>ruoyi-modules</artifactId>

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ruoyi-modules</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.6.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ruoyi.potenza</groupId>
<artifactId>com.ruoyi.potenza</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.2</version>
</dependency>
<!-- SpringCloud Alibaba Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Swagger UI -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.fox.version}</version>
</dependency>
<!-- Mysql Connector -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- RuoYi Common DataSource -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-datasource</artifactId>
</dependency>
<!-- RuoYi Common DataScope -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-datascope</artifactId>
</dependency>
<!-- RuoYi Common Log -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-log</artifactId>
</dependency>
<!-- RuoYi Common Swagger -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-swagger</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -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" +
" ''-' `'-' `-..-' ");
}
}

@ -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<TbBorrower> 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<TbBorrower> list = tbBorrowerService.selectTbBorrowerList(tbBorrower);
ExcelUtil<TbBorrower> util = new ExcelUtil<TbBorrower>(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));
}
}

@ -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<TbBorrowerPeriods> 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<TbBorrowerPeriods> list = tbBorrowerPeriodsService.selectTbBorrowerPeriodsList(tbBorrowerPeriods);
ExcelUtil<TbBorrowerPeriods> util = new ExcelUtil<TbBorrowerPeriods>(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));
}
}

@ -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<TbBorrowerPlan> 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<TbBorrowerPlan> list = tbBorrowerPlanService.selectTbBorrowerPlanList(tbBorrowerPlan);
ExcelUtil<TbBorrowerPlan> util = new ExcelUtil<TbBorrowerPlan>(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));
}
}

@ -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;
/**
* 02
*/
private Integer delFlag;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -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;
/**
* 02
*/
private Integer delFlag;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -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;
/**
* 02
*/
private Integer delFlag;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -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;
}

@ -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<TbBorrower> {
List<TbBorrower> pageList();
/**
*
*
* @param borrowerId
* @return
*/
public TbBorrower selectTbBorrowerByBorrowerId(Long borrowerId);
/**
*
*
* @param tbBorrower
* @return
*/
public List<TbBorrower> selectTbBorrowerList(TbBorrower tbBorrower);
/**
*
*
* @param tbBorrower
* @return
*/
public int insertTbBorrower(TbBorrower tbBorrower);
/**
*
*
* @param tbBorrower
* @return
*/
public int updateTbBorrower(TbBorrower tbBorrower);
}

@ -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<TbBorrowerPeriods> {
/**
*
*
* @param periodsId
* @return
*/
public TbBorrowerPeriods selectTbBorrowerPeriodsByPeriodsId(Long periodsId);
/**
*
*
* @param tbBorrowerPeriods
* @return
*/
public List<TbBorrowerPeriods> 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);
}

@ -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<TbBorrowerPlan> {
/**
*
*
* @param planId
* @return
*/
public TbBorrowerPlan selectTbBorrowerPlanByPlanId(Long planId);
/**
*
*
* @param tbBorrowerPlan
* @return
*/
public List<TbBorrowerPlan> 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);
}

@ -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<TbBorrowerPeriods> {
/**
*
*
* @param periodsId
* @return
*/
public TbBorrowerPeriods selectTbBorrowerPeriodsByPeriodsId(Long periodsId);
/**
*
*
* @param tbBorrowerPeriods
* @return
*/
public List<TbBorrowerPeriods> 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);
}

@ -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<TbBorrowerPlan> {
/**
*
*
* @param planId
* @return
*/
public TbBorrowerPlan selectTbBorrowerPlanByPlanId(Long planId);
/**
*
*
* @param tbBorrowerPlan
* @return
*/
public List<TbBorrowerPlan> 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);
}

@ -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<TbBorrower> {
List<?> pageList(TbBorrower tbBorrower);
AjaxResult borrowerDele(IdVo idVo);
/**
*
*
* @param borrowerId
* @return
*/
public TbBorrower selectTbBorrowerByBorrowerId(Long borrowerId);
/**
*
*
* @param tbBorrower
* @return
*/
public List<TbBorrower> selectTbBorrowerList(TbBorrower tbBorrower);
/**
*
*
* @param tbBorrower
* @return
*/
public int insertTbBorrower(TbBorrower tbBorrower);
/**
*
*
* @param tbBorrower
* @return
*/
public int updateTbBorrower(TbBorrower tbBorrower);
}

@ -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<TbBorrowerPeriodsMapper, TbBorrowerPeriods>
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<TbBorrowerPeriods> 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);
}
}

@ -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<TbBorrowerPlanMapper, TbBorrowerPlan>
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<TbBorrowerPlan> 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);
}
}

@ -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<TbBorrowerMapper, TbBorrower>
implements TbBorrowerService{
@Autowired
private TbBorrowerMapper tbBorrowerMapper;
@Override
public List<?> pageList(TbBorrower tbBorrower) {
List<TbBorrower> 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<TbBorrower> 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);
}
}

@ -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}

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/ruoyi-potenza" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.ruoyi" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info" />
<appender-ref ref="file_error" />
</root>
</configuration>

@ -0,0 +1,108 @@
<?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">
<mapper namespace="com.ruoyi.potenza.mapper.TbBorrowerMapper">
<resultMap type="com.ruoyi.potenza.domain.TbBorrower" id="TbBorrowerResult">
<result property="borrowerId" column="borrower_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="productId" column="product_id" />
<result property="borrowerMoney" column="borrower_money" />
<result property="periodsId" column="periods_id" />
<result property="wayId" column="way_id" />
<result property="borrowerPurpose" column="borrower_purpose" />
<result property="borrowerState" column="borrower_state" />
<result property="loanerId" column="loaner_id" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTbBorrowerVo">
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
</sql>
<select id="pageList" resultType="com.ruoyi.potenza.domain.TbBorrower">
select * from tb_borrower where del_flag=0
</select>
<select id="selectTbBorrowerList" parameterType="com.ruoyi.potenza.domain.TbBorrower" resultMap="TbBorrowerResult">
<include refid="selectTbBorrowerVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="productId != null "> and product_id = #{productId}</if>
<if test="borrowerMoney != null "> and borrower_money = #{borrowerMoney}</if>
<if test="periodsId != null "> and periods_id = #{periodsId}</if>
<if test="wayId != null "> and way_id = #{wayId}</if>
<if test="borrowerPurpose != null and borrowerPurpose != ''"> and borrower_purpose = #{borrowerPurpose}</if>
<if test="borrowerState != null "> and borrower_state = #{borrowerState}</if>
<if test="loanerId != null "> and loaner_id = #{loanerId}</if>
</where>
</select>
<select id="selectTbBorrowerByBorrowerId" parameterType="Long" resultMap="TbBorrowerResult">
<include refid="selectTbBorrowerVo"/>
where borrower_id = #{borrowerId}
</select>
<insert id="insertTbBorrower" parameterType="com.ruoyi.potenza.domain.TbBorrower" useGeneratedKeys="true" keyProperty="borrowerId">
insert into tb_borrower
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="productId != null">product_id,</if>
<if test="borrowerMoney != null">borrower_money,</if>
<if test="periodsId != null">periods_id,</if>
<if test="wayId != null">way_id,</if>
<if test="borrowerPurpose != null and borrowerPurpose != ''">borrower_purpose,</if>
<if test="borrowerState != null">borrower_state,</if>
<if test="loanerId != null">loaner_id,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="productId != null">#{productId},</if>
<if test="borrowerMoney != null">#{borrowerMoney},</if>
<if test="periodsId != null">#{periodsId},</if>
<if test="wayId != null">#{wayId},</if>
<if test="borrowerPurpose != null and borrowerPurpose != ''">#{borrowerPurpose},</if>
<if test="borrowerState != null">#{borrowerState},</if>
<if test="loanerId != null">#{loanerId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTbBorrower" parameterType="com.ruoyi.potenza.domain.TbBorrower">
update tb_borrower
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="borrowerMoney != null">borrower_money = #{borrowerMoney},</if>
<if test="periodsId != null">periods_id = #{periodsId},</if>
<if test="wayId != null">way_id = #{wayId},</if>
<if test="borrowerPurpose != null and borrowerPurpose != ''">borrower_purpose = #{borrowerPurpose},</if>
<if test="borrowerState != null">borrower_state = #{borrowerState},</if>
<if test="loanerId != null">loaner_id = #{loanerId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where borrower_id = #{borrowerId}
</update>
</mapper>

@ -0,0 +1,76 @@
<?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">
<mapper namespace="com.ruoyi.potenza.mapper.TbBorrowerPeriodsMapper">
<resultMap type="com.ruoyi.potenza.domain.TbBorrowerPeriods" id="TbBorrowerPeriodsResult">
<result property="periodsId" column="periods_id" />
<result property="periodsName" column="periods_name" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTbBorrowerPeriodsVo">
select periods_id, periods_name, create_by, update_by, del_flag, create_time, update_time from tb_borrower_periods
</sql>
<select id="selectTbBorrowerPeriodsList" parameterType="com.ruoyi.potenza.domain.TbBorrowerPeriods" resultMap="TbBorrowerPeriodsResult">
<include refid="selectTbBorrowerPeriodsVo"/>
<where>
<if test="periodsName != null "> and periods_name like concat('%', #{periodsName}, '%')</if>
</where>
</select>
<select id="selectTbBorrowerPeriodsByPeriodsId" parameterType="Long" resultMap="TbBorrowerPeriodsResult">
<include refid="selectTbBorrowerPeriodsVo"/>
where periods_id = #{periodsId}
</select>
<insert id="insertTbBorrowerPeriods" parameterType="com.ruoyi.potenza.domain.TbBorrowerPeriods" useGeneratedKeys="true" keyProperty="periodsId">
insert into tb_borrower_periods
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="periodsName != null">periods_name,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="periodsName != null">#{periodsName},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTbBorrowerPeriods" parameterType="com.ruoyi.potenza.domain.TbBorrowerPeriods">
update tb_borrower_periods
<trim prefix="SET" suffixOverrides=",">
<if test="periodsName != null">periods_name = #{periodsName},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where periods_id = #{periodsId}
</update>
<delete id="deleteTbBorrowerPeriodsByPeriodsId" parameterType="Long">
delete from tb_borrower_periods where periods_id = #{periodsId}
</delete>
<delete id="deleteTbBorrowerPeriodsByPeriodsIds" parameterType="String">
delete from tb_borrower_periods where periods_id in
<foreach item="periodsId" collection="array" open="(" separator="," close=")">
#{periodsId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,104 @@
<?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">
<mapper namespace="com.ruoyi.potenza.mapper.TbBorrowerPlanMapper">
<resultMap type="com.ruoyi.potenza.domain.TbBorrowerPlan" id="TbBorrowerPlanResult">
<result property="planId" column="plan_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="borrowerPeriods" column="borrower_periods" />
<result property="periodsMoney" column="periods_money" />
<result property="periodsCapital" column="periods_capital" />
<result property="periodsInterests" column="periods_interests" />
<result property="planDate" column="plan_date" />
<result property="planState" column="plan_state" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTbBorrowerPlanVo">
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
</sql>
<select id="selectTbBorrowerPlanList" parameterType="com.ruoyi.potenza.domain.TbBorrowerPlan" resultMap="TbBorrowerPlanResult">
<include refid="selectTbBorrowerPlanVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="borrowerPeriods != null "> and borrower_periods = #{borrowerPeriods}</if>
<if test="periodsMoney != null "> and periods_money = #{periodsMoney}</if>
<if test="periodsCapital != null "> and periods_capital = #{periodsCapital}</if>
<if test="periodsInterests != null "> and periods_interests = #{periodsInterests}</if>
<if test="planDate != null "> and plan_date = #{planDate}</if>
<if test="planState != null "> and plan_state = #{planState}</if>
</where>
</select>
<select id="selectTbBorrowerPlanByPlanId" parameterType="Long" resultMap="TbBorrowerPlanResult">
<include refid="selectTbBorrowerPlanVo"/>
where plan_id = #{planId}
</select>
<insert id="insertTbBorrowerPlan" parameterType="com.ruoyi.potenza.domain.TbBorrowerPlan" useGeneratedKeys="true" keyProperty="planId">
insert into tb_borrower_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="borrowerPeriods != null">borrower_periods,</if>
<if test="periodsMoney != null">periods_money,</if>
<if test="periodsCapital != null">periods_capital,</if>
<if test="periodsInterests != null">periods_interests,</if>
<if test="planDate != null">plan_date,</if>
<if test="planState != null">plan_state,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="borrowerPeriods != null">#{borrowerPeriods},</if>
<if test="periodsMoney != null">#{periodsMoney},</if>
<if test="periodsCapital != null">#{periodsCapital},</if>
<if test="periodsInterests != null">#{periodsInterests},</if>
<if test="planDate != null">#{planDate},</if>
<if test="planState != null">#{planState},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTbBorrowerPlan" parameterType="com.ruoyi.potenza.domain.TbBorrowerPlan">
update tb_borrower_plan
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="borrowerPeriods != null">borrower_periods = #{borrowerPeriods},</if>
<if test="periodsMoney != null">periods_money = #{periodsMoney},</if>
<if test="periodsCapital != null">periods_capital = #{periodsCapital},</if>
<if test="periodsInterests != null">periods_interests = #{periodsInterests},</if>
<if test="planDate != null">plan_date = #{planDate},</if>
<if test="planState != null">plan_state = #{planState},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where plan_id = #{planId}
</update>
<delete id="deleteTbBorrowerPlanByPlanId" parameterType="Long">
delete from tb_borrower_plan where plan_id = #{planId}
</delete>
<delete id="deleteTbBorrowerPlanByPlanIds" parameterType="String">
delete from tb_borrower_plan where plan_id in
<foreach item="planId" collection="array" open="(" separator="," close=")">
#{planId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save