完成部分TODO

This commit is contained in:
shuo.wang
2024-05-08 20:29:43 +08:00
parent 6f5af7c3b8
commit e54a45143b
29 changed files with 322 additions and 201 deletions

View File

@@ -3,6 +3,7 @@ package com.cool.store.dao;
import com.cool.store.constants.CommonConstants;
import com.cool.store.entity.AcceptanceInfoDO;
import com.cool.store.mapper.AcceptanceInfoMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
@@ -43,4 +44,10 @@ public class AcceptanceInfoDAO {
}
return acceptanceInfoMapper.selectByShopId(shopId);
}
public List<AcceptanceInfoDO> selectByShopIds (List<Long> shopIds){
if (CollectionUtils.isEmpty(shopIds)){
return null;
}
return acceptanceInfoMapper.selectByShopIds(shopIds);
}
}

View File

@@ -21,7 +21,7 @@ public class AssessmentDataDAO {
private AssessmentDataMapper assessmentDataMapper;
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
if (CollectionUtils.isNotEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
if (CollectionUtils.isNotEmpty(assessmentDataDOS)) {
for (AssessmentDataDO assessmentDataDO : assessmentDataDOS) {
assessmentDataMapper.insertSelective(assessmentDataDO);
}
@@ -31,8 +31,7 @@ public class AssessmentDataDAO {
}
public Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS) {
if (CollectionUtils.isEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
if (CollectionUtils.isNotEmpty(assessmentDataDOS)) {
return assessmentDataMapper.batchUpdate(assessmentDataDOS);
}
return 0;
@@ -69,13 +68,7 @@ public class AssessmentDataDAO {
public List<AssessmentDataDO> selectListByShopId(Long shopId) {
return assessmentDataMapper.selectListByShopId(shopId);
}
public Boolean deleteByShopId(Long shopId){
if (shopId == null){
return Boolean.FALSE;
}
assessmentDataMapper.deleteByShopId(shopId);
return Boolean.TRUE;
}
public void batchInsertDO(List<AssessmentDataDO> assessmentDataDOList) {
assessmentDataMapper.batchInsert(assessmentDataDOList);
}

View File

@@ -13,6 +13,7 @@ public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
* @description:三方验收g根据阶段状态
*/
List<AcceptanceInfoDO> selectShopIdListBySignatures(Integer status);
/**
* @Auther: wangshuo
* @Date: 2024/4/29
@@ -21,6 +22,9 @@ public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
Integer updateByShopIDSelective(AcceptanceInfoDO acceptanceInfoDO);
AcceptanceInfoDO selectByShopId(@Param("shopId") Long shopId);
List<AcceptanceInfoDO> selectByShopIds(@Param("shopIds") List<Long> shopIds);
/**
* @Auther: wangshuo
* @Date: 2024/5/3

View File

@@ -8,10 +8,18 @@ import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface AssessmentDataMapper extends Mapper<AssessmentDataDO> {
/**
* @Auther: wangshuo
* @Date: 2024/5/8
* @description:三方验收
*/
Integer batchUpdate(List<AssessmentDataDO> AssessmentDataDOS);
/**
* @Auther: wangshuo
* @Date: 2024/5/8
* @description:三方验收
*/
List<AssessmentDataDO> selectListByShopId(@Param("shopId") Long shopId);
Boolean deleteByShopId(@Param("shopId") Long shopId);
Integer batchInsert(@Param("assessmentDataList") List<AssessmentDataDO> assessmentDataList);

View File

@@ -75,7 +75,7 @@
select
<include refid="baseColumn"/>
from xfsg_acceptance_info
where shop_id = #{shopId}
where shop_id = #{shopId} and deleted = 0
</select>
<select id="selectListByActualEntryTime" resultType="com.cool.store.entity.AcceptanceInfoDO">
select
@@ -83,5 +83,17 @@
from xfsg_acceptance_info
where actual_entry_time is null
</select>
<select id="selectByShopIds" resultType="com.cool.store.entity.AcceptanceInfoDO">
select
<include refid="baseColumn"/>
from xfsg_acceptance_info
where deleted = 0
<if test="shopIds != null and shopIds.size()>0">
and shop_id in
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
#{shopId}
</foreach>
</if>
</select>
</mapper>

View File

@@ -58,10 +58,6 @@
<foreach collection="AssessmentDataDOS" separator=" " item="item">
WHEN #{item.id} THEN #{item.qualified}
</foreach>,
score = CASE id
<foreach collection="AssessmentDataDOS" separator=" " item="item">
WHEN #{item.id} THEN #{item.score}
</foreach>,
reason = CASE id
<foreach collection="AssessmentDataDOS" separator=" " item="item">
WHEN #{item.id} THEN #{item.reason}
@@ -78,12 +74,10 @@
</foreach>
)
</update>
<delete id="deleteByShopId">
DELETE FROM xfsg_assessment_data WHERE shop_id = #{shopId}
</delete>
<select id="selectListByShopId" resultType="com.cool.store.entity.AssessmentDataDO">
select *
from xfsg_assessment_data
where shop_id = #{shopId}
where shop_id = #{shopId} and template_id >=75 and template_id &lt;= 108
</select>
</mapper>

View File

@@ -23,11 +23,12 @@
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId"/>
<result column="deleted" jdbcType="BIT" property="deleted"/>
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType"/>
<result column="amount" jdbcType="VARCHAR" property="amount"/>
</resultMap>
<sql id="Base_Column_List">
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
update_time, create_user_id, update_user_id, deleted,pay_business_type
update_time, create_user_id, update_user_id, deleted,pay_business_type,amount
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
@@ -106,6 +107,9 @@
<if test="shopId !=null">
shop_id,
</if>
<if test="amount != null">
amount,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="partnerId != null">
@@ -168,6 +172,9 @@
<if test="shopId !=null">
#{shopId},
</if>
<if test="amount !=null">
#{amount},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
@@ -227,6 +234,9 @@
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>