13 changed files with 191 additions and 20 deletions
@ -0,0 +1,29 @@ |
|||||
|
package com.qs.serve.modules.vtb.event; |
||||
|
|
||||
|
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationBo; |
||||
|
import org.springframework.context.ApplicationEvent; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2025/5/26 |
||||
|
*/ |
||||
|
public class VtbRebateAutoEvent extends ApplicationEvent { |
||||
|
|
||||
|
private VtbVerificationBo verificationBo; |
||||
|
private String userId; |
||||
|
|
||||
|
public VtbRebateAutoEvent(Object source, VtbVerificationBo verificationBo, String userId) { |
||||
|
super(source); |
||||
|
this.userId = userId; |
||||
|
this.verificationBo = verificationBo; |
||||
|
} |
||||
|
|
||||
|
public VtbVerificationBo getVerificationBo() { |
||||
|
return verificationBo; |
||||
|
} |
||||
|
|
||||
|
public String getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.qs.serve.modules.vtb.listener; |
||||
|
|
||||
|
import com.qs.serve.modules.sys.common.AuthContextUtils; |
||||
|
import com.qs.serve.modules.vtb.entity.bo.VtbVerificationBo; |
||||
|
import com.qs.serve.modules.vtb.event.VtbRebateAutoEvent; |
||||
|
import com.qs.serve.modules.vtb.service.VtbVerificationService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.context.event.EventListener; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2025/5/26 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component |
||||
|
@RequiredArgsConstructor |
||||
|
public class VtbRebateAutoEventListener { |
||||
|
|
||||
|
private final VtbVerificationService vtbVerificationService; |
||||
|
|
||||
|
@EventListener |
||||
|
public void handleVtbRebateAutoEvent(VtbRebateAutoEvent event) { |
||||
|
VtbVerificationBo verificationBo = event.getVerificationBo(); |
||||
|
vtbVerificationService.commit(verificationBo,event.getUserId()); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<?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.qs.serve.modules.tbs.mapper.TbsActivityMapper"> |
||||
|
|
||||
|
|
||||
|
<select id="listRebateAutoActIds" resultType="java.lang.String"> |
||||
|
select t1.id |
||||
|
from tbs_activity t1 |
||||
|
left join tbs_cost_apply t2 on t2.id = t1.cost_apply_id |
||||
|
where |
||||
|
and t1.rebate_period_id is not null |
||||
|
and t1.rebate_period_id != 0 |
||||
|
and t1.del_flag = 0 |
||||
|
and t2.del_flag = 0 |
||||
|
and t2.charge_state = 2 |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
|
|
Loading…
Reference in new issue