Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

This commit is contained in:
zhangchenbiao
2023-06-12 10:16:52 +08:00
16 changed files with 630 additions and 146 deletions

View File

@@ -0,0 +1,46 @@
package com.cool.store.dao;
import cn.hutool.core.bean.BeanUtil;
import com.cool.store.dto.content.ContentAddDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.dto.content.ContentUpdateDto;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.mapper.HyContentInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Deprecated
public class ContentDAO {
@Autowired
private HyContentInfoMapper contentInfoMapper;
public String addContentInfo(ContentAddDto dto) {
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
BeanUtil.copyProperties(dto, hyContentInfoDO);
hyContentInfoDO.setUpdateUserId(dto.getCreateUserId());
return Integer.toString(contentInfoMapper.insertSelective(hyContentInfoDO));
}
public void deleteContent(String contentId) {
contentInfoMapper.deleteSelective(contentId);
}
public void updateContent(ContentUpdateDto dto) {
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
BeanUtil.copyProperties(dto, hyContentInfoDO);
hyContentInfoDO.setId(Long.parseLong(dto.getContentId()));
contentInfoMapper.updateByPrimaryKeySelective(hyContentInfoDO);
}
public List<HyContentInfoDO> queryContentList(ContentQueryListDto dto) {
return contentInfoMapper.queryContentList(dto);
}
public HyContentInfoDO queryContentInfo(String contentId) {
return contentInfoMapper.queryContentInfo(contentId);
}
}

View File

@@ -1,8 +1,11 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.entity.HyContentInfoDO; import com.cool.store.entity.HyContentInfoDO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @author zhangchenbiao * @author zhangchenbiao
* @date 2023-05-29 03:50 * @date 2023-05-29 03:50
@@ -22,4 +25,22 @@ public interface HyContentInfoMapper {
* dateTime:2023-05-29 03:50 * dateTime:2023-05-29 03:50
*/ */
int updateByPrimaryKeySelective(@Param("record") HyContentInfoDO record); int updateByPrimaryKeySelective(@Param("record") HyContentInfoDO record);
/**
* 删除方法
* @param contentId
*/
void deleteSelective(@Param("contentId") String contentId);
/**
* 分页查询动态列表
* 根据传入参数匹配
*/
List<HyContentInfoDO> queryContentList(ContentQueryListDto dto);
/**
* 根据contentId查询动态详情
*/
HyContentInfoDO queryContentInfo(@Param("contentId") String contentId);
} }

View File

@@ -1,25 +1,34 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerInterviewDO; import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.vo.PartnerInterviewInfoVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
/** /**
* @author zhangchenbiao * @author zhangchenbiao
* @date 2023-05-29 03:52 * @date 2023-06-09 05:51
*/ */
public interface HyPartnerInterviewMapper { public interface HyPartnerInterviewMapper {
/** /**
* *
* 默认插入方法,只会给有值的字段赋值 * 默认插入方法,只会给有值的字段赋值
* 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null * 会对传进来的字段做判空处理如果字段为空则使用数据库默认字段或者null
* dateTime:2023-05-29 03:52 * dateTime:2023-06-09 05:51
*/ */
int insertSelective(@Param("record") HyPartnerInterviewDO record); int insertSelective(HyPartnerInterviewDO record);
/** /**
* *
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的 * 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2023-05-29 03:52 * dateTime:2023-06-09 05:51
*/ */
int updateByPrimaryKeySelective(@Param("record") HyPartnerInterviewDO record); int updateByPrimaryKeySelective(HyPartnerInterviewDO record);
/**
* 根据加盟商id查询面试信息
* @param partnerId
* @return
*/
PartnerInterviewInfoVO queryByPartnerId(@Param("partnerId") String partnerId);
} }

View File

@@ -100,40 +100,69 @@
<update id="updateByPrimaryKeySelective"> <update id="updateByPrimaryKeySelective">
update hy_content_info update hy_content_info
<set> <set>
<if test="record.contentTitle != null"> <if test="record.contentTitle != null and record.contentTitle != ''">
content_title = #{record.contentTitle}, content_title = #{record.contentTitle},
</if> </if>
<if test="record.subject != null"> <if test="record.subject != null and record.subject != ''">
subject = #{record.subject}, subject = #{record.subject},
</if> </if>
<if test="record.contentType != null"> <if test="record.contentType != null and record.contentType != ''">
content_type = #{record.contentType}, content_type = #{record.contentType},
</if> </if>
<if test="record.cover != null"> <if test="record.cover != null and record.cover != ''">
cover = #{record.cover}, cover = #{record.cover},
</if> </if>
<if test="record.status != null"> <if test="record.status != null and record.status != null">
status = #{record.status}, status = #{record.status},
</if> </if>
<if test="record.deleted != null"> <if test="record.deleted != null and record.deleted != ''">
deleted = #{record.deleted}, deleted = #{record.deleted},
</if> </if>
<if test="record.createTime != null"> <if test="record.createTime != null and record.createTime != ''">
create_time = #{record.createTime}, create_time = #{record.createTime},
</if> </if>
<if test="record.updateTime != null"> <if test="record.updateTime != null and record.updateTime != ''">
update_time = #{record.updateTime}, update_time = #{record.updateTime},
</if> </if>
<if test="record.createUserId != null"> <if test="record.createUserId != null and record.createUserId != ''">
create_user_id = #{record.createUserId}, create_user_id = #{record.createUserId},
</if> </if>
<if test="record.updateUserId != null"> <if test="record.updateUserId != null and record.updateUserId != ''">
update_user_id = #{record.updateUserId}, update_user_id = #{record.updateUserId},
</if> </if>
<if test="record.content != null"> <if test="record.content != null and record.content != ''">
content = #{record.content}, content = #{record.content},
</if> </if>
</set> </set>
where id = #{record.id} where id = #{record.id}
</update> </update>
<update id="deleteSelective">
update hy_content_info
<set>
deleted = 1
</set>
where id = #{contentId}
</update>
<select id="queryContentList" resultType="com.cool.store.entity.HyContentInfoDO">
select <include refid="Base_Column_List"></include>
from hy_content_info
where deleted = 0
<if test="contentTitle != null and contentTitle != ''">
and content_title like concat('%', #{contentTitle}, '%')
</if>
<if test="subject != null and subject != ''">
and subject = #{subject}
</if>
<if test="contentType != null and contentType != ''">
and content_type = #{contentType}
</if>
</select>
<!-- 查询动态详情 -->
<select id="queryContentInfo" resultType="com.cool.store.entity.HyContentInfoDO">
select <include refid="Base_Column_List"></include>
from hy_content_info
where deleted = 0
and id = #{contentId}
</select>
</mapper> </mapper>

View File

@@ -5,7 +5,7 @@
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="status" jdbcType="TINYINT" property="status" /> <result column="status" jdbcType="TINYINT" property="status" />
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" /> <result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
<result column="interview_arrangement_id" jdbcType="BIGINT" property="interviewArrangementId" /> <result column="interview_plan_id" jdbcType="BIGINT" property="interviewPlanId" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" /> <result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="deadline" jdbcType="TIMESTAMP" property="deadline" /> <result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
<result column="interviewer" jdbcType="VARCHAR" property="interviewer" /> <result column="interviewer" jdbcType="VARCHAR" property="interviewer" />
@@ -21,185 +21,244 @@
<result column="certify_file" jdbcType="VARCHAR" property="certifyFile" /> <result column="certify_file" jdbcType="VARCHAR" property="certifyFile" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="approve_time" jdbcType="TIMESTAMP" property="approveTime" />
<result column="partner_enter_time" jdbcType="TIMESTAMP" property="partnerEnterTime" />
<result column="interviewer_enter_time" jdbcType="TIMESTAMP" property="interviewerEnterTime" />
</resultMap> </resultMap>
<resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO">
<id column="interviewId" property="interviewId"/>
<result column="partnerId" property="partnerId"/>
<result column="interviewerId" property="interviewerId"/>
<association property="partnerName" column="partnerId" select="queryPartnerName" javaType="string"/>
<association property="interviewerName" column="interviewerId" select="queryInterviewerName" javaType="string"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, status, partner_line_id, interview_arrangement_id, partner_id, deadline, interviewer, id, status, partner_line_id, interview_plan_id, partner_id, deadline, interviewer,
recorder, process_info, record_time, summary, auth_code, pass_file_url, expiry_date, recorder, process_info, record_time, summary, auth_code, pass_file_url, expiry_date,
latest_log_message, pass_reason, certify_file, create_time, update_time latest_log_message, pass_reason, certify_file, create_time, update_time, approve_time,
partner_enter_time, interviewer_enter_time
</sql> </sql>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_interview insert into hy_partner_interview
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.status != null"> <if test="status != null">
status, status,
</if> </if>
<if test="record.partnerLineId != null"> <if test="partnerLineId != null">
partner_line_id, partner_line_id,
</if> </if>
<if test="record.interviewArrangementId != null"> <if test="interviewPlanId != null">
interview_arrangement_id, interview_plan_id,
</if> </if>
<if test="record.partnerId != null"> <if test="partnerId != null">
partner_id, partner_id,
</if> </if>
<if test="record.deadline != null"> <if test="deadline != null">
deadline, deadline,
</if> </if>
<if test="record.interviewer != null"> <if test="interviewer != null">
interviewer, interviewer,
</if> </if>
<if test="record.recorder != null"> <if test="recorder != null">
recorder, recorder,
</if> </if>
<if test="record.processInfo != null"> <if test="processInfo != null">
process_info, process_info,
</if> </if>
<if test="record.recordTime != null"> <if test="recordTime != null">
record_time, record_time,
</if> </if>
<if test="record.summary != null"> <if test="summary != null">
summary, summary,
</if> </if>
<if test="record.authCode != null"> <if test="authCode != null">
auth_code, auth_code,
</if> </if>
<if test="record.passFileUrl != null"> <if test="passFileUrl != null">
pass_file_url, pass_file_url,
</if> </if>
<if test="record.expiryDate != null"> <if test="expiryDate != null">
expiry_date, expiry_date,
</if> </if>
<if test="record.latestLogMessage != null"> <if test="latestLogMessage != null">
latest_log_message, latest_log_message,
</if> </if>
<if test="record.passReason != null"> <if test="passReason != null">
pass_reason, pass_reason,
</if> </if>
<if test="record.certifyFile != null"> <if test="certifyFile != null">
certify_file, certify_file,
</if> </if>
<if test="record.createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="record.updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
<if test="approveTime != null">
approve_time,
</if>
<if test="partnerEnterTime != null">
partner_enter_time,
</if>
<if test="interviewerEnterTime != null">
interviewer_enter_time,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.status != null"> <if test="status != null">
#{record.status}, #{status},
</if> </if>
<if test="record.partnerLineId != null"> <if test="partnerLineId != null">
#{record.partnerLineId}, #{partnerLineId},
</if> </if>
<if test="record.interviewArrangementId != null"> <if test="interviewPlanId != null">
#{record.interviewArrangementId}, #{interviewPlanId},
</if> </if>
<if test="record.partnerId != null"> <if test="partnerId != null">
#{record.partnerId}, #{partnerId},
</if> </if>
<if test="record.deadline != null"> <if test="deadline != null">
#{record.deadline}, #{deadline},
</if> </if>
<if test="record.interviewer != null"> <if test="interviewer != null">
#{record.interviewer}, #{interviewer},
</if> </if>
<if test="record.recorder != null"> <if test="recorder != null">
#{record.recorder}, #{recorder},
</if> </if>
<if test="record.processInfo != null"> <if test="processInfo != null">
#{record.processInfo}, #{processInfo},
</if> </if>
<if test="record.recordTime != null"> <if test="recordTime != null">
#{record.recordTime}, #{recordTime},
</if> </if>
<if test="record.summary != null"> <if test="summary != null">
#{record.summary}, #{summary},
</if> </if>
<if test="record.authCode != null"> <if test="authCode != null">
#{record.authCode}, #{authCode},
</if> </if>
<if test="record.passFileUrl != null"> <if test="passFileUrl != null">
#{record.passFileUrl}, #{passFileUrl},
</if> </if>
<if test="record.expiryDate != null"> <if test="expiryDate != null">
#{record.expiryDate}, #{expiryDate},
</if> </if>
<if test="record.latestLogMessage != null"> <if test="latestLogMessage != null">
#{record.latestLogMessage}, #{latestLogMessage},
</if> </if>
<if test="record.passReason != null"> <if test="passReason != null">
#{record.passReason}, #{passReason},
</if> </if>
<if test="record.certifyFile != null"> <if test="certifyFile != null">
#{record.certifyFile}, #{certifyFile},
</if> </if>
<if test="record.createTime != null"> <if test="createTime != null">
#{record.createTime}, #{createTime},
</if> </if>
<if test="record.updateTime != null"> <if test="updateTime != null">
#{record.updateTime}, #{updateTime},
</if>
<if test="approveTime != null">
#{approveTime},
</if>
<if test="partnerEnterTime != null">
#{partnerEnterTime},
</if>
<if test="interviewerEnterTime != null">
#{interviewerEnterTime},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective"> <update id="updateByPrimaryKeySelective">
update hy_partner_interview update hy_partner_interview
<set> <set>
<if test="record.status != null"> <if test="status != null">
status = #{record.status}, status = #{status},
</if> </if>
<if test="record.partnerLineId != null"> <if test="partnerLineId != null">
partner_line_id = #{record.partnerLineId}, partner_line_id = #{partnerLineId},
</if> </if>
<if test="record.interviewArrangementId != null"> <if test="interviewPlanId != null">
interview_arrangement_id = #{record.interviewArrangementId}, interview_plan_id = #{interviewPlanId},
</if> </if>
<if test="record.partnerId != null"> <if test="partnerId != null">
partner_id = #{record.partnerId}, partner_id = #{partnerId},
</if> </if>
<if test="record.deadline != null"> <if test="deadline != null">
deadline = #{record.deadline}, deadline = #{deadline},
</if> </if>
<if test="record.interviewer != null"> <if test="interviewer != null">
interviewer = #{record.interviewer}, interviewer = #{interviewer},
</if> </if>
<if test="record.recorder != null"> <if test="recorder != null">
recorder = #{record.recorder}, recorder = #{recorder},
</if> </if>
<if test="record.processInfo != null"> <if test="processInfo != null">
process_info = #{record.processInfo}, process_info = #{processInfo},
</if> </if>
<if test="record.recordTime != null"> <if test="recordTime != null">
record_time = #{record.recordTime}, record_time = #{recordTime},
</if> </if>
<if test="record.summary != null"> <if test="summary != null">
summary = #{record.summary}, summary = #{summary},
</if> </if>
<if test="record.authCode != null"> <if test="authCode != null">
auth_code = #{record.authCode}, auth_code = #{authCode},
</if> </if>
<if test="record.passFileUrl != null"> <if test="passFileUrl != null">
pass_file_url = #{record.passFileUrl}, pass_file_url = #{passFileUrl},
</if> </if>
<if test="record.expiryDate != null"> <if test="expiryDate != null">
expiry_date = #{record.expiryDate}, expiry_date = #{expiryDate},
</if> </if>
<if test="record.latestLogMessage != null"> <if test="latestLogMessage != null">
latest_log_message = #{record.latestLogMessage}, latest_log_message = #{latestLogMessage},
</if> </if>
<if test="record.passReason != null"> <if test="passReason != null">
pass_reason = #{record.passReason}, pass_reason = #{passReason},
</if> </if>
<if test="record.certifyFile != null"> <if test="certifyFile != null">
certify_file = #{record.certifyFile}, certify_file = #{certifyFile},
</if> </if>
<if test="record.createTime != null"> <if test="createTime != null">
create_time = #{record.createTime}, create_time = #{createTime},
</if> </if>
<if test="record.updateTime != null"> <if test="updateTime != null">
update_time = #{record.updateTime}, update_time = #{updateTime},
</if>
<if test="approveTime != null">
approve_time = #{approveTime},
</if>
<if test="partnerEnterTime != null">
partner_enter_time = #{partnerEnterTime},
</if>
<if test="interviewerEnterTime != null">
interviewer_enter_time = #{interviewerEnterTime},
</if> </if>
</set> </set>
where id = #{record.id} where id = #{id}
</update> </update>
<!-- 根据加盟商id查询面试信息 -->
<select id="queryByPartnerId" resultMap="PartnerInterviewInfoVO">
SELECT t1.id interviewId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
FROM hy_partner_interview t1
LEFT JOIN hy_partner_interview_plan t2 ON t1.interview_plan_id = t2.id
WHERE t1.partner_id = #{partnerId}
</select>
<select id="queryPartnerName" resultType="string">
SELECT username
FROM hy_partner_user_info
WHERE partner_id = #{partnerId}
</select>
<select id="queryInterviewerName" resultType="string">
SELECT name
FROM enterprise_user
WHERE deleted = 0
AND user_id = #{interview}
</select>
</mapper> </mapper>

View File

@@ -0,0 +1,30 @@
package com.cool.store.dto.content;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ContentAddDto {
@ApiModelProperty(value = "标题", required = true)
private String contentTitle;
@ApiModelProperty(value = "状态,0.启用1.禁用", required = true)
private String status;
@ApiModelProperty(value = "栏目code", required = true)
private String subject;
@ApiModelProperty(value = "类型", required = true)
private String contentType;
@ApiModelProperty(value = "封面地址", required = true)
private String cover;
@ApiModelProperty(value = "内容(文字信息或视频地址)", required = true)
private String content;
@ApiModelProperty(value = "创建用户id", required = true)
private String createUserId;
}

View File

@@ -0,0 +1,21 @@
package com.cool.store.dto.content;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class ContentQueryListDto extends PageBasicInfo {
@ApiModelProperty("标题")
private String contentTitle;
@ApiModelProperty("栏目Code")
private String subject;
@ApiModelProperty("类型,默认选中全部时不传值")
private String contentType;
}

View File

@@ -0,0 +1,33 @@
package com.cool.store.dto.content;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ContentUpdateDto {
@ApiModelProperty(value = "动态id", required = true)
private String contentId;
@ApiModelProperty("标题")
private String contentTitle;
@ApiModelProperty("状态,0.启用1.禁用")
private String status;
@ApiModelProperty("栏目code")
private String subject;
@ApiModelProperty("类型")
private String contentType;
@ApiModelProperty("封面地址")
private String cover;
@ApiModelProperty("内容(文字信息或视频地址)")
private String content;
@ApiModelProperty(value = "更新用户id", required = true)
private String updateUserId;
}

View File

@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
/** /**
* *
* @author zhangchenbiao * @author zhangchenbiao
* @date 2023-05-29 03:52 * @date 2023-06-09 05:51
*/ */
@Data @Data
@Builder @Builder
@@ -27,8 +27,8 @@ public class HyPartnerInterviewDO implements Serializable {
@ApiModelProperty("hy_partner_line_info.id") @ApiModelProperty("hy_partner_line_info.id")
private Long partnerLineId; private Long partnerLineId;
@ApiModelProperty("hy_partner_interview_arrangement.id") @ApiModelProperty("hy_partner_interview_plan.id")
private Long interviewArrangementId; private Long interviewPlanId;
@ApiModelProperty("hy_partner_user_info.partner_id") @ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId; private String partnerId;
@@ -74,4 +74,13 @@ public class HyPartnerInterviewDO implements Serializable {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
private Date updateTime; private Date updateTime;
@ApiModelProperty("审批发起时间")
private Date approveTime;
@ApiModelProperty("加盟商进入面试时间")
private Date partnerEnterTime;
@ApiModelProperty("面试官进入面试时间")
private Date interviewerEnterTime;
} }

View File

@@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date;
/** /**
* @Author suzhuhong * @Author suzhuhong
* @Date 2023/5/30 20:28 * @Date 2023/5/30 20:28
@@ -15,48 +13,31 @@ import java.util.Date;
@ApiModel @ApiModel
public class PartnerInterviewInfoVO { public class PartnerInterviewInfoVO {
@ApiModelProperty("会议id")
@ApiModelProperty("") private String interviewId;
private Long id;
@ApiModelProperty("加盟商用户名称")
private String partnerUserName;
@ApiModelProperty("预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝") @ApiModelProperty("预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝")
private Integer status; private Integer status;
@ApiModelProperty("hy_partner_line_info.id") @ApiModelProperty("会议开始时间")
private Long partnerLineId; private String startTime;
@ApiModelProperty("hy_partner_interview_arrangement.id") @ApiModelProperty("会议结束时间")
private Long interviewArrangementId; private String endTime;
@ApiModelProperty("房间号")
private String roomId;
@ApiModelProperty("加盟商用户ID") @ApiModelProperty("加盟商用户ID")
private String partnerId; private String partnerId;
@ApiModelProperty("截止时间") @ApiModelProperty("加盟商用户名称")
private Date deadline; private String partnerName;
@ApiModelProperty("审批发起时间")
private Date approveTime;
@ApiModelProperty("意向合同号")
private String authCode;
@ApiModelProperty("面试开始时间")
private Date startTime;
@ApiModelProperty("面试官ID") @ApiModelProperty("面试官ID")
private String interviewer; private String interviewerId;
@ApiModelProperty("面试官名称") @ApiModelProperty("面试官名称")
private String interviewerName; private String interviewerName;
@ApiModelProperty("预约时间")
private Date createTime;
@ApiModelProperty("房间号")
private String roomId;
@ApiModelProperty("过程信息")
private String processInfo;
} }

View File

@@ -0,0 +1,43 @@
package com.cool.store.service;
import com.cool.store.dto.content.ContentAddDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.dto.content.ContentUpdateDto;
import com.cool.store.entity.HyContentInfoDO;
import java.util.List;
public interface ContentService {
/**
*
* @param dto
* @return contentId 新增动态id
*/
String addNews(ContentAddDto dto);
/**
* 删除动态
* @param contentId
*/
void deleteContent(String contentId);
/**
* 更新动态信息
* @param dto
*/
void updateContent(ContentUpdateDto dto);
/**
* 查询动态列表
*/
List<HyContentInfoDO> queryContentList(ContentQueryListDto dto);
/**
* 查询动态详情
* @param contentId
* @return
*/
HyContentInfoDO queryContentInfo(String contentId);
}

View File

@@ -0,0 +1,14 @@
package com.cool.store.service;
import com.cool.store.vo.PartnerInterviewInfoVO;
public interface PartnerInterviewService {
/**
* 加盟商查询面试信息
* @param partnerId
* @return
*/
PartnerInterviewInfoVO queryByPartnerId(String partnerId);
}

View File

@@ -0,0 +1,77 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.cool.store.dao.ContentDAO;
import com.cool.store.dto.content.ContentAddDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.dto.content.ContentUpdateDto;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.mapper.HyContentInfoMapper;
import com.cool.store.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ContentServiceImpl implements ContentService {
@Autowired
private ContentDAO contentDAO;
@Autowired
private HyContentInfoMapper contentInfoMapper;
/**
*
* @param dto
* @return contentId 新增动态id
*/
@Override
public String addNews(ContentAddDto dto) {
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
BeanUtil.copyProperties(dto, hyContentInfoDO);
hyContentInfoDO.setUpdateUserId(dto.getCreateUserId());
return Integer.toString(contentInfoMapper.insertSelective(hyContentInfoDO));
}
/**
* 删除动态
* @param contentId
*/
@Override
public void deleteContent(String contentId) {
contentInfoMapper.deleteSelective(contentId);
}
/**
* 更新动态信息
* @param dto
*/
@Override
public void updateContent(ContentUpdateDto dto) {
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
BeanUtil.copyProperties(dto, hyContentInfoDO);
hyContentInfoDO.setId(Long.parseLong(dto.getContentId()));
contentInfoMapper.updateByPrimaryKeySelective(hyContentInfoDO);
}
/**
* 查询动态列表
*/
@Override
public List<HyContentInfoDO> queryContentList(ContentQueryListDto dto) {
return contentInfoMapper.queryContentList(dto);
}
/**
* 查询动态详情
* @param contentId
* @return
*/
@Override
public HyContentInfoDO queryContentInfo(String contentId) {
return contentInfoMapper.queryContentInfo(contentId);
}
}

View File

@@ -0,0 +1,25 @@
package com.cool.store.service.impl;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.service.PartnerInterviewService;
import com.cool.store.vo.PartnerInterviewInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class PartnerInterviewServiceImpl implements PartnerInterviewService {
@Autowired
private HyPartnerInterviewMapper interviewMapper;
/**
* 加盟商查询面试信息
* @param partnerId
* @return
*/
@Override
public PartnerInterviewInfoVO queryByPartnerId(String partnerId) {
return interviewMapper.queryByPartnerId(partnerId);
}
}

View File

@@ -0,0 +1,59 @@
package com.cool.store.controller;
import com.cool.store.dto.content.ContentAddDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.dto.content.ContentUpdateDto;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.ContentService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("news")
@Slf4j
public class ContentController {
@Autowired
private ContentService contentService;
@PostMapping("/add")
@ApiOperation("新增动态")
public ResponseResult<String> addContent(@RequestBody ContentAddDto dto) {
return ResponseResult.success(contentService.addNews(dto));
}
@PostMapping("/delete")
@ApiOperation("删除动态")
public void deleteContent(@RequestParam(value = "contentId") String contentId) {
contentService.deleteContent(contentId);
}
@PostMapping("/modify")
@ApiOperation("修改动态")
public void updateContent(@RequestBody ContentUpdateDto dto) {
contentService.updateContent(dto);
}
@PostMapping("/queryContentList")
@ApiOperation("查询动态列表")
public ResponseResult<PageInfo<HyContentInfoDO>> queryContentList(@RequestBody ContentQueryListDto dto) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
List<HyContentInfoDO> list = contentService.queryContentList(dto);
PageInfo<HyContentInfoDO> page = new PageInfo<>(list);
return ResponseResult.success(page);
}
@PostMapping("/detail")
@ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestParam String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId));
}
}

View File

@@ -0,0 +1,28 @@
package com.cool.store.controller;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.PartnerInterviewService;
import com.cool.store.vo.PartnerInterviewInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "加盟商资格面试")
@RestController
@RequestMapping("interview")
public class InterviewController {
@Autowired
private PartnerInterviewService interviewService;
@PostMapping("/queryByPartnerId")
@ApiOperation("根据用户id查询面试信息")
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestParam String partnerId) {
return ResponseResult.success(interviewService.queryByPartnerId(partnerId));
}
}