加盟费改造

This commit is contained in:
shuo.wang
2025-05-30 18:17:57 +08:00
parent 20fcd02ac2
commit c014841e8c
15 changed files with 464 additions and 43 deletions

View File

@@ -5,6 +5,7 @@ import com.cool.store.mapper.LinePayMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.*;
@@ -69,4 +70,21 @@ public class LinePayDAO {
List<LinePayDO> linePayDO = linePayMapper.getLinePayByLineIds(null,shopIds,payBusinessType);
return linePayDO.stream().collect(Collectors.toMap(LinePayDO::getShopId, linePayDO1 -> linePayDO1, (o, n) -> o));
}
public List<LinePayDO>getFranchiseFeePayInfoByShopId(Long shopId){
if (Objects.isNull(shopId)){
return null;
}
List<LinePayDO> franchiseFeePayInfoByShopId = linePayMapper.getFranchiseFeePayInfoByShopId(shopId);
if (CollectionUtils.isEmpty(franchiseFeePayInfoByShopId)){
return new ArrayList<>();
}
return franchiseFeePayInfoByShopId;
}
public LinePayDO getById(Long id) {
return linePayMapper.selectByPrimaryKey(id);
}
public Integer deleteById(Long id,String userId) {
return linePayMapper.deleteById(id,userId);
}
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.mapper;
import com.cool.store.entity.LinePayDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
@@ -9,7 +10,7 @@ import java.util.List;
* @author wxp
* @date 2024-03-27 09:25
*/
public interface LinePayMapper {
public interface LinePayMapper {
/**
*
* 默认插入方法,只会给有值的字段赋值
@@ -55,4 +56,8 @@ public interface LinePayMapper {
void updateByPidAndLid(@Param("lineId") Long lineId,
@Param("partnerId") String partnerId,
@Param("auditId") Long auditId);
List<LinePayDO>getFranchiseFeePayInfoByShopId(@Param("shopId") Long shopId);
Integer deleteById(@Param("id") Long id,@Param("userId")String userId);
}

View File

@@ -28,17 +28,19 @@
<result column="xgj_claim_status" jdbcType="TINYINT" property="xgjClaimStatus"/>
<result column="payment_receipt_code" jdbcType="VARCHAR" property="paymentReceiptCode"/>
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
</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,amount,combined_field,xgj_claim_status,payment_receipt_code,pay_serial_number
update_time, create_user_id, update_user_id, deleted,pay_business_type,amount,combined_field,xgj_claim_status,payment_receipt_code,pay_serial_number,
remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xfsg_line_pay
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} and deleted = 0
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete
@@ -114,6 +116,18 @@
<if test="combinedField != null">
combined_field,
</if>
<if test="xgjClaimStatus !=null">
xgj_claim_status,
</if>
<if test="paymentReceiptCode !=null">
payment_receipt_code,
</if>
<if test="paySerialNumber !=null">
pay_serial_number,
</if>
<if test="remark != null">
remark
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="partnerId != null">
@@ -178,6 +192,18 @@
<if test="combinedField != null">
#{combinedField,jdbcType=VARCHAR},
</if>
<if test="xgjClaimStatus !=null">
#{xgjClaimStatus,jdbcType=TINYINT},
</if>
<if test="paymentReceiptCode !=null">
#{paymentReceiptCode,jdbcType=VARCHAR},
</if>
<if test="paySerialNumber !=null">
#{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR}
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
@@ -240,6 +266,18 @@
<if test="combinedField != null">
combined_field = #{combinedField,jdbcType=VARCHAR},
</if>
<if test="xgjClaimStatus !=null">
xgj_claim_status = #{xgjClaimStatus,jdbcType=TINYINT},
</if>
<if test="paymentReceiptCode !=null">
payment_receipt_code = #{paymentReceiptCode,jdbcType=VARCHAR},
</if>
<if test="paySerialNumber !=null">
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@@ -349,4 +387,10 @@
</foreach>
</if>
</select>
<select id="getFranchiseFeePayInfoByShopId" resultType="com.cool.store.entity.LinePayDO">
select * from xfsg_line_pay where deleted = 0 and shop_id = #{shopId} and pay_business_type = 1
</select>
<update id="deleteById">
update xfsg_line_pay set deleted = 1 ,update_time = now(),update_user_id = #{userId} where id = #{id}
</update>
</mapper>