lidongdong
2023-10-17 96ef2a6baeed3e8345cbe55f4aec143963db1ea5
金汇微心愿模块
4个文件已添加
1个文件已修改
297 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiMicroVolunteeringVO.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/dao/JinhuiMicroVolunteeringDao.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/entity/JinhuiMicroVolunteering.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiInterspaceTypeMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiMicroVolunteeringMapper.xml 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiMicroVolunteeringVO.java
New file
@@ -0,0 +1,55 @@
package com.panzhihua.common.model.vos.jinhui;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("金汇微心愿")
public class JinhuiMicroVolunteeringVO implements Serializable {
    private static final long serialVersionUID = -70884515430727555L;
    @ApiModelProperty(value = "主键")
    private String id;
    @ApiModelProperty(value = "内容")
    private String content;
    @ApiModelProperty(value = "提交人id")
    private String userId;
    @ApiModelProperty(value = "心愿类型id")
    private String wishTypeId;
    @ApiModelProperty(value = "姓名")
    private String userName;
    @ApiModelProperty(value = "电话")
    private String userPhone;
    @ApiModelProperty(value = "图片")
    private String imgUrl;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date creationTime;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/dao/JinhuiMicroVolunteeringDao.java
New file
@@ -0,0 +1,41 @@
package com.panzhihua.service_jinhui_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.jinhui.JinhuiInterspaceVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiMicroVolunteeringVO;
import com.panzhihua.service_jinhui_community.entity.JinhuiInterspace;
import com.panzhihua.service_jinhui_community.entity.JinhuiMicroVolunteering;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface JinhuiMicroVolunteeringDao extends BaseMapper<JinhuiMicroVolunteering>
{
    /**
     * 分页查询
     * @param
     * @return
     */
    IPage<JinhuiMicroVolunteering> getList(Page page);
    JinhuiMicroVolunteering getDetails(@Param("id") String id);
    /**
     * 新增
     * @param
     * @return
     */
    int addData(@Param("item") JinhuiMicroVolunteeringVO item);
    int editData(@Param("item") JinhuiMicroVolunteeringVO item);
    int expurgateData(@Param("id") String id);
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/entity/JinhuiMicroVolunteering.java
New file
@@ -0,0 +1,55 @@
package com.panzhihua.service_jinhui_community.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("金汇微心愿")
public class JinhuiMicroVolunteering implements Serializable {
    private static final long serialVersionUID = -70884515430727555L;
    @ApiModelProperty(value = "主键")
    private String id;
    @ApiModelProperty(value = "内容")
    private String content;
    @ApiModelProperty(value = "提交人id")
    private String userId;
    @ApiModelProperty(value = "心愿类型id")
    private String wishTypeId;
    @ApiModelProperty(value = "姓名")
    private String userName;
    @ApiModelProperty(value = "电话")
    private String userPhone;
    @ApiModelProperty(value = "图片")
    private String imgUrl;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date creationTime;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiInterspaceTypeMapper.xml
@@ -18,7 +18,7 @@
            intendant_name,
            user_id,
            creation_time,
            updata_time
            update_time
        from jinhui_intendant_type
        order by creation_time desc
    </select>
@@ -30,7 +30,7 @@
            intendant_name,
            user_id,
            creation_time,
            updata_time
            update_time
        from jinhui_intendant_type
        where
            id=#{id}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiMicroVolunteeringMapper.xml
New file
@@ -0,0 +1,142 @@
<?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.panzhihua.service_jinhui_community.dao.JinhuiMicroVolunteeringDao">
    <resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiMicroVolunteering" id="itemMap">
        <result property="id" column="id" />
        <result property="content" column="content" />
        <result property="userId" column="user_id" />
        <result property="wishTypeId" column="wish_type_id" />
        <result property="userName" column="user_name" />
        <result property="userPhone" column="user_phone" />
        <result property="creationTime" column="creation_time" />
        <result property="updateTime" column="update_time" />
        <result property="imgUrl" column="img_url" />
    </resultMap>
    <!-- 分页查询 -->
    <select id="getList" resultMap="itemMap">
        select
            id,
            content,
            user_id,
            wish_type_id,
            user_name,
            user_phone,
            img_url,
            created_time,
            update_time
        from jinhui_micro_volunteering
        <where>
            <if test="intendantType !=null and intendantType !='' ">
                intendant_type=#{intendantType}
            </if>
        </where>
        order by creation_time desc
    </select>
    <select id="getDetails" resultMap="itemMap">
        select
            id,
            content,
            user_id,
            wish_type_id,
            user_name,
            user_phone,
            img_url,
            created_time,
            update_time
        from jinhui_micro_volunteering
        where
            id=#{id}
    </select>
    <insert id="addData">
        insert into jinhui_micro_volunteering
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="item.id != null and item.id != '' ">
                id,
            </if>
            <if test="item.content != null and item.content != '' ">
                content,
            </if>
            <if test="item.userId != null and item.userId != '' ">
                user_id,
            </if>
            <if test="item.wishTypeId != null and item.wishTypeId != '' ">
                wish_type_id,
            </if>
            <if test="item.userName != null and item.userName != '' ">
                user_name,
            </if>
            <if test="item.userPhone != null and item.userPhone != '' ">
                user_phone,
            </if>
            <if test="item.imgUrl != null and item.imgUrl != '' ">
                img_url,
            </if>
            creation_time
        </trim>
        values
        <trim prefix="("  suffix=")" suffixOverrides=",">
            <if test="item.id != null and item.id != '' ">
                #{item.id},
            </if>
            <if test="item.content != null and item.content != '' ">
                #{item.content},
            </if>
            <if test="item.userId != null and item.userId != '' ">
                #{item.userId},
            </if>
            <if test="item.wishTypeId != null and item.wishTypeId != '' ">
                #{item.wishTypeId},
            </if>
            <if test="item.userName != null and item.userName != '' ">
                #{item.userName},
            </if>
            <if test="item.userPhone != null and item.userPhone != '' ">
                #{item.userPhone},
            </if>
            <if test="item.imgUrl != null and item.imgUrl != '' ">
                #{item.imgUrl},
            </if>
            sysdate()
        </trim>
    </insert>
    <update id="editData">
        update jinhui_micro_volunteering
        <set>
            <if test="item.id != null and item.id != '' ">
                id=#{item.id},
            </if>
            <if test="item.content != null and item.content != '' ">
                content=#{item.content},
            </if>
            <if test="item.userId != null and item.userId != '' ">
                user_id=#{item.userId},
            </if>
            <if test="item.wishTypeId != null and item.wishTypeId != '' ">
                wish_type_id=#{item.wishTypeId},
            </if>
            <if test="item.userName != null and item.userName != '' ">
                user_name=#{item.userName},
            </if>
            <if test="item.userPhone != null and item.userPhone != '' ">
                user_phone=#{item.userPhone},
            </if>
            <if test="item.imgUrl != null and item.imgUrl != '' ">
                img_url=#{item.imgUrl},
            </if>
            update_time=sysdate()
        </set>
        where id = #{item.id}
    </update>
    <delete id="expurgateData" parameterType="String">
        delete from jinhui_micro_volunteering where id=#{id}
    </delete>
</mapper>