Commit ff02c0b1 by 284718418@qq.com

民族字典 基础代码命名格式优化

parent 9a28f78b
package cn.timer.api.dto.yggl;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("nation_class")
@ApiModel("民族")
public class YgmzDto {
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="民族名称 ",example="民族名称")
private String name;
@ApiModelProperty(value="拼音",example="pinyin")
private String pinyin;
@ApiModelProperty(value="简写",example="PY")
private String letter;
@ApiModelProperty(value="这个才是排序",example="number")
private Integer number;
@ApiModelProperty(value="排序",example="排序")
private String sort;
}
package cn.timer.api.bean.clazz;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("nation_class")
@ApiModel("民族")
public class NationClass extends Model<NationClass> {
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="民族名称 ",example="民族名称")
private String name;
@ApiModelProperty(value="拼音",example="pinyin")
private String pinyin;
@ApiModelProperty(value="简写",example="PY")
private String letter;
@ApiModelProperty(value="这个才是排序",example="number")
private Integer number;
@ApiModelProperty(value="排序",example="排序")
private String sort;
}
package cn.timer.api.dao.yggl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgmzDto;
/**
* 民族表
* @author Tang 2019-11-15
*/
@Repository
public interface YgMzDtoMapper extends BaseMapper<YgmzDto> {
}
package cn.timer.api.dao.clazz;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.clazz.NationClass;
/**
* 民族表
* @author Tang 2019-11-15
*/
@Repository
public interface NationClassMapper extends BaseMapper<NationClass> {
}
<?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="cn.timer.api.dao.clazz.NationClassMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.clazz.NationClass" id="nationClassMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="pinyin" column="pinyin"/>
<result property="letter" column="letter"/>
<result property="number" column="number"/>
<result property="sort" column="sort"/>
</resultMap>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment