实训体验

This commit is contained in:
guohb
2024-03-26 16:40:27 +08:00
parent e98fcf626d
commit 4416f8aef5
18 changed files with 448 additions and 8 deletions

View File

@@ -9,4 +9,7 @@ import org.apache.ibatis.annotations.Param;
public interface IntentAgreementMapper {
boolean insert(@Param("request") SigningBaseInfoDO request);
SigningBaseInfoDO selectByPartnerIdOrLineId(@Param("partnerId") String partnerId,
@Param("lineId") Long lineId);
}

View File

@@ -6,4 +6,6 @@ import tk.mybatis.mapper.common.Mapper;
public interface LineInfoMapper extends Mapper<LineInfoDO> {
LineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
LineInfoDO getByLineId(@Param("lineId") Long lineId);
}

View File

@@ -0,0 +1,17 @@
package com.cool.store.mapper;
import com.cool.store.entity.LeaseBaseInfoDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import javax.websocket.server.PathParam;
@Mapper
public interface TrainingExperienceMapper {
void insert(@Param("entity") LeaseBaseInfoDO toLeaseBaseInfoDO);
void updateStatus(@Param("lineId") Long lineId,
@Param("status") Integer status,
@Param("abandonCause") String abandonCause);
}

View File

@@ -3,7 +3,8 @@
<mapper namespace="com.cool.store.mapper.IntentAgreementMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.SigningBaseInfoDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_base_info_id" jdbcType="VARCHAR" property="partnerBaseInfoId" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="line_id" jdbcType="BIGINT" property="lineId" />
<result column="sign_name" jdbcType="VARCHAR" property="signName" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="sex" jdbcType="TINYINT" property="sex" />
@@ -22,7 +23,8 @@
</resultMap>
<sql id="Base_Column_List">
id,
partner_base_info_id,
partner_id,
line_id,
sign_name
mobile,
sex,
@@ -74,6 +76,20 @@
<if test="request.businessLicenseAddress != null">#{request.businessLicenseAddress},</if>
</trim>
</insert>
<select id="selectByPartnerIdOrLineId" resultType="com.cool.store.entity.SigningBaseInfoDO">
select
<include refid="Base_Column_List"/>
from xfsg_signing_base_info
<where>
deleted = 0
<if test="partnerId != null and partnerId != ''">
and partner_id = #{partnerId}
</if>
<if test="lineId != null">
and line_id = #{lineId}
</if>
</where>
</select>
</mapper>

View File

@@ -48,7 +48,7 @@
<if test="request.areaCode != null">area_code,</if>
<if test="request.liveArea != null">live_area,</if>
<if test="request.liveAddress != null">live_address,</if>
<if test="request.joiningQuestionnaire != null">joining_questionnaire,</if>
<if test="request.joiningQuestionnaire != null">joining_questionnaire,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="request.lineId != null">#{request.lineId},</if>

View File

@@ -34,5 +34,8 @@
<select id="getByPartnerId" resultMap="BaseResultMap">
select * from xfsg_line_info where partner_id = #{partnerId} and deleted = 0
</select>
<select id="getByLineId" resultType="com.cool.store.entity.LineInfoDO">
select * from xfsg_line_info where id = #{lineId} and deleted = 0
</select>
</mapper>

View File

@@ -0,0 +1,65 @@
<?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.cool.store.mapper.TrainingExperienceMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.LeaseBaseInfoDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="line_id" jdbcType="BIGINT" property="lineId"/>
<result column="store_name" jdbcType="VARCHAR" property="storeName"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
<result column="experience_start_time" jdbcType="TIMESTAMP" property="experienceStartTime"/>
<result column="experience_end_time" jdbcType="TIMESTAMP" property="experienceEndTime"/>
<result column="experience_status" jdbcType="TINYINT" property="experienceStatus"/>
<result column="abandon_cause" jdbcType="VARCHAR" property="abandonCause"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="TINYINT" property="deleted"/>
</resultMap>
<sql id="Base_Column_List">
id,
partner_id,
line_id,
store_name,
store_id,
experience_start_time,
experience_end_time,
experience_status,
abandon_cause,
create_time,
update_time,
deleted
</sql>
<insert id="insert">
insert into xfsg_lease_base_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="entity.partnerId != null">partner_id,</if>
<if test="entity.lineId != null">line_id,</if>
<if test="entity.storeName != null">store_name,</if>
<if test="entity.storeId != null">store_id,</if>
<if test="entity.experienceStartTime != null">experience_start_time,</if>
<if test="entity.experienceEndTime != null">experience_end_time,</if>
<if test="entity.experienceStatus != null">experience_status,</if>
<if test="entity.abandonCause != null">abandon_cause,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="entity.partnerId != null">#{request.partnerId},</if>
<if test="entity.lineId != null">#{request.lineId},</if>
<if test="entity.storeName != null">#{request.storeName},</if>
<if test="entity.storeId != null">#{request.storeId},</if>
<if test="entity.experienceStartTime != null">#{request.experienceStartTime},</if>
<if test="entity.experienceEndTime != null">#{request.experienceEndTime},</if>
<if test="entity.experienceStatus != null">#{request.experienceStatus},</if>
<if test="entity.abandonCause != null">#{request.abandonCause},</if>
</trim>
</insert>
<update id="updateStatus">
update
xfsg_lease_base_info
set
experience_status = #{status},
abandon_cause=#{abandonCause}
where line_id = #{lineId}
</update>
</mapper>