feat: 智聪收藏管理平台,代码提交。
This commit is contained in:
1
intc-modules/intc-collect/README.md
Normal file
1
intc-modules/intc-collect/README.md
Normal file
@@ -0,0 +1 @@
|
||||
特定业务模块
|
||||
143
intc-modules/intc-collect/pom.xml
Normal file
143
intc-modules/intc-collect/pom.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?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.intc</groupId>
|
||||
<artifactId>intc-modules</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>intc-collect</artifactId>
|
||||
|
||||
<description>
|
||||
intc-collect 智聪收藏
|
||||
</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>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-prometheus</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.intc</groupId>
|
||||
<artifactId>intc-common-datasource</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.intc</groupId>
|
||||
<artifactId>intc-common-datascope</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.22</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- RuoYi Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.intc</groupId>
|
||||
<artifactId>intc-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.intc</groupId>
|
||||
<artifactId>intc-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ws.schild</groupId>
|
||||
<artifactId>jave-core</artifactId>
|
||||
<version>2.4.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ws.schild</groupId>
|
||||
<artifactId>jave-native-win64</artifactId>
|
||||
<version>2.4.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ws.schild</groupId>
|
||||
<artifactId>jave-native-linux64</artifactId>
|
||||
<version>2.4.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>5.3.3</version>
|
||||
<scope>compile</scope>
|
||||
</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,25 @@
|
||||
package com.intc;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import com.intc.common.security.annotation.EnableCustomConfig;
|
||||
import com.intc.common.security.annotation.EnableRyFeignClients;
|
||||
import com.intc.common.swagger.annotation.EnableCustomSwagger2;
|
||||
|
||||
/**
|
||||
* 系统模块
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
public class IntcCollectApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(IntcCollectApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 智聪收藏业务模块启动成功 ლ(´ڡ`ლ)゙");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.intc.collect.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.annotation.Resource;
|
||||
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.intc.common.log.annotation.Log;
|
||||
import com.intc.common.log.enums.BusinessType;
|
||||
import com.intc.common.security.annotation.RequiresPermissions;
|
||||
import com.intc.collect.domain.CommemorativeCoin;
|
||||
import com.intc.collect.domain.vo.CommemorativeCoinVo;
|
||||
import com.intc.collect.domain.dto.CommemorativeCoinDto;
|
||||
import com.intc.collect.service.ICommemorativeCoinService;
|
||||
import com.intc.common.core.web.controller.BaseController;
|
||||
import com.intc.common.core.web.domain.AjaxResult;
|
||||
import com.intc.common.core.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.intc.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 流通纪念币Controller
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-21
|
||||
*/
|
||||
@Api(tags=" 流通纪念币")
|
||||
@RestController
|
||||
@RequestMapping("/commemorativeCoin")
|
||||
public class CommemorativeCoinController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private ICommemorativeCoinService commemorativeCoinService;
|
||||
|
||||
/**
|
||||
* 查询流通纪念币列表
|
||||
*/
|
||||
@ApiOperation(value="查询流通纪念币列表",response = CommemorativeCoinVo.class)
|
||||
@RequiresPermissions("collect:commemorativeCoin:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommemorativeCoinDto commemorativeCoinDto)
|
||||
{
|
||||
startPage();
|
||||
List<CommemorativeCoinVo> list = commemorativeCoinService.selectCommemorativeCoinList(commemorativeCoinDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出流通纪念币列表
|
||||
*/
|
||||
@ApiOperation(value="导出流通纪念币列表")
|
||||
@RequiresPermissions("collect:commemorativeCoin:export")
|
||||
@Log(title = "流通纪念币", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommemorativeCoinDto commemorativeCoinDto)
|
||||
{
|
||||
List<CommemorativeCoinVo> list = commemorativeCoinService.selectCommemorativeCoinList(commemorativeCoinDto);
|
||||
ExcelUtil<CommemorativeCoinVo> util = new ExcelUtil<CommemorativeCoinVo>(CommemorativeCoinVo.class);
|
||||
util.exportExcel(response, list, "流通纪念币数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流通纪念币详细信息
|
||||
*/
|
||||
@ApiOperation(value="获取流通纪念币详细信息")
|
||||
@RequiresPermissions("collect:commemorativeCoin:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(commemorativeCoinService.selectCommemorativeCoinById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流通纪念币
|
||||
*/
|
||||
@ApiOperation(value="新增流通纪念币")
|
||||
@RequiresPermissions("collect:commemorativeCoin:add")
|
||||
@Log(title = "流通纪念币", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommemorativeCoin commemorativeCoin)
|
||||
{
|
||||
return toAjax(commemorativeCoinService.insertCommemorativeCoin(commemorativeCoin));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流通纪念币
|
||||
*/
|
||||
@ApiOperation(value="修改流通纪念币")
|
||||
@RequiresPermissions("collect:commemorativeCoin:edit")
|
||||
@Log(title = "流通纪念币", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CommemorativeCoin commemorativeCoin)
|
||||
{
|
||||
return toAjax(commemorativeCoinService.updateCommemorativeCoin(commemorativeCoin));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流通纪念币
|
||||
*/
|
||||
@ApiOperation(value="删除流通纪念币")
|
||||
@RequiresPermissions("collect:commemorativeCoin:remove")
|
||||
@Log(title = "流通纪念币", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(commemorativeCoinService.deleteCommemorativeCoinByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.intc.collect.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.intc.common.core.annotation.Excel;
|
||||
import com.intc.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.*;
|
||||
/**
|
||||
* 流通纪念币对象 col_commemorative_coin
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-21
|
||||
*/
|
||||
@ApiModel("流通纪念币对象")
|
||||
@Data
|
||||
public class CommemorativeCoin extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 类型 */
|
||||
@ApiModelProperty(value="类型)")
|
||||
@NotNull(message="类型不能为空")
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** 全称 */
|
||||
@ApiModelProperty(value="全称)")
|
||||
@NotNull(message="全称不能为空")
|
||||
@Excel(name = "全称")
|
||||
private String fullName;
|
||||
|
||||
/** 简称 */
|
||||
@ApiModelProperty(value="简称)")
|
||||
@NotNull(message="简称不能为空")
|
||||
@Excel(name = "简称")
|
||||
private String shortName;
|
||||
|
||||
/** 面值 */
|
||||
@ApiModelProperty(value="面值)")
|
||||
@NotNull(message="面值不能为空")
|
||||
@Excel(name = "面值")
|
||||
private String faceValue;
|
||||
|
||||
/** 发行时间 */
|
||||
@ApiModelProperty(value="发行时间)")
|
||||
@NotNull(message="发行时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "发行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date issueDate;
|
||||
|
||||
/** 发行年份 */
|
||||
private String issueYear;
|
||||
|
||||
/** 系列 */
|
||||
@ApiModelProperty(value="系列)")
|
||||
@NotNull(message="系列不能为空")
|
||||
@Excel(name = "系列")
|
||||
private String series;
|
||||
|
||||
/** 套装编号 */
|
||||
private String setNumber;
|
||||
|
||||
/** 版别 */
|
||||
private String blockType;
|
||||
|
||||
/** 形状 */
|
||||
private String shape;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("type", getType())
|
||||
.append("fullName", getFullName())
|
||||
.append("shortName", getShortName())
|
||||
.append("faceValue", getFaceValue())
|
||||
.append("issueDate", getIssueDate())
|
||||
.append("issueYear", getIssueYear())
|
||||
.append("series", getSeries())
|
||||
.append("setNumber", getSetNumber())
|
||||
.append("blockType", getBlockType())
|
||||
.append("shape", getShape())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.intc.collect.domain.dto;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* 流通纪念币Dto对象 col_commemorative_coin
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-21
|
||||
*/
|
||||
@ApiModel("流通纪念币Dto对象")
|
||||
@Data
|
||||
public class CommemorativeCoinDto implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型 */
|
||||
@ApiModelProperty(value="类型")
|
||||
private String type;
|
||||
|
||||
/** 全称 */
|
||||
@ApiModelProperty(value="全称")
|
||||
private String fullName;
|
||||
|
||||
/** 简称 */
|
||||
@ApiModelProperty(value="简称")
|
||||
private String shortName;
|
||||
|
||||
/** 发行时间 */
|
||||
@ApiModelProperty(value="发行时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueDate;
|
||||
|
||||
/** 发行年份 */
|
||||
@ApiModelProperty(value="发行年份")
|
||||
private String issueYear;
|
||||
|
||||
/** 系列 */
|
||||
@ApiModelProperty(value="系列")
|
||||
private String series;
|
||||
|
||||
/** 版别 */
|
||||
@ApiModelProperty(value="版别")
|
||||
private String blockType;
|
||||
|
||||
/** 形状 */
|
||||
@ApiModelProperty(value="形状")
|
||||
private String shape;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.intc.collect.domain.vo;
|
||||
|
||||
import com.intc.collect.domain.CommemorativeCoin;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
/**
|
||||
* 流通纪念币Vo对象 col_commemorative_coin
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-21
|
||||
*/
|
||||
@ApiModel("流通纪念币Vo对象")
|
||||
@Data
|
||||
public class CommemorativeCoinVo extends CommemorativeCoin
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.intc.collect.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.intc.collect.domain.CommemorativeCoin;
|
||||
import com.intc.collect.domain.dto.CommemorativeCoinDto;
|
||||
import com.intc.collect.domain.vo.CommemorativeCoinVo;
|
||||
|
||||
/**
|
||||
* 流通纪念币Mapper接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-21
|
||||
*/
|
||||
public interface CommemorativeCoinMapper
|
||||
{
|
||||
/**
|
||||
* 查询流通纪念币
|
||||
*
|
||||
* @param id 流通纪念币主键
|
||||
* @return 流通纪念币
|
||||
*/
|
||||
public CommemorativeCoinVo selectCommemorativeCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流通纪念币列表
|
||||
*
|
||||
* @param commemorativeCoinDto 流通纪念币
|
||||
* @return 流通纪念币集合
|
||||
*/
|
||||
public List<CommemorativeCoinVo> selectCommemorativeCoinList(CommemorativeCoinDto commemorativeCoinDto);
|
||||
|
||||
/**
|
||||
* 新增流通纪念币
|
||||
*
|
||||
* @param commemorativeCoin 流通纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommemorativeCoin(CommemorativeCoin commemorativeCoin);
|
||||
|
||||
/**
|
||||
* 修改流通纪念币
|
||||
*
|
||||
* @param commemorativeCoin 流通纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommemorativeCoin(CommemorativeCoin commemorativeCoin);
|
||||
|
||||
/**
|
||||
* 删除流通纪念币
|
||||
*
|
||||
* @param id 流通纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除流通纪念币
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeCoinByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 逻辑删除流通纪念币
|
||||
*
|
||||
* @param id 流通纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeCommemorativeCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除流通纪念币
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeCommemorativeCoinByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.intc.collect.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.intc.collect.domain.CommemorativeCoin;
|
||||
import com.intc.collect.domain.dto.CommemorativeCoinDto;
|
||||
import com.intc.collect.domain.vo.CommemorativeCoinVo;
|
||||
|
||||
/**
|
||||
* 流通纪念币Service接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-21
|
||||
*/
|
||||
public interface ICommemorativeCoinService
|
||||
{
|
||||
/**
|
||||
* 查询流通纪念币
|
||||
*
|
||||
* @param id 流通纪念币主键
|
||||
* @return 流通纪念币
|
||||
*/
|
||||
public CommemorativeCoinVo selectCommemorativeCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流通纪念币列表
|
||||
*
|
||||
* @param commemorativeCoinDto 流通纪念币
|
||||
* @return 流通纪念币集合
|
||||
*/
|
||||
public List<CommemorativeCoinVo> selectCommemorativeCoinList(CommemorativeCoinDto commemorativeCoinDto);
|
||||
|
||||
/**
|
||||
* 新增流通纪念币
|
||||
*
|
||||
* @param commemorativeCoin 流通纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommemorativeCoin(CommemorativeCoin commemorativeCoin);
|
||||
|
||||
/**
|
||||
* 修改流通纪念币
|
||||
*
|
||||
* @param commemorativeCoin 流通纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommemorativeCoin(CommemorativeCoin commemorativeCoin);
|
||||
|
||||
/**
|
||||
* 批量删除流通纪念币
|
||||
*
|
||||
* @param ids 需要删除的流通纪念币主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeCoinByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除流通纪念币信息
|
||||
*
|
||||
* @param id 流通纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeCoinById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.intc.collect.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.intc.common.core.utils.DateUtils;
|
||||
import com.intc.common.security.utils.SecurityUtils;
|
||||
import com.intc.common.core.utils.IdWorker;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.intc.collect.mapper.CommemorativeCoinMapper;
|
||||
import com.intc.collect.domain.CommemorativeCoin;
|
||||
import com.intc.collect.domain.dto.CommemorativeCoinDto;
|
||||
import com.intc.collect.domain.vo.CommemorativeCoinVo;
|
||||
import com.intc.collect.service.ICommemorativeCoinService;
|
||||
|
||||
/**
|
||||
* 流通纪念币Service业务层处理
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-21
|
||||
*/
|
||||
@Service
|
||||
public class CommemorativeCoinServiceImpl implements ICommemorativeCoinService
|
||||
{
|
||||
@Resource
|
||||
private CommemorativeCoinMapper commemorativeCoinMapper;
|
||||
|
||||
/**
|
||||
* 查询流通纪念币
|
||||
*
|
||||
* @param id 流通纪念币主键
|
||||
* @return 流通纪念币
|
||||
*/
|
||||
@Override
|
||||
public CommemorativeCoinVo selectCommemorativeCoinById(Long id)
|
||||
{
|
||||
return commemorativeCoinMapper.selectCommemorativeCoinById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流通纪念币列表
|
||||
*
|
||||
* @param commemorativeCoinDto 流通纪念币
|
||||
* @return 流通纪念币
|
||||
*/
|
||||
@Override
|
||||
public List<CommemorativeCoinVo> selectCommemorativeCoinList(CommemorativeCoinDto commemorativeCoinDto)
|
||||
{
|
||||
return commemorativeCoinMapper.selectCommemorativeCoinList(commemorativeCoinDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流通纪念币
|
||||
*
|
||||
* @param commemorativeCoin 流通纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCommemorativeCoin(CommemorativeCoin commemorativeCoin)
|
||||
{
|
||||
commemorativeCoin.setId(IdWorker.getId());
|
||||
commemorativeCoin.setCreateBy(SecurityUtils.getUsername());
|
||||
commemorativeCoin.setCreateTime(DateUtils.getNowDate());
|
||||
return commemorativeCoinMapper.insertCommemorativeCoin(commemorativeCoin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流通纪念币
|
||||
*
|
||||
* @param commemorativeCoin 流通纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCommemorativeCoin(CommemorativeCoin commemorativeCoin)
|
||||
{
|
||||
commemorativeCoin.setUpdateBy(SecurityUtils.getUsername());
|
||||
commemorativeCoin.setUpdateTime(DateUtils.getNowDate());
|
||||
return commemorativeCoinMapper.updateCommemorativeCoin(commemorativeCoin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除流通纪念币
|
||||
*
|
||||
* @param ids 需要删除的流通纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommemorativeCoinByIds(Long[] ids)
|
||||
{
|
||||
return commemorativeCoinMapper.removeCommemorativeCoinByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流通纪念币信息
|
||||
*
|
||||
* @param id 流通纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommemorativeCoinById(Long id)
|
||||
{
|
||||
return commemorativeCoinMapper.removeCommemorativeCoinById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.intc.config;
|
||||
|
||||
import com.intc.common.core.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
||||
/**
|
||||
* @ClassName ActuatorSecurityConfig
|
||||
* @Author YaphetS
|
||||
* @Date 2023/3/14 9:18
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||
public class ActuatorSecurityConfig {
|
||||
|
||||
@Autowired
|
||||
Environment env;
|
||||
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
String contextPath = env.getProperty("management.endpoints.web.base-path");
|
||||
if(StringUtils.isEmpty(contextPath)) {
|
||||
contextPath = "/actuator";
|
||||
}
|
||||
http.csrf().disable();
|
||||
http.authorizeRequests()
|
||||
.antMatchers("/**"+contextPath+"/**")
|
||||
.authenticated()
|
||||
.anyRequest()
|
||||
.permitAll()
|
||||
.and()
|
||||
.httpBasic();
|
||||
return http.build();
|
||||
}
|
||||
}
|
||||
15
intc-modules/intc-collect/src/main/resources/banner.txt
Normal file
15
intc-modules/intc-collect/src/main/resources/banner.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
(♥◠‿◠)ノ゙ 智聪健康业务模块开始启动 ლ(´ڡ`ლ)
|
||||
.----------------. .-----------------. .----------------. .----------------.
|
||||
| .--------------. || .--------------. || .--------------. || .--------------. |
|
||||
| | _____ | || | ____ _____ | || | _________ | || | ______ | |
|
||||
| | |_ _| | || ||_ \|_ _| | || | | _ _ | | || | .' ___ | | |
|
||||
| | | | | || | | \ | | | || | |_/ | | \_| | || | / .' \_| | |
|
||||
| | | | | || | | |\ \| | | || | | | | || | | | | |
|
||||
| | _| |_ | || | _| |_\ |_ | || | _| |_ | || | \ `.___.'\ | |
|
||||
| | |_____| | || ||_____|\____| | || | |_____| | || | `._____.' | |
|
||||
| | | || | | || | | || | | |
|
||||
| '--------------' || '--------------' || '--------------' || '--------------' |
|
||||
'----------------' '----------------' '----------------' '----------------'
|
||||
|
||||
48
intc-modules/intc-collect/src/main/resources/bootstrap.yml
Normal file
48
intc-modules/intc-collect/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
# Tomcat
|
||||
server:
|
||||
max-http-header-size: 4048576
|
||||
port: 9258
|
||||
tomcat:
|
||||
max-http-form-post-size: -1
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: intc-collect
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
banner:
|
||||
charset: UTF-8
|
||||
location: classpath:banner.txt
|
||||
servlet:
|
||||
multipart:
|
||||
enabled: true
|
||||
max-file-size: -1
|
||||
max-request-size: -1
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: intc
|
||||
username: nacos
|
||||
password: ZmNDMacAng
|
||||
# 配置中心地址
|
||||
server-addr: 117.72.197.29:8858
|
||||
group: dev
|
||||
# ip: 8.140.22.151
|
||||
config:
|
||||
namespace: intc
|
||||
username: nacos
|
||||
password: ZmNDMacAng
|
||||
# 配置中心地址
|
||||
server-addr: 117.72.197.29:8858
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# 用于服务监控可在线查看日志,该配置用于生产环境
|
||||
logging:
|
||||
file:
|
||||
name: logs/${spring.application.name}/info.log
|
||||
74
intc-modules/intc-collect/src/main/resources/logback.xml
Normal file
74
intc-modules/intc-collect/src/main/resources/logback.xml
Normal file
@@ -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/intc-collect" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{yyyy-MM-dd 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}.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.intc" 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,137 @@
|
||||
<?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.intc.collect.mapper.CommemorativeCoinMapper">
|
||||
|
||||
<resultMap type="CommemorativeCoinVo" id="CommemorativeCoinResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="fullName" column="full_name" />
|
||||
<result property="shortName" column="short_name" />
|
||||
<result property="faceValue" column="face_value" />
|
||||
<result property="issueDate" column="issue_date" />
|
||||
<result property="issueYear" column="issue_year" />
|
||||
<result property="series" column="series" />
|
||||
<result property="setNumber" column="set_number" />
|
||||
<result property="blockType" column="block_type" />
|
||||
<result property="shape" column="shape" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCommemorativeCoinVo">
|
||||
select a.id, a.type, a.full_name, a.short_name, a.face_value, a.issue_date, a.issue_year, a.series, a.set_number, a.block_type, a.shape, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark from col_commemorative_coin a
|
||||
</sql>
|
||||
|
||||
<select id="selectCommemorativeCoinList" parameterType="CommemorativeCoinDto" resultMap="CommemorativeCoinResult">
|
||||
<include refid="selectCommemorativeCoinVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="fullName != null and fullName != ''"> and a.full_name like '%'|| #{fullName}||'%'</if>
|
||||
<if test="shortName != null and shortName != ''"> and a.short_name like '%'|| #{shortName}||'%'</if>
|
||||
<if test="issueDate != null "> and a.issue_date = #{issueDate}</if>
|
||||
<if test="issueYear != null and issueYear != ''"> and a.issue_year = #{issueYear}</if>
|
||||
<if test="series != null and series != ''"> and a.series = #{series}</if>
|
||||
<if test="blockType != null and blockType != ''"> and a.block_type = #{blockType}</if>
|
||||
<if test="shape != null and shape != ''"> and a.shape = #{shape}</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCommemorativeCoinById" parameterType="Long" resultMap="CommemorativeCoinResult">
|
||||
<include refid="selectCommemorativeCoinVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCommemorativeCoin" parameterType="CommemorativeCoin">
|
||||
insert into col_commemorative_coin
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="fullName != null and fullName != ''">full_name,</if>
|
||||
<if test="shortName != null and shortName != ''">short_name,</if>
|
||||
<if test="faceValue != null and faceValue != ''">face_value,</if>
|
||||
<if test="issueDate != null">issue_date,</if>
|
||||
<if test="issueYear != null and issueYear != ''">issue_year,</if>
|
||||
<if test="series != null and series != ''">series,</if>
|
||||
<if test="setNumber != null">set_number,</if>
|
||||
<if test="blockType != null">block_type,</if>
|
||||
<if test="shape != null and shape != ''">shape,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="fullName != null and fullName != ''">#{fullName},</if>
|
||||
<if test="shortName != null and shortName != ''">#{shortName},</if>
|
||||
<if test="faceValue != null and faceValue != ''">#{faceValue},</if>
|
||||
<if test="issueDate != null">#{issueDate},</if>
|
||||
<if test="issueYear != null and issueYear != ''">#{issueYear},</if>
|
||||
<if test="series != null and series != ''">#{series},</if>
|
||||
<if test="setNumber != null">#{setNumber},</if>
|
||||
<if test="blockType != null">#{blockType},</if>
|
||||
<if test="shape != null and shape != ''">#{shape},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCommemorativeCoin" parameterType="CommemorativeCoin">
|
||||
update col_commemorative_coin
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="fullName != null and fullName != ''">full_name = #{fullName},</if>
|
||||
<if test="shortName != null and shortName != ''">short_name = #{shortName},</if>
|
||||
<if test="faceValue != null and faceValue != ''">face_value = #{faceValue},</if>
|
||||
<if test="issueDate != null">issue_date = #{issueDate},</if>
|
||||
<if test="issueYear != null and issueYear != ''">issue_year = #{issueYear},</if>
|
||||
<if test="series != null and series != ''">series = #{series},</if>
|
||||
<if test="setNumber != null">set_number = #{setNumber},</if>
|
||||
<if test="blockType != null">block_type = #{blockType},</if>
|
||||
<if test="shape != null and shape != ''">shape = #{shape},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCommemorativeCoinById" parameterType="Long">
|
||||
delete from col_commemorative_coin where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCommemorativeCoinByIds" parameterType="String">
|
||||
delete from col_commemorative_coin where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeCommemorativeCoinById" parameterType="Long">
|
||||
update col_commemorative_coin set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeCommemorativeCoinByIds" parameterType="String">
|
||||
update col_commemorative_coin set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Reference in New Issue
Block a user