diff --git a/source/xzs/src/main/java/com/mindskip/xzs/domain/Industry.java b/source/xzs/src/main/java/com/mindskip/xzs/domain/Industry.java new file mode 100644 index 0000000..3113017 --- /dev/null +++ b/source/xzs/src/main/java/com/mindskip/xzs/domain/Industry.java @@ -0,0 +1,31 @@ +package com.mindskip.xzs.domain; + +import java.io.Serializable; + +/** + * t_industry + * @author + */ +public class Industry implements Serializable { + private Integer id; + + private String name; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} \ No newline at end of file diff --git a/source/xzs/src/main/java/com/mindskip/xzs/repository/IndustryMapper.java b/source/xzs/src/main/java/com/mindskip/xzs/repository/IndustryMapper.java new file mode 100644 index 0000000..3720992 --- /dev/null +++ b/source/xzs/src/main/java/com/mindskip/xzs/repository/IndustryMapper.java @@ -0,0 +1,29 @@ +package com.mindskip.xzs.repository; + +import com.mindskip.xzs.domain.Industry; +import com.mindskip.xzs.domain.Subject; +import com.mindskip.xzs.viewmodel.admin.industry.IndustryEditRequestVM; +import com.mindskip.xzs.viewmodel.admin.industry.IndustryPageRequestVM; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface IndustryMapper extends BaseMapper { + int deleteByPrimaryKey(Integer id); + + int insert(Industry record); + + int insertSelective(Industry record); + + Industry selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(Industry record); + + int updateByPrimaryKey(Industry record); + + List page(IndustryPageRequestVM requestVM); + + List allIndustry(); + +} \ No newline at end of file diff --git a/source/xzs/src/main/resources/mapper/IndustryMapper.xml b/source/xzs/src/main/resources/mapper/IndustryMapper.xml new file mode 100644 index 0000000..7cbc551 --- /dev/null +++ b/source/xzs/src/main/resources/mapper/IndustryMapper.xml @@ -0,0 +1,69 @@ + + + + + + + + + id, `name` + + + + delete from t_industry + where id = #{id,jdbcType=INTEGER} + + + insert into t_industry (`name`) + values (#{name,jdbcType=VARCHAR}) + + + insert into t_industry + + + `name`, + + + + + #{name,jdbcType=VARCHAR}, + + + + + update t_industry + + + `name` = #{name,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update t_industry + set `name` = #{name,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + + \ No newline at end of file