feat: 纪念钞,贵金属,代码提交。
This commit is contained in:
@@ -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.CommemorativeBanknote;
|
||||
import com.intc.collect.domain.vo.CommemorativeBanknoteVo;
|
||||
import com.intc.collect.domain.dto.CommemorativeBanknoteDto;
|
||||
import com.intc.collect.service.ICommemorativeBanknoteService;
|
||||
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-22
|
||||
*/
|
||||
@Api(tags=" 纪念钞")
|
||||
@RestController
|
||||
@RequestMapping("/CommemorativeBanknote")
|
||||
public class CommemorativeBanknoteController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private ICommemorativeBanknoteService commemorativeBanknoteService;
|
||||
|
||||
/**
|
||||
* 查询纪念钞列表
|
||||
*/
|
||||
@ApiOperation(value="查询纪念钞列表",response = CommemorativeBanknoteVo.class)
|
||||
@RequiresPermissions("collect:CommemorativeBanknote:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommemorativeBanknoteDto commemorativeBanknoteDto)
|
||||
{
|
||||
startPage();
|
||||
List<CommemorativeBanknoteVo> list = commemorativeBanknoteService.selectCommemorativeBanknoteList(commemorativeBanknoteDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出纪念钞列表
|
||||
*/
|
||||
@ApiOperation(value="导出纪念钞列表")
|
||||
@RequiresPermissions("collect:CommemorativeBanknote:export")
|
||||
@Log(title = "纪念钞", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommemorativeBanknoteDto commemorativeBanknoteDto)
|
||||
{
|
||||
List<CommemorativeBanknoteVo> list = commemorativeBanknoteService.selectCommemorativeBanknoteList(commemorativeBanknoteDto);
|
||||
ExcelUtil<CommemorativeBanknoteVo> util = new ExcelUtil<CommemorativeBanknoteVo>(CommemorativeBanknoteVo.class);
|
||||
util.exportExcel(response, list, "纪念钞数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取纪念钞详细信息
|
||||
*/
|
||||
@ApiOperation(value="获取纪念钞详细信息")
|
||||
@RequiresPermissions("collect:CommemorativeBanknote:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(commemorativeBanknoteService.selectCommemorativeBanknoteById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增纪念钞
|
||||
*/
|
||||
@ApiOperation(value="新增纪念钞")
|
||||
@RequiresPermissions("collect:CommemorativeBanknote:add")
|
||||
@Log(title = "纪念钞", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommemorativeBanknote commemorativeBanknote)
|
||||
{
|
||||
return toAjax(commemorativeBanknoteService.insertCommemorativeBanknote(commemorativeBanknote));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改纪念钞
|
||||
*/
|
||||
@ApiOperation(value="修改纪念钞")
|
||||
@RequiresPermissions("collect:CommemorativeBanknote:edit")
|
||||
@Log(title = "纪念钞", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CommemorativeBanknote commemorativeBanknote)
|
||||
{
|
||||
return toAjax(commemorativeBanknoteService.updateCommemorativeBanknote(commemorativeBanknote));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除纪念钞
|
||||
*/
|
||||
@ApiOperation(value="删除纪念钞")
|
||||
@RequiresPermissions("collect:CommemorativeBanknote:remove")
|
||||
@Log(title = "纪念钞", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(commemorativeBanknoteService.deleteCommemorativeBanknoteByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -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.PreciousMetalCoin;
|
||||
import com.intc.collect.domain.vo.PreciousMetalCoinVo;
|
||||
import com.intc.collect.domain.dto.PreciousMetalCoinDto;
|
||||
import com.intc.collect.service.IPreciousMetalCoinService;
|
||||
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-22
|
||||
*/
|
||||
@Api(tags=" 贵金属纪念币")
|
||||
@RestController
|
||||
@RequestMapping("/preciousMetalCoin")
|
||||
public class PreciousMetalCoinController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IPreciousMetalCoinService preciousMetalCoinService;
|
||||
|
||||
/**
|
||||
* 查询贵金属纪念币列表
|
||||
*/
|
||||
@ApiOperation(value="查询贵金属纪念币列表",response = PreciousMetalCoinVo.class)
|
||||
@RequiresPermissions("collect:preciousMetalCoin:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PreciousMetalCoinDto preciousMetalCoinDto)
|
||||
{
|
||||
startPage();
|
||||
List<PreciousMetalCoinVo> list = preciousMetalCoinService.selectPreciousMetalCoinList(preciousMetalCoinDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出贵金属纪念币列表
|
||||
*/
|
||||
@ApiOperation(value="导出贵金属纪念币列表")
|
||||
@RequiresPermissions("collect:preciousMetalCoin:export")
|
||||
@Log(title = "贵金属纪念币", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PreciousMetalCoinDto preciousMetalCoinDto)
|
||||
{
|
||||
List<PreciousMetalCoinVo> list = preciousMetalCoinService.selectPreciousMetalCoinList(preciousMetalCoinDto);
|
||||
ExcelUtil<PreciousMetalCoinVo> util = new ExcelUtil<PreciousMetalCoinVo>(PreciousMetalCoinVo.class);
|
||||
util.exportExcel(response, list, "贵金属纪念币数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取贵金属纪念币详细信息
|
||||
*/
|
||||
@ApiOperation(value="获取贵金属纪念币详细信息")
|
||||
@RequiresPermissions("collect:preciousMetalCoin:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(preciousMetalCoinService.selectPreciousMetalCoinById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增贵金属纪念币
|
||||
*/
|
||||
@ApiOperation(value="新增贵金属纪念币")
|
||||
@RequiresPermissions("collect:preciousMetalCoin:add")
|
||||
@Log(title = "贵金属纪念币", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PreciousMetalCoin preciousMetalCoin)
|
||||
{
|
||||
return toAjax(preciousMetalCoinService.insertPreciousMetalCoin(preciousMetalCoin));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改贵金属纪念币
|
||||
*/
|
||||
@ApiOperation(value="修改贵金属纪念币")
|
||||
@RequiresPermissions("collect:preciousMetalCoin:edit")
|
||||
@Log(title = "贵金属纪念币", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PreciousMetalCoin preciousMetalCoin)
|
||||
{
|
||||
return toAjax(preciousMetalCoinService.updatePreciousMetalCoin(preciousMetalCoin));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除贵金属纪念币
|
||||
*/
|
||||
@ApiOperation(value="删除贵金属纪念币")
|
||||
@RequiresPermissions("collect:preciousMetalCoin:remove")
|
||||
@Log(title = "贵金属纪念币", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(preciousMetalCoinService.deletePreciousMetalCoinByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.intc.collect.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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_banknote
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@ApiModel("纪念钞对象")
|
||||
@Data
|
||||
public class CommemorativeBanknote extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 类型 */
|
||||
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 mintage;
|
||||
|
||||
/** 面额 */
|
||||
@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;
|
||||
|
||||
/** 发行年份 */
|
||||
@ApiModelProperty(value="发行年份)")
|
||||
@NotNull(message="发行年份不能为空")
|
||||
@Excel(name = "发行年份")
|
||||
private String issueYear;
|
||||
|
||||
/** 材质 */
|
||||
@ApiModelProperty(value="材质)")
|
||||
@NotNull(message="材质不能为空")
|
||||
@Excel(name = "材质")
|
||||
private String composition;
|
||||
|
||||
/** 系列 */
|
||||
@ApiModelProperty(value="系列)")
|
||||
@NotNull(message="系列不能为空")
|
||||
@Excel(name = "系列")
|
||||
private String series;
|
||||
|
||||
/** 版别 */
|
||||
private String blockType;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 铸币单位 */
|
||||
@ApiModelProperty(value="铸币单位)")
|
||||
@NotNull(message="铸币单位不能为空")
|
||||
@Excel(name = "铸币单位")
|
||||
private String coinageUnit;
|
||||
|
||||
/** 文件信息 */
|
||||
private List<CollectFile> collectFileList;
|
||||
@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("mintage", getMintage())
|
||||
.append("faceValue", getFaceValue())
|
||||
.append("issueDate", getIssueDate())
|
||||
.append("issueYear", getIssueYear())
|
||||
.append("composition", getComposition())
|
||||
.append("series", getSeries())
|
||||
.append("blockType", getBlockType())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("coinageUnit", getCoinageUnit())
|
||||
.append("collectFileList", getCollectFileList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package com.intc.collect.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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_precious_metal_coin
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@ApiModel("贵金属纪念币对象")
|
||||
@Data
|
||||
public class PreciousMetalCoin extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 类型 */
|
||||
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;
|
||||
|
||||
/** 发行年份 */
|
||||
@ApiModelProperty(value="发行年份)")
|
||||
@NotNull(message="发行年份不能为空")
|
||||
@Excel(name = "发行年份")
|
||||
private String issueYear;
|
||||
|
||||
/** 项目题材 */
|
||||
@ApiModelProperty(value="项目题材)")
|
||||
@NotNull(message="项目题材不能为空")
|
||||
@Excel(name = "项目题材")
|
||||
private String blockType;
|
||||
|
||||
/** 系列 */
|
||||
@ApiModelProperty(value="系列)")
|
||||
@NotNull(message="系列不能为空")
|
||||
@Excel(name = "系列")
|
||||
private String series;
|
||||
|
||||
/** 套装编号 */
|
||||
private String setNumber;
|
||||
|
||||
/** 形状 */
|
||||
@ApiModelProperty(value="形状)")
|
||||
@NotNull(message="形状不能为空")
|
||||
@Excel(name = "形状")
|
||||
private String shape;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 发行量 */
|
||||
@ApiModelProperty(value="发行量)")
|
||||
@NotNull(message="发行量不能为空")
|
||||
@Excel(name = "发行量")
|
||||
private String mintage;
|
||||
|
||||
/** 纪念币编码 */
|
||||
private String code;
|
||||
|
||||
/** 重量 */
|
||||
private String weight;
|
||||
|
||||
/** 铸币单位 */
|
||||
@ApiModelProperty(value="铸币单位)")
|
||||
@NotNull(message="铸币单位不能为空")
|
||||
@Excel(name = "铸币单位")
|
||||
private String coinageUnit;
|
||||
|
||||
/** 质量 */
|
||||
private String quality;
|
||||
|
||||
/** 规格尺寸 */
|
||||
private String dimension;
|
||||
|
||||
/** 工艺 */
|
||||
private String craft;
|
||||
|
||||
/** 材质 */
|
||||
private String composition;
|
||||
|
||||
/** 成色 */
|
||||
private String fineness;
|
||||
|
||||
/** 图案描述 */
|
||||
private String patternDescription;
|
||||
|
||||
/** 文件信息 */
|
||||
private List<CollectFile> collectFileList;
|
||||
@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("blockType", getBlockType())
|
||||
.append("series", getSeries())
|
||||
.append("setNumber", getSetNumber())
|
||||
.append("shape", getShape())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("mintage", getMintage())
|
||||
.append("code", getCode())
|
||||
.append("weight", getWeight())
|
||||
.append("coinageUnit", getCoinageUnit())
|
||||
.append("quality", getQuality())
|
||||
.append("dimension", getDimension())
|
||||
.append("craft", getCraft())
|
||||
.append("composition", getComposition())
|
||||
.append("fineness", getFineness())
|
||||
.append("patternDescription", getPatternDescription())
|
||||
.append("collectFileList", getCollectFileList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
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_banknote
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@ApiModel("纪念钞Dto对象")
|
||||
@Data
|
||||
public class CommemorativeBanknoteDto implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型 */
|
||||
@ApiModelProperty(value="类型")
|
||||
private String type;
|
||||
|
||||
/** 全称 */
|
||||
@ApiModelProperty(value="全称")
|
||||
private String fullName;
|
||||
|
||||
/** 简称 */
|
||||
@ApiModelProperty(value="简称")
|
||||
private String name;
|
||||
|
||||
/** 发行时间 */
|
||||
@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 coinageUnit;
|
||||
|
||||
/** 开始时间 */
|
||||
@ApiModelProperty(value="开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@ApiModelProperty(value="结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
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_precious_metal_coin
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@ApiModel("贵金属纪念币Dto对象")
|
||||
@Data
|
||||
public class PreciousMetalCoinDto implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 全称 */
|
||||
@ApiModelProperty(value="全称")
|
||||
private String fullName;
|
||||
|
||||
/** 简称 */
|
||||
@ApiModelProperty(value="简称")
|
||||
private String name;
|
||||
|
||||
/** 发行时间 */
|
||||
@ApiModelProperty(value="发行时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueDate;
|
||||
|
||||
/** 发行年份 */
|
||||
@ApiModelProperty(value="发行年份")
|
||||
private String issueYear;
|
||||
|
||||
/** 项目题材 */
|
||||
@ApiModelProperty(value="项目题材")
|
||||
private String blockType;
|
||||
|
||||
/** 系列 */
|
||||
@ApiModelProperty(value="系列")
|
||||
private String series;
|
||||
|
||||
/** 形状 */
|
||||
@ApiModelProperty(value="形状")
|
||||
private String shape;
|
||||
|
||||
/** 开始时间 */
|
||||
@ApiModelProperty(value="开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@ApiModelProperty(value="结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.intc.collect.domain.vo;
|
||||
|
||||
import com.intc.collect.domain.CommemorativeBanknote;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
/**
|
||||
* 纪念钞Vo对象 col_commemorative_banknote
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@ApiModel("纪念钞Vo对象")
|
||||
@Data
|
||||
public class CommemorativeBanknoteVo extends CommemorativeBanknote
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.intc.collect.domain.vo;
|
||||
|
||||
import com.intc.collect.domain.PreciousMetalCoin;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
/**
|
||||
* 贵金属纪念币Vo对象 col_precious_metal_coin
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@ApiModel("贵金属纪念币Vo对象")
|
||||
@Data
|
||||
public class PreciousMetalCoinVo extends PreciousMetalCoin
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.intc.collect.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.intc.collect.domain.CommemorativeBanknote;
|
||||
import com.intc.collect.domain.dto.CommemorativeBanknoteDto;
|
||||
import com.intc.collect.domain.vo.CommemorativeBanknoteVo;
|
||||
|
||||
/**
|
||||
* 纪念钞Mapper接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
public interface CommemorativeBanknoteMapper
|
||||
{
|
||||
/**
|
||||
* 查询纪念钞
|
||||
*
|
||||
* @param id 纪念钞主键
|
||||
* @return 纪念钞
|
||||
*/
|
||||
public CommemorativeBanknoteVo selectCommemorativeBanknoteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询纪念钞列表
|
||||
*
|
||||
* @param commemorativeBanknoteDto 纪念钞
|
||||
* @return 纪念钞集合
|
||||
*/
|
||||
public List<CommemorativeBanknoteVo> selectCommemorativeBanknoteList(CommemorativeBanknoteDto commemorativeBanknoteDto);
|
||||
|
||||
/**
|
||||
* 根据ID列表查询纪念钞及其关联文件
|
||||
*
|
||||
* @param ids 纪念钞ID列表
|
||||
* @return 纪念钞集合(包含关联文件)
|
||||
*/
|
||||
public List<CommemorativeBanknoteVo> selectCommemorativeBanknoteListWithFiles(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 新增纪念钞
|
||||
*
|
||||
* @param commemorativeBanknote 纪念钞
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommemorativeBanknote(CommemorativeBanknote commemorativeBanknote);
|
||||
|
||||
/**
|
||||
* 修改纪念钞
|
||||
*
|
||||
* @param commemorativeBanknote 纪念钞
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommemorativeBanknote(CommemorativeBanknote commemorativeBanknote);
|
||||
|
||||
/**
|
||||
* 删除纪念钞
|
||||
*
|
||||
* @param id 纪念钞主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeBanknoteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除纪念钞
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeBanknoteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 逻辑删除纪念钞
|
||||
*
|
||||
* @param id 纪念钞主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeCommemorativeBanknoteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除纪念钞
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int removeCommemorativeBanknoteByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.intc.collect.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.intc.collect.domain.PreciousMetalCoin;
|
||||
import com.intc.collect.domain.dto.PreciousMetalCoinDto;
|
||||
import com.intc.collect.domain.vo.PreciousMetalCoinVo;
|
||||
|
||||
/**
|
||||
* 贵金属纪念币Mapper接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
public interface PreciousMetalCoinMapper
|
||||
{
|
||||
/**
|
||||
* 查询贵金属纪念币
|
||||
*
|
||||
* @param id 贵金属纪念币主键
|
||||
* @return 贵金属纪念币
|
||||
*/
|
||||
public PreciousMetalCoinVo selectPreciousMetalCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 查询贵金属纪念币列表
|
||||
*
|
||||
* @param preciousMetalCoinDto 贵金属纪念币
|
||||
* @return 贵金属纪念币集合
|
||||
*/
|
||||
public List<PreciousMetalCoinVo> selectPreciousMetalCoinList(PreciousMetalCoinDto preciousMetalCoinDto);
|
||||
|
||||
/**
|
||||
* 根据ID列表查询贵金属纪念币及其关联文件
|
||||
*
|
||||
* @param ids 贵金属纪念币ID列表
|
||||
* @return 贵金属纪念币集合(包含关联文件)
|
||||
*/
|
||||
public List<PreciousMetalCoinVo> selectPreciousMetalCoinListWithFiles(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 新增贵金属纪念币
|
||||
*
|
||||
* @param preciousMetalCoin 贵金属纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPreciousMetalCoin(PreciousMetalCoin preciousMetalCoin);
|
||||
|
||||
/**
|
||||
* 修改贵金属纪念币
|
||||
*
|
||||
* @param preciousMetalCoin 贵金属纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePreciousMetalCoin(PreciousMetalCoin preciousMetalCoin);
|
||||
|
||||
/**
|
||||
* 删除贵金属纪念币
|
||||
*
|
||||
* @param id 贵金属纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePreciousMetalCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除贵金属纪念币
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePreciousMetalCoinByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 逻辑删除贵金属纪念币
|
||||
*
|
||||
* @param id 贵金属纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int removePreciousMetalCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除贵金属纪念币
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int removePreciousMetalCoinByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.intc.collect.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.intc.collect.domain.CommemorativeBanknote;
|
||||
import com.intc.collect.domain.dto.CommemorativeBanknoteDto;
|
||||
import com.intc.collect.domain.vo.CommemorativeBanknoteVo;
|
||||
|
||||
/**
|
||||
* 纪念钞Service接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
public interface ICommemorativeBanknoteService
|
||||
{
|
||||
/**
|
||||
* 查询纪念钞
|
||||
*
|
||||
* @param id 纪念钞主键
|
||||
* @return 纪念钞
|
||||
*/
|
||||
public CommemorativeBanknoteVo selectCommemorativeBanknoteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询纪念钞列表
|
||||
*
|
||||
* @param commemorativeBanknoteDto 纪念钞
|
||||
* @return 纪念钞集合
|
||||
*/
|
||||
public List<CommemorativeBanknoteVo> selectCommemorativeBanknoteList(CommemorativeBanknoteDto commemorativeBanknoteDto);
|
||||
|
||||
/**
|
||||
* 新增纪念钞
|
||||
*
|
||||
* @param commemorativeBanknote 纪念钞
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommemorativeBanknote(CommemorativeBanknote commemorativeBanknote);
|
||||
|
||||
/**
|
||||
* 修改纪念钞
|
||||
*
|
||||
* @param commemorativeBanknote 纪念钞
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommemorativeBanknote(CommemorativeBanknote commemorativeBanknote);
|
||||
|
||||
/**
|
||||
* 批量删除纪念钞
|
||||
*
|
||||
* @param ids 需要删除的纪念钞主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeBanknoteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除纪念钞信息
|
||||
*
|
||||
* @param id 纪念钞主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommemorativeBanknoteById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.intc.collect.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.intc.collect.domain.PreciousMetalCoin;
|
||||
import com.intc.collect.domain.dto.PreciousMetalCoinDto;
|
||||
import com.intc.collect.domain.vo.PreciousMetalCoinVo;
|
||||
|
||||
/**
|
||||
* 贵金属纪念币Service接口
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
public interface IPreciousMetalCoinService
|
||||
{
|
||||
/**
|
||||
* 查询贵金属纪念币
|
||||
*
|
||||
* @param id 贵金属纪念币主键
|
||||
* @return 贵金属纪念币
|
||||
*/
|
||||
public PreciousMetalCoinVo selectPreciousMetalCoinById(Long id);
|
||||
|
||||
/**
|
||||
* 查询贵金属纪念币列表
|
||||
*
|
||||
* @param preciousMetalCoinDto 贵金属纪念币
|
||||
* @return 贵金属纪念币集合
|
||||
*/
|
||||
public List<PreciousMetalCoinVo> selectPreciousMetalCoinList(PreciousMetalCoinDto preciousMetalCoinDto);
|
||||
|
||||
/**
|
||||
* 新增贵金属纪念币
|
||||
*
|
||||
* @param preciousMetalCoin 贵金属纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPreciousMetalCoin(PreciousMetalCoin preciousMetalCoin);
|
||||
|
||||
/**
|
||||
* 修改贵金属纪念币
|
||||
*
|
||||
* @param preciousMetalCoin 贵金属纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePreciousMetalCoin(PreciousMetalCoin preciousMetalCoin);
|
||||
|
||||
/**
|
||||
* 批量删除贵金属纪念币
|
||||
*
|
||||
* @param ids 需要删除的贵金属纪念币主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePreciousMetalCoinByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除贵金属纪念币信息
|
||||
*
|
||||
* @param id 贵金属纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePreciousMetalCoinById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
package com.intc.collect.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.intc.collect.domain.CollectFile;
|
||||
import com.intc.collect.mapper.CollectFileMapper;
|
||||
import com.intc.common.core.utils.DateUtils;
|
||||
import com.intc.common.core.utils.StringUtils;
|
||||
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.CommemorativeBanknoteMapper;
|
||||
import com.intc.collect.domain.CommemorativeBanknote;
|
||||
import com.intc.collect.domain.dto.CommemorativeBanknoteDto;
|
||||
import com.intc.collect.domain.vo.CommemorativeBanknoteVo;
|
||||
import com.intc.collect.service.ICommemorativeBanknoteService;
|
||||
|
||||
/**
|
||||
* 纪念钞Service业务层处理
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@Service
|
||||
public class CommemorativeBanknoteServiceImpl implements ICommemorativeBanknoteService
|
||||
{
|
||||
@Resource
|
||||
private CommemorativeBanknoteMapper commemorativeBanknoteMapper;
|
||||
|
||||
@Resource
|
||||
private CollectFileMapper collectFileMapper;
|
||||
|
||||
/**
|
||||
* 查询纪念钞
|
||||
*
|
||||
* @param id 纪念钞主键
|
||||
* @return 纪念钞
|
||||
*/
|
||||
@Override
|
||||
public CommemorativeBanknoteVo selectCommemorativeBanknoteById(Long id)
|
||||
{
|
||||
return commemorativeBanknoteMapper.selectCommemorativeBanknoteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询纪念钞列表
|
||||
*
|
||||
* @param commemorativeBanknoteDto 纪念钞
|
||||
* @return 纪念钞
|
||||
*/
|
||||
@Override
|
||||
public List<CommemorativeBanknoteVo> selectCommemorativeBanknoteList(CommemorativeBanknoteDto commemorativeBanknoteDto)
|
||||
{
|
||||
// 第一步:先分页查询主表数据
|
||||
List<CommemorativeBanknoteVo> list = commemorativeBanknoteMapper.selectCommemorativeBanknoteList(commemorativeBanknoteDto);
|
||||
|
||||
// 如果查询结果为空,直接返回
|
||||
if (list == null || list.isEmpty())
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
// 第二步:提取主表ID列表
|
||||
List<Long> ids = list.stream().map(CommemorativeBanknoteVo::getId).collect(Collectors.toList());
|
||||
|
||||
// 第三步:批量查询关联的文件信息
|
||||
List<CommemorativeBanknoteVo> listWithFiles = commemorativeBanknoteMapper.selectCommemorativeBanknoteListWithFiles(ids);
|
||||
|
||||
// 第四步:将关联文件数据填充回主表对象
|
||||
Map<Long, CommemorativeBanknoteVo> fileMap = listWithFiles.stream()
|
||||
.collect(Collectors.toMap(CommemorativeBanknoteVo::getId, vo -> vo));
|
||||
|
||||
for (CommemorativeBanknoteVo vo : list)
|
||||
{
|
||||
CommemorativeBanknoteVo voWithFiles = fileMap.get(vo.getId());
|
||||
if (voWithFiles != null && voWithFiles.getCollectFileList() != null)
|
||||
{
|
||||
vo.setCollectFileList(voWithFiles.getCollectFileList());
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增纪念钞
|
||||
*
|
||||
* @param commemorativeBanknote 纪念钞
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCommemorativeBanknote(CommemorativeBanknote commemorativeBanknote)
|
||||
{
|
||||
commemorativeBanknote.setId(IdWorker.getId());
|
||||
commemorativeBanknote.setCreateBy(SecurityUtils.getUsername());
|
||||
commemorativeBanknote.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = commemorativeBanknoteMapper.insertCommemorativeBanknote(commemorativeBanknote);
|
||||
insertCollectFile(commemorativeBanknote);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*
|
||||
* @param commemorativeBanknote 对象
|
||||
*/
|
||||
public void insertCollectFile(CommemorativeBanknote commemorativeBanknote)
|
||||
{
|
||||
//先删除,再添加
|
||||
collectFileMapper.deleteCollectFileByCollectId(commemorativeBanknote.getId());
|
||||
|
||||
List<CollectFile> collectFileList = commemorativeBanknote.getCollectFileList();
|
||||
Long id = commemorativeBanknote.getId();
|
||||
if (StringUtils.isNotNull(collectFileList))
|
||||
{
|
||||
List<CollectFile> list = new ArrayList<CollectFile>();
|
||||
for (CollectFile collectFile : collectFileList)
|
||||
{
|
||||
collectFile.setCollectId(id);
|
||||
collectFile.setCreateTime(DateUtils.getNowDate());
|
||||
collectFile.setCreateBy(SecurityUtils.getUsername());
|
||||
collectFile.setId(IdWorker.getId());
|
||||
list.add(collectFile);
|
||||
}
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
collectFileMapper.batchInsertCollectFile(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改纪念钞
|
||||
*
|
||||
* @param commemorativeBanknote 纪念钞
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCommemorativeBanknote(CommemorativeBanknote commemorativeBanknote)
|
||||
{
|
||||
commemorativeBanknote.setUpdateBy(SecurityUtils.getUsername());
|
||||
commemorativeBanknote.setUpdateTime(DateUtils.getNowDate());
|
||||
insertCollectFile(commemorativeBanknote);
|
||||
return commemorativeBanknoteMapper.updateCommemorativeBanknote(commemorativeBanknote);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除纪念钞
|
||||
*
|
||||
* @param ids 需要删除的纪念钞主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommemorativeBanknoteByIds(Long[] ids)
|
||||
{
|
||||
int i = commemorativeBanknoteMapper.removeCommemorativeBanknoteByIds(ids);
|
||||
for (Long collectId : ids)
|
||||
{
|
||||
collectFileMapper.deleteCollectFileByCollectId(collectId);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除纪念钞信息
|
||||
*
|
||||
* @param id 纪念钞主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommemorativeBanknoteById(Long id)
|
||||
{
|
||||
return commemorativeBanknoteMapper.removeCommemorativeBanknoteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
package com.intc.collect.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.intc.collect.domain.CollectFile;
|
||||
import com.intc.collect.mapper.CollectFileMapper;
|
||||
import com.intc.common.core.utils.DateUtils;
|
||||
import com.intc.common.core.utils.StringUtils;
|
||||
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.PreciousMetalCoinMapper;
|
||||
import com.intc.collect.domain.PreciousMetalCoin;
|
||||
import com.intc.collect.domain.dto.PreciousMetalCoinDto;
|
||||
import com.intc.collect.domain.vo.PreciousMetalCoinVo;
|
||||
import com.intc.collect.service.IPreciousMetalCoinService;
|
||||
|
||||
/**
|
||||
* 贵金属纪念币Service业务层处理
|
||||
*
|
||||
* @author tianyongbao
|
||||
* @date 2026-02-22
|
||||
*/
|
||||
@Service
|
||||
public class PreciousMetalCoinServiceImpl implements IPreciousMetalCoinService
|
||||
{
|
||||
@Resource
|
||||
private PreciousMetalCoinMapper preciousMetalCoinMapper;
|
||||
|
||||
@Resource
|
||||
private CollectFileMapper collectFileMapper;
|
||||
|
||||
/**
|
||||
* 查询贵金属纪念币
|
||||
*
|
||||
* @param id 贵金属纪念币主键
|
||||
* @return 贵金属纪念币
|
||||
*/
|
||||
@Override
|
||||
public PreciousMetalCoinVo selectPreciousMetalCoinById(Long id)
|
||||
{
|
||||
return preciousMetalCoinMapper.selectPreciousMetalCoinById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询贵金属纪念币列表
|
||||
*
|
||||
* @param preciousMetalCoinDto 贵金属纪念币
|
||||
* @return 贵金属纪念币
|
||||
*/
|
||||
@Override
|
||||
public List<PreciousMetalCoinVo> selectPreciousMetalCoinList(PreciousMetalCoinDto preciousMetalCoinDto)
|
||||
{
|
||||
// 第一步:先分页查询主表数据
|
||||
List<PreciousMetalCoinVo> list = preciousMetalCoinMapper.selectPreciousMetalCoinList(preciousMetalCoinDto);
|
||||
|
||||
// 如果查询结果为空,直接返回
|
||||
if (list == null || list.isEmpty())
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
// 第二步:提取主表ID列表
|
||||
List<Long> ids = list.stream().map(PreciousMetalCoinVo::getId).collect(Collectors.toList());
|
||||
|
||||
// 第三步:批量查询关联的文件信息
|
||||
List<PreciousMetalCoinVo> listWithFiles = preciousMetalCoinMapper.selectPreciousMetalCoinListWithFiles(ids);
|
||||
|
||||
// 第四步:将关联文件数据填充回主表对象
|
||||
Map<Long, PreciousMetalCoinVo> fileMap = listWithFiles.stream()
|
||||
.collect(Collectors.toMap(PreciousMetalCoinVo::getId, vo -> vo));
|
||||
|
||||
for (PreciousMetalCoinVo vo : list)
|
||||
{
|
||||
PreciousMetalCoinVo voWithFiles = fileMap.get(vo.getId());
|
||||
if (voWithFiles != null && voWithFiles.getCollectFileList() != null)
|
||||
{
|
||||
vo.setCollectFileList(voWithFiles.getCollectFileList());
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增贵金属纪念币
|
||||
*
|
||||
* @param preciousMetalCoin 贵金属纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPreciousMetalCoin(PreciousMetalCoin preciousMetalCoin)
|
||||
{
|
||||
preciousMetalCoin.setId(IdWorker.getId());
|
||||
preciousMetalCoin.setCreateBy(SecurityUtils.getUsername());
|
||||
preciousMetalCoin.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = preciousMetalCoinMapper.insertPreciousMetalCoin(preciousMetalCoin);
|
||||
insertCollectFile(preciousMetalCoin);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*
|
||||
* @param preciousMetalCoin 对象
|
||||
*/
|
||||
public void insertCollectFile(PreciousMetalCoin preciousMetalCoin)
|
||||
{
|
||||
//先删除,再添加
|
||||
collectFileMapper.deleteCollectFileByCollectId(preciousMetalCoin.getId());
|
||||
|
||||
List<CollectFile> collectFileList = preciousMetalCoin.getCollectFileList();
|
||||
Long id = preciousMetalCoin.getId();
|
||||
if (StringUtils.isNotNull(collectFileList))
|
||||
{
|
||||
List<CollectFile> list = new ArrayList<CollectFile>();
|
||||
for (CollectFile collectFile : collectFileList)
|
||||
{
|
||||
collectFile.setCollectId(id);
|
||||
collectFile.setCreateTime(DateUtils.getNowDate());
|
||||
collectFile.setCreateBy(SecurityUtils.getUsername());
|
||||
collectFile.setId(IdWorker.getId());
|
||||
list.add(collectFile);
|
||||
}
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
collectFileMapper.batchInsertCollectFile(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改贵金属纪念币
|
||||
*
|
||||
* @param preciousMetalCoin 贵金属纪念币
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePreciousMetalCoin(PreciousMetalCoin preciousMetalCoin)
|
||||
{
|
||||
preciousMetalCoin.setUpdateBy(SecurityUtils.getUsername());
|
||||
preciousMetalCoin.setUpdateTime(DateUtils.getNowDate());
|
||||
insertCollectFile(preciousMetalCoin);
|
||||
return preciousMetalCoinMapper.updatePreciousMetalCoin(preciousMetalCoin);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除贵金属纪念币
|
||||
*
|
||||
* @param ids 需要删除的贵金属纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePreciousMetalCoinByIds(Long[] ids)
|
||||
{
|
||||
int i = preciousMetalCoinMapper.removePreciousMetalCoinByIds(ids);
|
||||
for (Long collectId : ids)
|
||||
{
|
||||
collectFileMapper.deleteCollectFileByCollectId(collectId);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除贵金属纪念币信息
|
||||
*
|
||||
* @param id 贵金属纪念币主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePreciousMetalCoinById(Long id)
|
||||
{
|
||||
return preciousMetalCoinMapper.removePreciousMetalCoinById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
<?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.CommemorativeBanknoteMapper">
|
||||
|
||||
<resultMap type="CommemorativeBanknoteVo" id="CommemorativeBanknoteResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="fullName" column="full_name" />
|
||||
<result property="shortName" column="short_name" />
|
||||
<result property="mintage" column="mintage" />
|
||||
<result property="faceValue" column="face_value" />
|
||||
<result property="issueDate" column="issue_date" />
|
||||
<result property="issueYear" column="issue_year" />
|
||||
<result property="composition" column="composition" />
|
||||
<result property="series" column="series" />
|
||||
<result property="blockType" column="block_type" />
|
||||
<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" />
|
||||
<result property="coinageUnit" column="coinage_unit" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="CommemorativeBanknoteCollectFileResult" type="CommemorativeBanknoteVo" extends="CommemorativeBanknoteResult">
|
||||
<collection property="collectFileList" notNullColumn="sub_id" javaType="java.util.List" resultMap="CollectFileResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="CollectFileVo" id="CollectFileResult">
|
||||
<result property="id" column="sub_id" />
|
||||
<result property="collectId" column="sub_collect_id" />
|
||||
<result property="catelog" column="sub_catelog" />
|
||||
<result property="fileName" column="sub_file_name" />
|
||||
<result property="name" column="sub_name" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="createBy" column="sub_create_by" />
|
||||
<result property="url" column="sub_url" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCommemorativeBanknoteVo">
|
||||
select a.id, a.type, a.full_name, a.short_name, a.mintage, a.face_value, a.issue_date, a.issue_year, a.composition, a.series, a.block_type, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.coinage_unit,
|
||||
b.id as sub_id, b.collect_id as sub_collect_id, b.catelog as sub_catelog, b.file_name as sub_file_name,
|
||||
b.name as sub_name, b.create_by as sub_create_by, b.create_time as sub_create_time, b.url as sub_url
|
||||
from col_commemorative_banknote a
|
||||
left join col_collect_file b on b.collect_id=a.id
|
||||
</sql>
|
||||
|
||||
<select id="selectCommemorativeBanknoteList" parameterType="CommemorativeBanknoteDto" resultMap="CommemorativeBanknoteResult">
|
||||
select id, type, full_name, short_name, mintage, face_value, issue_date, issue_year, composition, series, block_type, create_by, create_time, update_by, update_time, del_flag, remark, coinage_unit
|
||||
from col_commemorative_banknote
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="fullName != null and fullName != ''"> and full_name like '%'|| #{fullName}||'%'</if>
|
||||
<if test="name != null and name != ''"> and (short_name like '%'|| #{name}||'%' or full_name like '%'|| #{name}||'%') </if>
|
||||
<if test="issueDate != null "> and issue_date = #{issueDate}</if>
|
||||
<if test="issueYear != null and issueYear != ''"> and issue_year = #{issueYear}</if>
|
||||
<if test="series != null and series != ''"> and series = #{series}</if>
|
||||
<if test="coinageUnit != null and coinageUnit != ''"> and coinage_unit = #{coinageUnit}</if>
|
||||
<if test="endTime!=null and endTime !=''">
|
||||
and #{endTime}>=to_char(issue_date, 'yyyy-MM-dd')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime !=''">
|
||||
and to_char(issue_date, 'yyyy-MM-dd')>=#{startTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCommemorativeBanknoteListWithFiles" parameterType="list" resultMap="CommemorativeBanknoteCollectFileResult">
|
||||
<include refid="selectCommemorativeBanknoteVo"/>
|
||||
where a.id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCommemorativeBanknoteById" parameterType="Long" resultMap="CommemorativeBanknoteCollectFileResult">
|
||||
<include refid="selectCommemorativeBanknoteVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCommemorativeBanknote" parameterType="CommemorativeBanknote">
|
||||
insert into col_commemorative_banknote
|
||||
<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="mintage != null and mintage != ''">mintage,</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="composition != null and composition != ''">composition,</if>
|
||||
<if test="series != null and series != ''">series,</if>
|
||||
<if test="blockType != null">block_type,</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>
|
||||
<if test="coinageUnit != null and coinageUnit != ''">coinage_unit,</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="mintage != null and mintage != ''">#{mintage},</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="composition != null and composition != ''">#{composition},</if>
|
||||
<if test="series != null and series != ''">#{series},</if>
|
||||
<if test="blockType != null">#{blockType},</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>
|
||||
<if test="coinageUnit != null and coinageUnit != ''">#{coinageUnit},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCommemorativeBanknote" parameterType="CommemorativeBanknote">
|
||||
update col_commemorative_banknote
|
||||
<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="mintage != null and mintage != ''">mintage = #{mintage},</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="composition != null and composition != ''">composition = #{composition},</if>
|
||||
<if test="series != null and series != ''">series = #{series},</if>
|
||||
<if test="blockType != null">block_type = #{blockType},</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>
|
||||
<if test="coinageUnit != null and coinageUnit != ''">coinage_unit = #{coinageUnit},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCommemorativeBanknoteById" parameterType="Long">
|
||||
delete from col_commemorative_banknote where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCommemorativeBanknoteByIds" parameterType="String">
|
||||
delete from col_commemorative_banknote where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeCommemorativeBanknoteById" parameterType="Long">
|
||||
update col_commemorative_banknote set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeCommemorativeBanknoteByIds" parameterType="String">
|
||||
update col_commemorative_banknote set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,211 @@
|
||||
<?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.PreciousMetalCoinMapper">
|
||||
|
||||
<resultMap type="PreciousMetalCoinVo" id="PreciousMetalCoinResult">
|
||||
<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="blockType" column="block_type" />
|
||||
<result property="series" column="series" />
|
||||
<result property="setNumber" column="set_number" />
|
||||
<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" />
|
||||
<result property="mintage" column="mintage" />
|
||||
<result property="code" column="code" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="coinageUnit" column="coinage_unit" />
|
||||
<result property="quality" column="quality" />
|
||||
<result property="dimension" column="dimension" />
|
||||
<result property="craft" column="craft" />
|
||||
<result property="composition" column="composition" />
|
||||
<result property="fineness" column="fineness" />
|
||||
<result property="patternDescription" column="pattern_description" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="PreciousMetalCoinCollectFileResult" type="PreciousMetalCoinVo" extends="PreciousMetalCoinResult">
|
||||
<collection property="collectFileList" notNullColumn="sub_id" javaType="java.util.List" resultMap="CollectFileResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="CollectFileVo" id="CollectFileResult">
|
||||
<result property="id" column="sub_id" />
|
||||
<result property="collectId" column="sub_collect_id" />
|
||||
<result property="catelog" column="sub_catelog" />
|
||||
<result property="fileName" column="sub_file_name" />
|
||||
<result property="name" column="sub_name" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="createBy" column="sub_create_by" />
|
||||
<result property="url" column="sub_url" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPreciousMetalCoinVo">
|
||||
select a.id, a.type, a.full_name, a.short_name, a.face_value, a.issue_date, a.issue_year, a.block_type, a.series, a.set_number, a.shape, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.mintage, a.code, a.weight, a.coinage_unit, a.quality, a.dimension, a.craft, a.composition, a.fineness, a.pattern_description,
|
||||
b.id as sub_id, b.collect_id as sub_collect_id, b.catelog as sub_catelog, b.file_name as sub_file_name,
|
||||
b.name as sub_name, b.create_by as sub_create_by, b.create_time as sub_create_time, b.url as sub_url
|
||||
from col_precious_metal_coin a
|
||||
left join col_collect_file b on b.collect_id=a.id
|
||||
</sql>
|
||||
|
||||
<select id="selectPreciousMetalCoinList" parameterType="PreciousMetalCoinDto" resultMap="PreciousMetalCoinResult">
|
||||
select id, type, full_name, short_name, face_value, issue_date, issue_year, block_type, series, set_number, shape, create_by, create_time, update_by, update_time, del_flag, remark, mintage, code, weight, coinage_unit, quality, dimension, craft, composition, fineness, pattern_description
|
||||
from col_precious_metal_coin
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="fullName != null and fullName != ''"> and full_name like '%'|| #{fullName}||'%'</if>
|
||||
<if test="name != null and name != ''"> and (short_name like '%'|| #{name}||'%' or full_name like '%'|| #{name}||'%') </if>
|
||||
<if test="issueDate != null "> and issue_date = #{issueDate}</if>
|
||||
<if test="issueYear != null and issueYear != ''"> and issue_year = #{issueYear}</if>
|
||||
<if test="blockType != null and blockType != ''"> and block_type = #{blockType}</if>
|
||||
<if test="series != null and series != ''"> and series = #{series}</if>
|
||||
<if test="shape != null and shape != ''"> and shape = #{shape}</if>
|
||||
<if test="endTime!=null and endTime !=''">
|
||||
and #{endTime}>=to_char(issue_date, 'yyyy-MM-dd')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime !=''">
|
||||
and to_char(issue_date, 'yyyy-MM-dd')>=#{startTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectPreciousMetalCoinListWithFiles" parameterType="list" resultMap="PreciousMetalCoinCollectFileResult">
|
||||
<include refid="selectPreciousMetalCoinVo"/>
|
||||
where a.id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectPreciousMetalCoinById" parameterType="Long" resultMap="PreciousMetalCoinCollectFileResult">
|
||||
<include refid="selectPreciousMetalCoinVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPreciousMetalCoin" parameterType="PreciousMetalCoin">
|
||||
insert into col_precious_metal_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="blockType != null and blockType != ''">block_type,</if>
|
||||
<if test="series != null and series != ''">series,</if>
|
||||
<if test="setNumber != null and setNumber != ''">set_number,</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>
|
||||
<if test="mintage != null and mintage != ''">mintage,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="weight != null">weight,</if>
|
||||
<if test="coinageUnit != null and coinageUnit != ''">coinage_unit,</if>
|
||||
<if test="quality != null">quality,</if>
|
||||
<if test="dimension != null">dimension,</if>
|
||||
<if test="craft != null">craft,</if>
|
||||
<if test="composition != null">composition,</if>
|
||||
<if test="fineness != null">fineness,</if>
|
||||
<if test="patternDescription != null">pattern_description,</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="blockType != null and blockType != ''">#{blockType},</if>
|
||||
<if test="series != null and series != ''">#{series},</if>
|
||||
<if test="setNumber != null and setNumber != ''">#{setNumber},</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>
|
||||
<if test="mintage != null and mintage != ''">#{mintage},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="weight != null">#{weight},</if>
|
||||
<if test="coinageUnit != null and coinageUnit != ''">#{coinageUnit},</if>
|
||||
<if test="quality != null">#{quality},</if>
|
||||
<if test="dimension != null">#{dimension},</if>
|
||||
<if test="craft != null">#{craft},</if>
|
||||
<if test="composition != null">#{composition},</if>
|
||||
<if test="fineness != null">#{fineness},</if>
|
||||
<if test="patternDescription != null">#{patternDescription},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePreciousMetalCoin" parameterType="PreciousMetalCoin">
|
||||
update col_precious_metal_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="blockType != null and blockType != ''">block_type = #{blockType},</if>
|
||||
<if test="series != null and series != ''">series = #{series},</if>
|
||||
<if test="setNumber != null and setNumber != ''">set_number = #{setNumber},</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>
|
||||
<if test="mintage != null and mintage != ''">mintage = #{mintage},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
<if test="coinageUnit != null and coinageUnit != ''">coinage_unit = #{coinageUnit},</if>
|
||||
<if test="quality != null">quality = #{quality},</if>
|
||||
<if test="dimension != null">dimension = #{dimension},</if>
|
||||
<if test="craft != null">craft = #{craft},</if>
|
||||
<if test="composition != null">composition = #{composition},</if>
|
||||
<if test="fineness != null">fineness = #{fineness},</if>
|
||||
<if test="patternDescription != null">pattern_description = #{patternDescription},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePreciousMetalCoinById" parameterType="Long">
|
||||
delete from col_precious_metal_coin where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePreciousMetalCoinByIds" parameterType="String">
|
||||
delete from col_precious_metal_coin where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removePreciousMetalCoinById" parameterType="Long">
|
||||
update col_precious_metal_coin set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removePreciousMetalCoinByIds" parameterType="String">
|
||||
update col_precious_metal_coin set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user