Browse Source

新增限定项目sql

anderx 1 year ago
parent
commit
547c73cd47

+ 25 - 0
src/main/java/com/goafanti/common/dao/RestrictProjectMapper.java

@@ -0,0 +1,25 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.RestrictProject;
+
+/**
+* @author Administrator
+* @description 针对表【restrict_project(限定项目表)】的数据库操作Mapper
+* @createDate 2024-05-13 14:38:37
+* @Entity com.goafanti.common.model.RestrictProject
+*/
+public interface RestrictProjectMapper {
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(RestrictProject record);
+
+    int insertSelective(RestrictProject record);
+
+    RestrictProject selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(RestrictProject record);
+
+    int updateByPrimaryKey(RestrictProject record);
+
+}

+ 106 - 0
src/main/java/com/goafanti/common/mapper/RestrictProjectMapper.xml

@@ -0,0 +1,106 @@
+<?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.goafanti.common.dao.RestrictProjectMapper">
+
+    <resultMap id="BaseResultMap" type="com.goafanti.common.model.RestrictProject">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="pid" column="pid" jdbcType="VARCHAR"/>
+            <result property="uid" column="uid" jdbcType="VARCHAR"/>
+            <result property="aid" column="aid" jdbcType="VARCHAR"/>
+            <result property="type" column="type" jdbcType="INTEGER"/>
+            <result property="lockTime" column="lock_time" jdbcType="TIMESTAMP"/>
+            <result property="releaseTime" column="release_time" jdbcType="TIMESTAMP"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,pid,uid,
+        aid,type,lock_time,
+        release_time,create_time
+    </sql>
+
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from restrict_project
+        where  id = #{id,jdbcType=INTEGER} 
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete from restrict_project
+        where  id = #{id,jdbcType=INTEGER} 
+    </delete>
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RestrictProject" useGeneratedKeys="true">
+        insert into restrict_project
+        ( id,pid,uid
+        ,aid,type,lock_time
+        ,release_time,create_time)
+        values (#{id,jdbcType=INTEGER},#{pid,jdbcType=VARCHAR},#{uid,jdbcType=VARCHAR}
+        ,#{aid,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{lockTime,jdbcType=TIMESTAMP}
+        ,#{releaseTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP})
+    </insert>
+    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RestrictProject" useGeneratedKeys="true">
+        insert into restrict_project
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="pid != null">pid,</if>
+                <if test="uid != null">uid,</if>
+                <if test="aid != null">aid,</if>
+                <if test="type != null">type,</if>
+                <if test="lockTime != null">lock_time,</if>
+                <if test="releaseTime != null">release_time,</if>
+                <if test="createTime != null">create_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id,jdbcType=INTEGER},</if>
+                <if test="pid != null">#{pid,jdbcType=VARCHAR},</if>
+                <if test="uid != null">#{uid,jdbcType=VARCHAR},</if>
+                <if test="aid != null">#{aid,jdbcType=VARCHAR},</if>
+                <if test="type != null">#{type,jdbcType=INTEGER},</if>
+                <if test="lockTime != null">#{lockTime,jdbcType=TIMESTAMP},</if>
+                <if test="releaseTime != null">#{releaseTime,jdbcType=TIMESTAMP},</if>
+                <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.RestrictProject">
+        update restrict_project
+        <set>
+                <if test="pid != null">
+                    pid = #{pid,jdbcType=VARCHAR},
+                </if>
+                <if test="uid != null">
+                    uid = #{uid,jdbcType=VARCHAR},
+                </if>
+                <if test="aid != null">
+                    aid = #{aid,jdbcType=VARCHAR},
+                </if>
+                <if test="type != null">
+                    type = #{type,jdbcType=INTEGER},
+                </if>
+                <if test="lockTime != null">
+                    lock_time = #{lockTime,jdbcType=TIMESTAMP},
+                </if>
+                <if test="releaseTime != null">
+                    release_time = #{releaseTime,jdbcType=TIMESTAMP},
+                </if>
+                <if test="createTime != null">
+                    create_time = #{createTime,jdbcType=TIMESTAMP},
+                </if>
+        </set>
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.RestrictProject">
+        update restrict_project
+        set 
+            pid =  #{pid,jdbcType=VARCHAR},
+            uid =  #{uid,jdbcType=VARCHAR},
+            aid =  #{aid,jdbcType=VARCHAR},
+            type =  #{type,jdbcType=INTEGER},
+            lock_time =  #{lockTime,jdbcType=TIMESTAMP},
+            release_time =  #{releaseTime,jdbcType=TIMESTAMP},
+            create_time =  #{createTime,jdbcType=TIMESTAMP}
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+</mapper>

+ 164 - 0
src/main/java/com/goafanti/common/model/RestrictProject.java

@@ -0,0 +1,164 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 限定项目表
+ * @TableName restrict_project
+ */
+public class RestrictProject implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 项目编号
+     */
+    private String pid;
+
+    /**
+     * 客户编号
+     */
+    private String uid;
+
+    /**
+     * 归属人
+     */
+    private String aid;
+
+    /**
+     * 分类 0=公共限定,1=私有限定,2=签单限定
+     */
+    private Integer type;
+
+    /**
+     * 锁定时间
+     */
+    private Date lockTime;
+
+    /**
+     * 释放时间
+     */
+    private Date releaseTime;
+
+    /**
+     * 发起时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 项目编号
+     */
+    public String getPid() {
+        return pid;
+    }
+
+    /**
+     * 项目编号
+     */
+    public void setPid(String pid) {
+        this.pid = pid;
+    }
+
+    /**
+     * 客户编号
+     */
+    public String getUid() {
+        return uid;
+    }
+
+    /**
+     * 客户编号
+     */
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    /**
+     * 归属人
+     */
+    public String getAid() {
+        return aid;
+    }
+
+    /**
+     * 归属人
+     */
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    /**
+     * 分类 0=公共限定,1=私有限定,2=签单限定
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * 分类 0=公共限定,1=私有限定,2=签单限定
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * 锁定时间
+     */
+    public Date getLockTime() {
+        return lockTime;
+    }
+
+    /**
+     * 锁定时间
+     */
+    public void setLockTime(Date lockTime) {
+        this.lockTime = lockTime;
+    }
+
+    /**
+     * 释放时间
+     */
+    public Date getReleaseTime() {
+        return releaseTime;
+    }
+
+    /**
+     * 释放时间
+     */
+    public void setReleaseTime(Date releaseTime) {
+        this.releaseTime = releaseTime;
+    }
+
+    /**
+     * 发起时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 发起时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}