Commit 864c58da authored by licc's avatar licc

接口定义

parent 0a2a9791
package cn.wisenergy.mapper;
import cn.wisenergy.model.app.Advertising;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
public interface AdvertisingMapper extends BaseMapper<Advertising> {
/**
* 添加广告
*
* @param advertising 广告信息
* @return 广告信息
*/
Advertising add(Advertising advertising);
/**
* 编辑广告
*
* @param advertising 广告信息
* @return 结果
*/
int edit(Advertising advertising);
/**
* 删除广告
*
* @param id 广告id
* @return 结果
*/
int delById(@Param("id") Integer id);
}
package cn.wisenergy.mapper;
import cn.wisenergy.model.app.LoginRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
public interface LoginRecordMapper extends BaseMapper<LoginRecord> {
/**
* 添加登录信息
* @param loginRecord 登录信息
* @return 登录信息
*/
LoginRecord add(LoginRecord loginRecord);
/**
* 编辑
* @param loginRecord 登录信息
* @return 结果
*/
int edit(LoginRecord loginRecord);
/**
* 删除登录记录
* @param id 记录id
* @return 结果
*/
int delById(@Param("id") Integer id);
}
package cn.wisenergy.mapper;
import cn.wisenergy.model.app.ScoreInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
public interface ScoreInfoMapper extends BaseMapper<ScoreInfo> {
/**
* 添加考生成绩
*
* @param scoreInfo 成绩信息
* @return 成绩信息
*/
ScoreInfo add(ScoreInfo scoreInfo);
/**
* 编辑考生成绩
*
* @param scoreInfo 成绩信息
* @return 结果
*/
int edit(ScoreInfo scoreInfo);
/**
* 删除考生成绩
*
* @param id 成绩id
* @return 结果
*/
int delById(@Param("id") Integer id);
}
package cn.wisenergy.mapper;
import cn.wisenergy.model.app.Volunteer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface VolunteerMapper extends BaseMapper<Volunteer> {
Volunteer add(Volunteer volunteer);
}
<?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.wisenergy.mapper.AdvertisingMapper">
<resultMap id="advertisingMap" type="cn.wisenergy.model.app.Advertising">
<id column="id" property="id"/>
<result column="company_name" property="companyName"/>
<result column="status" property="status"/>
<result column="website" property="website"/>
<result column="is_have_image" property="isHaveImage"/>
<result column="type" property="type"/>
<result column="image" property="image"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="table">
user
</sql>
<sql id="cols_all">
id,
<include refid="cols_exclude_id"/>
</sql>
<sql id="cols_exclude_id">
company_name,status, website,is_have_image,type,image, create_time,update_time
</sql>
<sql id="vals">
#{companyName},#{status},#{website},#{isHaveImage},#{type},#{image},now(),now()
</sql>
<sql id="updateCondition">
<if test="companyName != null">company_name = #{companyName},</if>
<if test="status != null">status =#{status},</if>
<if test="website != null">website =#{website},</if>
<if test="isHaveImage != null">is_have_image =#{isHaveImage},</if>
<if test="type != null">type =#{type},</if>
<if test="image != null">image =#{image},</if>
update_time =now()
</sql>
<sql id="criteria">
<if test="id != null">id = #{id}</if>
<if test="companyName != null">and company_name = #{companyName}</if>
<if test="status != null">and status =#{status}</if>
<if test="website != null">and website =#{website}</if>
<if test="isHaveImage != null">and is_have_image =#{isHaveImage}</if>
<if test="type != null">and type =#{type}</if>
<if test="image != null">and image =#{image}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= update_time</if>
</sql>
<insert id="add" parameterType="cn.wisenergy.model.app.Advertising" keyProperty="id" useGeneratedKeys="true">
insert into
<include refid="table"/>
(<include refid="cols_exclude_id"/>)
value(
<include refid="vals"/>
)
</insert>
<update id="edit" parameterType="cn.wisenergy.model.app.Advertising">
UPDATE
<include refid="table"/>
<set>
<include refid="updateCondition"/>
</set>
<where>
id = #{id}
</where>
</update>
<delete id="delById" parameterType="java.lang.Integer">
delete from
<include refid="table"/>
where id = #{id}
</delete>
</mapper>
<?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.wisenergy.mapper.LoginRecordMapper">
<resultMap id="advertisingMap" type="cn.wisenergy.model.app.LoginRecord">
<id column="id" property="id"/>
<result column="user_id" property="userId"/>
<result column="type" property="type"/>
<result column="ip" property="ip"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="table">
login_record
</sql>
<sql id="cols_all">
id,
<include refid="cols_exclude_id"/>
</sql>
<sql id="cols_exclude_id">
user_id,type, ip, create_time,update_time
</sql>
<sql id="vals">
#{userId},#{type},#{ip},now(),now()
</sql>
<sql id="updateCondition">
<if test="userId != null">user_id = #{userId},</if>
<if test="type != null">type =#{type},</if>
<if test="ip != null">ip =#{ip},</if>
update_time =now()
</sql>
<sql id="criteria">
<if test="id != null">id = #{id}</if>
<if test="userId != null">and user_id = #{userId}</if>
<if test="type != null">and type =#{type}</if>
<if test="ip != null">and ip =#{ip}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= update_time</if>
</sql>
<insert id="add" parameterType="cn.wisenergy.model.app.LoginRecord" keyProperty="id" useGeneratedKeys="true">
insert into
<include refid="table"/>
(<include refid="cols_exclude_id"/>)
value(
<include refid="vals"/>
)
</insert>
<update id="edit" parameterType="cn.wisenergy.model.app.LoginRecord">
UPDATE
<include refid="table"/>
<set>
<include refid="updateCondition"/>
</set>
<where>
id = #{id}
</where>
</update>
<delete id="delById" parameterType="java.lang.Integer">
delete from
<include refid="table"/>
where id = #{id}
</delete>
</mapper>
<?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.wisenergy.mapper.ScoreInfoMapper">
<resultMap id="userMap" type="cn.wisenergy.model.app.ScoreInfo">
<id column="id" property="id"/>
<result column="user_id" property="userId"/>
<result column="culture_grade" property="cultureGrade"/>
<result column="major_grade" property="majorGrade"/>
<result column="language_grade" property="languageGrade"/>
<result column="math_grade" property="mathGrade"/>
<result column="english_grade" property="englishGrade"/>
<result column="physics_grade" property="physicsGrade"/>
<result column="chemistry_grade" property="chemistryGrade"/>
<result column="biology_grade" property="biologyGrade"/>
<result column="history_grade" property="historyGrade"/>
<result column="geography_grade" property="geographyGrade"/>
<result column="politics_grade" property="politicsGrade"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="table">
user
</sql>
<sql id="cols_all">
id,
<include refid="cols_exclude_id"/>
</sql>
<sql id="cols_exclude_id">
user_id,culture_grade, major_grade,language_grade,math_grade,english_grade, physics_grade,chemistry_grade,
biology_grade,history_grade,geography_grade,politics_grade, create_time,update_time
</sql>
<sql id="vals">
#{userId},#{cultureGrade},#{majorGrade},#{languageGrade},#{mathGrade},#{englishGrade},#{physicsGrade},
#{chemistryGrade},#{biologyGrade}, #{historyGrade},#{geographyGrade},#{politicsGrade},now(),now()
</sql>
<sql id="updateCondition">
<if test="userId != null">user_id = #{userId},</if>
<if test="cultureGrade != null">culture_grade =#{cultureGrade},</if>
<if test="majorGrade != null">major_grade =#{majorGrade},</if>
<if test="languageGrade != null">language_grade =#{languageGrade},</if>
<if test="mathGrade != null">math_grade =#{mathGrade},</if>
<if test="englishGrade != null">english_grade =#{englishGrade},</if>
<if test="physicsGrade != null">physics_grade = #{physicsGrade},</if>
<if test="chemistryGrade != null">chemistry_grade = #{chemistryGrade},</if>
<if test="biologyGrade != null">biology_grade = #{biologyGrade},</if>
<if test="historyGrade != null">history_grade = #{historyGrade},</if>
<if test="geographyGrade != null">geography_grade = #{geographyGrade},</if>
<if test="politicsGrade != null">politics_grade = #{politicsGrade},</if>
update_time =now()
</sql>
<sql id="criteria">
<if test="id != null">id = #{id}</if>
<if test="userId != null">and user_id = #{userId}</if>
<if test="cultureGrade != null">and culture_grade =#{cultureGrade}</if>
<if test="majorGrade != null">and major_grade =#{majorGrade}</if>
<if test="languageGrade != null">and language_grade =#{languageGrade}</if>
<if test="mathGrade != null">and math_grade =#{mathGrade}</if>
<if test="englishGrade != null">and english_grade =#{englishGrade}</if>
<if test="physicsGrade != null">and physics_grade = #{physicsGrade}</if>
<if test="chemistryGrade != null">and chemistry_grade = #{chemistryGrade}</if>
<if test="biologyGrade != null">and biology_grade = #{biologyGrade}</if>
<if test="historyGrade != null">and history_grade = #{historyGrade}</if>
<if test="geographyGrade != null">and geography_grade = #{geographyGrade}</if>
<if test="politicsGrade != null">and politics_grade = #{politicsGrade}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= update_time</if>
</sql>
<insert id="add" parameterType="cn.wisenergy.model.app.ScoreInfo" keyProperty="id" useGeneratedKeys="true">
insert into
<include refid="table"/>
(<include refid="cols_exclude_id"/>)
value(
<include refid="vals"/>
)
</insert>
<update id="edit" parameterType="cn.wisenergy.model.app.ScoreInfo">
UPDATE
<include refid="table"/>
<set>
<include refid="updateCondition"/>
</set>
<where>
id = #{id}
</where>
</update>
<delete id="delById" parameterType="java.lang.Integer">
delete from
<include refid="table"/>
where id = #{id}
</delete>
</mapper>
...@@ -7,11 +7,10 @@ ...@@ -7,11 +7,10 @@
<result column="user_name" property="userName"/> <result column="user_name" property="userName"/>
<result column="password" property="password"/> <result column="password" property="password"/>
<result column="phone" property="phone"/> <result column="phone" property="phone"/>
<result column="head_image" property="headImage"/>
<result column="sex" property="sex"/> <result column="sex" property="sex"/>
<result column="school" property="school"/> <result column="school" property="school"/>
<result column="student_type" property="studentType"/> <result column="student_type" property="studentType"/>
<result column="culture_grade" property="cultureGrade"/>
<result column="major_grade" property="majorGrade"/>
<result column="query_limit" property="queryLimit"/> <result column="query_limit" property="queryLimit"/>
<result column="money_amount" property="moneyAmount"/> <result column="money_amount" property="moneyAmount"/>
<result column="is_delete" property="isDelete"/> <result column="is_delete" property="isDelete"/>
...@@ -29,24 +28,25 @@ ...@@ -29,24 +28,25 @@
</sql> </sql>
<sql id="cols_exclude_id"> <sql id="cols_exclude_id">
user_name,password, phone,sex,school, student_type,culture_grade,major_grade,is_delete,query_limit, user_name,password, phone,head_image,sex,school, student_type,is_delete,query_limit,
money_amount,create_time,update_time money_amount,create_time,update_time
</sql> </sql>
<sql id="vals"> <sql id="vals">
#{userName},#{password},#{phone},#{sex},#{school},#{studentType},#{cultureGrade},#{majorGrade}, #{userName},#{password},#{phone},#{headImage},#{sex},#{school},#{studentType}, #{queryLimit},#{moneyAmount},
#{queryLimit},#{moneyAmount},#{isDelete},#{remark},now(),now() #{isDelete},now(),now()
</sql> </sql>
<sql id="updateCondition"> <sql id="updateCondition">
<if test="userName != null">user_name = #{userName},</if> <if test="userName != null">user_name = #{userName},</if>
<if test="password != null">password =#{password},</if> <if test="password != null">password =#{password},</if>
<if test="phone != null">phone =#{phone},</if> <if test="phone != null">phone =#{phone},</if>
<if test="headImage != null">head_image =#{headImage},</if>
<if test="sex != null">sex =#{sex},</if> <if test="sex != null">sex =#{sex},</if>
<if test="school != null">school =#{school},</if> <if test="school != null">school =#{school},</if>
<if test="studentType != null">inspector_name = #{studentType},</if> <if test="studentType != null">inspector_name = #{studentType},</if>
<if test="cultureGrade != null">culture_grade = #{cultureGrade},</if> <if test="queryLimit != null">query_limit = #{queryLimit},</if>
<if test="majorGrade != null">major_grade = #{majorGrade},</if> <if test="moneyAmount != null">money_amount = #{moneyAmount},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if> <if test="isDelete != null">is_delete = #{isDelete},</if>
update_time =now() update_time =now()
</sql> </sql>
...@@ -56,11 +56,12 @@ ...@@ -56,11 +56,12 @@
<if test="userName != null">and user_name = #{userName}</if> <if test="userName != null">and user_name = #{userName}</if>
<if test="password != null">and password =#{password}</if> <if test="password != null">and password =#{password}</if>
<if test="phone != null">and phone =#{phone}</if> <if test="phone != null">and phone =#{phone}</if>
<if test="headImage != null">and head_image =#{headImage}</if>
<if test="sex != null">and sex =#{sex}</if> <if test="sex != null">and sex =#{sex}</if>
<if test="school != null">and school =#{school}</if> <if test="school != null">and school =#{school}</if>
<if test="studentType != null">and inspector_name = #{studentType}</if> <if test="studentType != null">and inspector_name = #{studentType}</if>
<if test="cultureGrade != null">and culture_grade = #{cultureGrade}</if> <if test="queryLimit != null">and query_limit = #{queryLimit}</if>
<if test="majorGrade != null">and major_grade = #{majorGrade}</if> <if test="moneyAmount != null">and money_amount = #{moneyAmount}</if>
<if test="isDelete != null">and is_delete = #{isDelete}</if> <if test="isDelete != null">and is_delete = #{isDelete}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if> <if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= update_time</if> <if test="updateTime != null">and #{updateTime} &gt;= update_time</if>
......
<?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.wisenergy.mapper.VolunteerMapper">
<resultMap id="userMap" type="cn.wisenergy.model.app.Volunteer">
<id column="id" property="id"/>
<result column="major_name" property="majorName"/>
<result column="academy" property="academy"/>
<result column="course_demand" property="courseDemand"/>
<result column="nature" property="nature"/>
<result column="year_limit" property="yearLimit"/>
<result column="plan_num" property="planNum"/>
<result column="castArchives_num" property="castArchivesNum"/>
<result column="launch_num" property="launchNum"/>
<result column="lowest_mark" property="lowestMark"/>
<result column="lowest_rank" property="lowestRank"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="table">
volunteer
</sql>
<sql id="cols_all">
id,
<include refid="cols_exclude_id"/>
</sql>
<sql id="cols_exclude_id">
major_name,academy, course_demand,nature,year_limit,plan_num, castArchives_num,launch_num,lowest_mark,
lowest_rank,create_time,update_time
</sql>
<sql id="vals">
#{majorName},#{academy},#{courseDemand},#{nature},#{yearLimit},#{planNum},#{castArchivesNum}, #{launchNum},
#{lowestMark}, #{lowestRank},now(),now()
</sql>
<sql id="updateCondition">
<if test="majorName != null">major_name = #{majorName},</if>
<if test="academy != null">academy =#{academy},</if>
<if test="courseDemand != null">course_demand =#{courseDemand},</if>
<if test="nature != null">nature =#{nature},</if>
<if test="yearLimit != null">year_limit =#{yearLimit},</if>
<if test="planNum != null">plan_num =#{planNum},</if>
<if test="castArchivesNum != null">castArchives_num = #{castArchivesNum},</if>
<if test="launchNum != null">launch_num = #{launchNum},</if>
<if test="lowestMark != null">lowest_mark = #{lowestMark},</if>
<if test="lowestRank != null">lowestMark = #{lowestRank},</if>
update_time =now()
</sql>
<sql id="criteria">
<if test="id != null">id = #{id}</if>
<if test="majorName != null">and major_name = #{majorName}</if>
<if test="academy != null">and academy =#{academy}</if>
<if test="courseDemand != null">and course_demand =#{courseDemand}</if>
<if test="nature != null">and nature =#{nature}</if>
<if test="yearLimit != null">and year_limit =#{yearLimit}</if>
<if test="planNum != null">and plan_num =#{planNum}</if>
<if test="castArchivesNum != null">and castArchives_num = #{castArchivesNum}</if>
<if test="launchNum != null">and launch_num = #{launchNum}</if>
<if test="lowestMark != null">and lowest_mark = #{lowestMark}</if>
<if test="lowestRank != null">and lowestMark = #{lowestRank}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= update_time</if>
</sql>
<insert id="add" parameterType="cn.wisenergy.model.app.Volunteer" keyProperty="id" useGeneratedKeys="true">
insert into
<include refid="table"/>
(<include refid="cols_exclude_id"/>)
value(
<include refid="vals"/>
)
</insert>
</mapper>
package cn.wisenergy.model.app;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ Description: 广告实体类
* @ Author : 86187
* @ Date : 2021/1/7 16:01
*/
@Data
@ApiModel(value = "Advertising")
public class Advertising implements Serializable {
private static final long serialVersionUID = 5513428780946937905L;
/**
* 广告id
*/
@ApiModelProperty(value = "广告id",name = "id")
private Integer id;
/**
* 合作公司名称
*/
@ApiModelProperty(value = "合作公司名称",name = "companyName")
private String companyName;
/**
* 投放状态 0:暂停中 1:投放中
*/
@ApiModelProperty(value = "投放状态 0:暂停中 1:投放中",name = "status")
private Integer status;
/**
* 网址
*/
@ApiModelProperty(value = "网址",name = "website")
private String website;
/**
* 是否有宣传图 0:没有 1:有
*/
@ApiModelProperty(value = "是否有宣传图 0:没有 1:有",name = "isHaveImage")
private Integer isHaveImage;
/**
* 广告类型: 1:顶部广告 2:底部广告
*/
@ApiModelProperty(value = "广告类型: 1:顶部广告 2:底部广告",name = "type")
private Integer type;
/**
* 广告图片url
*/
@ApiModelProperty(value = "广告图片url",name = "image")
private String image;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间",name = "createTime")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间",name = "updateTime")
private Date updateTime;
}
package cn.wisenergy.model.app;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ Description: 用户登录操作记录实体类
* @ Author : 86187
* @ Date : 2021/1/7 15:09
*/
@Data
@ApiModel(value = "LoginRecord")
public class LoginRecord implements Serializable {
private static final long serialVersionUID = 3450614328514828031L;
/**
* 用户操作记录id
*/
@ApiModelProperty(value = "用户操作记录id", name = "id")
private Integer id;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id", name = "userId")
private Integer userId;
/**
* 类型 1:登录 2:退出
*/
@ApiModelProperty(value = "类型 1:登录 2:退出", name = "type")
private Integer type;
/**
* ip
*/
@ApiModelProperty(value = "ip", name = "ip")
private String ip;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间", name = "createTime")
private Date createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间", name = "updateTime")
private Date updateTime;
}
package cn.wisenergy.model.app;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*@ Description: 用户成绩实体类
*@ Author : 86187
*@ Date : 2021/1/7 14:56
*/
@Data
@ApiModel(value = "ScoreInfo")
public class ScoreInfo implements Serializable {
private static final long serialVersionUID = -8644045186424617919L;
/**
* 成绩id
*/
@ApiModelProperty(value = "成绩id",name = "id")
private Integer id;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id",name = "userId")
private Integer userId;
/**
* 文化成绩
*/
@ApiModelProperty(value = "文化成绩",name = "cultureGrade")
private String cultureGrade;
/**
* 专业成绩
*/
@ApiModelProperty(value = "专业成绩",name = "majorGrade")
private String majorGrade;
/**
* 语文成绩
*/
@ApiModelProperty(value = "语文成绩",name = "languageGrade")
private String languageGrade;
/**
* 数学成绩
*/
@ApiModelProperty(value = "数学成绩",name = "mathGrade")
private String mathGrade;
/**
* 英语成绩
*/
@ApiModelProperty(value = "英语成绩",name = "englishGrade")
private String englishGrade;
/**
* 物理成绩
*/
@ApiModelProperty(value = "物理成绩",name = "physicsGrade")
private String physicsGrade;
/**
* 化学成绩
*/
@ApiModelProperty(value = "化学成绩",name = "chemistryGrade")
private String chemistryGrade;
/**
* 生物成绩
*/
@ApiModelProperty(value = "生物成绩",name = "biologyGrade")
private String biologyGrade;
/**
* 历史成绩
*/
@ApiModelProperty(value = "历史成绩",name = "historyGrade")
private String historyGrade;
/**
* 地址成绩
*/
@ApiModelProperty(value = "地址成绩",name = "geographyGrade")
private String geographyGrade;
/**
* 政治成绩
*/
@ApiModelProperty(value = "政治成绩",name = "politicsGrade")
private String politicsGrade;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间",name = "creteTime")
private Date createTime;
/**
*更改时间
*/
@ApiModelProperty(value = "更改时间",name = "updateTime")
private Date updateTime;
}
...@@ -36,6 +36,11 @@ public class UserInfo extends BaseEntity implements Serializable { ...@@ -36,6 +36,11 @@ public class UserInfo extends BaseEntity implements Serializable {
*/ */
private String phone; private String phone;
/**
* 头像
*/
private String headImage;
/** /**
* 性别 * 性别
*/ */
...@@ -51,16 +56,6 @@ public class UserInfo extends BaseEntity implements Serializable { ...@@ -51,16 +56,6 @@ public class UserInfo extends BaseEntity implements Serializable {
*/ */
private Integer studentType; private Integer studentType;
/**
* 文化成绩
*/
private String cultureGrade;
/**
* 专业成绩
*/
private String majorGrade;
/** /**
* 用户剩余查询次数 * 用户剩余查询次数
*/ */
......
package cn.wisenergy.model.app;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ Description: 志愿实体类
* @ Author : 86187
* @ Date : 2021/1/7 15:15
*/
@Data
@ApiModel(value = "Volunteer")
public class Volunteer implements Serializable {
private static final long serialVersionUID = -7880251929353475087L;
/**
* 志愿主键id
*/
@ApiModelProperty(value = "志愿主键id", name = "id")
private Integer id;
/**
* 专业名称
*/
@ApiModelProperty(value = "专业名称", name = "majorName")
private String majorName;
/**
* 院校
*/
@ApiModelProperty(value = "院校", name = "academy")
private String academy;
/**
* 选考科目要求
*/
@ApiModelProperty(value = "选考科目要求", name = "courseDemand")
private String courseDemand;
/**
* 学校性质
*/
@ApiModelProperty(value = "学校性质", name = "nature")
private String nature;
/**
* 学年制(年)
*/
@ApiModelProperty(value = "学年制(年)", name = "yearLimit")
private Integer yearLimit;
/**
* 计划投档
*/
@ApiModelProperty(value = "计划投档", name = "planNum")
private Integer planNum;
/**
* 投档计划数
*/
@ApiModelProperty(value = "投档计划数", name = "投档计划数")
private Integer castArchivesNum;
/**
* 投出数量
*/
@ApiModelProperty(value = "投出数量", name = "launchNum")
private Integer launchNum;
/**
* 最低分
*/
@ApiModelProperty(value = "最低分", name = "lowestMark")
private String lowestMark;
/**
* 最低位次
*/
@ApiModelProperty(value = "最低位次", name = "lowestRank")
private String lowestRank;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间", name = "createTime")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间", name = "updateTime")
private Date updateTime;
}
package cn.wisenergy.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ Description: 用户列表展示dto
* @ Author : 86187
* @ Date : 2021/1/7 10:47
*/
@Data
@ApiModel(value = "UserInfoDto")
public class UserInfoDto implements Serializable {
private static final long serialVersionUID = 4791446858538524520L;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id", name = "userId")
private Integer userId;
/**
* 用户名称
*/
@ApiModelProperty(value = "用户名称", name = "userName")
private String userName;
/**
* 性别 0:男 1:女
*/
@ApiModelProperty(value = "性别 0:男 1:女", name = "sex")
private Integer sex;
/**
* 考生类型 1:文化课考生 2:美术生 3:体育生 4:文学编导考生
*/
@ApiModelProperty(value = "考生类型 1:文化课考生 2:美术生 3:体育生 4:文学编导考生", name = "studentType")
private Integer studentType;
/**
* 手机
*/
@ApiModelProperty(value = "手机号", name = "phone")
private String phone;
/**
* 文化成绩
*/
@ApiModelProperty(value = "文化成绩", name = "cultureGrade")
private String cultureGrade;
/**
* 专业成绩
*/
@ApiModelProperty(value = "专业成绩", name = "majorGrade")
private String majorGrade;
/**
* 用户剩余查询次数
*/
@ApiModelProperty(value = "用户剩余查询次数", name = "queryLimit")
private Integer queryLimit;
/**
* 用户充值总金额
*/
@ApiModelProperty(value = "用户充值总金额", name = "moneyAmount")
private String moneyAmount;
/**
* ip
*/
@ApiModelProperty(value = "ip", name = "ip")
private String ip;
/**
* 注册时间
*/
@ApiModelProperty(value = "注册时间", name = "registerTime")
private Date registerTime;
/**
* 用户最后登陆时间
*/
@ApiModelProperty(value = "用户最后登陆时间", name = "lastLoginTime")
private Date lastLoginTime;
}
package cn.wisenergy.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*@ Description: 广告分页查询Vo
*@ Author : 86187
*@ Date : 2021/1/7 17:13
*/
@Data
@ApiModel(value = "AdvertisingQueryVo")
public class AdvertisingQueryVo implements Serializable {
private static final long serialVersionUID = 8066049220539686367L;
/**
* 关键词
*/
@ApiModelProperty(value = "关键词", name = "keyword")
private String keyword;
/**
* 开始时间
*/
@ApiModelProperty(value = "开始时间", name = "startTime")
private Date startTime;
/**
* 结束时间
*/
@ApiModelProperty(value = "结束时间", name = "endTime")
private Date endTime;
/**
* 起始页
*/
@ApiModelProperty(value = "起始页", name = "pageNo")
private Integer pageNo;
/**
* 页大小
*/
@ApiModelProperty(value = "页大小", name = "pageSize")
private Integer pageSize;
private Integer startNum;
private Integer endNum;
}
package cn.wisenergy.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ Description: 用户信息Vo
* @ Author : 86187
* @ Date : 2021/1/7 11:14
*/
@Data
@ApiModel(value = "UserInfoVo")
public class UserInfoVo implements Serializable {
private static final long serialVersionUID = 6175769905046107052L;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id", name = "userId")
private Integer userId;
/**
* 用户名称
*/
@ApiModelProperty(value = "用户名称", name = "userName")
private String userName;
/**
* 性别 0:男 1:女
*/
@ApiModelProperty(value = "性别 0:男 1:女", name = "sex")
private Integer sex;
/**
* 考生类型 1:文化课考生 2:美术生 3:体育生 4:文学编导考生
*/
@ApiModelProperty(value = "考生类型 1:文化课考生 2:美术生 3:体育生 4:文学编导考生", name = "studentType")
private Integer studentType;
/**
* 手机
*/
@ApiModelProperty(value = "手机号", name = "phone")
private String phone;
/**
* 头像
*/
@ApiModelProperty(value = "头像", name = "headImage")
private String headImage;
/**
* 文化成绩
*/
@ApiModelProperty(value = "文化成绩", name = "cultureGrade")
private String cultureGrade;
/**
* 专业成绩
*/
@ApiModelProperty(value = "专业成绩", name = "majorGrade")
private String majorGrade;
/**
* 用户剩余查询次数
*/
@ApiModelProperty(value = "用户剩余查询次数", name = "queryLimit")
private Integer queryLimit;
/**
* 用户充值总金额
*/
@ApiModelProperty(value = "用户充值总金额", name = "moneyAmount")
private String moneyAmount;
}
package cn.wisenergy.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*@ Description: 用户分页查询Vo
*@ Author : 86187
*@ Date : 2021/1/7 11:30
*/
@Data
@ApiModel(value = "UserQueryVo")
public class UserQueryVo implements Serializable {
private static final long serialVersionUID = -3717746916267660740L;
/**
* 关键词
*/
@ApiModelProperty(value = "关键词", name = "keyword")
private String keyword;
/**
* 开始时间
*/
@ApiModelProperty(value = "开始时间", name = "startTime")
private Date startTime;
/**
* 结束时间
*/
@ApiModelProperty(value = "结束时间", name = "endTime")
private Date endTime;
/**
* 起始页
*/
@ApiModelProperty(value = "起始页", name = "pageNo")
private Integer pageNo;
/**
* 页大小
*/
@ApiModelProperty(value = "页大小", name = "pageSize")
private Integer pageSize;
private Integer startNum;
private Integer endNum;
}
package cn.wisenergy.service.app;
import cn.wisenergy.common.utils.R;
import cn.wisenergy.model.app.Advertising;
import cn.wisenergy.model.vo.AdvertisingQueryVo;
import com.github.pagehelper.PageInfo;
/**
* @ Description: 广告接口定义
* @ Author : 86187
* @ Date : 2021/1/7 17:08
*/
public interface AdvertisingService {
/**
* 添加广告
*
* @param advertising 广告信息
* @return 广告信息
*/
R<Advertising> add(Advertising advertising);
/**
* 编辑广告
*
* @param advertising 广告信息
* @return true 成功 false 失败
*/
R<Boolean> edit(Advertising advertising);
/**
* 获取详情
*
* @param id 广告id
* @return 详情
*/
R<Advertising> getById(Integer id);
/**
* 获取广告分页列表
*
* @param advertisingQueryVo 分页参数
* @return 分页结果集
*/
R<PageInfo<Advertising>> getList(AdvertisingQueryVo advertisingQueryVo);
/**
* 开始/暂停投放广告
*
* @param id 广告id
* @param status 1 :投放 2:暂停投放
* @return true 成功 false 失败
*/
R<Boolean> putIn(Integer id, Integer status);
}
package cn.wisenergy.service.app;
import cn.wisenergy.common.utils.R;
/**
* @ Description: 用户登录
* @ Author : 86187
* @ Date : 2021/1/7 14:20
*/
public interface UserLoginService {
/**
* 用户注册接口
*
* @param phone 手机号
* @param password 密码
* @return true 成功 false 失败
*/
R<Boolean> register(String phone, String password);
/**
* 手机验证码登录
*
* @param code 验证码
* @param phone 手机号
* @return true 成功 false 失败
*/
R<Boolean> loginCode(String code, String phone);
/**
* 手机密码登录
*
* @param phone 手机号
* @param password 密码
* @return true 成功 false 失败
*/
R<Boolean> login(String phone, String password);
/**
* 退出登录
*
* @param userId 用户id
* @return true 成功 false 失败
*/
R<Boolean> loginOut(Integer userId);
/**
* 修改密码
*
* @param userId 用户id
* @param newPassword 新密码
* @param oldPassword 旧密码
* @return true 成功 false 失败
*/
R<Boolean> updatePassword(Integer userId, String newPassword, String oldPassword);
/**
* 重置密码
*
* @param userId 用户id
* @return true 成功 false 失败
*/
R<Boolean> resetPassword(Integer userId);
/**
* 短信重置密码
*
* @param code 用户id
* @param phone 手机号
* @return true 成功 false 失败
*/
R<Boolean> notePassword(Integer code,String phone);
}
...@@ -3,21 +3,57 @@ package cn.wisenergy.service.app; ...@@ -3,21 +3,57 @@ package cn.wisenergy.service.app;
import cn.wisenergy.common.utils.R; import cn.wisenergy.common.utils.R;
import cn.wisenergy.model.app.UserInfo; import cn.wisenergy.model.app.UserInfo;
import cn.wisenergy.model.dto.UserInfoDto;
import java.util.List; import cn.wisenergy.model.vo.UserInfoVo;
import cn.wisenergy.model.vo.UserQueryVo;
import com.github.pagehelper.PageInfo;
/** /**
*@ Description: 用户接口 * @ Description: 用户接口
*@ Author : 86187 * @ Author : 86187
*@ Date : 2021/1/6 16:08 * @ Date : 2021/1/6 16:08
*/ */
public interface UserService { public interface UserService {
/** /**
* 获取用户列表 * 获取用户列表
* @param keyword 关键字 *
* @return 用户列表 * @param queryVo 查询条件
* @return 用户列表集合
*/
R<PageInfo<UserInfoDto>> getUserList(UserQueryVo queryVo);
/**
* 添加用户信息
*
* @param userInfo 用户信息
* @return 用户信息
*/
R<UserInfoVo> add(UserInfo userInfo);
/**
* 编辑用户信息
*
* @param userInfo 用户信息
* @return true 成功 false 失败
*/
R<Boolean> edit(UserInfo userInfo);
/**
* 删除用户
*
* @param userId 用户id
* @return true 成功 false 失败
*/
R<Boolean> delete(Integer userId);
/**
* 获取用户信息
*
* @param id 用户id
* @return 用户信息
*/ */
R<List<UserInfo>> getUserList(String keyword); R<UserInfoVo> getById(Integer id);
} }
package cn.wisenergy.service.app.impl;
import cn.wisenergy.common.utils.R;
import cn.wisenergy.mapper.AdvertisingMapper;
import cn.wisenergy.model.app.Advertising;
import cn.wisenergy.model.vo.AdvertisingQueryVo;
import cn.wisenergy.service.app.AdvertisingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
*@ Description: 广告接口是实现
*@ Author : 86187
*@ Date : 2021/1/7 17:07
*/
@Slf4j
@Service
public class AdvertisingServiceImpl extends ServiceImpl<AdvertisingMapper, Advertising> implements AdvertisingService {
@Override
public R<Advertising> add(Advertising advertising) {
return null;
}
@Override
public R<Boolean> edit(Advertising advertising) {
return null;
}
@Override
public R<Advertising> getById(Integer id) {
return null;
}
@Override
public R<PageInfo<Advertising>> getList(AdvertisingQueryVo advertisingQueryVo) {
return null;
}
@Override
public R<Boolean> putIn(Integer id, Integer status) {
return null;
}
}
package cn.wisenergy.service.app.impl;
import cn.wisenergy.common.utils.R;
import cn.wisenergy.mapper.UsersMapper;
import cn.wisenergy.model.app.UserInfo;
import cn.wisenergy.service.app.UserLoginService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
*@ Description: 用户登录相关接口实现
*@ Author : 86187
*@ Date : 2021/1/7 14:22
*/
@Service
@Slf4j
public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> implements UserLoginService {
@Override
public R<Boolean> register(String phone, String password) {
return null;
}
@Override
public R<Boolean> loginCode(String code, String phone) {
return null;
}
@Override
public R<Boolean> login(String code, String phone) {
return null;
}
@Override
public R<Boolean> loginOut(Integer userId) {
return null;
}
@Override
public R<Boolean> updatePassword(Integer userId, String newPassword, String oldPassword) {
return null;
}
@Override
public R<Boolean> resetPassword(Integer userId) {
return null;
}
@Override
public R<Boolean> notePassword(Integer code, String phone) {
return null;
}
}
package cn.wisenergy.service.app.impl; package cn.wisenergy.service.app.impl;
import cn.wisenergy.common.constant.CommonAttributes;
import cn.wisenergy.common.utils.R; import cn.wisenergy.common.utils.R;
import cn.wisenergy.mapper.UsersMapper; import cn.wisenergy.mapper.UsersMapper;
import cn.wisenergy.model.app.UserInfo; import cn.wisenergy.model.app.UserInfo;
import cn.wisenergy.model.dto.UserInfoDto;
import cn.wisenergy.model.vo.UserInfoVo;
import cn.wisenergy.model.vo.UserQueryVo;
import cn.wisenergy.service.app.UserService; import cn.wisenergy.service.app.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
*@ Description: 用户接口实现 * @ Description: 用户接口实现
*@ Author : 86187 * @ Author : 86187
*@ Date : 2021/1/6 16:11 * @ Date : 2021/1/6 16:11
*/ */
@Service @Service
@Slf4j @Slf4j
public class UserServiceImpl extends ServiceImpl<UsersMapper, UserInfo> implements UserService { public class UserServiceImpl extends ServiceImpl<UsersMapper, UserInfo> implements UserService {
@Override
public R<PageInfo<UserInfoDto>> getUserList(UserQueryVo queryVo) {
log.info("volunteer_service[]UserServiceImpl[]getUserList[]input.param.queryVo:" + queryVo);
if (null == queryVo) {
return R.error("入参不能为空!");
}
pageHandle(queryVo);
int total=0;
List<UserInfoDto> list=new ArrayList<>();
PageInfo<UserInfoDto> info = new PageInfo<>();
info.setPageSize(queryVo.getPageSize());
info.setPageNum(queryVo.getPageNo());
info.setTotal(total);
info.setList(list);
return R.ok(info);
}
@Override
public R<UserInfoVo> add(UserInfo userInfo) {
return null;
}
@Override @Override
public R<List<UserInfo>> getUserList(String keyword) { public R<Boolean> edit(UserInfo userInfo) {
return null; return null;
} }
@Override
public R<Boolean> delete(Integer userId) {
return null;
}
@Override
public R<UserInfoVo> getById(Integer id) {
return null;
}
/**
* 分页处理方法
* @param orderQueryVo 参数
*/
private void pageHandle(UserQueryVo orderQueryVo) {
Integer pageNum = orderQueryVo.getPageNo();
Integer pageSize = orderQueryVo.getPageSize();
if (null == pageSize || pageSize == 0) {
pageSize = 10;
}
if (null == pageNum || pageNum == 0) {
pageNum = 1;
}
Integer endNum = pageSize;
Integer startNum = (pageNum - CommonAttributes.NUM_ONE) * pageSize;
orderQueryVo.setEndNum(endNum);
orderQueryVo.setStartNum(startNum);
orderQueryVo.setPageNo(pageNum);
orderQueryVo.setPageSize(pageSize);
}
} }
...@@ -4,14 +4,19 @@ import io.swagger.annotations.Api; ...@@ -4,14 +4,19 @@ import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.net.InetAddress;
/** /**
*@ Description: 用户管理模块 * @ Description: 用户管理模
*@ Author : 86187 * @ Author : 86187
*@ Date : 2021/1/7 10:29 * @ Date : 2021/1/7 10:29
*/ */
@RestController @RestController
@Api(tags = "用户管理") @Api(tags = "用户管理")
@RequestMapping("/user") @RequestMapping("/user")
@Slf4j @Slf4j
public class UserController { public class UserController {
} }
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