xhxu 3 лет назад
Родитель
Сommit
98fd79b16d
5 измененных файлов: 51 добавлений и 4 удалений
  1. +16
    -0
      mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java
  2. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java
  3. +4
    -0
      mallinkService/src/main/java/com/iformall/service/WxProfitSharingReceiverApplyService.java
  4. +18
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java
  5. +10
    -0
      mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml

+ 16
- 0
mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java Просмотреть файл

@@ -167,6 +167,22 @@ public class WxProfitSharingReceiverApplyController extends BaseController {
return wxProfitSharingReceiverApplyService.applyment(receiverAdd);
}

@ApiOperation("刷新审核状态")
@GetMapping("/syncApplymentStates")
public ResultData syncApplymentStates(Long id) {
log.debug("[" + getIpAddr() + "] merchantProfitSharingReceiver::syncApplymentStates");
if(id == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "ID不能为空");
}

WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.findResultStateById(id);
if(receiverApply == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未找到进件数据");
}

return wxProfitSharingReceiverApplyService.handApplymentStates(receiverApply);
}

/**
* 获取授权函
* {


+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java Просмотреть файл

@@ -3,6 +3,7 @@ package com.iformall.mapper;
import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxProfitSharingReceiver;
import com.iformall.domain.po.WxProfitSharingReceiverApply;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@@ -13,4 +14,6 @@ public interface WxProfitSharingReceiverApplyMapper extends CommonMapper<WxProfi
List<WxProfitSharingReceiverApply> findListByApplymentState(WxProfitSharingReceiverApply apply);

List<WxProfitSharingReceiverApply> findListByVerifyResult(WxProfitSharingReceiverApply apply);

WxProfitSharingReceiverApply findResultStateById(@Param("id") Long id);
}

+ 4
- 0
mallinkService/src/main/java/com/iformall/service/WxProfitSharingReceiverApplyService.java Просмотреть файл

@@ -18,6 +18,8 @@ public interface WxProfitSharingReceiverApplyService {

WxProfitSharingReceiverApply selectById(Long id);

WxProfitSharingReceiverApply findResultStateById(Long id);

WxProfitSharingReceiverApply selectByPlat(TenantEntity tenantEntity, Long merchantId, EnumAppPlat plat);

WxProfitSharingReceiverApply detailByPlat(TenantEntity tenantEntity, Long merchantId, EnumAppPlat plat);
@@ -31,4 +33,6 @@ public interface WxProfitSharingReceiverApplyService {
ResultData modifySettlement(WxProfitSharingReceiverApply receiverAdd,String subMchid);

ResultData handVerifyResult(WxProfitSharingReceiverApply apply);


}

+ 18
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java Просмотреть файл

@@ -59,6 +59,11 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR
return wxProfitSharingReceiverApplyMapper.selectById(id);
}

@Override
public WxProfitSharingReceiverApply findResultStateById(Long id) {
return wxProfitSharingReceiverApplyMapper.findResultStateById(id);
}

@Override
public WxProfitSharingReceiverApply selectByPlat(TenantEntity tenantEntity, Long merchantId, EnumAppPlat plat) {
WxProfitSharingReceiverApply receiverApply = new WxProfitSharingReceiverApply();
@@ -150,10 +155,12 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR
@Transactional(rollbackFor = {Exception.class})
public ResultData handApplymentStates(WxProfitSharingReceiverApply receiverApply) {
if(receiverApply == null || !EnumSharingReceiverApplymentState.getNeedSyncList().contains(receiverApply.getApplymentState())){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该状态无需同步");
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该状态无需同步");
return new ResultData(receiverApply);
}
WxPayService wxPayService = wxPayAccountService.getWxPayService(receiverApply.getTenantId());
try {
WxPayService wxPayService = wxPayAccountService.getWxPayService(receiverApply.getTenantId());
ApplymentStateQueryResult applymentStateQueryResult = wxPayService.getApplyment4SubService().queryApplyStatusByBusinessCode(receiverApply.getOutRequestNo());
EnumSharingReceiverApplymentState enumApplymentState = EnumSharingReceiverApplymentState.getEnum(applymentStateQueryResult.getApplymentState());
if(enumApplymentState != null && !enumApplymentState.getCode().equals(receiverApply.getApplymentState())){
@@ -190,8 +197,15 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR
}
wxProfitSharingReceiverService.saveOrUpdate(receiverUpd);
}
}
return new ResultData();

receiverApply.setSubMchid(receiverApplyUpd.getSubMchid());
receiverApply.setSignUrl(receiverApplyUpd.getSignUrl());
receiverApply.setApplymentState(receiverApplyUpd.getApplymentState());
receiverApply.setApplymentStateDesc(receiverApplyUpd.getApplymentStateDesc());
receiverApply.setAuditDetail(receiverApplyUpd.getAuditDetail());
receiverApply.setUpdateTime(receiverApplyUpd.getUpdateTime());
}
return new ResultData(receiverApply);
} catch (WxPayException e) {
e.printStackTrace();
return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(),e.getMessage());


+ 10
- 0
mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml Просмотреть файл

@@ -138,6 +138,16 @@
<include refid="dynamicWhereConditions"/>
</select>

<select id="findResultStateById" parameterType="Long" resultMap="BaseResultMap">
select
`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`plat`,`out_request_no`,
`applyment_id`,`applyment_state`,`applyment_state_desc`,`sign_state`,`sign_url`,
`sub_mchid`,`account_validation`,`audit_detail`,`legal_validation_url`,`legal_validation_qrcode`,
`verify_result`,`verify_fail_reason`,`status`,`create_time`,`update_time`
from wx_profit_sharing_receiver_apply
where `id` = #{id}
</select>

<select id="findListByApplymentState" parameterType="com.iformall.domain.po.WxProfitSharingReceiverApply" resultMap="BaseResultMap">
select
`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`plat`,`out_request_no`,`applyment_id`,`applyment_state`


Загрузка…
Отмена
Сохранить