parent
7afbeb5257
commit
70f22db558
@ -0,0 +1,111 @@
|
|||||||
|
<?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.product</groupId>
|
||||||
|
<artifactId>ruoyi-product</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>3.5.2</version>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
<version>3.0.3</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.product;
|
||||||
|
|
||||||
|
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||||
|
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统模块
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableCustomSwagger2
|
||||||
|
@EnableRyFeignClients
|
||||||
|
@SpringBootApplication
|
||||||
|
public class RuoYiProductApplication
|
||||||
|
{
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
SpringApplication.run(RuoYiProductApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 系统模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
|
" .-------. ____ __ \n" +
|
||||||
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
|
" | ( ' ) | \\ _. / ' \n" +
|
||||||
|
" |(_ o _) / _( )_ .' \n" +
|
||||||
|
" | (_,_).' __ ___(_ o _)' \n" +
|
||||||
|
" | |\\ \\ | || |(_,_)' \n" +
|
||||||
|
" | | \\ `' /| `-' / \n" +
|
||||||
|
" | | \\ / \\ / \n" +
|
||||||
|
" ''-' `'-' `-..-' ");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.ruoyi.product.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
|
import springfox.documentation.builders.PathSelectors;
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
|
import springfox.documentation.service.Contact;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableSwagger2
|
||||||
|
public class Knife4jConfiguration {
|
||||||
|
@Bean(value = "defaultApi2")
|
||||||
|
public Docket defaultApi2() {
|
||||||
|
String groupName="3.X版本";
|
||||||
|
Docket docket=new Docket(DocumentationType.OAS_30)
|
||||||
|
.apiInfo(new ApiInfoBuilder()
|
||||||
|
.title("产品中心 API详细描述 ")
|
||||||
|
.description("# 这里记录服务端所有的接口的入参,出参等等信息")
|
||||||
|
.termsOfServiceUrl("https://www.shenmazong.com")
|
||||||
|
.contact(new Contact("杨杨","http://yangzongli.com","337296894@qq.com"))
|
||||||
|
.version("3.0")
|
||||||
|
.build())
|
||||||
|
//分组名称
|
||||||
|
.groupName(groupName)
|
||||||
|
.select()
|
||||||
|
//这里指定Controller扫描包路径
|
||||||
|
.apis(RequestHandlerSelectors.basePackage("com.ruoyi.product.controller"))
|
||||||
|
.paths(PathSelectors.any())
|
||||||
|
.build();
|
||||||
|
return docket;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.ruoyi.product.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
|
||||||
|
import com.ruoyi.product.pojo.vo.IdVo;
|
||||||
|
import com.ruoyi.product.pojo.vo.PageInfoVo;
|
||||||
|
import com.ruoyi.product.service.TbFinancialProductService;
|
||||||
|
import com.ruoyi.product.pojo.vo.ProductInfoVo;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @description: TODO
|
||||||
|
* @author杨宗理
|
||||||
|
* @date 2023/1/15 16:34
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/product")
|
||||||
|
public class ProductController {
|
||||||
|
@Autowired
|
||||||
|
private TbFinancialProductService tbFinancialProductService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示产品列表数据
|
||||||
|
* @param pageInfoVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/list")
|
||||||
|
public AjaxResult list(@RequestBody PageInfoVo pageInfoVo){
|
||||||
|
return tbFinancialProductService.listPage(pageInfoVo);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加列表数据
|
||||||
|
* @param productInfoVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public AjaxResult add(@RequestBody ProductInfoVo productInfoVo){
|
||||||
|
return tbFinancialProductService.add(productInfoVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
* @param idVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/delete")
|
||||||
|
public AjaxResult delete(@RequestBody IdVo idVo){
|
||||||
|
return tbFinancialProductService.deleteById(idVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*修改数据通过Id
|
||||||
|
* @param productInfoVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/update")
|
||||||
|
public AjaxResult update(@RequestBody ProductInfoVo productInfoVo){
|
||||||
|
return tbFinancialProductService.updateId(productInfoVo);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.product.pojo.TbFinancialProduct;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Entity com.ruoyi.product.pojo.TbFinancialProduct
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TbFinancialProductMapper extends BaseMapper<TbFinancialProduct> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.product.pojo.TbProductType;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Entity com.ruoyi.product.pojo.TbProductType
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TbProductTypeMapper extends BaseMapper<TbProductType> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.ruoyi.product.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @description: TODO
|
||||||
|
* @author杨宗理
|
||||||
|
* @date 2023/1/15 20:16
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IdVo implements Serializable {
|
||||||
|
private Integer ProductId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.ruoyi.product.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @description: TODO
|
||||||
|
* @author杨宗理
|
||||||
|
* @date 2023/1/15 16:46
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PageInfoVo implements Serializable {
|
||||||
|
private Integer pageNum;
|
||||||
|
private Integer pageSize;
|
||||||
|
//模糊查询数据
|
||||||
|
private String keyword;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.product.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.product.pojo.TbFinancialProduct;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.product.pojo.vo.IdVo;
|
||||||
|
import com.ruoyi.product.pojo.vo.PageInfoVo;
|
||||||
|
import com.ruoyi.product.pojo.vo.ProductInfoVo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface TbFinancialProductService extends IService<TbFinancialProduct> {
|
||||||
|
|
||||||
|
AjaxResult listPage(PageInfoVo pageInfoVo);
|
||||||
|
|
||||||
|
AjaxResult add(ProductInfoVo productInfoVo);
|
||||||
|
|
||||||
|
AjaxResult deleteById(IdVo idVo);
|
||||||
|
|
||||||
|
AjaxResult updateId(ProductInfoVo productInfoVo);
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.ruoyi.product.service;
|
||||||
|
|
||||||
|
import com.ruoyi.product.pojo.TbProductType;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface TbProductTypeService extends IService<TbProductType> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
package com.ruoyi.product.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.product.pojo.TbFinancialProduct;
|
||||||
|
import com.ruoyi.product.pojo.vo.IdVo;
|
||||||
|
import com.ruoyi.product.pojo.vo.PageInfoVo;
|
||||||
|
import com.ruoyi.product.pojo.vo.ProductInfoVo;
|
||||||
|
import com.ruoyi.product.service.TbFinancialProductService;
|
||||||
|
import com.ruoyi.product.mapper.TbFinancialProductMapper;
|
||||||
|
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TbFinancialProductServiceImpl extends ServiceImpl<TbFinancialProductMapper, TbFinancialProduct>
|
||||||
|
implements TbFinancialProductService{
|
||||||
|
@Autowired
|
||||||
|
private TbFinancialProductMapper tbFinancialProductMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品数据查询
|
||||||
|
* @param pageInfoVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult listPage(PageInfoVo pageInfoVo) {
|
||||||
|
Page<TbFinancialProduct> page = new Page<>(pageInfoVo.getPageNum(), pageInfoVo.getPageSize());
|
||||||
|
Page<TbFinancialProduct> financialProductPage = page(page, new QueryWrapper<TbFinancialProduct>().lambda().eq(TbFinancialProduct::getFirmName, pageInfoVo.getKeyword()).last("limit 1"));
|
||||||
|
List<ProductInfoVo> collect = financialProductPage.getRecords().stream().map((item) -> {
|
||||||
|
ProductInfoVo productInfoVo = new ProductInfoVo();
|
||||||
|
BeanUtils.copyProperties(item, productInfoVo);
|
||||||
|
return productInfoVo;
|
||||||
|
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
Page<ProductInfoVo> infoVoPage = new Page<>();
|
||||||
|
infoVoPage.setRecords(collect);
|
||||||
|
infoVoPage.setCurrent(financialProductPage.getCurrent());
|
||||||
|
infoVoPage.setSize(financialProductPage.getSize());
|
||||||
|
infoVoPage.setTotal(financialProductPage.getTotal());
|
||||||
|
|
||||||
|
return AjaxResult.success(infoVoPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加列表数据
|
||||||
|
* @param productInfoVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult add(ProductInfoVo productInfoVo) {
|
||||||
|
String firmName = productInfoVo.getFirmName();
|
||||||
|
TbFinancialProduct one = getOne(new QueryWrapper<TbFinancialProduct>().lambda().eq(TbFinancialProduct::getFirmName, firmName));
|
||||||
|
if(one!=null){
|
||||||
|
return AjaxResult.error(302,"产品名称重复");
|
||||||
|
}
|
||||||
|
TbFinancialProduct financialProduct = new TbFinancialProduct();
|
||||||
|
BeanUtils.copyProperties(productInfoVo,financialProduct);
|
||||||
|
save(financialProduct);
|
||||||
|
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据通过id
|
||||||
|
* @param idVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult deleteById(IdVo idVo) {
|
||||||
|
Integer productId = idVo.getProductId();
|
||||||
|
TbFinancialProduct one = getOne(new QueryWrapper<TbFinancialProduct>().lambda().eq(TbFinancialProduct::getProductId, productId));
|
||||||
|
if(one==null){
|
||||||
|
return AjaxResult.error(402,"产品Id不存在");
|
||||||
|
}
|
||||||
|
Integer oneProductId = one.getProductId();
|
||||||
|
|
||||||
|
BeanUtils.copyProperties(idVo,one);
|
||||||
|
int i = tbFinancialProductMapper.deleteById(oneProductId);
|
||||||
|
if(i>0){
|
||||||
|
return AjaxResult.success("删除成功");
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error(302,"删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据通过id
|
||||||
|
* @param productInfoVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult updateId(ProductInfoVo productInfoVo) {
|
||||||
|
Integer productId = productInfoVo.getProductId();
|
||||||
|
TbFinancialProduct one = getOne(new QueryWrapper<TbFinancialProduct>().lambda().eq(TbFinancialProduct::getProductId, productId));
|
||||||
|
if(one==null){
|
||||||
|
return AjaxResult.error(402,"产品Id不存在");
|
||||||
|
}
|
||||||
|
TbFinancialProduct product = new TbFinancialProduct();
|
||||||
|
//
|
||||||
|
BeanUtils.copyProperties(productInfoVo,product);
|
||||||
|
tbFinancialProductMapper.updateById(product);
|
||||||
|
return AjaxResult.success("修改成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.product.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.product.pojo.TbProductType;
|
||||||
|
import com.ruoyi.product.service.TbProductTypeService;
|
||||||
|
import com.ruoyi.product.mapper.TbProductTypeMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TbProductTypeServiceImpl extends ServiceImpl<TbProductTypeMapper, TbProductType>
|
||||||
|
implements TbProductTypeService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9304
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: ruoyi-product
|
||||||
|
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-system" />
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<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,40 @@
|
|||||||
|
<?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.product.mapper.TbFinancialProductMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ruoyi.product.pojo.TbFinancialProduct">
|
||||||
|
<id property="productId" column="product_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="firmId" column="firm_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="firmName" column="firm_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="productName" column="product_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="productDesc" column="product_desc" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="typeId" column="type_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="periods" column="periods" jdbcType="INTEGER"/>
|
||||||
|
<result property="productRate" column="product_rate" jdbcType="INTEGER"/>
|
||||||
|
<result property="produtCharge" column="produt_charge" jdbcType="INTEGER"/>
|
||||||
|
<result property="maxPrice" column="max_price" jdbcType="INTEGER"/>
|
||||||
|
<result property="minPrice" column="min_price" jdbcType="INTEGER"/>
|
||||||
|
<result property="termsForLate" column="terms_for_late" jdbcType="INTEGER"/>
|
||||||
|
<result property="termsProductLate" column="terms_product_late" jdbcType="VARCHAR"/>
|
||||||
|
<result property="modeProduct" column="mode_product" jdbcType="INTEGER"/>
|
||||||
|
<result property="productPhoto" column="product_photo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
product_id,firm_id,firm_name,
|
||||||
|
product_name,product_desc,user_id,
|
||||||
|
type_id,periods,product_rate,
|
||||||
|
produt_charge,max_price,min_price,
|
||||||
|
terms_for_late,terms_product_late,mode_product,
|
||||||
|
product_photo,del_flag,create_by,
|
||||||
|
create_time,update_by,update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
@ -0,0 +1,22 @@
|
|||||||
|
<?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.product.mapper.TbProductTypeMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ruoyi.product.pojo.TbProductType">
|
||||||
|
<id property="typeId" column="type_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="typeName" column="type_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
type_id,type_name,del_flag,
|
||||||
|
create_by,create_time,update_by,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
|
<version>3.6.1</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-modules-system</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
ruoyi-modules-system系统模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 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>
|
Loading…
Reference in new issue