提交 60360dbc 作者: xiaowang

fdd企业实名认证

上级 36769fc3
package com.mmc.iuav.user.model.fdd.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* author:zhenjie
* Date:2022/9/1
* time:15:53
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AppUserFddDTO implements Serializable {
private static final long serialVersionUID = -4952516407490131779L;
private Integer id;
private String unionId;
private String customerId;
private Integer personVerifyStatus;
private Integer entVerifyStatus;
private Integer accountType;
private Date createTime;
private Date updateTime;
}
package com.mmc.iuav.user.model.fdd.req;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/7/27
* time:14:29
*/
@Data
@NoArgsConstructor
public class NECertReq implements Serializable {
private static final long serialVersionUID = 6174142180495289363L;
private String name;
private String value;
}
package com.mmc.iuav.user.model.fdd.resp;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/7/21
* time:18:13
*/
@Data
@NoArgsConstructor
public class CompanyVerifyResp implements Serializable {
private static final long serialVersionUID = 5835274401261039702L;
private String transactionNo;
private String url;
}
package com.mmc.iuav.user.model.fdd.resp;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/7/18
* time:16:00
*/
@Data
@NoArgsConstructor
public class PersonVerifyResp implements Serializable {
private static final long serialVersionUID = 7583599952872411025L;
private String transactionNo;
private String url;
}
package com.mmc.iuav.user.model.fdd.seal;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author LW
* @date 2022/8/3 16:24
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SealDetail implements Serializable {
@ApiModelProperty(value = "签章图片Base64")
private String signatureImg;
@ApiModelProperty(value = "签章编号")
private String signatureId;
@ApiModelProperty(value = "签章图片作用范围:0:非默认 1:默认章")
private Integer signatureScope;
@ApiModelProperty(value = "签章来源 0:法大大生成 1:平台上传")
private String signatureSource;
@ApiModelProperty(value = "企业或者个人 1:个人 2:企业")
private String signatureType;
}
......@@ -9,6 +9,8 @@ public enum ResultEnum implements BaseErrorInfoInterface {
BODY_NOT_MATCH("400", "请求的数据格式不符"),
FAIL("500", "fail"),
PARAM_ERROR("400", "参数错误"),
REQUEST_PARAM_ILLEGAL_ERROR("706", "请求参数非法"),
NOT_FOUND("404", "未找到该资源!"),
//企业认证
BUSINESS_LICENSE_CHECK_ANALYSIS_ERROR("1000", "营业执照解析失败,请上传有效清晰的执照"),
......
......@@ -94,6 +94,14 @@
</dependency>
<dependency>
<groupId>com.mmc.csf.fdd</groupId>
<artifactId>self-innovate</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/lib/fdd-verify-process-1.8.5.jar</systemPath>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.3.5</version>
......
......@@ -22,11 +22,11 @@ public class FddConstant {
public static final String UPLOAD_FILE = "uploadFile/";
//企业实名认证异步回调
public static final String NOTIFY_E_CERT_RES = "fddservlet/fdd/notifyECertRes";
// public static final String NOTIFY_E_CERT_RES = "fddservlet/fdd/notifyECertRes";
//企业实名认证同步回调
public static final String RETURN_E_CERT_RES = "fddservlet/fdd/returnECertRes";
//小程序企业实名认证异步回调
public static final String APP_NOTIFY_E_CERT_RES = "fddservlet/appfdd/notifyECertRes";
public static final String NOTIFY_E_CERT_RES = "fdd/notifyECertRes";
//签署合同异步回调
public static final String NOTIFY_STAMP = "fddservlet/contract/notifyStamp";
......
package com.mmc.iuav.user.controller.fdd;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.controller.BaseController;
import com.mmc.iuav.user.model.fdd.resp.CompanyVerifyResp;
import com.mmc.iuav.user.service.fdd.UserFddAuthService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* @author:zhenjie Date:2022/9/1
* time:15:44
*/
@Api(tags = {"小程序-fdd用户认证" })
@RestController
@RequestMapping("/fdd/")
public class UserFddAuthController extends BaseController {
@Autowired
private UserFddAuthService userFddAuthService;
@ApiOperation(value = "注册法大大账号")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = String.class)})
@ApiIgnore
@GetMapping("register")
public String register(@ApiParam(value = "唯一标识当类型为1的时候传openid 当为2的时候传id") @RequestParam String uid, @ApiParam(value = "账号类型 1个人 2企业") @RequestParam String accountType) {
return userFddAuthService.register(uid, accountType);
}
// @ApiOperation(value = "获取个人实名认证地址")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = PersonVerifyResp.class)})
// @ApiIgnore
// @GetMapping("getPersonVerifyUrl")
// public PersonVerifyResp getPersonVerifyUrl(@RequestParam String customerId) {
// return userFddAuthService.getPersonVerifyUrl(customerId);
// }
@ApiOperation(value = "获取企业实名认证url")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CompanyVerifyResp.class)})
@GetMapping("getCompanyVerifyUrl")
public ResultBody getCompanyVerifyUrl(@ApiParam(value = "端口:0小程序 1后台") @RequestParam Integer port, HttpServletRequest request) {
return userFddAuthService.getCompanyVerifyUrl(port, this.getUserLoginInfoFromRedis(request));
}
@ApiOperation(value = "异步处理企业实名认证")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@ApiIgnore
@PostMapping("notifyECertRes")
public ResultBody notifyECertRes(@RequestParam Map<String, String> map) {
return userFddAuthService.notifyECertRes(map);
}
//
// @ApiOperation(value = "app获取企业实名认证信息")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppEVerifyInfoDTO.class)})
// @GetMapping("findCompanyCertInfo")
// public ResultBody findCompanyCertInfo(@RequestParam String unionId) {
// return userFddAuthService.findCompanyCertInfo(unionId);
// }
//
// @ApiOperation(value = "app获取认证信息")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppUserFddDTO.class)})
// @GetMapping("getAppUserFddInfo")
// public ResultBody<AppUserFddDTO> getAppUserFddInfo(@RequestParam String unionId) {
// return userFddAuthService.getAppUserFddInfo(unionId);
// }
//
// @ApiOperation(value = "app获取认证信息(feign调用)")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppUserFddDTO.class)})
// @ApiIgnore
// @GetMapping("feignGetAppUserFddInfo")
// public List<AppUserFddDTO> feignGetAppUserFddInfo(@RequestParam List<String> unionIds) {
// return userFddAuthService.feignGetAppUserFddInfo(unionIds);
// }
}
package com.mmc.iuav.user.dao.fdd;
import com.mmc.iuav.user.entity.fdd.FddVerifyInfoDO;
import com.mmc.iuav.user.entity.fdd.UserFddDO;
import org.apache.ibatis.annotations.Mapper;
/**
* author:zhenjie
* Date:2022/9/1
* time:15:46
*/
@Mapper
public interface UserFddAuthDao {
UserFddDO checkRegisterFdd(String unionId);
void insertAppUserFdd(UserFddDO userFddDO);
FddVerifyInfoDO getCompanyVerifyUrl(String customerId);
void insertVerifyInfo(FddVerifyInfoDO verifyInfoDO1);
void updateCompanyCertStatus(String customerId, String status);
// void insertAppUserFdd(UserFddDO appUserFddDO1);
//
// AppEVerifyInfoDO getCompanyVerifyUrl(String customerId);
//
// void insertAppEVerifyInfo(AppEVerifyInfoDO appEVerifyInfoDO1);
//
// void updateCompanyCertStatus(String customerId, String status);
//
// UserFddDO getAppUserFddInfo(String unionId);
//
// List<UserFddDO> feignGetAppUserFddInfo(List<String> unionIds);
//
// UserFddDO getAppUserFddInfoByCustomerId(String customerId);
}
package com.mmc.iuav.user.entity.fdd;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author:zhenjie Date:2022/7/22
* time:11:33
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FddVerifyInfoDO implements Serializable {
private static final long serialVersionUID = 7766546708723743143L;
private Integer id;
private Integer userFddId;
private String customerId;
private String transactionNo;
private String url;
private Integer deleted;
private Date createTime;
private Date updateTime;
}
package com.mmc.iuav.user.entity.fdd;
import com.mmc.iuav.user.model.fdd.dto.AppUserFddDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* author:zhenjie
* Date:2022/9/1
* time:15:51
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserFddDO implements Serializable {
private static final long serialVersionUID = -6432171445803296265L;
private Integer id;
private String unionId;
private String customerId;
private Integer personVerifyStatus;
private Integer entVerifyStatus;
private Integer accountType;
private Date createTime;
private Date updateTime;
public AppUserFddDTO buildAppUserFddDTO() {
return AppUserFddDTO.builder().id(this.id).unionId(this.unionId).customerId(this.customerId).personVerifyStatus(this.personVerifyStatus)
.entVerifyStatus(this.entVerifyStatus).accountType(this.accountType).createTime(this.createTime).updateTime(this.updateTime).build();
}
}
package com.mmc.iuav.user.service.fdd;
import com.mmc.iuav.user.model.fdd.resp.PersonVerifyResp;
/**
* author:zhenjie
* Date:2022/7/16
* time:15:30
*/
public interface FddService {
String register(String uid, String accountType);
PersonVerifyResp getPersonVerifyUrl(String customerId);
//
// ResultBody findPersonCertInfo(String verifiedSerialNo);
//
// ResultBody getCompanyVerifyUrl(Integer userAccountId);
//
String getApplyCert(String customerId, String transactionNo);
//
// ResultBody findCompanyCertInfo(Integer userAccountId);
//
// ResultBody notifyECertRes(String appId, String serialNo, String customerId, String status, String statusDesc, String certStatus, String authenticationType, String timestamp, String sign);
//
// ResultBody returnECertRes(String personName, String transactionNo, String authenticationType, String status, String sign);
//
// ResultBody newNotifyECertRes(Map<String, String> map);
//
// ResultBody getUserFddInfo(Integer id);
//
// List<UserFddDTO> feignBatchUserFddPage(List<Integer> list);
//
// ResultBody getFileByUuid(String uuid, String docType);
}
package com.mmc.iuav.user.service.fdd;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.fdd.resp.PersonVerifyResp;
import java.util.Map;
/**
* author:zhenjie
* Date:2022/9/1
* time:15:46
*/
public interface UserFddAuthService {
String register(String uid, String accountType);
PersonVerifyResp getPersonVerifyUrl(String customerId);
ResultBody getCompanyVerifyUrl(Integer port, LoginSuccessDTO loginSuccessDTO);
ResultBody notifyECertRes(Map<String, String> map);
//
// ResultBody findCompanyCertInfo(String unionId);
//
// ResultBody getAppUserFddInfo(String unionId);
String replaceUnableString(String uid);
//
// List<AppUserFddDTO> feignGetAppUserFddInfo(List<String> unionId);
}
<?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.mmc.iuav.user.dao.fdd.UserFddAuthDao">
<resultMap id="appUserFddResultMap" type="com.mmc.iuav.user.entity.fdd.UserFddDO">
<id property="id" column="id"/>
<result property="unionId" column="union_id"/>
<result property="customerId" column="customer_id"/>
<result property="personVerifyStatus" column="person_verify_status"/>
<result property="entVerifyStatus" column="ent_verify_status"/>
<result property="accountType" column="account_type"/>
<result property="updateTime" column="update_time"/>
<result property="createTime" column="create_time"/>
</resultMap>
<insert id="insertAppUserFdd" parameterType="com.mmc.iuav.user.entity.fdd.UserFddDO"
keyProperty="id" useGeneratedKeys="true">
insert into user_fdd
(union_id, customer_id, person_verify_status, ent_verify_status, account_type, create_time)
values (#{unionId}, #{customerId}, #{personVerifyStatus}, #{entVerifyStatus}, #{accountType}, NOW())
</insert>
<insert id="insertVerifyInfo" useGeneratedKeys="true" keyProperty="id"
parameterType="com.mmc.iuav.user.entity.fdd.FddVerifyInfoDO">
insert into fdd_verify_info
(user_fdd_id, customer_id, transaction_no, url, create_time)
values (#{userFddId}, #{customerId}, #{transactionNo}, #{url}, NOW())
</insert>
<update id="updateCompanyCertStatus">
update user_fdd
set ent_verify_status = #{status}
where customer_id = #{customerId}
</update>
<select id="checkRegisterFdd" resultType="com.mmc.iuav.user.entity.fdd.UserFddDO">
select id,
union_id,
customer_id,
person_verify_status,
ent_verify_status,
account_type,
create_time,
update_time
from user_fdd
where union_id = #{unionId}
and is_deleted = 0
</select>
<select id="getCompanyVerifyUrl" resultType="com.mmc.iuav.user.entity.fdd.FddVerifyInfoDO">
select id, user_fdd_id, customer_id, transaction_no, url, create_time, update_time
from fdd_verify_info
where customer_id = #{customerId}
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论