Browse Source

//..

private_deployment
xhxu 1 year ago
parent
commit
b5a5766717
4 changed files with 131 additions and 0 deletions
  1. +33
    -0
      suimangService/src/main/java/com/iformall/domain/po/UserBasicGlodConfig.java
  2. +38
    -0
      suimangService/src/main/java/com/iformall/enums/EnumGlodConfigType.java
  3. +12
    -0
      suimangService/src/main/java/com/iformall/mapper/UserBasicGlodConfigMapper.java
  4. +48
    -0
      suimangService/src/main/resources/mapper/UserBasicGlodConfigMapper.xml

+ 33
- 0
suimangService/src/main/java/com/iformall/domain/po/UserBasicGlodConfig.java View File

@@ -0,0 +1,33 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

@TableName(value = "user_basic_glod_config")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class UserBasicGlodConfig extends TenantEntity {

protected Long id;

@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="projectType")
private Integer projectType;

@io.swagger.annotations.ApiModelProperty(value="EnumGlodConfigType",name="type")
private Integer type;
@io.swagger.annotations.ApiModelProperty(value="",name="glodNum")
private Integer glodNum;

@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateDate")
private Date updateDate;

}

+ 38
- 0
suimangService/src/main/java/com/iformall/enums/EnumGlodConfigType.java View File

@@ -0,0 +1,38 @@
package com.iformall.enums;


/**
* @author
*/

public enum EnumGlodConfigType {

register(1,"注册"),
invite(2,"邀请"),
;

public static EnumGlodConfigType getEnum(Integer code) {
for (EnumGlodConfigType value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumGlodConfigType(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 12
- 0
suimangService/src/main/java/com/iformall/mapper/UserBasicGlodConfigMapper.java View File

@@ -0,0 +1,12 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.UserBasicGlodConfig;

import java.util.List;

public interface UserBasicGlodConfigMapper extends CommonMapper<UserBasicGlodConfig, Long>{
List<UserBasicGlodConfig> findList(UserBasicGlodConfig record);

}

+ 48
- 0
suimangService/src/main/resources/mapper/UserBasicGlodConfigMapper.xml View File

@@ -0,0 +1,48 @@
<?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.iformall.mapper.UserBasicGlodConfigMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.UserBasicGlodConfig">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="project_type" jdbcType="INTEGER" property="projectType" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="glod_num" jdbcType="INTEGER" property="glodNum" />
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,
`project_type`,`type`,`glod_num`,
`create_date`,`update_date`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1
<if test=" null != id "> and `id` = #{id} </if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != projectType "> and `project_type` = #{projectType} </if>
<if test=" null != type "> and `type` = #{type} </if>

<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
</sql>

<select id="findList" parameterType="com.iformall.domain.po.UserBasicGlodConfig" resultMap="BaseResultMap">
select <include refid="allColumns" />
from user_basic_glod_config
<include refid="dynamicWhereConditions" />
</select>

</mapper>

Loading…
Cancel
Save