This commit is contained in:
马三炮 2025-04-25 18:07:01 +08:00
parent e1d243970a
commit 1a14dbe747
3 changed files with 7 additions and 6 deletions

View File

@ -16,7 +16,7 @@ public interface TbSubPeopleMapper {
TbSubPeopleVo getTbSubByIdCard(TbSubPeopleVo tbSubPeopleVo);
void addTbSub(TbSubPeopleVo tbSubPeopleVo);
void addTbSubPeople(TbSubPeopleVo tbSubPeopleVo);
void updateTbSubPeople(TbSubPeopleVo tbSubPeopleVo);

View File

@ -82,9 +82,10 @@ public class TbSubPeopleServiceImpl implements TbSubPeopleService {
}
tbSubPeopleVo.setCreateUser(SecurityUtils.getLoginUser().getUsername());
tbSubPeopleVo.setCreateTime(new Date());
tbSubPeopleMapper.addTbSub(tbSubPeopleVo);
tbFileSourceService.addTbFileSource(tbSubPeopleVo.getTbFileSourceVoList(),tbSubPeopleVo.getId(), TableType.TB_SUB_PEOPLE.getCode());
tbSubPeopleMapper.addTbSubPeople(tbSubPeopleVo);
if (!tbSubPeopleVo.getTbFileSourceVoList().isEmpty()){
tbFileSourceService.addTbFileSource(tbSubPeopleVo.getTbFileSourceVoList(),tbSubPeopleVo.getId(), TableType.TB_SUB_PEOPLE.getCode());
}
}
/**

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.tool.mapper.TbSubPeopleMapper">
<insert id="addTbSub" useGeneratedKeys="true" keyProperty="id">
insert into tb_sub
<insert id="addTbSubPeople" useGeneratedKeys="true" keyProperty="id">
insert into tb_sub_people
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userName != null and userName != ''">user_name,</if>
<if test="idCard != null and idCard != ''">id_card,</if>