feat: 收藏管理,新增纸币硬币邮票功能。
This commit is contained in:
@@ -0,0 +1,115 @@
|
|||||||
|
package com.intc.collect.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
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.Banknote;
|
||||||
|
import com.intc.collect.domain.vo.BanknoteVo;
|
||||||
|
import com.intc.collect.domain.dto.BanknoteDto;
|
||||||
|
import com.intc.collect.service.IBanknoteService;
|
||||||
|
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 intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@Api(tags="纸币")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/banknote")
|
||||||
|
public class BanknoteController extends BaseController
|
||||||
|
{
|
||||||
|
@Resource
|
||||||
|
private IBanknoteService banknoteService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询纸币列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="查询纸币列表",response = BanknoteVo.class)
|
||||||
|
@RequiresPermissions("collect:banknote:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(BanknoteDto banknoteDto)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BanknoteVo> list = banknoteService.selectBanknoteList(banknoteDto);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出纸币列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="导出纸币列表")
|
||||||
|
@RequiresPermissions("collect:banknote:export")
|
||||||
|
@Log(title = "纸币", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, BanknoteDto banknoteDto)
|
||||||
|
{
|
||||||
|
List<BanknoteVo> list = banknoteService.selectBanknoteList(banknoteDto);
|
||||||
|
ExcelUtil<BanknoteVo> util = new ExcelUtil<BanknoteVo>(BanknoteVo.class);
|
||||||
|
util.exportExcel(response, list, "纸币数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取纸币详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="获取纸币详细信息")
|
||||||
|
@RequiresPermissions("collect:banknote:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(banknoteService.selectBanknoteById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增纸币
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="新增纸币")
|
||||||
|
@RequiresPermissions("collect:banknote:add")
|
||||||
|
@Log(title = "纸币", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Banknote banknote)
|
||||||
|
{
|
||||||
|
return toAjax(banknoteService.insertBanknote(banknote));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改纸币
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="修改纸币")
|
||||||
|
@RequiresPermissions("collect:banknote:edit")
|
||||||
|
@Log(title = "纸币", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Banknote banknote)
|
||||||
|
{
|
||||||
|
return toAjax(banknoteService.updateBanknote(banknote));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除纸币
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="删除纸币")
|
||||||
|
@RequiresPermissions("collect:banknote:remove")
|
||||||
|
@Log(title = "纸币", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(banknoteService.deleteBanknoteByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.intc.collect.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
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.Coin;
|
||||||
|
import com.intc.collect.domain.vo.CoinVo;
|
||||||
|
import com.intc.collect.domain.dto.CoinDto;
|
||||||
|
import com.intc.collect.service.ICoinService;
|
||||||
|
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 intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@Api(tags="硬币")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/coin")
|
||||||
|
public class CoinController extends BaseController
|
||||||
|
{
|
||||||
|
@Resource
|
||||||
|
private ICoinService coinService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询硬币列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="查询硬币列表",response = CoinVo.class)
|
||||||
|
@RequiresPermissions("collect:coin:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(CoinDto coinDto)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<CoinVo> list = coinService.selectCoinList(coinDto);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出硬币列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="导出硬币列表")
|
||||||
|
@RequiresPermissions("collect:coin:export")
|
||||||
|
@Log(title = "硬币", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, CoinDto coinDto)
|
||||||
|
{
|
||||||
|
List<CoinVo> list = coinService.selectCoinList(coinDto);
|
||||||
|
ExcelUtil<CoinVo> util = new ExcelUtil<CoinVo>(CoinVo.class);
|
||||||
|
util.exportExcel(response, list, "硬币数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取硬币详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="获取硬币详细信息")
|
||||||
|
@RequiresPermissions("collect:coin:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(coinService.selectCoinById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增硬币
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="新增硬币")
|
||||||
|
@RequiresPermissions("collect:coin:add")
|
||||||
|
@Log(title = "硬币", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Coin coin)
|
||||||
|
{
|
||||||
|
return toAjax(coinService.insertCoin(coin));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改硬币
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="修改硬币")
|
||||||
|
@RequiresPermissions("collect:coin:edit")
|
||||||
|
@Log(title = "硬币", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Coin coin)
|
||||||
|
{
|
||||||
|
return toAjax(coinService.updateCoin(coin));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除硬币
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="删除硬币")
|
||||||
|
@RequiresPermissions("collect:coin:remove")
|
||||||
|
@Log(title = "硬币", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(coinService.deleteCoinByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.intc.collect.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
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.Stamp;
|
||||||
|
import com.intc.collect.domain.vo.StampVo;
|
||||||
|
import com.intc.collect.domain.dto.StampDto;
|
||||||
|
import com.intc.collect.service.IStampService;
|
||||||
|
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 intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@Api(tags="邮票")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/stamp")
|
||||||
|
public class StampController extends BaseController
|
||||||
|
{
|
||||||
|
@Resource
|
||||||
|
private IStampService stampService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询邮票列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="查询邮票列表",response = StampVo.class)
|
||||||
|
@RequiresPermissions("collect:stamp:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(StampDto stampDto)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<StampVo> list = stampService.selectStampList(stampDto);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出邮票列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="导出邮票列表")
|
||||||
|
@RequiresPermissions("collect:stamp:export")
|
||||||
|
@Log(title = "邮票", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, StampDto stampDto)
|
||||||
|
{
|
||||||
|
List<StampVo> list = stampService.selectStampList(stampDto);
|
||||||
|
ExcelUtil<StampVo> util = new ExcelUtil<StampVo>(StampVo.class);
|
||||||
|
util.exportExcel(response, list, "邮票数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取邮票详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="获取邮票详细信息")
|
||||||
|
@RequiresPermissions("collect:stamp:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(stampService.selectStampById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增邮票
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="新增邮票")
|
||||||
|
@RequiresPermissions("collect:stamp:add")
|
||||||
|
@Log(title = "邮票", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Stamp stamp)
|
||||||
|
{
|
||||||
|
return toAjax(stampService.insertStamp(stamp));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改邮票
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="修改邮票")
|
||||||
|
@RequiresPermissions("collect:stamp:edit")
|
||||||
|
@Log(title = "邮票", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Stamp stamp)
|
||||||
|
{
|
||||||
|
return toAjax(stampService.updateStamp(stamp));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除邮票
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="删除邮票")
|
||||||
|
@RequiresPermissions("collect:stamp:remove")
|
||||||
|
@Log(title = "邮票", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(stampService.deleteStampByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
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;
|
||||||
|
/**
|
||||||
|
* 纸币对象 col_banknote
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("纸币对象")
|
||||||
|
@Data
|
||||||
|
public class Banknote extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
@ApiModelProperty(value="类型")
|
||||||
|
@Excel(name = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 全称 */
|
||||||
|
@ApiModelProperty(value="全称")
|
||||||
|
@Excel(name = "全称")
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
/** 简称 */
|
||||||
|
@ApiModelProperty(value="简称")
|
||||||
|
@Excel(name = "简称")
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
/** 面额 */
|
||||||
|
@ApiModelProperty(value="面额")
|
||||||
|
@Excel(name = "面额")
|
||||||
|
private String faceValue;
|
||||||
|
|
||||||
|
/** 发行时间 */
|
||||||
|
@ApiModelProperty(value="发行时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "发行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date issueDate;
|
||||||
|
|
||||||
|
/** 发行年份 */
|
||||||
|
@ApiModelProperty(value="发行年份")
|
||||||
|
@Excel(name = "发行年份")
|
||||||
|
private String issueYear;
|
||||||
|
|
||||||
|
/** 版别 */
|
||||||
|
@ApiModelProperty(value="版别")
|
||||||
|
@Excel(name = "版别")
|
||||||
|
private String blockType;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在 1代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/** 发行量 */
|
||||||
|
@ApiModelProperty(value="发行量")
|
||||||
|
@Excel(name = "发行量")
|
||||||
|
private String mintage;
|
||||||
|
|
||||||
|
/** 材质 */
|
||||||
|
@ApiModelProperty(value="材质")
|
||||||
|
@Excel(name = "材质")
|
||||||
|
private String composition;
|
||||||
|
|
||||||
|
/** 文件信息 */
|
||||||
|
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("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("mintage", getMintage())
|
||||||
|
.append("composition", getComposition())
|
||||||
|
.append("collectFileList", getCollectFileList())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
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;
|
||||||
|
/**
|
||||||
|
* 硬币对象 col_coin
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("硬币对象")
|
||||||
|
@Data
|
||||||
|
public class Coin extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
@ApiModelProperty(value="类型")
|
||||||
|
@Excel(name = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 全称 */
|
||||||
|
@ApiModelProperty(value="全称")
|
||||||
|
@Excel(name = "全称")
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
/** 简称 */
|
||||||
|
@ApiModelProperty(value="简称")
|
||||||
|
@Excel(name = "简称")
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
/** 面额 */
|
||||||
|
@ApiModelProperty(value="面额")
|
||||||
|
@Excel(name = "面额")
|
||||||
|
private String faceValue;
|
||||||
|
|
||||||
|
/** 发行时间 */
|
||||||
|
@ApiModelProperty(value="发行时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "发行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date issueDate;
|
||||||
|
|
||||||
|
/** 发行年份 */
|
||||||
|
@ApiModelProperty(value="发行年份")
|
||||||
|
@Excel(name = "发行年份")
|
||||||
|
private String issueYear;
|
||||||
|
|
||||||
|
/** 版别 */
|
||||||
|
@ApiModelProperty(value="版别")
|
||||||
|
@Excel(name = "版别")
|
||||||
|
private String blockType;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在 1代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/** 发行量 */
|
||||||
|
@ApiModelProperty(value="发行量")
|
||||||
|
@Excel(name = "发行量")
|
||||||
|
private String mintage;
|
||||||
|
|
||||||
|
/** 材质 */
|
||||||
|
@ApiModelProperty(value="材质")
|
||||||
|
@Excel(name = "材质")
|
||||||
|
private String composition;
|
||||||
|
|
||||||
|
/** 文件信息 */
|
||||||
|
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("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("mintage", getMintage())
|
||||||
|
.append("composition", getComposition())
|
||||||
|
.append("collectFileList", getCollectFileList())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
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;
|
||||||
|
/**
|
||||||
|
* 邮票对象 col_stamp
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("邮票对象")
|
||||||
|
@Data
|
||||||
|
public class Stamp extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
@ApiModelProperty(value="类型")
|
||||||
|
@Excel(name = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 全称 */
|
||||||
|
@ApiModelProperty(value="全称")
|
||||||
|
@Excel(name = "全称")
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
/** 简称 */
|
||||||
|
@ApiModelProperty(value="简称")
|
||||||
|
@Excel(name = "简称")
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
/** 面额 */
|
||||||
|
@ApiModelProperty(value="面额")
|
||||||
|
@Excel(name = "面额")
|
||||||
|
private String faceValue;
|
||||||
|
|
||||||
|
/** 发行时间 */
|
||||||
|
@ApiModelProperty(value="发行时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "发行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date issueDate;
|
||||||
|
|
||||||
|
/** 发行年份 */
|
||||||
|
@ApiModelProperty(value="发行年份")
|
||||||
|
@Excel(name = "发行年份")
|
||||||
|
private String issueYear;
|
||||||
|
|
||||||
|
/** 系列 */
|
||||||
|
@ApiModelProperty(value="系列")
|
||||||
|
@Excel(name = "系列")
|
||||||
|
private String series;
|
||||||
|
|
||||||
|
/** 版别 */
|
||||||
|
@ApiModelProperty(value="版别")
|
||||||
|
@Excel(name = "版别")
|
||||||
|
private String blockType;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在 1代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/** 发行量 */
|
||||||
|
@ApiModelProperty(value="发行量")
|
||||||
|
@Excel(name = "发行量")
|
||||||
|
private String mintage;
|
||||||
|
|
||||||
|
/** 文件信息 */
|
||||||
|
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("series", getSeries())
|
||||||
|
.append("blockType", getBlockType())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("mintage", getMintage())
|
||||||
|
.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对象
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("纸币Dto对象")
|
||||||
|
@Data
|
||||||
|
public class BanknoteDto 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 blockType;
|
||||||
|
|
||||||
|
/** 材质 */
|
||||||
|
@ApiModelProperty(value="材质")
|
||||||
|
private String composition;
|
||||||
|
|
||||||
|
/** 开始时间 */
|
||||||
|
@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对象
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("硬币Dto对象")
|
||||||
|
@Data
|
||||||
|
public class CoinDto 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 blockType;
|
||||||
|
|
||||||
|
/** 材质 */
|
||||||
|
@ApiModelProperty(value="材质")
|
||||||
|
private String composition;
|
||||||
|
|
||||||
|
/** 开始时间 */
|
||||||
|
@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对象
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("邮票Dto对象")
|
||||||
|
@Data
|
||||||
|
public class StampDto 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 blockType;
|
||||||
|
|
||||||
|
/** 开始时间 */
|
||||||
|
@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,18 @@
|
|||||||
|
package com.intc.collect.domain.vo;
|
||||||
|
|
||||||
|
import com.intc.collect.domain.Banknote;
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纸币Vo对象 col_banknote
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("纸币Vo对象")
|
||||||
|
@Data
|
||||||
|
public class BanknoteVo extends Banknote
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.intc.collect.domain.vo;
|
||||||
|
|
||||||
|
import com.intc.collect.domain.Coin;
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 硬币Vo对象 col_coin
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("硬币Vo对象")
|
||||||
|
@Data
|
||||||
|
public class CoinVo extends Coin
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.intc.collect.domain.vo;
|
||||||
|
|
||||||
|
import com.intc.collect.domain.Stamp;
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮票Vo对象 col_stamp
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@ApiModel("邮票Vo对象")
|
||||||
|
@Data
|
||||||
|
public class StampVo extends Stamp
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.intc.collect.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.intc.collect.domain.Banknote;
|
||||||
|
import com.intc.collect.domain.dto.BanknoteDto;
|
||||||
|
import com.intc.collect.domain.vo.BanknoteVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纸币Mapper接口
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
public interface BanknoteMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询纸币
|
||||||
|
*
|
||||||
|
* @param id 纸币主键
|
||||||
|
* @return 纸币
|
||||||
|
*/
|
||||||
|
public BanknoteVo selectBanknoteById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询纸币列表
|
||||||
|
*
|
||||||
|
* @param banknoteDto 纸币
|
||||||
|
* @return 纸币集合
|
||||||
|
*/
|
||||||
|
public List<BanknoteVo> selectBanknoteList(BanknoteDto banknoteDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID列表查询纸币及其关联文件
|
||||||
|
*
|
||||||
|
* @param ids 纸币ID列表
|
||||||
|
* @return 纸币集合(包含关联文件)
|
||||||
|
*/
|
||||||
|
public List<BanknoteVo> selectBanknoteListWithFiles(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增纸币
|
||||||
|
*
|
||||||
|
* @param banknote 纸币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBanknote(Banknote banknote);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改纸币
|
||||||
|
*
|
||||||
|
* @param banknote 纸币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBanknote(Banknote banknote);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除纸币
|
||||||
|
*
|
||||||
|
* @param id 纸币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBanknoteById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除纸币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBanknoteByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除纸币
|
||||||
|
*
|
||||||
|
* @param id 纸币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int removeBanknoteById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量逻辑删除纸币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int removeBanknoteByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.intc.collect.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.intc.collect.domain.Coin;
|
||||||
|
import com.intc.collect.domain.dto.CoinDto;
|
||||||
|
import com.intc.collect.domain.vo.CoinVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 硬币Mapper接口
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
public interface CoinMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询硬币
|
||||||
|
*
|
||||||
|
* @param id 硬币主键
|
||||||
|
* @return 硬币
|
||||||
|
*/
|
||||||
|
public CoinVo selectCoinById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询硬币列表
|
||||||
|
*
|
||||||
|
* @param coinDto 硬币
|
||||||
|
* @return 硬币集合
|
||||||
|
*/
|
||||||
|
public List<CoinVo> selectCoinList(CoinDto coinDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID列表查询硬币及其关联文件
|
||||||
|
*
|
||||||
|
* @param ids 硬币ID列表
|
||||||
|
* @return 硬币集合(包含关联文件)
|
||||||
|
*/
|
||||||
|
public List<CoinVo> selectCoinListWithFiles(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增硬币
|
||||||
|
*
|
||||||
|
* @param coin 硬币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertCoin(Coin coin);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改硬币
|
||||||
|
*
|
||||||
|
* @param coin 硬币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateCoin(Coin coin);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除硬币
|
||||||
|
*
|
||||||
|
* @param id 硬币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCoinById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除硬币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCoinByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除硬币
|
||||||
|
*
|
||||||
|
* @param id 硬币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int removeCoinById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量逻辑删除硬币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int removeCoinByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.intc.collect.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.intc.collect.domain.Stamp;
|
||||||
|
import com.intc.collect.domain.dto.StampDto;
|
||||||
|
import com.intc.collect.domain.vo.StampVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮票Mapper接口
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
public interface StampMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询邮票
|
||||||
|
*
|
||||||
|
* @param id 邮票主键
|
||||||
|
* @return 邮票
|
||||||
|
*/
|
||||||
|
public StampVo selectStampById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询邮票列表
|
||||||
|
*
|
||||||
|
* @param stampDto 邮票
|
||||||
|
* @return 邮票集合
|
||||||
|
*/
|
||||||
|
public List<StampVo> selectStampList(StampDto stampDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID列表查询邮票及其关联文件
|
||||||
|
*
|
||||||
|
* @param ids 邮票ID列表
|
||||||
|
* @return 邮票集合(包含关联文件)
|
||||||
|
*/
|
||||||
|
public List<StampVo> selectStampListWithFiles(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增邮票
|
||||||
|
*
|
||||||
|
* @param stamp 邮票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertStamp(Stamp stamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改邮票
|
||||||
|
*
|
||||||
|
* @param stamp 邮票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateStamp(Stamp stamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除邮票
|
||||||
|
*
|
||||||
|
* @param id 邮票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteStampById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除邮票
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteStampByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除邮票
|
||||||
|
*
|
||||||
|
* @param id 邮票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int removeStampById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量逻辑删除邮票
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int removeStampByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.intc.collect.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.intc.collect.domain.Banknote;
|
||||||
|
import com.intc.collect.domain.dto.BanknoteDto;
|
||||||
|
import com.intc.collect.domain.vo.BanknoteVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纸币Service接口
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
public interface IBanknoteService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询纸币
|
||||||
|
*
|
||||||
|
* @param id 纸币主键
|
||||||
|
* @return 纸币
|
||||||
|
*/
|
||||||
|
public BanknoteVo selectBanknoteById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询纸币列表
|
||||||
|
*
|
||||||
|
* @param banknoteDto 纸币
|
||||||
|
* @return 纸币集合
|
||||||
|
*/
|
||||||
|
public List<BanknoteVo> selectBanknoteList(BanknoteDto banknoteDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增纸币
|
||||||
|
*
|
||||||
|
* @param banknote 纸币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBanknote(Banknote banknote);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改纸币
|
||||||
|
*
|
||||||
|
* @param banknote 纸币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBanknote(Banknote banknote);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除纸币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的纸币主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBanknoteByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除纸币信息
|
||||||
|
*
|
||||||
|
* @param id 纸币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBanknoteById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.intc.collect.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.intc.collect.domain.Coin;
|
||||||
|
import com.intc.collect.domain.dto.CoinDto;
|
||||||
|
import com.intc.collect.domain.vo.CoinVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 硬币Service接口
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
public interface ICoinService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询硬币
|
||||||
|
*
|
||||||
|
* @param id 硬币主键
|
||||||
|
* @return 硬币
|
||||||
|
*/
|
||||||
|
public CoinVo selectCoinById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询硬币列表
|
||||||
|
*
|
||||||
|
* @param coinDto 硬币
|
||||||
|
* @return 硬币集合
|
||||||
|
*/
|
||||||
|
public List<CoinVo> selectCoinList(CoinDto coinDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增硬币
|
||||||
|
*
|
||||||
|
* @param coin 硬币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertCoin(Coin coin);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改硬币
|
||||||
|
*
|
||||||
|
* @param coin 硬币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateCoin(Coin coin);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除硬币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的硬币主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCoinByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除硬币信息
|
||||||
|
*
|
||||||
|
* @param id 硬币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteCoinById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.intc.collect.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.intc.collect.domain.Stamp;
|
||||||
|
import com.intc.collect.domain.dto.StampDto;
|
||||||
|
import com.intc.collect.domain.vo.StampVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮票Service接口
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
public interface IStampService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询邮票
|
||||||
|
*
|
||||||
|
* @param id 邮票主键
|
||||||
|
* @return 邮票
|
||||||
|
*/
|
||||||
|
public StampVo selectStampById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询邮票列表
|
||||||
|
*
|
||||||
|
* @param stampDto 邮票
|
||||||
|
* @return 邮票集合
|
||||||
|
*/
|
||||||
|
public List<StampVo> selectStampList(StampDto stampDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增邮票
|
||||||
|
*
|
||||||
|
* @param stamp 邮票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertStamp(Stamp stamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改邮票
|
||||||
|
*
|
||||||
|
* @param stamp 邮票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateStamp(Stamp stamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除邮票
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的邮票主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteStampByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除邮票信息
|
||||||
|
*
|
||||||
|
* @param id 邮票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteStampById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
package com.intc.collect.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
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.BanknoteMapper;
|
||||||
|
import com.intc.collect.domain.Banknote;
|
||||||
|
import com.intc.collect.domain.dto.BanknoteDto;
|
||||||
|
import com.intc.collect.domain.vo.BanknoteVo;
|
||||||
|
import com.intc.collect.service.IBanknoteService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纸币Service业务层处理
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BanknoteServiceImpl implements IBanknoteService
|
||||||
|
{
|
||||||
|
@Resource
|
||||||
|
private BanknoteMapper banknoteMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CollectFileMapper collectFileMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询纸币
|
||||||
|
*
|
||||||
|
* @param id 纸币主键
|
||||||
|
* @return 纸币
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BanknoteVo selectBanknoteById(Long id)
|
||||||
|
{
|
||||||
|
return banknoteMapper.selectBanknoteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询纸币列表
|
||||||
|
*
|
||||||
|
* @param banknoteDto 纸币
|
||||||
|
* @return 纸币
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BanknoteVo> selectBanknoteList(BanknoteDto banknoteDto)
|
||||||
|
{
|
||||||
|
List<BanknoteVo> list = banknoteMapper.selectBanknoteList(banknoteDto);
|
||||||
|
if (list == null || list.isEmpty())
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> ids = list.stream().map(BanknoteVo::getId).collect(Collectors.toList());
|
||||||
|
List<BanknoteVo> listWithFiles = banknoteMapper.selectBanknoteListWithFiles(ids);
|
||||||
|
Map<Long, BanknoteVo> fileMap = listWithFiles.stream()
|
||||||
|
.collect(Collectors.toMap(BanknoteVo::getId, vo -> vo));
|
||||||
|
|
||||||
|
for (BanknoteVo vo : list)
|
||||||
|
{
|
||||||
|
BanknoteVo voWithFiles = fileMap.get(vo.getId());
|
||||||
|
if (voWithFiles != null && voWithFiles.getCollectFileList() != null)
|
||||||
|
{
|
||||||
|
vo.setCollectFileList(voWithFiles.getCollectFileList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增纸币
|
||||||
|
*
|
||||||
|
* @param banknote 纸币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBanknote(Banknote banknote)
|
||||||
|
{
|
||||||
|
banknote.setId(IdWorker.getId());
|
||||||
|
banknote.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
banknote.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int rows = banknoteMapper.insertBanknote(banknote);
|
||||||
|
insertCollectFile(banknote);
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件信息
|
||||||
|
*
|
||||||
|
* @param banknote 对象
|
||||||
|
*/
|
||||||
|
public void insertCollectFile(Banknote banknote)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(banknote.getId());
|
||||||
|
|
||||||
|
List<CollectFile> collectFileList = banknote.getCollectFileList();
|
||||||
|
Long id = banknote.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 banknote 纸币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBanknote(Banknote banknote)
|
||||||
|
{
|
||||||
|
banknote.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
banknote.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
insertCollectFile(banknote);
|
||||||
|
return banknoteMapper.updateBanknote(banknote);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除纸币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的纸币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBanknoteByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
int rows = banknoteMapper.removeBanknoteByIds(ids);
|
||||||
|
for (Long collectId : ids)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(collectId);
|
||||||
|
}
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除纸币信息
|
||||||
|
*
|
||||||
|
* @param id 纸币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBanknoteById(Long id)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(id);
|
||||||
|
return banknoteMapper.removeBanknoteById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
package com.intc.collect.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
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.CoinMapper;
|
||||||
|
import com.intc.collect.domain.Coin;
|
||||||
|
import com.intc.collect.domain.dto.CoinDto;
|
||||||
|
import com.intc.collect.domain.vo.CoinVo;
|
||||||
|
import com.intc.collect.service.ICoinService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 硬币Service业务层处理
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CoinServiceImpl implements ICoinService
|
||||||
|
{
|
||||||
|
@Resource
|
||||||
|
private CoinMapper coinMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CollectFileMapper collectFileMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询硬币
|
||||||
|
*
|
||||||
|
* @param id 硬币主键
|
||||||
|
* @return 硬币
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CoinVo selectCoinById(Long id)
|
||||||
|
{
|
||||||
|
return coinMapper.selectCoinById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询硬币列表
|
||||||
|
*
|
||||||
|
* @param coinDto 硬币
|
||||||
|
* @return 硬币
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CoinVo> selectCoinList(CoinDto coinDto)
|
||||||
|
{
|
||||||
|
List<CoinVo> list = coinMapper.selectCoinList(coinDto);
|
||||||
|
if (list == null || list.isEmpty())
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> ids = list.stream().map(CoinVo::getId).collect(Collectors.toList());
|
||||||
|
List<CoinVo> listWithFiles = coinMapper.selectCoinListWithFiles(ids);
|
||||||
|
Map<Long, CoinVo> fileMap = listWithFiles.stream()
|
||||||
|
.collect(Collectors.toMap(CoinVo::getId, vo -> vo));
|
||||||
|
|
||||||
|
for (CoinVo vo : list)
|
||||||
|
{
|
||||||
|
CoinVo voWithFiles = fileMap.get(vo.getId());
|
||||||
|
if (voWithFiles != null && voWithFiles.getCollectFileList() != null)
|
||||||
|
{
|
||||||
|
vo.setCollectFileList(voWithFiles.getCollectFileList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增硬币
|
||||||
|
*
|
||||||
|
* @param coin 硬币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertCoin(Coin coin)
|
||||||
|
{
|
||||||
|
coin.setId(IdWorker.getId());
|
||||||
|
coin.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
coin.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int rows = coinMapper.insertCoin(coin);
|
||||||
|
insertCollectFile(coin);
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件信息
|
||||||
|
*
|
||||||
|
* @param coin 对象
|
||||||
|
*/
|
||||||
|
public void insertCollectFile(Coin coin)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(coin.getId());
|
||||||
|
|
||||||
|
List<CollectFile> collectFileList = coin.getCollectFileList();
|
||||||
|
Long id = coin.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 coin 硬币
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateCoin(Coin coin)
|
||||||
|
{
|
||||||
|
coin.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
coin.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
insertCollectFile(coin);
|
||||||
|
return coinMapper.updateCoin(coin);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除硬币
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的硬币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteCoinByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
int rows = coinMapper.removeCoinByIds(ids);
|
||||||
|
for (Long collectId : ids)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(collectId);
|
||||||
|
}
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除硬币信息
|
||||||
|
*
|
||||||
|
* @param id 硬币主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteCoinById(Long id)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(id);
|
||||||
|
return coinMapper.removeCoinById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
package com.intc.collect.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
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.StampMapper;
|
||||||
|
import com.intc.collect.domain.Stamp;
|
||||||
|
import com.intc.collect.domain.dto.StampDto;
|
||||||
|
import com.intc.collect.domain.vo.StampVo;
|
||||||
|
import com.intc.collect.service.IStampService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮票Service业务层处理
|
||||||
|
*
|
||||||
|
* @author intc
|
||||||
|
* @date 2026-07-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class StampServiceImpl implements IStampService
|
||||||
|
{
|
||||||
|
@Resource
|
||||||
|
private StampMapper stampMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CollectFileMapper collectFileMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询邮票
|
||||||
|
*
|
||||||
|
* @param id 邮票主键
|
||||||
|
* @return 邮票
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public StampVo selectStampById(Long id)
|
||||||
|
{
|
||||||
|
return stampMapper.selectStampById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询邮票列表
|
||||||
|
*
|
||||||
|
* @param stampDto 邮票
|
||||||
|
* @return 邮票
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<StampVo> selectStampList(StampDto stampDto)
|
||||||
|
{
|
||||||
|
List<StampVo> list = stampMapper.selectStampList(stampDto);
|
||||||
|
if (list == null || list.isEmpty())
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> ids = list.stream().map(StampVo::getId).collect(Collectors.toList());
|
||||||
|
List<StampVo> listWithFiles = stampMapper.selectStampListWithFiles(ids);
|
||||||
|
Map<Long, StampVo> fileMap = listWithFiles.stream()
|
||||||
|
.collect(Collectors.toMap(StampVo::getId, vo -> vo));
|
||||||
|
|
||||||
|
for (StampVo vo : list)
|
||||||
|
{
|
||||||
|
StampVo voWithFiles = fileMap.get(vo.getId());
|
||||||
|
if (voWithFiles != null && voWithFiles.getCollectFileList() != null)
|
||||||
|
{
|
||||||
|
vo.setCollectFileList(voWithFiles.getCollectFileList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增邮票
|
||||||
|
*
|
||||||
|
* @param stamp 邮票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertStamp(Stamp stamp)
|
||||||
|
{
|
||||||
|
stamp.setId(IdWorker.getId());
|
||||||
|
stamp.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
stamp.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int rows = stampMapper.insertStamp(stamp);
|
||||||
|
insertCollectFile(stamp);
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件信息
|
||||||
|
*
|
||||||
|
* @param stamp 对象
|
||||||
|
*/
|
||||||
|
public void insertCollectFile(Stamp stamp)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(stamp.getId());
|
||||||
|
|
||||||
|
List<CollectFile> collectFileList = stamp.getCollectFileList();
|
||||||
|
Long id = stamp.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 stamp 邮票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateStamp(Stamp stamp)
|
||||||
|
{
|
||||||
|
stamp.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
stamp.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
insertCollectFile(stamp);
|
||||||
|
return stampMapper.updateStamp(stamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除邮票
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的邮票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteStampByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
int rows = stampMapper.removeStampByIds(ids);
|
||||||
|
for (Long collectId : ids)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(collectId);
|
||||||
|
}
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除邮票信息
|
||||||
|
*
|
||||||
|
* @param id 邮票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteStampById(Long id)
|
||||||
|
{
|
||||||
|
collectFileMapper.deleteCollectFileByCollectId(id);
|
||||||
|
return stampMapper.removeStampById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
<?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.BanknoteMapper">
|
||||||
|
|
||||||
|
<resultMap type="BanknoteVo" id="BanknoteResult">
|
||||||
|
<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="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="composition" column="composition" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="BanknoteCollectFileResult" type="BanknoteVo" extends="BanknoteResult">
|
||||||
|
<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="selectBanknoteVo">
|
||||||
|
select a.id, a.type, a.full_name, a.short_name, a.face_value, a.issue_date,
|
||||||
|
a.issue_year, a.block_type, a.create_by, a.create_time, a.update_by,
|
||||||
|
a.update_time, a.del_flag, a.remark, a.mintage, a.composition,
|
||||||
|
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_banknote a
|
||||||
|
left join col_collect_file b on b.collect_id = a.id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBanknoteList" parameterType="BanknoteDto" resultMap="BanknoteResult">
|
||||||
|
select id, type, full_name, short_name, face_value, issue_date,
|
||||||
|
issue_year, block_type, create_by, create_time, update_by,
|
||||||
|
update_time, del_flag, remark, mintage, composition
|
||||||
|
from col_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 like '%'|| #{issueYear}||'%'</if>
|
||||||
|
<if test="blockType != null and blockType != ''"> and block_type = #{blockType}</if>
|
||||||
|
<if test="composition != null and composition != ''"> and composition = #{composition}</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
and issue_date <= #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
and issue_date >= #{startTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by issue_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBanknoteListWithFiles" parameterType="list" resultMap="BanknoteCollectFileResult">
|
||||||
|
<include refid="selectBanknoteVo"/>
|
||||||
|
where a.id in
|
||||||
|
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
order by a.issue_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBanknoteById" parameterType="Long" resultMap="BanknoteCollectFileResult">
|
||||||
|
<include refid="selectBanknoteVo"/>
|
||||||
|
where a.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBanknote" parameterType="Banknote">
|
||||||
|
insert into col_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="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">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="mintage != null">mintage,</if>
|
||||||
|
<if test="composition != null">composition,</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">#{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="mintage != null">#{mintage},</if>
|
||||||
|
<if test="composition != null">#{composition},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBanknote" parameterType="Banknote">
|
||||||
|
update col_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="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">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="mintage != null">mintage = #{mintage},</if>
|
||||||
|
<if test="composition != null">composition = #{composition},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBanknoteById" parameterType="Long">
|
||||||
|
delete from col_banknote where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBanknoteByIds" parameterType="String">
|
||||||
|
delete from col_banknote where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="removeBanknoteById" parameterType="Long">
|
||||||
|
update col_banknote set del_flag='1' where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="removeBanknoteByIds" parameterType="String">
|
||||||
|
update col_banknote set del_flag='1' where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
<?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.CoinMapper">
|
||||||
|
|
||||||
|
<resultMap type="CoinVo" id="CoinResult">
|
||||||
|
<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="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="composition" column="composition" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="CoinCollectFileResult" type="CoinVo" extends="CoinResult">
|
||||||
|
<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="selectCoinVo">
|
||||||
|
select a.id, a.type, a.full_name, a.short_name, a.face_value, a.issue_date,
|
||||||
|
a.issue_year, a.block_type, a.create_by, a.create_time, a.update_by,
|
||||||
|
a.update_time, a.del_flag, a.remark, a.mintage, a.composition,
|
||||||
|
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_coin a
|
||||||
|
left join col_collect_file b on b.collect_id = a.id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectCoinList" parameterType="CoinDto" resultMap="CoinResult">
|
||||||
|
select id, type, full_name, short_name, face_value, issue_date,
|
||||||
|
issue_year, block_type, create_by, create_time, update_by,
|
||||||
|
update_time, del_flag, remark, mintage, composition
|
||||||
|
from col_coin
|
||||||
|
<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 like '%'|| #{issueYear}||'%'</if>
|
||||||
|
<if test="blockType != null and blockType != ''"> and block_type = #{blockType}</if>
|
||||||
|
<if test="composition != null and composition != ''"> and composition = #{composition}</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
and issue_date <= #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
and issue_date >= #{startTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by issue_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCoinListWithFiles" parameterType="list" resultMap="CoinCollectFileResult">
|
||||||
|
<include refid="selectCoinVo"/>
|
||||||
|
where a.id in
|
||||||
|
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
order by a.issue_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCoinById" parameterType="Long" resultMap="CoinCollectFileResult">
|
||||||
|
<include refid="selectCoinVo"/>
|
||||||
|
where a.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertCoin" parameterType="Coin">
|
||||||
|
insert into col_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">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="mintage != null">mintage,</if>
|
||||||
|
<if test="composition != null">composition,</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">#{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="mintage != null">#{mintage},</if>
|
||||||
|
<if test="composition != null">#{composition},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateCoin" parameterType="Coin">
|
||||||
|
update col_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">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="mintage != null">mintage = #{mintage},</if>
|
||||||
|
<if test="composition != null">composition = #{composition},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteCoinById" parameterType="Long">
|
||||||
|
delete from col_coin where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteCoinByIds" parameterType="String">
|
||||||
|
delete from col_coin where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="removeCoinById" parameterType="Long">
|
||||||
|
update col_coin set del_flag='1' where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="removeCoinByIds" parameterType="String">
|
||||||
|
update col_coin set del_flag='1' where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
<?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.StampMapper">
|
||||||
|
|
||||||
|
<resultMap type="StampVo" id="StampResult">
|
||||||
|
<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="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="mintage" column="mintage" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="StampCollectFileResult" type="StampVo" extends="StampResult">
|
||||||
|
<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="selectStampVo">
|
||||||
|
select a.id, a.type, a.full_name, a.short_name, a.face_value, a.issue_date,
|
||||||
|
a.issue_year, a.series, a.block_type, a.create_by, a.create_time,
|
||||||
|
a.update_by, a.update_time, a.del_flag, a.remark, a.mintage,
|
||||||
|
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_stamp a
|
||||||
|
left join col_collect_file b on b.collect_id = a.id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectStampList" parameterType="StampDto" resultMap="StampResult">
|
||||||
|
select id, type, full_name, short_name, face_value, issue_date,
|
||||||
|
issue_year, series, block_type, create_by, create_time,
|
||||||
|
update_by, update_time, del_flag, remark, mintage
|
||||||
|
from col_stamp
|
||||||
|
<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 like '%'|| #{issueYear}||'%'</if>
|
||||||
|
<if test="series != null and series != ''"> and series = #{series}</if>
|
||||||
|
<if test="blockType != null and blockType != ''"> and block_type = #{blockType}</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
and issue_date <= #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
and issue_date >= #{startTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by issue_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectStampListWithFiles" parameterType="list" resultMap="StampCollectFileResult">
|
||||||
|
<include refid="selectStampVo"/>
|
||||||
|
where a.id in
|
||||||
|
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
order by a.issue_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectStampById" parameterType="Long" resultMap="StampCollectFileResult">
|
||||||
|
<include refid="selectStampVo"/>
|
||||||
|
where a.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertStamp" parameterType="Stamp">
|
||||||
|
insert into col_stamp
|
||||||
|
<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="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="mintage != null">mintage,</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="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="mintage != null">#{mintage},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateStamp" parameterType="Stamp">
|
||||||
|
update col_stamp
|
||||||
|
<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="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="mintage != null">mintage = #{mintage},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteStampById" parameterType="Long">
|
||||||
|
delete from col_stamp where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteStampByIds" parameterType="String">
|
||||||
|
delete from col_stamp where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="removeStampById" parameterType="Long">
|
||||||
|
update col_stamp set del_flag='1' where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="removeStampByIds" parameterType="String">
|
||||||
|
update col_stamp 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