实训体验

This commit is contained in:
guohb
2024-03-27 17:18:42 +08:00
parent 60e862e273
commit 86742ab075
6 changed files with 34 additions and 10 deletions

View File

@@ -14,4 +14,6 @@ public interface TrainingExperienceMapper {
void updateStatus(@Param("lineId") Long lineId, void updateStatus(@Param("lineId") Long lineId,
@Param("status") Integer status, @Param("status") Integer status,
@Param("abandonCause") String abandonCause); @Param("abandonCause") String abandonCause);
LeaseBaseInfoDO selectByLineId(@Param("lineId") Long lineId);
} }

View File

@@ -42,14 +42,14 @@
<if test="entity.abandonCause != null">abandon_cause,</if> <if test="entity.abandonCause != null">abandon_cause,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="entity.partnerId != null">#{request.partnerId},</if> <if test="entity.partnerId != null">#{entity.partnerId},</if>
<if test="entity.lineId != null">#{request.lineId},</if> <if test="entity.lineId != null">#{entity.lineId},</if>
<if test="entity.storeName != null">#{request.storeName},</if> <if test="entity.storeName != null">#{entity.storeName},</if>
<if test="entity.storeId != null">#{request.storeId},</if> <if test="entity.storeId != null">#{entity.storeId},</if>
<if test="entity.experienceStartTime != null">#{request.experienceStartTime},</if> <if test="entity.experienceStartTime != null">#{entity.experienceStartTime},</if>
<if test="entity.experienceEndTime != null">#{request.experienceEndTime},</if> <if test="entity.experienceEndTime != null">#{entity.experienceEndTime},</if>
<if test="entity.experienceStatus != null">#{request.experienceStatus},</if> <if test="entity.experienceStatus != null">#{entity.experienceStatus},</if>
<if test="entity.abandonCause != null">#{request.abandonCause},</if> <if test="entity.abandonCause != null">#{entity.abandonCause},</if>
</trim> </trim>
</insert> </insert>
<update id="updateStatus"> <update id="updateStatus">
@@ -60,6 +60,12 @@
abandon_cause=#{abandonCause} abandon_cause=#{abandonCause}
where line_id = #{lineId} where line_id = #{lineId}
</update> </update>
<select id="selectByLineId" resultType="com.cool.store.entity.LeaseBaseInfoDO">
select
<include refid="Base_Column_List"/>
from xfsg_lease_base_info
where line_id = #{lineId}
</select>
</mapper> </mapper>

View File

@@ -1,5 +1,6 @@
package com.cool.store.entity; package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@@ -19,9 +20,9 @@ public class LeaseBaseInfoDO {
private Date experienceStartTime; private Date experienceStartTime;
private Date experienceEndTime; private Date experienceEndTime;
@ApiModelProperty("体验状态 0完成 1放弃")
private Integer experienceStatus; private Integer experienceStatus;
@ApiModelProperty("放弃原因")
private String abandonCause; private String abandonCause;
private Date createTime; private Date createTime;

View File

@@ -1,5 +1,6 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.request.TrainingExperienceDistributionRequest; import com.cool.store.request.TrainingExperienceDistributionRequest;
public interface TrainingExperienceService { public interface TrainingExperienceService {
@@ -18,4 +19,5 @@ public interface TrainingExperienceService {
*/ */
void experienceStatusChange(Long lineId, Integer status, String abandonCause); void experienceStatusChange(Long lineId, Integer status, String abandonCause);
LeaseBaseInfoDO getTrainingExperience(Long lineId);
} }

View File

@@ -56,4 +56,10 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
} }
} }
@Override
public LeaseBaseInfoDO getTrainingExperience(Long lineId) {
LeaseBaseInfoDO leaseBaseInfoDO = trainingExperienceMapper.selectByLineId(lineId);
return leaseBaseInfoDO;
}
} }

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller.webb; package com.cool.store.controller.webb;
import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.enums.ExperienceStatusEnum; import com.cool.store.enums.ExperienceStatusEnum;
import com.cool.store.request.TrainingExperienceDistributionRequest; import com.cool.store.request.TrainingExperienceDistributionRequest;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
@@ -28,4 +29,10 @@ public class PCTrainingExperienceController {
return ResponseResult.success(trainingExperienceService.distribution(request)); return ResponseResult.success(trainingExperienceService.distribution(request));
} }
@ApiOperation("查询实训体验")
@GetMapping("/get")
public ResponseResult<LeaseBaseInfoDO> getTrainingExperience(@RequestParam("lineId") Long lineId) {
return ResponseResult.success(trainingExperienceService.getTrainingExperience(lineId));
}
} }