张天森
2022-10-26 3b96a967f1bda174061c81122e27e1d1c675a61f
三说会堂bug修改
3个文件已修改
95 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDpcDAO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDpcServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDpcMapper.xml 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDpcDAO.java
@@ -62,4 +62,9 @@
     * @return
     */
    SysUserVO selectUser(@Param("phone") String phone);
    /**
     * 插入一条人大代表记录
     * */
    int insertComActDpc(@Param("comActDpc") ComActDpc comActDpc);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDpcServiceImpl.java
@@ -22,6 +22,7 @@
import com.panzhihua.service_community.service.ComActDpcService;
import javax.annotation.Resource;
import java.util.Date;
/**
 * 人大代表(ComActDpc)表服务实现类
@@ -34,6 +35,8 @@
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @Resource
    private ComActDpcDAO comActDpcDAO;
    /**
     * 新增人大代表
@@ -54,8 +57,9 @@
        }
        dpc = new ComActDpc();
        dpc.setId(Snowflake.getId());
        dpc.setCreatedAt(new Date());
        BeanUtils.copyProperties(addDpcDTO, dpc);
        int result = this.baseMapper.insert(dpc);
        int result = comActDpcDAO.insertComActDpc(dpc);
        if (result > 0) {
            refreshAssociateUserCash(addDpcDTO.getPhone());
            return R.ok();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDpcMapper.xml
@@ -64,6 +64,90 @@
        SELECT user_id, `name`, phone
        FROM sys_user WHERE `type` = 1 AND phone = #{phone}
    </select>
    <insert id="insertComActDpc">
        insert into com_act_dpc
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="comActDpc.id != null and comActDpc.id != ''">
                id,
            </if>
            <if test="comActDpc.name != null and comActDpc.name != ''">
                name,
            </if>
            <if test="comActDpc.phone != null and comActDpc.phone != ''">
                phone,
            </if>
            <if test="comActDpc.nation != null and comActDpc.nation != ''">
            nation,
            <if test="comActDpc.sex != null and comActDpc.sex != ''">
                sex,
            </if>
            <if test="comActDpc.area != null and comActDpc.area != ''">
                area,
            </if>
            <if test="comActDpc.belong != null and comActDpc.belong != ''">
                belong,
            </if>
            <if test="comActDpc.category != null and comActDpc.category != ''">
                category,
            </if>
            <if test="comActDpc.position != null and comActDpc.position != ''">
                position,
            </if>
            <if test="comActDpc.photo != null and comActDpc.photo != ''">
                photo,
            </if>
            <if test="comActDpc.communityId != null and comActDpc.communityId != ''">
                community_id,
            </if>
            <if test="comActDpc.createBy != null and comActDpc.createBy != ''">
                created_by,
            </if>
            <if test="comActDpc.createAt != null and comActDpc.createAt != ''">
                created_at,
            </if>
        </trim>
        values
        <trim prefix="("  suffix=")" suffixOverrides=",">
            <if test="comActDpc.id != null and comActDpc.id != ''">
                #{comActDpc.id},
            </if>
            <if test="comActDpc.name != null and comActDpc.name != ''">
                #{comActDpc.name},
            </if>
            <if test="comActDpc.phone != null and comActDpc.phone != ''">
                #{comActDpc.phone},
            </if>
            <if test="comActDpc.nation != null and comActDpc.nation != ''">
            #{comActDpc.nation},
            <if test="comActDpc.sex != null and comActDpc.sex != ''">
                #{comActDpc.sex},
            </if>
            <if test="comActDpc.area != null and comActDpc.area != ''">
                #{comActDpc.area},
            </if>
            <if test="comActDpc.belong != null and comActDpc.belong != ''">
                #{comActDpc.belong},
            </if>
            <if test="comActDpc.category != null and comActDpc.category != ''">
                #{comActDpc.category},
            </if>
            <if test="comActDpc.position != null and comActDpc.position != ''">
                #{comActDpc.position},
            </if>
            <if test="comActDpc.photo != null and comActDpc.photo != ''">
                #{comActDpc.photo},
            </if>
            <if test="comActDpc.communityId != null and comActDpc.communityId != ''">
                #{comActDpc.communityId},
            </if>
            <if test="comActDpc.createBy != null and comActDpc.createBy != ''">
                #{comActDpc.createBy},
            </if>
            <if test="comActDpc.createAt != null and comActDpc.createAt != ''">
                #{comActDpc.createAt},
            </if>
        </trim>
    </insert>
</mapper>