Merge branch 'master' into cc_20250609_takeoutBuild
# Conflicts: # coolstore-partner-service/src/main/java/com/cool/store/service/impl/BuildInformationServiceImpl.java
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.FranchiseFeeStageDateDTO;
|
||||
import com.cool.store.entity.FranchiseFeeDO;
|
||||
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@@ -26,4 +28,18 @@ public class FranchiseFeeDAO {
|
||||
}
|
||||
return franchiseFeeMapper.updateBill(list);
|
||||
}
|
||||
|
||||
public Integer batchUpdateXgjCollectionStatus(List<Long> shopIds,Integer collectionStatus){
|
||||
if (CollectionUtils.isEmpty(shopIds)|| collectionStatus==null){
|
||||
return 0;
|
||||
}
|
||||
return franchiseFeeMapper.batchUpdateXgjCollectionStatus(shopIds,collectionStatus);
|
||||
}
|
||||
|
||||
public Integer batchUpdateXgjCollectionStatusAndXgjFeesPaid( List<FranchiseFeeStageDateDTO> franchiseFeeStageDateDTOList){
|
||||
if (CollectionUtils.isEmpty(franchiseFeeStageDateDTOList)){
|
||||
return 0;
|
||||
}
|
||||
return franchiseFeeMapper.batchUpdateXgjCollectionStatusAndXgjFeesPaid(franchiseFeeStageDateDTOList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,48 @@ 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);
|
||||
}
|
||||
//数据处理专用0604,查询加盟费阶段缴费信息
|
||||
public List<LinePayDO> getDateHandler() {
|
||||
return linePayMapper.getDateHandler();
|
||||
}
|
||||
//数据处理专用0604,处理paytime paypic
|
||||
public Integer dataUpdateLinePay(List<LinePayDO> linePayDOList) {
|
||||
if (CollectionUtils.isEmpty(linePayDOList)){
|
||||
return null;
|
||||
}
|
||||
return linePayMapper.dataUpdateLinePay(linePayDOList);
|
||||
}
|
||||
|
||||
public LinePayDO selectByPaymentReceiptCode(String paymentReceiptCode) {
|
||||
return linePayMapper.selectByPaymentReceiptCode(paymentReceiptCode);
|
||||
}
|
||||
public Integer updateXgjClaimStatus(List<Long> shopIds,Integer xgjClaimStatus,Integer payBusinessType){
|
||||
if (CollectionUtils.isEmpty(shopIds)){
|
||||
return null;
|
||||
}
|
||||
return linePayMapper.updateXgjClaimStatus(shopIds,xgjClaimStatus,payBusinessType);
|
||||
}
|
||||
public Integer deleteByShopId(List<Long> shopIds){
|
||||
if (CollectionUtils.isEmpty(shopIds)){
|
||||
return null;
|
||||
}
|
||||
return linePayMapper.deleteByShopId(shopIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,4 +466,10 @@ public class ShopStageInfoDAO {
|
||||
example.createCriteria().andIn("shopId",shopIds).andEqualTo("shopStage",shopStage);
|
||||
return shopStageInfoMapper.selectByExample(example);
|
||||
}
|
||||
//查询处于xx状态的数据
|
||||
public List<ShopStageInfoDO> getShopStageInfoByShopSubStageStatus(Integer shopSubStageStatus) {
|
||||
Example example = new Example(ShopStageInfoDO.class);
|
||||
example.createCriteria().andEqualTo("shopSubStageStatus", shopSubStageStatus);
|
||||
return shopStageInfoMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.FranchiseFeeDTO;
|
||||
import com.cool.store.dto.FranchiseFeeStageDateDTO;
|
||||
import com.cool.store.entity.FranchiseFeeDO;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -24,4 +25,8 @@ public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
|
||||
* @description: 数据处理修改账单
|
||||
*/
|
||||
Integer updateBill(@Param("list") List<FranchiseFeeDO> list);
|
||||
|
||||
Integer batchUpdateXgjCollectionStatus(@Param("shopIds")List<Long> shopId, @Param("collectionStatus")Integer collectionStatus);
|
||||
|
||||
Integer batchUpdateXgjCollectionStatusAndXgjFeesPaid( @Param("list") List<FranchiseFeeStageDateDTO> franchiseFeeStageDateDTOList);
|
||||
}
|
||||
|
||||
@@ -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,18 @@ 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);
|
||||
|
||||
LinePayDO selectByPaymentReceiptCode(@Param("paymentReceiptCode") String paymentReceiptCode);
|
||||
//数据处理专用0604,查询加盟费阶段缴费信息
|
||||
List<LinePayDO> getDateHandler();
|
||||
|
||||
Integer dataUpdateLinePay(@Param("list") List<LinePayDO> linePayDOList);
|
||||
|
||||
Integer updateXgjClaimStatus(@Param("list") List<Long> shopIds,@Param("xgjClaimStatus") Integer xgjClaimStatus,@Param("payBusinessType") Integer payBusinessType);
|
||||
|
||||
Integer deleteByShopId(@Param("list")List<Long> shopIds);
|
||||
}
|
||||
@@ -32,6 +32,22 @@
|
||||
where shop_id = #{item.shopId}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="batchUpdateXgjCollectionStatus">
|
||||
update xfsg_franchise_fee
|
||||
set xgj_collection_status = #{collectionStatus}
|
||||
where shop_id in
|
||||
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="batchUpdateXgjCollectionStatusAndXgjFeesPaid">
|
||||
<foreach collection="list" separator=";" item="item">
|
||||
update xfsg_franchise_fee
|
||||
set xgj_collection_status = #{item.xgjCollectionStatus},
|
||||
xgj_fees_paid = #{item.xgjFeesPaid}
|
||||
where shop_id = #{item.shopId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
|
||||
select *
|
||||
|
||||
@@ -25,23 +25,37 @@
|
||||
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType"/>
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount"/>
|
||||
<result column="combined_field" jdbcType="VARCHAR" property="combinedField"/>
|
||||
<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
|
||||
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,
|
||||
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
|
||||
from xfsg_line_pay
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<update id="deleteByShopId">
|
||||
update xfsg_line_pay
|
||||
set deleted = 1
|
||||
where shop_id in
|
||||
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.LinePayDO">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
@@ -78,8 +92,8 @@
|
||||
<if test="branchBankName != null">
|
||||
branch_bank_name,
|
||||
</if>
|
||||
pay_time,
|
||||
pay_pic,
|
||||
pay_time,
|
||||
pay_pic,
|
||||
|
||||
<if test="promisePic != null">
|
||||
promise_pic,
|
||||
@@ -111,6 +125,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">
|
||||
@@ -143,8 +169,8 @@
|
||||
<if test="branchBankName != null">
|
||||
#{branchBankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
#{payTime,jdbcType=TIMESTAMP},
|
||||
#{payPic,jdbcType=VARCHAR},
|
||||
#{payTime,jdbcType=TIMESTAMP},
|
||||
#{payPic,jdbcType=VARCHAR},
|
||||
<if test="promisePic != null">
|
||||
#{promisePic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -175,6 +201,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">
|
||||
@@ -210,8 +248,8 @@
|
||||
<if test="branchBankName != null">
|
||||
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
||||
pay_pic = #{payPic,jdbcType=VARCHAR},
|
||||
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
||||
pay_pic = #{payPic,jdbcType=VARCHAR},
|
||||
|
||||
<if test="promisePic != null">
|
||||
promise_pic = #{promisePic,jdbcType=VARCHAR},
|
||||
@@ -237,6 +275,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>
|
||||
@@ -244,7 +294,7 @@
|
||||
update xfsg_line_pay
|
||||
set audit_id = #{auditId}
|
||||
where line_id = #{lineId}
|
||||
and partner_id = #{partnerId}
|
||||
and partner_id = #{partnerId}
|
||||
</update>
|
||||
<sql id="dynamicQuery">
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||
@@ -312,14 +362,15 @@
|
||||
select *
|
||||
from xfsg_line_pay
|
||||
where line_id = #{lineId}
|
||||
and deleted = '0' limit 1
|
||||
and deleted = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="getByLineIdAndPayTypeAndShopId" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from xfsg_line_pay
|
||||
<where>
|
||||
deleted = '0'
|
||||
deleted = '0'
|
||||
and pay_business_type = #{payBusinessType}
|
||||
<if test="lineId != null and lineId != ''">
|
||||
and line_id = #{lineId}
|
||||
@@ -346,4 +397,53 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
<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 order by
|
||||
create_time desc
|
||||
</select>
|
||||
<select id="getDateHandler" resultType="com.cool.store.entity.LinePayDO">
|
||||
select * from xfsg_line_pay where deleted = 0 and pay_business_type = 1 and pay_pic is null and combined_field
|
||||
is not null
|
||||
</select>
|
||||
<update id="deleteById">
|
||||
update xfsg_line_pay set deleted = 1 ,update_time = now(),update_user_id = #{userId} where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectByPaymentReceiptCode" resultType="com.cool.store.entity.LinePayDO">
|
||||
select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and
|
||||
pay_business_type = 1 order by create_time desc
|
||||
</select>
|
||||
<update id="dataUpdateLinePay">
|
||||
<foreach collection="list" separator=";" item="item" index="index">
|
||||
update xfsg_line_pay
|
||||
<set>
|
||||
<if test="item.payTime !=null">
|
||||
pay_time = #{item.payTime},
|
||||
</if>
|
||||
<if test="item.payPic !=null and item !=''">
|
||||
pay_pic = #{item.payPic},
|
||||
</if>
|
||||
<if test="item.paymentReceiptCode!=null and item.paymentReceiptCode !=''">
|
||||
payment_receipt_code = #{item.paymentReceiptCode},
|
||||
</if>
|
||||
<if test="item.xgjClaimStatus">
|
||||
xgj_claim_status = #{item.xgjClaimStatus}
|
||||
</if>
|
||||
|
||||
</set>
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateXgjClaimStatus">
|
||||
update xfsg_line_pay
|
||||
set
|
||||
xgj_claim_status = #{xgjClaimStatus},
|
||||
update_time = now()
|
||||
where shop_id in (
|
||||
<foreach collection="list" item="shopId" separator=",">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
) and pay_business_type = #{payBusinessType}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user