fix: 普通纪念币自测问题修复。
This commit is contained in:
@@ -80,6 +80,9 @@ public class CommemorativeCoinServiceImpl implements ICommemorativeCoinService
|
||||
*/
|
||||
public void insertCollectFile(CommemorativeCoin commemorativeCoin)
|
||||
{
|
||||
//先删除,再添加
|
||||
collectFileMapper.deleteCollectFileByCollectId(commemorativeCoin.getId());
|
||||
|
||||
List<CollectFile> collectFileList = commemorativeCoin.getCollectFileList();
|
||||
Long id = commemorativeCoin.getId();
|
||||
if (StringUtils.isNotNull(collectFileList))
|
||||
@@ -93,7 +96,7 @@ public class CommemorativeCoinServiceImpl implements ICommemorativeCoinService
|
||||
collectFile.setId(IdWorker.getId());
|
||||
list.add(collectFile);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
collectFileMapper.batchInsertCollectFile(list);
|
||||
}
|
||||
@@ -124,7 +127,13 @@ public class CommemorativeCoinServiceImpl implements ICommemorativeCoinService
|
||||
@Override
|
||||
public int deleteCommemorativeCoinByIds(Long[] ids)
|
||||
{
|
||||
return commemorativeCoinMapper.removeCommemorativeCoinByIds(ids);
|
||||
int i= commemorativeCoinMapper.removeCommemorativeCoinByIds(ids);
|
||||
for (Long collectId : ids)
|
||||
{
|
||||
collectFileMapper.deleteCollectFileByCollectId(collectId);
|
||||
}
|
||||
return i;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectCommemorativeCoinList" parameterType="CommemorativeCoinDto" resultMap="CommemorativeCoinResult">
|
||||
<select id="selectCommemorativeCoinList" parameterType="CommemorativeCoinDto" resultMap="CommemorativeCoinCollectFileResult">
|
||||
<include refid="selectCommemorativeCoinVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by a.issue_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectCommemorativeCoinById" parameterType="Long" resultMap="CommemorativeCoinResult">
|
||||
<select id="selectCommemorativeCoinById" parameterType="Long" resultMap="CommemorativeCoinCollectFileResult">
|
||||
<include refid="selectCommemorativeCoinVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user