Sfoglia il codice sorgente

增加apply info 报名相关组件

周箭河 6 anni fa
parent
commit
0b00fec169

+ 22 - 0
src/main/java/com/ym/mec/collectfee/controller/GroupController.java

@@ -0,0 +1,22 @@
+package com.ym.mec.collectfee.controller;
+
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 乐团
+ */
+@RestController
+@RequestMapping("group")
+public class GroupController {
+
+    /**
+     * 乐团报名
+     */
+    @PostMapping("/apply")
+    public void apply() {
+
+    }
+
+}

+ 11 - 0
src/main/java/com/ym/mec/collectfee/dao/ApplyInfoDao.java

@@ -0,0 +1,11 @@
+package com.ym.mec.collectfee.dao;
+
+import com.ym.mec.collectfee.common.dao.BaseDAO;
+import com.ym.mec.collectfee.entity.ApplyInfo;
+import org.springframework.stereotype.Component;
+
+@Component
+public interface ApplyInfoDao extends BaseDAO<Integer, ApplyInfo> {
+
+	
+}

+ 191 - 0
src/main/java/com/ym/mec/collectfee/entity/ApplyInfo.java

@@ -0,0 +1,191 @@
+package com.ym.mec.collectfee.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(apply_info):
+ */
+public class ApplyInfo {
+
+	/**  */
+	private Integer id;
+	
+	/** 学生姓名 */
+	private String name;
+	
+	/** 性别 */
+	private Integer sex;
+	
+	/** 生日 */
+	private java.util.Date birthday;
+	
+	/** 城市 */
+	private String city;
+	
+	/** 学校编号 */
+	private String school;
+	
+	/** 年级 */
+	private String grade;
+	
+	/** 班级 */
+	private String gclass;
+	
+	/** 家长手机号 */
+	private String mobile;
+	
+	/** 科目id */
+	private Integer subId;
+	
+	/** 是否服从调剂 0 否 1是 */
+	private Integer isadjust;
+	
+	/** 家长姓名 */
+	private String parentName;
+	
+	/** 家长工作单位 */
+	private String parentCompany;
+	
+	/** 辅件,多个用逗号分隔 */
+	private Integer status;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setName(String name){
+		this.name = name;
+	}
+	
+	public String getName(){
+		return this.name;
+	}
+			
+	public void setSex(Integer sex){
+		this.sex = sex;
+	}
+	
+	public Integer getSex(){
+		return this.sex;
+	}
+			
+	public void setBirthday(java.util.Date birthday){
+		this.birthday = birthday;
+	}
+	
+	public java.util.Date getBirthday(){
+		return this.birthday;
+	}
+			
+	public void setCity(String city){
+		this.city = city;
+	}
+	
+	public String getCity(){
+		return this.city;
+	}
+			
+	public void setSchool(String school){
+		this.school = school;
+	}
+	
+	public String getSchool(){
+		return this.school;
+	}
+			
+	public void setGrade(String grade){
+		this.grade = grade;
+	}
+	
+	public String getGrade(){
+		return this.grade;
+	}
+			
+	public void setGclass(String gclass){
+		this.gclass = gclass;
+	}
+	
+	public String getGclass(){
+		return this.gclass;
+	}
+			
+	public void setMobile(String mobile){
+		this.mobile = mobile;
+	}
+	
+	public String getMobile(){
+		return this.mobile;
+	}
+			
+	public void setSubId(Integer subId){
+		this.subId = subId;
+	}
+	
+	public Integer getSubId(){
+		return this.subId;
+	}
+			
+	public void setIsadjust(Integer isadjust){
+		this.isadjust = isadjust;
+	}
+	
+	public Integer getIsadjust(){
+		return this.isadjust;
+	}
+			
+	public void setParentName(String parentName){
+		this.parentName = parentName;
+	}
+	
+	public String getParentName(){
+		return this.parentName;
+	}
+			
+	public void setParentCompany(String parentCompany){
+		this.parentCompany = parentCompany;
+	}
+	
+	public String getParentCompany(){
+		return this.parentCompany;
+	}
+			
+	public void setStatus(Integer status){
+		this.status = status;
+	}
+	
+	public Integer getStatus(){
+		return this.status;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 8 - 0
src/main/java/com/ym/mec/collectfee/service/ApplyInfoService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.collectfee.service;
+
+import com.ym.mec.collectfee.common.service.BaseService;
+import com.ym.mec.collectfee.entity.ApplyInfo;
+
+public interface ApplyInfoService extends BaseService<Integer, ApplyInfo> {
+
+}

+ 24 - 0
src/main/java/com/ym/mec/collectfee/service/impl/ApplyInfoServiceImpl.java

@@ -0,0 +1,24 @@
+package com.ym.mec.collectfee.service.impl;
+
+
+import com.ym.mec.collectfee.common.dao.BaseDAO;
+import com.ym.mec.collectfee.common.service.impl.BaseServiceImpl;
+import com.ym.mec.collectfee.dao.ApplyInfoDao;
+import com.ym.mec.collectfee.entity.ApplyInfo;
+import com.ym.mec.collectfee.service.ApplyInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import org.springframework.stereotype.Service;
+
+@Service
+public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> implements ApplyInfoService {
+	
+	@Autowired
+	private ApplyInfoDao applyInfoDao;
+
+	@Override
+	public BaseDAO<Integer, ApplyInfo> getDAO() {
+		return applyInfoDao;
+	}
+	
+}

+ 67 - 0
src/main/resources/config/mybatis/ApplyInfoMapper.xml

@@ -0,0 +1,67 @@
+<?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.ym.mec.collectfee.dal.dao.ApplyInfoDao">
+	
+	<resultMap type="com.ym.mec.collectfee.api.entity.ApplyInfo" id="ApplyInfo">
+		<result column="id_" property="id" />
+		<result column="name" property="name" />
+		<result column="sex" property="sex" />
+		<result column="birthday" property="birthday" />
+		<result column="city" property="city" />
+		<result column="school" property="school" />
+		<result column="grade" property="grade" />
+		<result column="gClass" property="gclass" />
+		<result column="mobile" property="mobile" />
+		<result column="sub_id" property="subId" />
+		<result column="isAdjust" property="isadjust" />
+		<result column="parent_name" property="parentName" />
+		<result column="parent_company" property="parentCompany" />
+		<result column="status" property="status" />
+		<result column="update_time" property="updateTime" />
+		<result column="create_time" property="createTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="ApplyInfo" >
+		SELECT * FROM apply_info WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="ApplyInfo">
+		SELECT * FROM apply_info ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.collectfee.api.entity.ApplyInfo" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO apply_info (id_,name,sex,birthday,city,school,grade,gClass,mobile,sub_id,isAdjust,parent_name,parent_company,status,update_time,create_time) VALUES(#{id},#{name},#{sex},#{birthday},#{city},#{school},#{grade},#{gclass},#{mobile},#{subId},#{isadjust},#{parentName},#{parentCompany},#{status},#{updateTime},#{createTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.collectfee.api.entity.ApplyInfo">
+		UPDATE apply_info SET birthday = #{birthday},parent_name = #{parentName},parent_company = #{parentCompany},create_time = #{createTime},id_ = #{id},city = #{city},sub_id = #{subId},sex = #{sex},mobile = #{mobile},update_time = #{updateTime},gClass = #{gclass},school = #{school},grade = #{grade},name = #{name},isAdjust = #{isadjust},status = #{status} WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM apply_info WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="ApplyInfo" parameterType="map">
+		SELECT * FROM apply_info ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM apply_info
+	</select>
+</mapper>