Commit a6b7c612 authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:新增EKP重发控制层"

See merge request fangxinjiang/yifu!181
parents e0ea4c46 1bc6233e
...@@ -29,7 +29,7 @@ public class EKPInteractiveParam implements Serializable { ...@@ -29,7 +29,7 @@ public class EKPInteractiveParam implements Serializable {
/** /**
* 商险id * 商险id
*/ */
@Schema(description = "主键") @Schema(description = "商险id")
private String detailId; private String detailId;
/** /**
......
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEkpService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author zhaji
* @description EKP重发类
* @date 2022-08-23 17:35:47
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/insuranceEkp")
@Tag(name = "EKP重发类")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TInsuranceEkpController {
@Resource
private TInsuranceEkpService tInsuranceEkpService;
/**
* ekp重发
* @return
*/
@Operation(summary = "ekp重发", description = "ekp重发")
@GetMapping("/resend" )
public R resend() {
return R.ok(tInsuranceEkpService.resend());
}
}
...@@ -91,8 +91,8 @@ public class TInsuranceEnclosureController { ...@@ -91,8 +91,8 @@ public class TInsuranceEnclosureController {
/** /**
* 商险附件列表分页查询 * 商险附件列表分页查询
* *
* @param page * @param page 分页参数
* @param param * @param param 查询条件
* @return * @return
* @Author zhaji * @Author zhaji
* @Date 2022-08-23 * @Date 2022-08-23
......
...@@ -9,5 +9,13 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp; ...@@ -9,5 +9,13 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
* @createDate 2022-08-23 17:02:49 * @createDate 2022-08-23 17:02:49
*/ */
public interface TInsuranceEkpService extends IService<TInsuranceEkp> { public interface TInsuranceEkpService extends IService<TInsuranceEkp> {
/**
* ekp重发
*
* @author zhaji
* @param
* @return {@link Object}
*/
Object resend();
} }
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl; package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEkpMapper; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEkpMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEkpService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEkpService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EKPInteractiveParam;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @author Administrator * @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Service实现 * @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Service实现
...@@ -14,4 +22,23 @@ import org.springframework.stereotype.Service; ...@@ -14,4 +22,23 @@ import org.springframework.stereotype.Service;
@Service @Service
public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService { public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService {
@Override
public Object resend() {
LambdaQueryWrapper<TInsuranceEkp> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceEkp :: getResendFlag , CommonConstants.ZERO_INT);
queryWrapper.orderByDesc(TInsuranceEkp::getDetailId);
queryWrapper.orderByAsc(TInsuranceEkp::getCreateTime);
List<TInsuranceEkp> list = list(queryWrapper);
if (CollectionUtils.isNotEmpty(list)){
for (TInsuranceEkp tInsuranceEkp : list) {
EKPInteractiveParam ekpParam = new EKPInteractiveParam();
BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam);
String detailId = ekpParam.getDetailId();
String defaultSettleId = ekpParam.getDefaultSettleId();
}
return R.ok("发送成功");
}else{
return R.failed("无需要发送的信息");
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment