commit
938fa2e9ae
@ -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,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…
Reference in new issue