@@ -11,6 +11,19 @@ | |||
<artifactId>ywx-customer-common</artifactId> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.projectlombok</groupId> | |||
<artifactId>lombok</artifactId> | |||
<scope>provided</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.hibernate.validator</groupId> | |||
<artifactId>hibernate-validator</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.51trust.rd</groupId> | |||
<artifactId>common-model</artifactId> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -13,7 +13,7 @@ package com.trust.ywx.customer.common.enu; | |||
* @修改记录: | |||
**/ | |||
public enum CaChannelEnum { | |||
XBY(0,"北京ca","北京数字认证股份有限公司"), | |||
BJCA(0,"北京ca","北京数字认证股份有限公司"), | |||
SZCA(1,"深圳ca","深圳ca"), | |||
GXCA(2,"广西ca","广西壮族自治区数字证书认证中心有限公司"), | |||
XJCA(3,"新疆ca","新疆数字证书认证中心") | |||
@@ -53,7 +53,7 @@ public enum FirmProperEnum { | |||
//---------------------------可选配置及服务------------------------------------- | |||
// 审核短信 | |||
//fixme 审核完成发送短信 目前存在firm_info表的send_sms,以后需要迁移到firm_info_extends表 | |||
SMS_SEND("sms_send", "是否短信定制"), //0-否 1-是 | |||
SMS_SEND("sms_send", "是否短信定制"), //N-否 Y-是 | |||
SMS_CUSTOMIZE("sms_customize", "是否短信定制"), //N或者空-否 Y-是 | |||
SMS_CUSTOMIZE_CONTENT("sms_customize_content", "短信定制内容"), | |||
@@ -0,0 +1,45 @@ | |||
package com.trust.ywx.customer.common.enu; | |||
/*************************************************************************** | |||
* <pre></pre> | |||
* @文件名称: CachannelEnum.java | |||
* @包 路 径: cn.org.bjca.ywq.firm.cons | |||
* @版权所有:北京数字认证股份有限公司 (C) 2018 | |||
* | |||
* @类描述: | |||
* @版本: V1.5 | |||
* @创建人: wujunpeng | |||
* @创建时间:2021年3月9日 下午7:36:58 | |||
* | |||
* @修改记录: | |||
**/ | |||
public enum FirmStampEnum { | |||
ROUND (0,"圆章"), | |||
SQUARE (1,"方章"), | |||
; | |||
private int code; | |||
private String name; | |||
FirmStampEnum(int channel, String dec) { | |||
this.code = channel; | |||
this.name = dec; | |||
} | |||
// 普通方法 | |||
public static String getName(int code) { | |||
for (FirmStampEnum t : FirmStampEnum.values()) { | |||
if (t.getCode() == code) { | |||
return t.getName(); | |||
} | |||
} | |||
return null; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public String getName() { | |||
return name; | |||
} | |||
} |
@@ -0,0 +1,54 @@ | |||
package com.trust.ywx.customer.common.enu; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmStatusEnum.java | |||
* @包 路 径: com.trust.ywx.customer.common.enu | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/21 11:34 | |||
* @Modify: | |||
*/ | |||
public enum FirmStatusEnum { | |||
FIRM_SUB_NORMAL(1, "正常"), | |||
FIRM_SUB_USEUP(2, "用尽"), | |||
FIRM_SUB_STOP(3, "停用"), | |||
FIRM_SUB_DELETE(4, "删除"), | |||
FIRM_SUB_EXCESS(5, "过量"), | |||
FIRM_SUB_TIMEOUT(6, "过期"), | |||
FIRM_SUB_NOCONTRACT_AUTO_STOP(7, "未签约自动强制停止"), | |||
FIRM_SUB_OVER_AUTO_STOP(8, "超出自动强制停止"); | |||
private int code; | |||
private String dec; | |||
private FirmStatusEnum(int code, String dec) { | |||
this.code = code; | |||
this.dec = dec; | |||
} | |||
public static String getDesc(int code) { | |||
FirmStatusEnum[] var1 = values(); | |||
int var2 = var1.length; | |||
for(int var3 = 0; var3 < var2; ++var3) { | |||
FirmStatusEnum t = var1[var3]; | |||
if (t.code == code) { | |||
return t.getDec(); | |||
} | |||
} | |||
return null; | |||
} | |||
public int getCode() { | |||
return this.code; | |||
} | |||
public String getDec() { | |||
return this.dec; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
package com.trust.ywx.customer.common.enu; | |||
/** | |||
* ************************************************************************* | |||
* <pre></pre> | |||
* @文件名称: FirmStatus.java | |||
* @包 路 径: cn.org.bjca.ywq.config.common.status | |||
* @版权所有:北京数字认证股份有限公司 (C) 2017 | |||
* | |||
* @类描述: 厂商状态枚举 | |||
* @版本: V1.0 | |||
* @创建人: hudan | |||
* @创建时间:2017年1月22日 上午10:42:38 | |||
* @修改记录: | |||
*/ | |||
public enum TempFirmStatusEnum { | |||
//可信任客户 | |||
FIRM_RIGHT(1,"正常"), | |||
FIRM_STOP(3,"停用"), | |||
FIRM_CREATE_STAMP(5,"已制章"), | |||
// 临时客户 | |||
TEMP_UNAUTHEN(0,"未审核"), | |||
TEMP_PASS(1,"审核通过"), | |||
TEMP_REFUSE(2,"拒绝"), | |||
TEMP_DEL(4, "删除") | |||
; | |||
private int code; | |||
private String dec; | |||
private TempFirmStatusEnum(int code, String dec) { | |||
this.code = code; | |||
this.dec = dec; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
} |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.exception; | |||
package com.trust.ywx.customer.common.exception; | |||
import com.trust.ywx.customer.common.enu.FirmErrEum; | |||
@@ -1,10 +1,9 @@ | |||
package com.trust.ywx.customer.service.dto.request; | |||
package com.trust.ywx.customer.common.model.manager.request; | |||
import com.trust.ywx.customer.common.enu.CommonStatusEnum; | |||
import com.trust.ywx.customer.common.enu.DoctorProductTypeEnum; | |||
import com.trust.ywx.customer.common.enu.FirmProperEnum; | |||
import lombok.Data; | |||
import org.springframework.util.CollectionUtils; | |||
import java.io.Serializable; | |||
import java.util.HashMap; | |||
@@ -98,12 +97,11 @@ public class FirmPropParam implements Serializable { | |||
* see com.trust.ywx.customer.common.enums.FirmModeEnum | |||
*/ | |||
private Integer firmMode; | |||
/** | |||
* 证书算法 RSA、SM2 | |||
* fixme 目前存放与firm_info表的cert_alg。以后需要迁移到firm_info_extends表 | |||
*/ | |||
private String certAlg; | |||
// | |||
// /** | |||
// * 证书算法 RSA、SM2 | |||
// */ | |||
// private String certAlg; | |||
/** | |||
* 客户白名单 | |||
@@ -112,12 +110,12 @@ public class FirmPropParam implements Serializable { | |||
*/ | |||
private Integer isFirmWhite; | |||
/** | |||
* ca渠道类型 | |||
* see com.trust.ywx.customer.common.enums.CaChannelEnum | |||
* fixme 目前存放与firm_info表的ca_channel。以后需要迁移到firm_info_extends表 | |||
*/ | |||
private Integer caChannel; | |||
// /** | |||
// * ca渠道类型 | |||
// * see com.trust.ywx.customer.common.enums.CaChannelEnum | |||
// * fixme 目前存放与firm_info表的ca_channel。以后需要迁移到firm_info_extends表 | |||
// */ | |||
// private Integer caChannel; | |||
/** | |||
* 是否允许医生挂靠 | |||
@@ -193,6 +191,7 @@ public class FirmPropParam implements Serializable { | |||
//------------------企业图章模式-----------------; | |||
/** | |||
* 厂商图章类型 0 圆章 1 方章 | |||
* see com.trust.ywx.customer.common.enums.FirmStampEnum | |||
*/ | |||
private Integer firmStampType; | |||
/** | |||
@@ -227,7 +226,7 @@ public class FirmPropParam implements Serializable { | |||
propMap.put(FirmProperEnum.TECHPERSON_SUPPORT.getProperName(), String.valueOf(this.techSupport)); | |||
propMap.put(FirmProperEnum.TECHPERSON_SUPPORT_INFO.getProperName(), this.techSupportInfo); | |||
propMap.put(FirmProperEnum.PUBLIC_PRODUCT_TYPE.getProperName(), String.valueOf(this.publicProductType)); | |||
if(!CollectionUtils.isEmpty(this.getDoctorProductType())){ | |||
if(null != this.getDoctorProductType() && this.getDoctorProductType().size()>0){ | |||
if(this.getDoctorProductType().contains(DoctorProductTypeEnum.APP.getName())){ | |||
propMap.put(FirmProperEnum.DOCTOR_PRODUCT_APP.getProperName(), CommonStatusEnum.YES.getCode()+""); | |||
}else{ | |||
@@ -249,8 +248,8 @@ public class FirmPropParam implements Serializable { | |||
propMap.put(FirmProperEnum.GATEWAY_MONITOR_URL.getProperName(), this.gatewayMonitorUrl); | |||
propMap.put(FirmProperEnum.HISCA_CALL_URL.getProperName(), this.hiscaCallUrl); | |||
propMap.put(FirmProperEnum.FIRM_MODE.getProperName(), String.valueOf(this.firmMode)); | |||
propMap.put(FirmProperEnum.CERT_ALG.getProperName(), this.certAlg); | |||
propMap.put(FirmProperEnum.CA_CHANNEL.getProperName(), String.valueOf(this.caChannel)); | |||
// propMap.put(FirmProperEnum.CERT_ALG.getProperName(), this.certAlg); | |||
// propMap.put(FirmProperEnum.CA_CHANNEL.getProperName(), String.valueOf(this.caChannel)); | |||
propMap.put(FirmProperEnum.FIRM_ALLOW_USER_BIND.getProperName(), String.valueOf(this.allowUserBind)); | |||
propMap.put(FirmProperEnum.FIRM_SHOW_INBINDLIST.getProperName(), String.valueOf(this.showFirmInBindList)); | |||
propMap.put(FirmProperEnum.SMS_SEND.getProperName(), String.valueOf(this.smsSend)); |
@@ -0,0 +1,82 @@ | |||
package com.trust.ywx.customer.common.model.manager.request; | |||
import lombok.Data; | |||
import javax.validation.constraints.Email; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.Pattern; | |||
import javax.validation.constraints.Size; | |||
import java.io.Serializable; | |||
@Data | |||
public class TempFirmParam implements Serializable { | |||
private static final long serialVersionUID = 4072319794402378694L; | |||
/** | |||
* 客户ID | |||
*/ | |||
private String clientId; | |||
/** | |||
* 客户名称 | |||
*/ | |||
@NotBlank(message = "客户名称不能为空") | |||
@Size(max = 29, message = "客户名称最多29个字符") | |||
private String firmName; | |||
/** | |||
* 客户联系人 | |||
*/ | |||
@NotBlank(message = "客户联系人不能为空") | |||
@Size(max = 10, message = "客户联系人最多10个字符") | |||
private String firmPerson; | |||
/** | |||
* 客户联系电话 | |||
*/ | |||
@NotBlank(message = "客户联系电话不能为空") | |||
@Size(max = 11, message = "客户联系电话11位") | |||
@Size(min = 11, message = "客户联系电话11位") | |||
@Pattern(regexp = "1[0-9][0-9]\\d{8}", message = "手机号格式有误") | |||
private String firmPhone; | |||
/** | |||
* 客户邮箱 | |||
*/ | |||
@Email(message = "邮箱格式有误") | |||
private String firmEmail; | |||
/** | |||
* 客户图标 base64 | |||
*/ | |||
private String appIcon; | |||
/** | |||
* 代理商ID | |||
*/ | |||
private String agentClientId; | |||
/** | |||
* 代理商销售ID | |||
*/ | |||
private String agentSaleId; | |||
/** | |||
* 客户状态 0待审核 1审核通过 2审核拒绝 4删除 | |||
*/ | |||
private String firmStatus; | |||
/** | |||
* 医生端产品形态 支持app | |||
*/ | |||
private Boolean channelApp; | |||
/** | |||
* 医生端产品形态 支持sdk | |||
*/ | |||
private Boolean channelSdk; | |||
/** | |||
* 统一社会信用代码 | |||
*/ | |||
private String firmOrgCode; | |||
} |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.request; | |||
package com.trust.ywx.customer.common.model.manager.request; | |||
import lombok.Data; | |||
@@ -10,7 +10,7 @@ import java.util.Date; | |||
* <pre></pre> | |||
* | |||
* @文件名称: TrustFirmParam.java | |||
* @包 路 径: com.trust.ywx.customer.service.dto.manager.request | |||
* @包 路 径: com.trust.ywx.customer.common.model.manager.request | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 |
@@ -1,15 +1,15 @@ | |||
package com.trust.ywx.customer.service.dto.request; | |||
package com.trust.ywx.customer.common.model.manager.request; | |||
import com.trust.ywx.customer.common.model.manager.request.FirmPropParam; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotEmpty; | |||
import java.util.Date; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: TrustFirmParam.java | |||
* @包 路 径: com.trust.ywx.customer.service.dto.manager.request | |||
* @包 路 径: com.trust.ywx.customer.common.model.manager.request | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
@@ -19,46 +19,42 @@ import java.util.Date; | |||
*/ | |||
@Data | |||
public class TrustFirmParam extends FirmPropParam { | |||
/** | |||
* 客户主键 | |||
*/ | |||
private String uniqueid; | |||
private static final long serialVersionUID = 8183777452023821497L; | |||
/** | |||
* 客户id | |||
*/ | |||
@NotEmpty(message = "客户ID不能为空") | |||
private String clientId; | |||
/** | |||
* 客户名称 | |||
*/ | |||
@NotEmpty(message = "客户名称不能为空") | |||
private String firmName; | |||
/** | |||
* 第三方应用APP_SECRET | |||
* | |||
*/ | |||
@NotEmpty(message = "APP_SECRET不能为空") | |||
private String appSecret; | |||
/** | |||
* 客户联系电话 | |||
*/ | |||
@NotEmpty(message = "APP_SECRET不能为空") | |||
private String firmPhone; | |||
/** | |||
* 客户地址 | |||
*/ | |||
private String firmAddress; | |||
/** | |||
* 客户联系人 | |||
* | |||
*/ | |||
@NotEmpty(message = "APP_SECRET不能为空") | |||
private String firmPerson; | |||
/** | |||
* 证书算法 RSA/SM2 | |||
* 改参数迁移至FirmPropParam.certAlg | |||
*/ | |||
// private String certAlg; | |||
private String certAlg; | |||
/** | |||
* 客户邮箱 | |||
@@ -77,14 +73,19 @@ public class TrustFirmParam extends FirmPropParam { | |||
/** | |||
* 统一信用代码 | |||
*/ | |||
@NotEmpty(message = "统一信用代码不能为空") | |||
private String clientOrgCode; | |||
/** | |||
* 审核状态 | |||
* 项目状态 | |||
* see com.trust.ywx.customer.common.enu.ProjectStatusEnum | |||
*/ | |||
private Integer projectStatus; | |||
/** | |||
* 审核状态 | |||
* see com.trust.ywx.customer.common.enu.FirmStatusEnum | |||
*/ | |||
private Integer FirmStatus; | |||
/** | |||
* 信步云appid | |||
@@ -124,7 +125,7 @@ public class TrustFirmParam extends FirmPropParam { | |||
private String salePersonId; | |||
/** | |||
* 技术支持 | |||
* 实施人员 | |||
* | |||
*/ | |||
private String techPersonId; | |||
@@ -153,9 +154,13 @@ public class TrustFirmParam extends FirmPropParam { | |||
/** | |||
* CA 渠道 | |||
* 改参数迁移至FirmPropParam.caChannel | |||
*/ | |||
// private Integer caChannel; | |||
private Integer caChannel; | |||
/** | |||
* 应用app图标 | |||
*/ | |||
private String appIcon; | |||
/** |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.response; | |||
package com.trust.ywx.customer.common.model.manager.response; | |||
import lombok.Data; | |||
@@ -7,7 +7,7 @@ import java.io.Serializable; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: AuditCustomerDto.java | |||
* @文件名称: TempFirmDto.java | |||
* @包 路 径: com.trust.ywx.customer.service.dto | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
@@ -17,10 +17,7 @@ import java.io.Serializable; | |||
* @Modify: | |||
*/ | |||
@Data | |||
public class BaseFirmDto implements Serializable { | |||
private static final long serialVersionUID = -6610974008466276331L; | |||
public class TempFirmDto implements Serializable { | |||
/** | |||
* 客户主键 | |||
*/ |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.response; | |||
package com.trust.ywx.customer.common.model.manager.response; | |||
import lombok.Data; | |||
@@ -17,7 +17,24 @@ import java.util.Date; | |||
* @Modify: | |||
*/ | |||
@Data | |||
public class TrustFirmDto extends BaseFirmDto { | |||
public class TrustFirmDto{ | |||
/** | |||
* 客户主键 | |||
*/ | |||
private String uniqueid; | |||
/** | |||
* 客户id | |||
*/ | |||
private String clientId; | |||
/** | |||
* 客户名称 | |||
*/ | |||
private String firmName; | |||
/** | |||
* 审核状态 | |||
*/ | |||
private String firmStatus; | |||
/** | |||
* 第三方应用APP_SECRET | |||
@@ -39,9 +56,8 @@ public class TrustFirmDto extends BaseFirmDto { | |||
/** | |||
* 证书算法 RSA/SM2 | |||
* 改参数迁移至FirmPropParam.certAlg | |||
*/ | |||
// private String certAlg; | |||
private String certAlg; | |||
/** | |||
* 第三方厂商联系地址 | |||
@@ -129,9 +145,8 @@ public class TrustFirmDto extends BaseFirmDto { | |||
/** | |||
* CA 渠道 | |||
* 改参数迁移至FirmPropParam.caChannel | |||
*/ | |||
// private Integer caChannel; | |||
private Integer caChannel; | |||
/** |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.response; | |||
package com.trust.ywx.customer.common.model.manager.response; | |||
import lombok.Data; | |||
@@ -15,7 +15,7 @@ import lombok.Data; | |||
* @Modify: | |||
*/ | |||
@Data | |||
public class TrustFirmWithBLOBs extends TrustFirmDto { | |||
public class TrustFirmDtoWithBLOBs extends TrustFirmDto { | |||
/** | |||
* 证书 |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.request; | |||
package com.trust.ywx.customer.common.model.query.request; | |||
import com.fiftyonetrust.common.model.param.PageParam; | |||
import lombok.Data; |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.request; | |||
package com.trust.ywx.customer.common.model.query.request; | |||
import com.fiftyonetrust.common.model.param.PageParam; | |||
import lombok.Data; |
@@ -1,10 +1,8 @@ | |||
package com.trust.ywx.customer.service.dto.request; | |||
package com.trust.ywx.customer.common.model.query.request; | |||
import com.fiftyonetrust.common.model.param.PageParam; | |||
import lombok.Data; | |||
import java.util.List; | |||
/*************************************************************************** | |||
* <pre></pre> | |||
* @文件名称: Search1FirmParam.java | |||
@@ -33,7 +31,7 @@ public class SearchTrustFirmParam extends PageParam{ | |||
/** | |||
* 审核状态 | |||
*/ | |||
private Integer firmStatus; | |||
private Integer status; | |||
/** | |||
* 销售人员id |
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.response; | |||
package com.trust.ywx.customer.common.model.query.response; | |||
import lombok.Data; | |||
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.response; | |||
package com.trust.ywx.customer.common.model.query.response; | |||
import lombok.Data; | |||
@@ -1,4 +1,4 @@ | |||
package com.trust.ywx.customer.service.dto.response; | |||
package com.trust.ywx.customer.common.model.query.response; | |||
import lombok.Data; | |||
@@ -142,55 +142,6 @@ | |||
<build> | |||
<finalName>${application.name}</finalName> | |||
<resources> | |||
<resource> | |||
<directory>src/main/resources.${deploy.type}</directory> | |||
</resource> | |||
<resource> | |||
<directory>src/main/resources</directory> | |||
<excludes> | |||
</excludes> | |||
<includes> | |||
<include>logback.xml</include> | |||
<include>application.properties</include> | |||
</includes> | |||
<filtering>true</filtering> | |||
</resource> | |||
<resource> | |||
<directory>src/main/resources</directory> | |||
<includes> | |||
<include>spring/**</include> | |||
<include>mybatis/**</include> | |||
<include>META-INF/**</include> | |||
</includes> | |||
<filtering>false</filtering> | |||
</resource> | |||
<resource> | |||
<directory>src/main/resources.${deploy.type}</directory> | |||
<excludes> | |||
</excludes> | |||
<includes> | |||
<include>logback.xml</include> | |||
<include>application.properties</include> | |||
</includes> | |||
<filtering>true</filtering> | |||
</resource> | |||
<resource> | |||
<directory>src/main/resources.${deploy.type}</directory> | |||
<includes> | |||
<include>spring/**</include> | |||
<include>mybatis/**</include> | |||
<include>base.properties</include> | |||
<include>server.properties</include> | |||
<include>redis.properties</include> | |||
<include>jdbc.properties</include> | |||
</includes> | |||
<filtering>false</filtering> | |||
</resource> | |||
</resources> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
@@ -246,6 +197,55 @@ | |||
</dependencies> | |||
</plugin> | |||
</plugins> | |||
<!-- <resources>--> | |||
<!-- <resource>--> | |||
<!-- <directory>src/main/resources.${deploy.type}</directory>--> | |||
<!-- </resource>--> | |||
<!-- <resource>--> | |||
<!-- <directory>src/main/resources</directory>--> | |||
<!-- <excludes>--> | |||
<!-- </excludes>--> | |||
<!-- <includes>--> | |||
<!-- <include>logback.xml</include>--> | |||
<!-- <include>application.properties</include>--> | |||
<!-- </includes>--> | |||
<!-- <filtering>true</filtering>--> | |||
<!-- </resource>--> | |||
<!-- <resource>--> | |||
<!-- <directory>src/main/resources</directory>--> | |||
<!-- <includes>--> | |||
<!-- <include>spring/**</include>--> | |||
<!-- <include>mybatis/**</include>--> | |||
<!-- <include>META-INF/**</include>--> | |||
<!-- </includes>--> | |||
<!-- <filtering>false</filtering>--> | |||
<!-- </resource>--> | |||
<!-- <resource>--> | |||
<!-- <directory>src/main/resources.${deploy.type}</directory>--> | |||
<!-- <excludes>--> | |||
<!-- </excludes>--> | |||
<!-- <includes>--> | |||
<!-- <include>logback.xml</include>--> | |||
<!-- <include>application.properties</include>--> | |||
<!-- </includes>--> | |||
<!-- <filtering>true</filtering>--> | |||
<!-- </resource>--> | |||
<!-- <resource>--> | |||
<!-- <directory>src/main/resources.${deploy.type}</directory>--> | |||
<!-- <includes>--> | |||
<!-- <include>spring/**</include>--> | |||
<!-- <include>mybatis/**</include>--> | |||
<!-- <include>base.properties</include>--> | |||
<!-- <include>server.properties</include>--> | |||
<!-- <include>redis.properties</include>--> | |||
<!-- <include>jdbc.properties</include>--> | |||
<!-- </includes>--> | |||
<!-- <filtering>false</filtering>--> | |||
<!-- </resource>--> | |||
<!-- </resources>--> | |||
</build> | |||
<!--发布--> | |||
@@ -11,6 +11,8 @@ import org.springframework.cache.annotation.EnableCaching; | |||
import org.springframework.context.annotation.ComponentScan; | |||
import org.springframework.context.annotation.ComponentScans; | |||
import org.springframework.context.annotation.ImportResource; | |||
import org.springframework.transaction.annotation.EnableTransactionManagement; | |||
/** | |||
* <pre></pre> | |||
* | |||
@@ -26,9 +28,7 @@ import org.springframework.context.annotation.ImportResource; | |||
@Slf4j | |||
@ImportResource(locations = {"classpath:spring/spring-applicationContext.xml",}) | |||
//@ComponentScan(basePackages = {"com.trust.ywx.customer",}) | |||
@SpringBootApplication(scanBasePackages = {"com.trust.ywx.customer"},exclude = { | |||
DataSourceAutoConfiguration.class, | |||
DataSourceTransactionManagerAutoConfiguration.class,}) | |||
@SpringBootApplication(scanBasePackages = {"com.trust.ywx.customer"}) | |||
public class Application { | |||
public static void main(String[] args) { | |||
@@ -0,0 +1,55 @@ | |||
package com.trust.ywx.customer.commons; | |||
import java.text.SimpleDateFormat; | |||
import java.util.Date; | |||
import java.util.Random; | |||
import java.util.UUID; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: UniqueIdUtils.java | |||
* @包 路 径: com.trust.ywx.customer.commons | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/21 10:00 | |||
* @Modify: | |||
*/ | |||
public class UniqueIdUtils { | |||
/** | |||
* 获取表主键 | |||
* 以后会删除此主键,建立一个int类型的数据库自增主键 | |||
* @return | |||
*/ | |||
public static String genrateUniqueId() { | |||
String uuid = UUID.randomUUID().toString().replace("-", ""); | |||
return uuid; | |||
} | |||
/** | |||
* 获取appSecret | |||
* @return | |||
*/ | |||
public static String generateAppSecret() { | |||
return generateClientId(); | |||
} | |||
/** | |||
* 获取clientId | |||
* @return | |||
*/ | |||
public static String generateClientId() { | |||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); | |||
Random random = new Random(); | |||
int randInt = random.nextInt(10) * 10; | |||
if (randInt == 0) { | |||
randInt = 10; | |||
} | |||
randInt += random.nextInt(10); | |||
return sdf.format(new Date()) + randInt; | |||
} | |||
} |
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Repository; | |||
import org.springframework.util.CollectionUtils; | |||
import javax.annotation.Resource; | |||
import java.util.Arrays; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
@@ -26,7 +27,7 @@ import java.util.stream.Collectors; | |||
@Repository | |||
public class DoctorProductTypeDao { | |||
@Autowired | |||
@Resource | |||
private FirmUsercertChannelMapper usercertChannelMapper; | |||
public List<String> getClientIdByProp(List<String> clientIdList,Integer doctorProductType){ | |||
@@ -36,7 +37,7 @@ public class DoctorProductTypeDao { | |||
if(CollectionUtils.isEmpty(list)) { | |||
return Arrays.asList(); | |||
} | |||
return list.stream().map(group->{return group.getFirmId();}).collect(Collectors.toList()); | |||
return list.stream().map(group-> group.getFirmId()).collect(Collectors.toList()); | |||
} | |||
public List<FirmUsercertChannel> getByClientId(String clientId){ | |||
@@ -1,83 +0,0 @@ | |||
package com.trust.ywx.customer.dao; | |||
import com.trust.ywx.customer.common.enu.ProjectStatusEnum; | |||
import com.trust.ywx.customer.dao.mapper.FirmInfoMapper; | |||
import com.trust.ywx.customer.dao.po.FirmInfo; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExample; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Repository; | |||
import javax.annotation.Resource; | |||
import java.util.List; | |||
import java.util.Map; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmDao.java | |||
* @包 路 径: com.trust.ywx.customer.dao | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 客户查询DAO fixme 每次查询都要加项目状态!=删除的。 为什么不直接物理删除呢 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 10:31 | |||
* @Modify: | |||
*/ | |||
@Repository | |||
public class FirmDao { | |||
@Resource | |||
private FirmInfoMapper firmInfoMapper; | |||
public Long countByExample(FirmInfoExample example) { | |||
return firmInfoMapper.countByExample(example); | |||
} | |||
public List<FirmInfo> getListByIds(List<String> clientIdList, int pageSize, int pageNo) { | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdIn(clientIdList).andProjectStatusNotEqualTo(ProjectStatusEnum.DEL.getCode()); | |||
example.page(pageNo, pageSize); | |||
return firmInfoMapper.selectByExample(example); | |||
} | |||
/** | |||
* 根据客户Id查询客户信息 | |||
* | |||
* @param clientId | |||
* @return | |||
*/ | |||
public FirmInfo getFrimByClientId(String clientId) { | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId).andProjectStatusNotEqualTo(ProjectStatusEnum.DEL.getCode()); | |||
return firmInfoMapper.selectOneByExample(example); | |||
} | |||
/** | |||
* 根据客户Id查询客户信息 | |||
* | |||
* @param clientId | |||
* @return | |||
*/ | |||
public FirmInfo getFrimBLOBsByClientId(String clientId) { | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId).andProjectStatusNotEqualTo(ProjectStatusEnum.DEL.getCode()); | |||
return firmInfoMapper.selectOneByExampleWithBLOBs(example); | |||
} | |||
/** | |||
* 根据属性集合获取客户id | |||
* | |||
* @param propMap | |||
*/ | |||
public List<String> getClientIdByProps(Map<String, String> propMap) { | |||
// firmCustomMapper.getClientIdByProps(propMap); | |||
return null; | |||
} | |||
public int insert(FirmInfo firmInfo) { | |||
firmInfo.setCreateTime(null); | |||
firmInfo.setUpdateTime(null); | |||
return firmInfoMapper.insertSelective(firmInfo); | |||
} | |||
} |
@@ -1,13 +1,12 @@ | |||
package com.trust.ywx.customer.dao; | |||
import com.trust.ywx.customer.commons.UniqueIdUtils; | |||
import com.trust.ywx.customer.dao.mapper.FirmInfoExtendMapper; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExtend; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExtendExample; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Repository; | |||
import org.springframework.util.CollectionUtils; | |||
import org.springframework.util.StringUtils; | |||
import javax.annotation.Resource; | |||
import java.util.*; | |||
@@ -31,24 +30,22 @@ public class FirmExtendDao { | |||
@Resource | |||
FirmInfoExtendMapper extendMapper; | |||
public int batchInsert(String clientId, Map<String,String> propMap){ | |||
// 先删除 fixme 要不要根据要添加的属性精准删除? | |||
public int batchInsert(String clientId, Map<String, String> propMap) { | |||
// 先删除 | |||
FirmInfoExtendExample example = new FirmInfoExtendExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId); | |||
int num = extendMapper.deleteByExample(example); | |||
if(num>propMap.size()){ | |||
log.warn("clientId={},删除的属性多余待添加的属性!",clientId); | |||
} | |||
example.createCriteria().andClientIdEqualTo(clientId) | |||
//根据传入的配置精准删除 | |||
.andPropNameIn(propMap.keySet().stream().collect(Collectors.toList())); | |||
extendMapper.deleteByExample(example); | |||
// 批量添加 | |||
List<FirmInfoExtend> list = new ArrayList<>(propMap.size()); | |||
for (Map.Entry<String,String> prop:propMap.entrySet()) { | |||
if("null".equalsIgnoreCase(prop.getValue())){ | |||
for (Map.Entry<String, String> prop : propMap.entrySet()) { | |||
if (null == prop.getValue() || "null".equalsIgnoreCase(prop.getValue())) { | |||
continue; | |||
} | |||
FirmInfoExtend po = new FirmInfoExtend(); | |||
// TODO 以后要废弃该字段,新主键为int类型,数据库递增。 | |||
po.setUniqueid(UUID.randomUUID().toString().replace("-", "")); | |||
po.setUniqueid(UniqueIdUtils.genrateUniqueId()); | |||
po.setClientId(clientId); | |||
po.setPropName(prop.getKey()); | |||
po.setPropValue(prop.getValue()); | |||
@@ -56,34 +53,36 @@ public class FirmExtendDao { | |||
} | |||
return extendMapper.batchInsert(list); | |||
} | |||
/** | |||
* 根据属性集合获取客户id | |||
* | |||
* @param propName | |||
* @param clientIdList | |||
*/ | |||
public List<String> getByPropsAndClientId(String propName,String propValue, List<String> clientIdList){ | |||
public List<String> getByPropsAndClientId(String propName, String propValue, List<String> clientIdList) { | |||
FirmInfoExtendExample example = new FirmInfoExtendExample(); | |||
FirmInfoExtendExample.Criteria where = example.createCriteria(); | |||
where.andPropNameEqualTo(propName).andPropValueEqualTo(propValue); | |||
if(!CollectionUtils.isEmpty(clientIdList)){ | |||
if (!CollectionUtils.isEmpty(clientIdList)) { | |||
where.andClientIdIn(clientIdList); | |||
} | |||
List<FirmInfoExtend> poList = extendMapper.selectByExample(example); | |||
if(CollectionUtils.isEmpty(poList)){ | |||
if (CollectionUtils.isEmpty(poList)) { | |||
return Arrays.asList(); | |||
} | |||
return poList.stream().map(extend->{ | |||
return poList.stream().map(extend -> { | |||
return extend.getClientId(); | |||
}).collect(Collectors.toList()); | |||
} | |||
public List<FirmInfoExtend> getListByClientId(String clientId){ | |||
public List<FirmInfoExtend> getListByClientId(String clientId) { | |||
FirmInfoExtendExample example = new FirmInfoExtendExample(); | |||
FirmInfoExtendExample.Criteria where = example.createCriteria(); | |||
where.andClientIdEqualTo(clientId); | |||
List<FirmInfoExtend> poList = extendMapper.selectByExample(example); | |||
if(CollectionUtils.isEmpty(poList)){ | |||
if (CollectionUtils.isEmpty(poList)) { | |||
return Arrays.asList(); | |||
} | |||
@@ -0,0 +1,74 @@ | |||
package com.trust.ywx.customer.dao; | |||
import com.trust.ywx.customer.common.enu.TempFirmStatusEnum; | |||
import com.trust.ywx.customer.dao.mapper.FirmInfoTempMapper; | |||
import com.trust.ywx.customer.dao.po.FirmInfoTemp; | |||
import com.trust.ywx.customer.dao.po.FirmInfoTempExample; | |||
import org.springframework.stereotype.Repository; | |||
import javax.annotation.Resource; | |||
import java.util.List; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: AuditFirmDao.java | |||
* @包 路 径: com.trust.ywx.customer.dao | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/21 11:40 | |||
* @Modify: | |||
*/ | |||
@Repository | |||
public class TempFirmDao { | |||
@Resource | |||
FirmInfoTempMapper tempMapper; | |||
public FirmInfoTemp getByClientId(String clientId){ | |||
FirmInfoTempExample example = new FirmInfoTempExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId); | |||
return tempMapper.selectOneByExample(example); | |||
} | |||
public int auditPass(String clientId){ | |||
// 将临时客户修改为已审核! | |||
FirmInfoTempExample example = new FirmInfoTempExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId). | |||
andFirmStatusEqualTo(TempFirmStatusEnum.TEMP_UNAUTHEN.getCode()+""); | |||
FirmInfoTemp record = new FirmInfoTemp(); | |||
record.setFirmStatus(TempFirmStatusEnum.TEMP_PASS.getCode()+""); | |||
return tempMapper.updateByExampleSelective(record,example); | |||
} | |||
public int auditReject(String clientId){ | |||
// 将临时客户修改为审核拒绝! | |||
FirmInfoTempExample example = new FirmInfoTempExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId). | |||
andFirmStatusEqualTo(TempFirmStatusEnum.TEMP_UNAUTHEN.getCode()+""); | |||
FirmInfoTemp record = new FirmInfoTemp(); | |||
record.setFirmStatus(TempFirmStatusEnum.TEMP_REFUSE.getCode()+""); | |||
return tempMapper.updateByExampleSelective(record,example); | |||
} | |||
public List<FirmInfoTemp> getListByFirmName(String firmName) { | |||
FirmInfoTempExample example = new FirmInfoTempExample(); | |||
example.createCriteria().andFirmNameEqualTo(firmName); | |||
return tempMapper.selectByExample(example); | |||
} | |||
public int insert(FirmInfoTemp temp) { | |||
temp.setCreateTime(null); | |||
temp.setUpdateTime(null); | |||
return tempMapper.insertSelective(temp); | |||
} | |||
public int update(FirmInfoTemp temp) { | |||
temp.setUpdateTime(null); | |||
FirmInfoTempExample example = new FirmInfoTempExample(); | |||
example.createCriteria().andClientIdEqualTo(temp.getClientId()); | |||
return tempMapper.updateByExampleSelective(temp,example); | |||
} | |||
} |
@@ -0,0 +1,99 @@ | |||
package com.trust.ywx.customer.dao; | |||
import com.trust.ywx.customer.common.enu.FirmStatusEnum; | |||
import com.trust.ywx.customer.common.enu.ProjectStatusEnum; | |||
import com.trust.ywx.customer.dao.mapper.FirmInfoMapper; | |||
import com.trust.ywx.customer.dao.po.FirmInfo; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExample; | |||
import org.springframework.stereotype.Repository; | |||
import javax.annotation.Resource; | |||
import java.util.List; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmDao.java | |||
* @包 路 径: com.trust.ywx.customer.dao | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 客户查询DAO | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 10:31 | |||
* @Modify: | |||
*/ | |||
@Repository | |||
public class TrustFirmDao { | |||
@Resource | |||
private FirmInfoMapper firmInfoMapper; | |||
public List<FirmInfo> getListByOrgCode(String orgCode){ | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientOrgCodeEqualTo(orgCode); | |||
return firmInfoMapper.selectByExample(example); | |||
} | |||
public List<FirmInfo> getListByFirmName(String firmName){ | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andFirmNameEqualTo(firmName); | |||
return firmInfoMapper.selectByExample(example); | |||
} | |||
public List<FirmInfo> getListByIds(List<String> clientIdList, int pageSize, int pageNo) { | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdIn(clientIdList); | |||
example.page(pageNo, pageSize); | |||
return firmInfoMapper.selectByExample(example); | |||
} | |||
/** | |||
* 根据客户Id查询客户信息 | |||
* 已删除的客户不对外暴露 | |||
* @param clientId | |||
* @return | |||
*/ | |||
public FirmInfo getFrimByClientId(String clientId) { | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId); | |||
return firmInfoMapper.selectOneByExample(example); | |||
} | |||
/** | |||
* 根据客户Id查询客户信息 | |||
* 已删除的客户不对外暴露 | |||
* @param clientId | |||
* @return | |||
*/ | |||
public FirmInfo getFirmBLOBsByClientId(String clientId) { | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId); | |||
return firmInfoMapper.selectOneByExampleWithBLOBs(example); | |||
} | |||
public int insert(FirmInfo firmInfo) { | |||
firmInfo.setCreateTime(null); | |||
firmInfo.setUpdateTime(null); | |||
return firmInfoMapper.insertSelective(firmInfo); | |||
} | |||
public int update(FirmInfo firmInfo) { | |||
firmInfo.setUpdateTime(null); | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdEqualTo(firmInfo.getClientId()); | |||
return firmInfoMapper.updateByExampleSelective(firmInfo,example); | |||
} | |||
/** | |||
* 根据客户id删除客户 | |||
* @param clientId | |||
* @return | |||
*/ | |||
public int deleteByClientId(String clientId) { | |||
FirmInfo firmInfo = new FirmInfo(); | |||
firmInfo.setUpdateTime(null); | |||
firmInfo.setStatus(FirmStatusEnum.FIRM_SUB_DELETE.getCode()); | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdEqualTo(clientId); | |||
return firmInfoMapper.updateByExampleSelective(firmInfo,example); | |||
} | |||
} |
@@ -1,36 +0,0 @@ | |||
package com.trust.ywx.customer.dao.mapper; | |||
import com.trust.ywx.customer.dao.po.FirmInfoDetail; | |||
import com.trust.ywx.customer.dao.po.FirmInfoDetailExample; | |||
import java.util.List; | |||
import org.apache.ibatis.annotations.Param; | |||
public interface FirmInfoDetailMapper { | |||
long countByExample(FirmInfoDetailExample example); | |||
int deleteByExample(FirmInfoDetailExample example); | |||
int deleteByPrimaryKey(String uniqueid); | |||
int insert(FirmInfoDetail record); | |||
int insertSelective(FirmInfoDetail record); | |||
FirmInfoDetail selectOneByExample(FirmInfoDetailExample example); | |||
List<FirmInfoDetail> selectByExample(FirmInfoDetailExample example); | |||
FirmInfoDetail selectByPrimaryKey(String uniqueid); | |||
int updateByExampleSelective(@Param("record") FirmInfoDetail record, @Param("example") FirmInfoDetailExample example); | |||
int updateByExample(@Param("record") FirmInfoDetail record, @Param("example") FirmInfoDetailExample example); | |||
int updateByPrimaryKeySelective(FirmInfoDetail record); | |||
int updateByPrimaryKey(FirmInfoDetail record); | |||
int batchInsert(@Param("list") List<FirmInfoDetail> list); | |||
int batchInsertSelective(@Param("list") List<FirmInfoDetail> list, @Param("selective") FirmInfoDetail.Column ... selective); | |||
} |
@@ -1,574 +0,0 @@ | |||
package com.trust.ywx.customer.dao.po; | |||
import java.io.Serializable; | |||
import java.util.ArrayList; | |||
import java.util.Arrays; | |||
import java.util.Date; | |||
import lombok.Data; | |||
/** | |||
* Table: firm_info | |||
*/ | |||
@Data | |||
public class CustomerInfo implements Serializable { | |||
/** | |||
* 厂商的唯一标识ID | |||
* | |||
* Table: firm_info | |||
* Column: uniqueid | |||
* Nullable: false | |||
*/ | |||
private String uniqueid; | |||
/** | |||
* 第三方应用标识 | |||
* | |||
* Table: firm_info | |||
* Column: client_id | |||
* Nullable: false | |||
*/ | |||
private String clientId; | |||
/** | |||
* 厂商联系人 | |||
* | |||
* Table: firm_info | |||
* Column: firm_person | |||
* Nullable: false | |||
*/ | |||
private String firmPerson; | |||
/** | |||
* 第三方应用APP_SECRET | |||
* | |||
* Table: firm_info | |||
* Column: app_secret | |||
* Nullable: false | |||
*/ | |||
private String appSecret; | |||
/** | |||
* 第三方应用厂商名称 | |||
* | |||
* Table: firm_info | |||
* Column: firm_name | |||
* Nullable: true | |||
*/ | |||
private String firmName; | |||
/** | |||
* 第三方厂商联系电话 | |||
* | |||
* Table: firm_info | |||
* Column: firm_phone | |||
* Nullable: true | |||
*/ | |||
private String firmPhone; | |||
/** | |||
* 证书算法 RSA/SM2 | |||
* | |||
* Table: firm_info | |||
* Column: cert_alg | |||
* Nullable: false | |||
*/ | |||
private String certAlg; | |||
/** | |||
* 第三方厂商联系地址 | |||
* | |||
* Table: firm_info | |||
* Column: firm_address | |||
* Nullable: true | |||
*/ | |||
private String firmAddress; | |||
/** | |||
* 第三方厂商描述 | |||
* | |||
* Table: firm_info | |||
* Column: note | |||
* Nullable: true | |||
*/ | |||
private String note; | |||
/** | |||
* 第三方厂商邮箱 | |||
* | |||
* Table: firm_info | |||
* Column: firm_email | |||
* Nullable: true | |||
*/ | |||
private String firmEmail; | |||
/** | |||
* 第三方厂商状态 | |||
* | |||
* Table: firm_info | |||
* Column: status | |||
* Nullable: true | |||
*/ | |||
private Integer status; | |||
/** | |||
* 企业组织机构号 | |||
* | |||
* Table: firm_info | |||
* Column: client_org_code | |||
* Nullable: true | |||
*/ | |||
private String clientOrgCode; | |||
/** | |||
* 信步云appid | |||
* | |||
* Table: firm_info | |||
* Column: mssp_appid | |||
* Nullable: true | |||
*/ | |||
private String msspAppid; | |||
/** | |||
* 证书发放厂家 | |||
* | |||
* Table: firm_info | |||
* Column: cert_agency | |||
* Nullable: true | |||
*/ | |||
private String certAgency; | |||
/** | |||
* 0 手动制章 1 自动制章 | |||
* | |||
* Table: firm_info | |||
* Column: stamp_type | |||
* Nullable: true | |||
*/ | |||
private String stampType; | |||
/** | |||
* 制章名称 | |||
* | |||
* Table: firm_info | |||
* Column: stamp_name | |||
* Nullable: true | |||
*/ | |||
private String stampName; | |||
/** | |||
* 外键id | |||
* | |||
* Table: firm_info | |||
* Column: open_id | |||
* Nullable: true | |||
*/ | |||
private String openId; | |||
/** | |||
* 审核完成之后是否发送短信提示 | |||
* | |||
* Table: firm_info | |||
* Column: send_sms | |||
* Nullable: true | |||
*/ | |||
private String sendSms; | |||
/** | |||
* 销售人员id | |||
* | |||
* Table: firm_info | |||
* Column: sale_person_id | |||
* Nullable: true | |||
*/ | |||
private String salePersonId; | |||
/** | |||
* 技术支持 | |||
* | |||
* Table: firm_info | |||
* Column: tech_person_id | |||
* Nullable: true | |||
*/ | |||
private String techPersonId; | |||
/** | |||
* 创建 | |||
* | |||
* Table: firm_info | |||
* Column: create_time | |||
* Nullable: true | |||
*/ | |||
private Date createTime; | |||
/** | |||
* 修改时间 | |||
* | |||
* Table: firm_info | |||
* Column: update_time | |||
* Nullable: true | |||
*/ | |||
private Date updateTime; | |||
/** | |||
* 代理厂商id | |||
* | |||
* Table: firm_info | |||
* Column: agent_client_id | |||
* Nullable: true | |||
*/ | |||
private String agentClientId; | |||
/** | |||
* 代理商销售 | |||
* | |||
* Table: firm_info | |||
* Column: agent_sale_id | |||
* Nullable: true | |||
*/ | |||
private String agentSaleId; | |||
/** | |||
* Table: firm_info | |||
* Column: ca_channel | |||
* Nullable: true | |||
*/ | |||
private Integer caChannel; | |||
/** | |||
* 1正常 2试用 3消亡 | |||
* | |||
* Table: firm_info | |||
* Column: project_status | |||
* Nullable: true | |||
*/ | |||
private Integer projectStatus; | |||
/** | |||
* 数字认证运营平台app_id | |||
* | |||
* Table: firm_info | |||
* Column: plat_app_id | |||
* Nullable: true | |||
*/ | |||
private Integer platAppId; | |||
/** | |||
* 第三方应用证书 | |||
* | |||
* Table: firm_info | |||
* Column: app_cert | |||
* Nullable: true | |||
*/ | |||
private String appCert; | |||
/** | |||
* 第三方厂商图标 | |||
* | |||
* Table: firm_info | |||
* Column: app_icon | |||
* Nullable: true | |||
*/ | |||
private String appIcon; | |||
private static final long serialVersionUID = 1L; | |||
@Override | |||
public String toString() { | |||
StringBuilder sb = new StringBuilder(); | |||
sb.append(getClass().getSimpleName()); | |||
sb.append(" ["); | |||
sb.append("Hash = ").append(hashCode()); | |||
sb.append(", uniqueid=").append(uniqueid); | |||
sb.append(", clientId=").append(clientId); | |||
sb.append(", firmPerson=").append(firmPerson); | |||
sb.append(", appSecret=").append(appSecret); | |||
sb.append(", firmName=").append(firmName); | |||
sb.append(", firmPhone=").append(firmPhone); | |||
sb.append(", certAlg=").append(certAlg); | |||
sb.append(", firmAddress=").append(firmAddress); | |||
sb.append(", note=").append(note); | |||
sb.append(", firmEmail=").append(firmEmail); | |||
sb.append(", status=").append(status); | |||
sb.append(", clientOrgCode=").append(clientOrgCode); | |||
sb.append(", msspAppid=").append(msspAppid); | |||
sb.append(", certAgency=").append(certAgency); | |||
sb.append(", stampType=").append(stampType); | |||
sb.append(", stampName=").append(stampName); | |||
sb.append(", openId=").append(openId); | |||
sb.append(", sendSms=").append(sendSms); | |||
sb.append(", salePersonId=").append(salePersonId); | |||
sb.append(", techPersonId=").append(techPersonId); | |||
sb.append(", createTime=").append(createTime); | |||
sb.append(", updateTime=").append(updateTime); | |||
sb.append(", agentClientId=").append(agentClientId); | |||
sb.append(", agentSaleId=").append(agentSaleId); | |||
sb.append(", caChannel=").append(caChannel); | |||
sb.append(", projectStatus=").append(projectStatus); | |||
sb.append(", platAppId=").append(platAppId); | |||
sb.append(", appCert=").append(appCert); | |||
sb.append(", appIcon=").append(appIcon); | |||
sb.append(", serialVersionUID=").append(serialVersionUID); | |||
sb.append("]"); | |||
return sb.toString(); | |||
} | |||
public static CustomerInfo.Builder builder() { | |||
return new CustomerInfo.Builder(); | |||
} | |||
public static class Builder { | |||
private CustomerInfo obj; | |||
public Builder() { | |||
this.obj = new CustomerInfo(); | |||
} | |||
public Builder uniqueid(String uniqueid) { | |||
obj.setUniqueid(uniqueid); | |||
return this; | |||
} | |||
public Builder clientId(String clientId) { | |||
obj.setClientId(clientId); | |||
return this; | |||
} | |||
public Builder firmPerson(String firmPerson) { | |||
obj.setFirmPerson(firmPerson); | |||
return this; | |||
} | |||
public Builder appSecret(String appSecret) { | |||
obj.setAppSecret(appSecret); | |||
return this; | |||
} | |||
public Builder firmName(String firmName) { | |||
obj.setFirmName(firmName); | |||
return this; | |||
} | |||
public Builder firmPhone(String firmPhone) { | |||
obj.setFirmPhone(firmPhone); | |||
return this; | |||
} | |||
public Builder certAlg(String certAlg) { | |||
obj.setCertAlg(certAlg); | |||
return this; | |||
} | |||
public Builder firmAddress(String firmAddress) { | |||
obj.setFirmAddress(firmAddress); | |||
return this; | |||
} | |||
public Builder note(String note) { | |||
obj.setNote(note); | |||
return this; | |||
} | |||
public Builder firmEmail(String firmEmail) { | |||
obj.setFirmEmail(firmEmail); | |||
return this; | |||
} | |||
public Builder status(Integer status) { | |||
obj.setStatus(status); | |||
return this; | |||
} | |||
public Builder clientOrgCode(String clientOrgCode) { | |||
obj.setClientOrgCode(clientOrgCode); | |||
return this; | |||
} | |||
public Builder msspAppid(String msspAppid) { | |||
obj.setMsspAppid(msspAppid); | |||
return this; | |||
} | |||
public Builder certAgency(String certAgency) { | |||
obj.setCertAgency(certAgency); | |||
return this; | |||
} | |||
public Builder stampType(String stampType) { | |||
obj.setStampType(stampType); | |||
return this; | |||
} | |||
public Builder stampName(String stampName) { | |||
obj.setStampName(stampName); | |||
return this; | |||
} | |||
public Builder openId(String openId) { | |||
obj.setOpenId(openId); | |||
return this; | |||
} | |||
public Builder sendSms(String sendSms) { | |||
obj.setSendSms(sendSms); | |||
return this; | |||
} | |||
public Builder salePersonId(String salePersonId) { | |||
obj.setSalePersonId(salePersonId); | |||
return this; | |||
} | |||
public Builder techPersonId(String techPersonId) { | |||
obj.setTechPersonId(techPersonId); | |||
return this; | |||
} | |||
public Builder createTime(Date createTime) { | |||
obj.setCreateTime(createTime); | |||
return this; | |||
} | |||
public Builder updateTime(Date updateTime) { | |||
obj.setUpdateTime(updateTime); | |||
return this; | |||
} | |||
public Builder agentClientId(String agentClientId) { | |||
obj.setAgentClientId(agentClientId); | |||
return this; | |||
} | |||
public Builder agentSaleId(String agentSaleId) { | |||
obj.setAgentSaleId(agentSaleId); | |||
return this; | |||
} | |||
public Builder caChannel(Integer caChannel) { | |||
obj.setCaChannel(caChannel); | |||
return this; | |||
} | |||
public Builder projectStatus(Integer projectStatus) { | |||
obj.setProjectStatus(projectStatus); | |||
return this; | |||
} | |||
public Builder platAppId(Integer platAppId) { | |||
obj.setPlatAppId(platAppId); | |||
return this; | |||
} | |||
public Builder appCert(String appCert) { | |||
obj.setAppCert(appCert); | |||
return this; | |||
} | |||
public Builder appIcon(String appIcon) { | |||
obj.setAppIcon(appIcon); | |||
return this; | |||
} | |||
public CustomerInfo build() { | |||
return this.obj; | |||
} | |||
} | |||
public enum Column { | |||
uniqueid("uniqueid", "uniqueid", "VARCHAR", false), | |||
clientId("client_id", "clientId", "VARCHAR", false), | |||
firmPerson("firm_person", "firmPerson", "VARCHAR", false), | |||
appSecret("app_secret", "appSecret", "VARCHAR", false), | |||
firmName("firm_name", "firmName", "VARCHAR", false), | |||
firmPhone("firm_phone", "firmPhone", "VARCHAR", false), | |||
certAlg("cert_alg", "certAlg", "VARCHAR", false), | |||
firmAddress("firm_address", "firmAddress", "VARCHAR", false), | |||
note("note", "note", "VARCHAR", false), | |||
firmEmail("firm_email", "firmEmail", "VARCHAR", false), | |||
status("status", "status", "INTEGER", false), | |||
clientOrgCode("client_org_code", "clientOrgCode", "VARCHAR", false), | |||
msspAppid("mssp_appid", "msspAppid", "VARCHAR", false), | |||
certAgency("cert_agency", "certAgency", "VARCHAR", false), | |||
stampType("stamp_type", "stampType", "CHAR", false), | |||
stampName("stamp_name", "stampName", "VARCHAR", false), | |||
openId("open_id", "openId", "VARCHAR", false), | |||
sendSms("send_sms", "sendSms", "VARCHAR", false), | |||
salePersonId("sale_person_id", "salePersonId", "VARCHAR", false), | |||
techPersonId("tech_person_id", "techPersonId", "VARCHAR", false), | |||
createTime("create_time", "createTime", "TIMESTAMP", false), | |||
updateTime("update_time", "updateTime", "TIMESTAMP", false), | |||
agentClientId("agent_client_id", "agentClientId", "VARCHAR", false), | |||
agentSaleId("agent_sale_id", "agentSaleId", "VARCHAR", false), | |||
caChannel("ca_channel", "caChannel", "INTEGER", false), | |||
projectStatus("project_status", "projectStatus", "INTEGER", false), | |||
platAppId("plat_app_id", "platAppId", "INTEGER", false), | |||
appCert("app_cert", "appCert", "LONGVARCHAR", false), | |||
appIcon("app_icon", "appIcon", "LONGVARCHAR", false); | |||
private static final String BEGINNING_DELIMITER = "\""; | |||
private static final String ENDING_DELIMITER = "\""; | |||
private final String column; | |||
private final boolean isColumnNameDelimited; | |||
private final String javaProperty; | |||
private final String jdbcType; | |||
public String value() { | |||
return this.column; | |||
} | |||
public String getValue() { | |||
return this.column; | |||
} | |||
public String getJavaProperty() { | |||
return this.javaProperty; | |||
} | |||
public String getJdbcType() { | |||
return this.jdbcType; | |||
} | |||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { | |||
this.column = column; | |||
this.javaProperty = javaProperty; | |||
this.jdbcType = jdbcType; | |||
this.isColumnNameDelimited = isColumnNameDelimited; | |||
} | |||
public String desc() { | |||
return this.getEscapedColumnName() + " DESC"; | |||
} | |||
public String asc() { | |||
return this.getEscapedColumnName() + " ASC"; | |||
} | |||
public static Column[] excludes(Column ... excludes) { | |||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values())); | |||
if (excludes != null && excludes.length > 0) { | |||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); | |||
} | |||
return columns.toArray(new Column[]{}); | |||
} | |||
public static Column[] all() { | |||
return Column.values(); | |||
} | |||
public String getEscapedColumnName() { | |||
if (this.isColumnNameDelimited) { | |||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); | |||
} else { | |||
return this.column; | |||
} | |||
} | |||
public String getAliasedEscapedColumnName() { | |||
return this.getEscapedColumnName(); | |||
} | |||
} | |||
} |
@@ -30,7 +30,7 @@ public class FirmInfo implements Serializable { | |||
private String clientId; | |||
/** | |||
* 厂商联系人 | |||
* 客户联系人 | |||
* | |||
* Table: firm_info | |||
* Column: firm_person | |||
@@ -52,7 +52,7 @@ public class FirmInfo implements Serializable { | |||
* | |||
* Table: firm_info | |||
* Column: firm_name | |||
* Nullable: true | |||
* Nullable: false | |||
*/ | |||
private String firmName; | |||
@@ -61,7 +61,7 @@ public class FirmInfo implements Serializable { | |||
* | |||
* Table: firm_info | |||
* Column: firm_phone | |||
* Nullable: true | |||
* Nullable: false | |||
*/ | |||
private String firmPhone; | |||
@@ -79,7 +79,7 @@ public class FirmInfo implements Serializable { | |||
* | |||
* Table: firm_info | |||
* Column: firm_address | |||
* Nullable: true | |||
* Nullable: false | |||
*/ | |||
private String firmAddress; | |||
@@ -88,7 +88,7 @@ public class FirmInfo implements Serializable { | |||
* | |||
* Table: firm_info | |||
* Column: note | |||
* Nullable: true | |||
* Nullable: false | |||
*/ | |||
private String note; | |||
@@ -108,7 +108,7 @@ public class FirmInfo implements Serializable { | |||
* Column: status | |||
* Nullable: true | |||
*/ | |||
private Integer firmStatus; | |||
private Integer status; | |||
/** | |||
* 企业组织机构号 | |||
@@ -288,7 +288,7 @@ public class FirmInfo implements Serializable { | |||
sb.append(", firmAddress=").append(firmAddress); | |||
sb.append(", note=").append(note); | |||
sb.append(", firmEmail=").append(firmEmail); | |||
sb.append(", firmStatus=").append(firmStatus); | |||
sb.append(", status=").append(status); | |||
sb.append(", clientOrgCode=").append(clientOrgCode); | |||
sb.append(", msspAppid=").append(msspAppid); | |||
sb.append(", certAgency=").append(certAgency); | |||
@@ -373,8 +373,8 @@ public class FirmInfo implements Serializable { | |||
return this; | |||
} | |||
public Builder firmStatus(Integer firmStatus) { | |||
obj.setFirmStatus(firmStatus); | |||
public Builder status(Integer status) { | |||
obj.setStatus(status); | |||
return this; | |||
} | |||
@@ -484,7 +484,7 @@ public class FirmInfo implements Serializable { | |||
firmAddress("firm_address", "firmAddress", "VARCHAR", false), | |||
note("note", "note", "VARCHAR", false), | |||
firmEmail("firm_email", "firmEmail", "VARCHAR", false), | |||
firmStatus("status", "firmStatus", "INTEGER", false), | |||
status("status", "status", "INTEGER", false), | |||
clientOrgCode("client_org_code", "clientOrgCode", "VARCHAR", false), | |||
msspAppid("mssp_appid", "msspAppid", "VARCHAR", false), | |||
certAgency("cert_agency", "certAgency", "VARCHAR", false), | |||
@@ -1,458 +0,0 @@ | |||
package com.trust.ywx.customer.dao.po; | |||
import java.io.Serializable; | |||
import java.util.ArrayList; | |||
import java.util.Arrays; | |||
import java.util.Date; | |||
import lombok.Data; | |||
/** | |||
* Table: firm_info_detail | |||
*/ | |||
@Data | |||
public class FirmInfoDetail implements Serializable { | |||
/** | |||
* Table: firm_info_detail | |||
* Column: uniqueid | |||
* Nullable: false | |||
*/ | |||
private String uniqueid; | |||
/** | |||
* Table: firm_info_detail | |||
* Column: open_id | |||
* Nullable: true | |||
*/ | |||
private String openId; | |||
/** | |||
* 组织机构代码 | |||
* | |||
* Table: firm_info_detail | |||
* Column: org_code_url | |||
* Nullable: true | |||
*/ | |||
private String orgCodeUrl; | |||
/** | |||
* 法人身份证正面 | |||
* | |||
* Table: firm_info_detail | |||
* Column: juridical_idcard_front_url | |||
* Nullable: true | |||
*/ | |||
private String juridicalIdcardFrontUrl; | |||
/** | |||
* 法人身份证背面 | |||
* | |||
* Table: firm_info_detail | |||
* Column: juridical_idcard_back_url | |||
* Nullable: true | |||
*/ | |||
private String juridicalIdcardBackUrl; | |||
/** | |||
* 法人临时身份证 | |||
* | |||
* Table: firm_info_detail | |||
* Column: juridical_tmp_id_url | |||
* Nullable: true | |||
*/ | |||
private String juridicalTmpIdUrl; | |||
/** | |||
* 工商注册号 | |||
* | |||
* Table: firm_info_detail | |||
* Column: firm_bus_reg_num | |||
* Nullable: true | |||
*/ | |||
private String firmBusRegNum; | |||
/** | |||
* 社会信用代码 | |||
* | |||
* Table: firm_info_detail | |||
* Column: firm_soc_cre_code | |||
* Nullable: true | |||
*/ | |||
private String firmSocCreCode; | |||
/** | |||
* Table: firm_info_detail | |||
* Column: firm_org_code | |||
* Nullable: true | |||
*/ | |||
private String firmOrgCode; | |||
/** | |||
* 税务登记证号 | |||
* | |||
* Table: firm_info_detail | |||
* Column: firm_tax_reg_cert_code | |||
* Nullable: true | |||
*/ | |||
private String firmTaxRegCertCode; | |||
/** | |||
* 经营范围 | |||
* | |||
* Table: firm_info_detail | |||
* Column: firm_bus_scope | |||
* Nullable: true | |||
*/ | |||
private String firmBusScope; | |||
/** | |||
* 经营期限 | |||
* | |||
* Table: firm_info_detail | |||
* Column: firm_bus_time | |||
* Nullable: true | |||
*/ | |||
private Date firmBusTime; | |||
/** | |||
* 法人归属地 | |||
* | |||
* Table: firm_info_detail | |||
* Column: juridical_nationality | |||
* Nullable: true | |||
*/ | |||
private String juridicalNationality; | |||
/** | |||
* 法人身份证号 | |||
* | |||
* Table: firm_info_detail | |||
* Column: juridical_idcard | |||
* Nullable: true | |||
*/ | |||
private String juridicalIdcard; | |||
/** | |||
* 法人证件有效期 | |||
* | |||
* Table: firm_info_detail | |||
* Column: juridical_time | |||
* Nullable: true | |||
*/ | |||
private Date juridicalTime; | |||
/** | |||
* 代理人姓名 | |||
* | |||
* Table: firm_info_detail | |||
* Column: agent_name | |||
* Nullable: true | |||
*/ | |||
private String agentName; | |||
/** | |||
* 代理人身份证号 | |||
* | |||
* Table: firm_info_detail | |||
* Column: agent_idcard | |||
* Nullable: true | |||
*/ | |||
private String agentIdcard; | |||
/** | |||
* 代理人证件有效期 | |||
* | |||
* Table: firm_info_detail | |||
* Column: agent_time | |||
* Nullable: true | |||
*/ | |||
private Date agentTime; | |||
/** | |||
* 企业电话 | |||
* | |||
* Table: firm_info_detail | |||
* Column: firm_phone | |||
* Nullable: true | |||
*/ | |||
private String firmPhone; | |||
/** | |||
* 企业营业执照 | |||
* | |||
* Table: firm_info_detail | |||
* Column: business_license_url | |||
* Nullable: true | |||
*/ | |||
private String businessLicenseUrl; | |||
/** | |||
* 法人身份证照片(实名认证获得) | |||
* | |||
* Table: firm_info_detail | |||
* Column: idcard_juridical_url | |||
* Nullable: true | |||
*/ | |||
private String idcardJuridicalUrl; | |||
/** | |||
* 代理人身份证照片(实名认证获取) | |||
* | |||
* Table: firm_info_detail | |||
* Column: idcard_agent_url | |||
* Nullable: true | |||
*/ | |||
private String idcardAgentUrl; | |||
private static final long serialVersionUID = 1L; | |||
@Override | |||
public String toString() { | |||
StringBuilder sb = new StringBuilder(); | |||
sb.append(getClass().getSimpleName()); | |||
sb.append(" ["); | |||
sb.append("Hash = ").append(hashCode()); | |||
sb.append(", uniqueid=").append(uniqueid); | |||
sb.append(", openId=").append(openId); | |||
sb.append(", orgCodeUrl=").append(orgCodeUrl); | |||
sb.append(", juridicalIdcardFrontUrl=").append(juridicalIdcardFrontUrl); | |||
sb.append(", juridicalIdcardBackUrl=").append(juridicalIdcardBackUrl); | |||
sb.append(", juridicalTmpIdUrl=").append(juridicalTmpIdUrl); | |||
sb.append(", firmBusRegNum=").append(firmBusRegNum); | |||
sb.append(", firmSocCreCode=").append(firmSocCreCode); | |||
sb.append(", firmOrgCode=").append(firmOrgCode); | |||
sb.append(", firmTaxRegCertCode=").append(firmTaxRegCertCode); | |||
sb.append(", firmBusScope=").append(firmBusScope); | |||
sb.append(", firmBusTime=").append(firmBusTime); | |||
sb.append(", juridicalNationality=").append(juridicalNationality); | |||
sb.append(", juridicalIdcard=").append(juridicalIdcard); | |||
sb.append(", juridicalTime=").append(juridicalTime); | |||
sb.append(", agentName=").append(agentName); | |||
sb.append(", agentIdcard=").append(agentIdcard); | |||
sb.append(", agentTime=").append(agentTime); | |||
sb.append(", firmPhone=").append(firmPhone); | |||
sb.append(", businessLicenseUrl=").append(businessLicenseUrl); | |||
sb.append(", idcardJuridicalUrl=").append(idcardJuridicalUrl); | |||
sb.append(", idcardAgentUrl=").append(idcardAgentUrl); | |||
sb.append(", serialVersionUID=").append(serialVersionUID); | |||
sb.append("]"); | |||
return sb.toString(); | |||
} | |||
public static FirmInfoDetail.Builder builder() { | |||
return new FirmInfoDetail.Builder(); | |||
} | |||
public static class Builder { | |||
private FirmInfoDetail obj; | |||
public Builder() { | |||
this.obj = new FirmInfoDetail(); | |||
} | |||
public Builder uniqueid(String uniqueid) { | |||
obj.setUniqueid(uniqueid); | |||
return this; | |||
} | |||
public Builder openId(String openId) { | |||
obj.setOpenId(openId); | |||
return this; | |||
} | |||
public Builder orgCodeUrl(String orgCodeUrl) { | |||
obj.setOrgCodeUrl(orgCodeUrl); | |||
return this; | |||
} | |||
public Builder juridicalIdcard(String juridicalIdcard) { | |||
obj.setJuridicalIdcard(juridicalIdcard); | |||
return this; | |||
} | |||
public Builder juridicalIdcardFrontUrl(String juridicalIdcardFrontUrl) { | |||
obj.setJuridicalIdcardFrontUrl(juridicalIdcardFrontUrl); | |||
return this; | |||
} | |||
public Builder juridicalIdcardBackUrl(String juridicalIdcardBackUrl) { | |||
obj.setJuridicalIdcardBackUrl(juridicalIdcardBackUrl); | |||
return this; | |||
} | |||
public Builder juridicalTmpIdUrl(String juridicalTmpIdUrl) { | |||
obj.setJuridicalTmpIdUrl(juridicalTmpIdUrl); | |||
return this; | |||
} | |||
public Builder firmBusRegNum(String firmBusRegNum) { | |||
obj.setFirmBusRegNum(firmBusRegNum); | |||
return this; | |||
} | |||
public Builder firmSocCreCode(String firmSocCreCode) { | |||
obj.setFirmSocCreCode(firmSocCreCode); | |||
return this; | |||
} | |||
public Builder firmOrgCode(String firmOrgCode) { | |||
obj.setFirmOrgCode(firmOrgCode); | |||
return this; | |||
} | |||
public Builder firmTaxRegCertCode(String firmTaxRegCertCode) { | |||
obj.setFirmTaxRegCertCode(firmTaxRegCertCode); | |||
return this; | |||
} | |||
public Builder firmBusScope(String firmBusScope) { | |||
obj.setFirmBusScope(firmBusScope); | |||
return this; | |||
} | |||
public Builder firmBusTime(Date firmBusTime) { | |||
obj.setFirmBusTime(firmBusTime); | |||
return this; | |||
} | |||
public Builder juridicalNationality(String juridicalNationality) { | |||
obj.setJuridicalNationality(juridicalNationality); | |||
return this; | |||
} | |||
public Builder juridicalTime(Date juridicalTime) { | |||
obj.setJuridicalTime(juridicalTime); | |||
return this; | |||
} | |||
public Builder agentName(String agentName) { | |||
obj.setAgentName(agentName); | |||
return this; | |||
} | |||
public Builder agentIdcard(String agentIdcard) { | |||
obj.setAgentIdcard(agentIdcard); | |||
return this; | |||
} | |||
public Builder agentTime(Date agentTime) { | |||
obj.setAgentTime(agentTime); | |||
return this; | |||
} | |||
public Builder firmPhone(String firmPhone) { | |||
obj.setFirmPhone(firmPhone); | |||
return this; | |||
} | |||
public Builder businessLicenseUrl(String businessLicenseUrl) { | |||
obj.setBusinessLicenseUrl(businessLicenseUrl); | |||
return this; | |||
} | |||
public Builder idcardJuridicalUrl(String idcardJuridicalUrl) { | |||
obj.setIdcardJuridicalUrl(idcardJuridicalUrl); | |||
return this; | |||
} | |||
public Builder idcardAgentUrl(String idcardAgentUrl) { | |||
obj.setIdcardAgentUrl(idcardAgentUrl); | |||
return this; | |||
} | |||
public FirmInfoDetail build() { | |||
return this.obj; | |||
} | |||
} | |||
public enum Column { | |||
uniqueid("uniqueid", "uniqueid", "VARCHAR", false), | |||
openId("open_id", "openId", "VARCHAR", false), | |||
orgCodeUrl("org_code_url", "orgCodeUrl", "VARCHAR", false), | |||
juridicalIdcardFrontUrl("juridical_idcard_front_url", "juridicalIdcardFrontUrl", "VARCHAR", false), | |||
juridicalIdcardBackUrl("juridical_idcard_back_url", "juridicalIdcardBackUrl", "VARCHAR", false), | |||
juridicalTmpIdUrl("juridical_tmp_id_url", "juridicalTmpIdUrl", "VARCHAR", false), | |||
firmBusRegNum("firm_bus_reg_num", "firmBusRegNum", "VARCHAR", false), | |||
firmSocCreCode("firm_soc_cre_code", "firmSocCreCode", "VARCHAR", false), | |||
firmOrgCode("firm_org_code", "firmOrgCode", "VARCHAR", false), | |||
firmTaxRegCertCode("firm_tax_reg_cert_code", "firmTaxRegCertCode", "VARCHAR", false), | |||
firmBusScope("firm_bus_scope", "firmBusScope", "VARCHAR", false), | |||
firmBusTime("firm_bus_time", "firmBusTime", "TIMESTAMP", false), | |||
juridicalNationality("juridical_nationality", "juridicalNationality", "VARCHAR", false), | |||
juridicalIdcard("juridical_idcard", "juridicalIdcard", "VARCHAR", false), | |||
juridicalTime("juridical_time", "juridicalTime", "TIMESTAMP", false), | |||
agentName("agent_name", "agentName", "VARCHAR", false), | |||
agentIdcard("agent_idcard", "agentIdcard", "VARCHAR", false), | |||
agentTime("agent_time", "agentTime", "TIMESTAMP", false), | |||
firmPhone("firm_phone", "firmPhone", "VARCHAR", false), | |||
businessLicenseUrl("business_license_url", "businessLicenseUrl", "VARCHAR", false), | |||
idcardJuridicalUrl("idcard_juridical_url", "idcardJuridicalUrl", "VARCHAR", false), | |||
idcardAgentUrl("idcard_agent_url", "idcardAgentUrl", "VARCHAR", false); | |||
private static final String BEGINNING_DELIMITER = "\""; | |||
private static final String ENDING_DELIMITER = "\""; | |||
private final String column; | |||
private final boolean isColumnNameDelimited; | |||
private final String javaProperty; | |||
private final String jdbcType; | |||
public String value() { | |||
return this.column; | |||
} | |||
public String getValue() { | |||
return this.column; | |||
} | |||
public String getJavaProperty() { | |||
return this.javaProperty; | |||
} | |||
public String getJdbcType() { | |||
return this.jdbcType; | |||
} | |||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { | |||
this.column = column; | |||
this.javaProperty = javaProperty; | |||
this.jdbcType = jdbcType; | |||
this.isColumnNameDelimited = isColumnNameDelimited; | |||
} | |||
public String desc() { | |||
return this.getEscapedColumnName() + " DESC"; | |||
} | |||
public String asc() { | |||
return this.getEscapedColumnName() + " ASC"; | |||
} | |||
public static Column[] excludes(Column ... excludes) { | |||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values())); | |||
if (excludes != null && excludes.length > 0) { | |||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); | |||
} | |||
return columns.toArray(new Column[]{}); | |||
} | |||
public static Column[] all() { | |||
return Column.values(); | |||
} | |||
public String getEscapedColumnName() { | |||
if (this.isColumnNameDelimited) { | |||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); | |||
} else { | |||
return this.column; | |||
} | |||
} | |||
public String getAliasedEscapedColumnName() { | |||
return this.getEscapedColumnName(); | |||
} | |||
} | |||
} |
@@ -844,63 +844,63 @@ public class FirmInfoExample { | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusIsNull() { | |||
public Criteria andStatusIsNull() { | |||
addCriterion("status is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusIsNotNull() { | |||
public Criteria andStatusIsNotNull() { | |||
addCriterion("status is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusEqualTo(Integer value) { | |||
addCriterion("status =", value, "firmStatus"); | |||
public Criteria andStatusEqualTo(Integer value) { | |||
addCriterion("status =", value, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusNotEqualTo(Integer value) { | |||
addCriterion("status <>", value, "firmStatus"); | |||
public Criteria andStatusNotEqualTo(Integer value) { | |||
addCriterion("status <>", value, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusGreaterThan(Integer value) { | |||
addCriterion("status >", value, "firmStatus"); | |||
public Criteria andStatusGreaterThan(Integer value) { | |||
addCriterion("status >", value, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusGreaterThanOrEqualTo(Integer value) { | |||
addCriterion("status >=", value, "firmStatus"); | |||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) { | |||
addCriterion("status >=", value, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusLessThan(Integer value) { | |||
addCriterion("status <", value, "firmStatus"); | |||
public Criteria andStatusLessThan(Integer value) { | |||
addCriterion("status <", value, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusLessThanOrEqualTo(Integer value) { | |||
addCriterion("status <=", value, "firmStatus"); | |||
public Criteria andStatusLessThanOrEqualTo(Integer value) { | |||
addCriterion("status <=", value, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusIn(List<Integer> values) { | |||
addCriterion("status in", values, "firmStatus"); | |||
public Criteria andStatusIn(List<Integer> values) { | |||
addCriterion("status in", values, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusNotIn(List<Integer> values) { | |||
addCriterion("status not in", values, "firmStatus"); | |||
public Criteria andStatusNotIn(List<Integer> values) { | |||
addCriterion("status not in", values, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusBetween(Integer value1, Integer value2) { | |||
addCriterion("status between", value1, value2, "firmStatus"); | |||
public Criteria andStatusBetween(Integer value1, Integer value2) { | |||
addCriterion("status between", value1, value2, "status"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmStatusNotBetween(Integer value1, Integer value2) { | |||
addCriterion("status not between", value1, value2, "firmStatus"); | |||
public Criteria andStatusNotBetween(Integer value1, Integer value2) { | |||
addCriterion("status not between", value1, value2, "status"); | |||
return (Criteria) this; | |||
} | |||
@@ -1,18 +0,0 @@ | |||
package com.trust.ywx.customer.service.dto.response; | |||
import lombok.Data; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: AuditCustomerDto.java | |||
* @包 路 径: com.trust.ywx.customer.service.dto | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/14 20:15 | |||
* @Modify: | |||
*/ | |||
@Data | |||
public class AuditFirmDto extends BaseFirmDto {} |
@@ -5,18 +5,18 @@ import com.fiftyonetrust.common.model.result.PageList; | |||
import com.trust.ywx.customer.common.enu.FirmProperEnum; | |||
import com.trust.ywx.customer.common.enu.NetworkTypeEnum; | |||
import com.trust.ywx.customer.dao.DoctorProductTypeDao; | |||
import com.trust.ywx.customer.dao.FirmDao; | |||
import com.trust.ywx.customer.dao.TrustFirmDao; | |||
import com.trust.ywx.customer.dao.FirmExtendDao; | |||
import com.trust.ywx.customer.dao.FirmGroupDao; | |||
import com.trust.ywx.customer.dao.po.FirmInfo; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExtend; | |||
import com.trust.ywx.customer.dao.po.FirmUsercertChannel; | |||
import com.trust.ywx.customer.service.dto.response.TrustFirmDto; | |||
import com.trust.ywx.customer.service.dto.request.SearchCrmFirmParam; | |||
import com.trust.ywx.customer.service.dto.request.SearchFirmParam; | |||
import com.trust.ywx.customer.service.dto.request.SearchTrustFirmParam; | |||
import com.trust.ywx.customer.service.dto.response.AuditFirmDto; | |||
import com.trust.ywx.customer.service.dto.response.CrmFirmDto; | |||
import com.trust.ywx.customer.common.model.manager.response.TrustFirmDto; | |||
import com.trust.ywx.customer.common.model.query.request.SearchCrmFirmParam; | |||
import com.trust.ywx.customer.common.model.query.request.SearchFirmParam; | |||
import com.trust.ywx.customer.common.model.query.request.SearchTrustFirmParam; | |||
import com.trust.ywx.customer.common.model.manager.response.TempFirmDto; | |||
import com.trust.ywx.customer.common.model.query.response.CrmFirmDto; | |||
import com.trust.ywx.customer.service.query.FirmQueryService; | |||
import org.apache.commons.lang.StringUtils; | |||
import org.springframework.beans.BeanUtils; | |||
@@ -41,7 +41,7 @@ import java.util.*; | |||
@Service | |||
public class FirmQueryServiceImpl implements FirmQueryService { | |||
@Autowired | |||
private FirmDao firmDao; | |||
private TrustFirmDao trustFirmDao; | |||
@Autowired | |||
private FirmGroupDao firmGroupDao; | |||
@Autowired | |||
@@ -83,13 +83,13 @@ public class FirmQueryServiceImpl implements FirmQueryService { | |||
@Override | |||
public TrustFirmDto getTrustFirm(String clientId) { | |||
FirmInfo po = firmDao.getFrimByClientId(clientId); | |||
FirmInfo po = trustFirmDao.getFrimByClientId(clientId); | |||
return converPoToDto(po); | |||
} | |||
@Override | |||
public TrustFirmDto getTrustFirmWithBLOBs(String clientId) { | |||
FirmInfo po = firmDao.getFrimByClientId(clientId); | |||
FirmInfo po = trustFirmDao.getFrimByClientId(clientId); | |||
return converPoToDto(po); | |||
} | |||
@@ -125,7 +125,7 @@ public class FirmQueryServiceImpl implements FirmQueryService { | |||
} | |||
@Override | |||
public List<AuditFirmDto> getAuditFirmList(SearchFirmParam param) { | |||
public List<TempFirmDto> getTempFirmList(SearchFirmParam param) { | |||
return null; | |||
} | |||
@@ -156,12 +156,12 @@ public class FirmQueryServiceImpl implements FirmQueryService { | |||
// clientId筛选 | |||
if (StringUtils.isNotEmpty(param.getClientId())) { | |||
FirmInfo firmInfo = firmDao.getFrimByClientId(param.getClientId()); | |||
FirmInfo firmInfo = trustFirmDao.getFrimByClientId(param.getClientId()); | |||
if (null == firmInfo) { | |||
return Arrays.asList(); | |||
} | |||
// 增加项目状态的判断 | |||
if (null != param.getFirmStatus() && !Objects.equals(firmInfo.getFirmStatus(), param.getFirmStatus())) { | |||
if (null != param.getProjectStatus() && !Objects.equals(firmInfo.getProjectStatus(), param.getProjectStatus())) { | |||
return Arrays.asList(); | |||
} | |||
// 增加实施人员的判断 | |||
@@ -244,12 +244,12 @@ public class FirmQueryServiceImpl implements FirmQueryService { | |||
} | |||
List<FirmInfo> firmList = null; | |||
if (isPage) { | |||
firmList = firmDao.getListByIds(clientIdList, 100000, 0); | |||
firmList = trustFirmDao.getListByIds(clientIdList, 100000, 0); | |||
} else { | |||
if (clientIdList.size() < param.getPageSize() * param.getPageNo()) { | |||
return Arrays.asList(); | |||
} | |||
firmList = firmDao.getListByIds(clientIdList, param.getPageSize(), param.getPageNo()); | |||
firmList = trustFirmDao.getListByIds(clientIdList, param.getPageSize(), param.getPageNo()); | |||
} | |||
List<TrustFirmDto> dtoList = new ArrayList<>(firmList.size()); | |||
@@ -11,12 +11,12 @@ | |||
//import com.trust.ywx.customer.dao.po.FirmInfo; | |||
//import com.trust.ywx.customer.dao.po.FirmUsercertChannelExample; | |||
//import com.trust.ywx.customer.service.dto.TrustFirmDto; | |||
//import com.trust.ywx.customer.service.dto.request.SearchCrmFirmParam; | |||
//import com.trust.ywx.customer.service.dto.request.SearchFirmParam; | |||
//import com.trust.ywx.customer.service.dto.request.SearchTrustFirmWithPageParam; | |||
//import com.trust.ywx.customer.common.model.query.request.SearchCrmFirmParam; | |||
//import com.trust.ywx.customer.common.model.query.request.SearchFirmParam; | |||
//import com.trust.ywx.customer.common.model.query.request.SearchTrustFirmWithPageParam; | |||
//import com.trust.ywx.customer.service.dto.response.AuditFirmDto; | |||
//import com.trust.ywx.customer.service.dto.response.CrmFirmDto; | |||
//import com.trust.ywx.customer.service.exception.BizException; | |||
//import com.trust.ywx.customer.common.model.query.response.CrmFirmDto; | |||
//import com.trust.ywx.customer.common.exception.BizException; | |||
//import com.trust.ywx.customer.service.query.FirmQueryService; | |||
//import org.apache.commons.lang.StringUtils; | |||
//import org.springframework.beans.BeanUtils; | |||
@@ -1,7 +1,8 @@ | |||
package com.trust.ywx.customer.service.manager; | |||
import com.trust.ywx.customer.service.dto.request.TrustFirmParam; | |||
import com.trust.ywx.customer.service.exception.BizException; | |||
import com.trust.ywx.customer.common.model.manager.request.TrustFirmParam; | |||
import com.trust.ywx.customer.common.model.manager.response.TrustFirmDto; | |||
import com.trust.ywx.customer.common.exception.BizException; | |||
/** | |||
* <pre></pre> | |||
@@ -17,20 +18,31 @@ import com.trust.ywx.customer.service.exception.BizException; | |||
*/ | |||
public interface FirmManagerService { | |||
/** | |||
* 初始化客户 | |||
* 返回clientId和appSecret | |||
* @param clientId | |||
* @return | |||
*/ | |||
TrustFirmDto init(String clientId); | |||
/** | |||
* 添加可信客户 | |||
*/ | |||
boolean addTrustFirm(TrustFirmParam param) throws BizException; | |||
boolean add(TrustFirmParam param) throws BizException; | |||
/** | |||
* 更新可信客户 | |||
*/ | |||
boolean updateTrustFirm(TrustFirmParam param); | |||
boolean update(TrustFirmParam param) throws BizException; | |||
/** | |||
* 添加待审核客户 | |||
* 删除可信客户 | |||
* | |||
* @param clientId | |||
* @return | |||
*/ | |||
boolean addAuditFirm(); | |||
boolean delete(String clientId); | |||
/** | |||
* 添加CA渠道客户 | |||
@@ -0,0 +1,55 @@ | |||
package com.trust.ywx.customer.service.manager; | |||
import com.trust.ywx.customer.common.model.manager.request.TempFirmParam; | |||
import com.trust.ywx.customer.common.exception.BizException; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmManagerService.java | |||
* @包 路 径: com.trust.ywx.customer.service.manager | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/15 18:55 | |||
* @Modify: | |||
*/ | |||
public interface TempFirmManagerService { | |||
/** | |||
* 添加临时客户 | |||
* 互联网医院通过开放平台自注册临时客户,会在firm_info_temp表生成client_id | |||
* | |||
*/ | |||
boolean add(TempFirmParam param) throws BizException; | |||
/** | |||
* 更新临时客户 | |||
* @param param | |||
* @return | |||
* @throws BizException | |||
*/ | |||
boolean update(TempFirmParam param) throws BizException; | |||
/** | |||
* 审核临时客户 | |||
* @param clientId | |||
* @return | |||
*/ | |||
boolean audit(String clientId) throws BizException; | |||
/** | |||
* 拒绝临时客户 | |||
* @param clientId | |||
* @return | |||
*/ | |||
boolean reject(String clientId) throws BizException; | |||
/** | |||
* 删除临时客户 | |||
* @param clientId | |||
* @return | |||
*/ | |||
boolean delete(String clientId); | |||
} |
@@ -1,19 +1,25 @@ | |||
package com.trust.ywx.customer.service.manager.impl; | |||
import com.trust.ywx.customer.common.enu.FirmErrEum; | |||
import com.trust.ywx.customer.common.enu.ProjectStatusEnum; | |||
import com.trust.ywx.customer.dao.FirmDao; | |||
import com.trust.ywx.customer.commons.UniqueIdUtils; | |||
import com.trust.ywx.customer.dao.FirmExtendDao; | |||
import com.trust.ywx.customer.dao.TrustFirmDao; | |||
import com.trust.ywx.customer.dao.po.FirmInfo; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExample; | |||
import com.trust.ywx.customer.service.dto.request.TrustFirmParam; | |||
import com.trust.ywx.customer.service.exception.BizException; | |||
import com.trust.ywx.customer.common.model.manager.request.TrustFirmParam; | |||
import com.trust.ywx.customer.common.model.manager.response.TrustFirmDto; | |||
import com.trust.ywx.customer.common.exception.BizException; | |||
import com.trust.ywx.customer.service.manager.FirmManagerService; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.transaction.annotation.Transactional; | |||
import org.springframework.transaction.TransactionStatus; | |||
import org.springframework.transaction.support.TransactionCallback; | |||
import org.springframework.transaction.support.TransactionCallbackWithoutResult; | |||
import org.springframework.transaction.support.TransactionTemplate; | |||
import javax.annotation.Resource; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Objects; | |||
/** | |||
* <pre></pre> | |||
@@ -30,92 +36,157 @@ import java.util.Map; | |||
@Service | |||
public class FirmManagerServiceImpl implements FirmManagerService { | |||
@Resource | |||
FirmDao firmDao; | |||
TransactionTemplate transactionTemplate; | |||
@Resource | |||
TrustFirmDao trustFirmDao; | |||
@Resource | |||
FirmExtendDao firmExtendDao; | |||
// @Resource | |||
// private Config config; | |||
@Override | |||
public TrustFirmDto init(String clientId) { | |||
TrustFirmDto dto = new TrustFirmDto(); | |||
dto.setClientId(UniqueIdUtils.generateClientId()); | |||
dto.setAppSecret(UniqueIdUtils.generateAppSecret()); | |||
// TODO 其他默认选项 | |||
return dto; | |||
} | |||
@Override | |||
public boolean addTrustFirm(TrustFirmParam param) throws BizException { | |||
// checkBiz | |||
checkBiz(param); | |||
// doAction | |||
return doAdd(param); | |||
public boolean add(TrustFirmParam param) throws BizException { | |||
// 参数校验 | |||
checkParam(param); | |||
// 业务校验 | |||
checkAddBiz(param); | |||
// 执行插入 | |||
return doAddTrust(param); | |||
} | |||
@Transactional(rollbackFor = Exception.class) | |||
public boolean doAdd(TrustFirmParam param) { | |||
private void checkParam(TrustFirmParam param) { | |||
//TODO | |||
} | |||
// 插入firm_info表 | |||
FirmInfo firmInfo = convertToFirmInfo(param); | |||
firmDao.insert(firmInfo); | |||
@Override | |||
public boolean update(TrustFirmParam param) throws BizException { | |||
// 参数校验 | |||
checkParam(param); | |||
// 业务校验 | |||
checkUpdateBiz(param); | |||
// 执行插入 | |||
return doUpdateTrust(param); | |||
} | |||
// 插入firm_info_extend表 | |||
Map<String,String> propMap= param.convertToMap(); | |||
firmExtendDao.batchInsert(param.getClientId(),propMap); | |||
@Override | |||
public boolean delete(String clientId) { | |||
// 逻辑删除可信客户 | |||
trustFirmDao.deleteByClientId(clientId); | |||
return true; | |||
} | |||
private FirmInfo convertToFirmInfo(TrustFirmParam param){ | |||
FirmInfo firmInfo = FirmInfo.builder().clientId(param.getClientId()) | |||
.appSecret(param.getAppSecret()) | |||
.firmName(param.getFirmName()) | |||
.firmPerson(param.getFirmPerson()) | |||
.firmPhone(param.getFirmPhone()) | |||
.firmEmail(param.getFirmEmail()) | |||
.salePersonId(param.getSalePersonId()) | |||
.techPersonId(param.getTechPersonId()) | |||
.agentClientId(param.getAgentClientId()) | |||
.projectStatus(param.getProjectStatus()) | |||
.build() | |||
; | |||
/** | |||
* 执行添加(包含事务) | |||
* | |||
* @param param | |||
* @return | |||
*/ | |||
private boolean doAddTrust(TrustFirmParam param) { | |||
transactionTemplate.execute(new TransactionCallbackWithoutResult() { | |||
@Override | |||
protected void doInTransactionWithoutResult(TransactionStatus transactionStatus) { | |||
// 插入firm_info表 | |||
FirmInfo firmInfo = convertToFirmInfo(param, true); | |||
trustFirmDao.insert(firmInfo); | |||
// 插入firm_info_extend表 | |||
Map<String, String> propMap = param.convertToMap(); | |||
firmExtendDao.batchInsert(param.getClientId(), propMap); | |||
} | |||
}); | |||
return true; | |||
} | |||
private FirmInfo convertToFirmInfo(TrustFirmParam param, boolean isAdd) { | |||
FirmInfo firmInfo = new FirmInfo(); | |||
BeanUtils.copyProperties(param, firmInfo); | |||
if (isAdd) { | |||
firmInfo.setUniqueid(UniqueIdUtils.genrateUniqueId()); | |||
} | |||
firmInfo.setStatus(param.getFirmStatus()); | |||
// TODO 客户属性有几个属性在此表维护,以后要迁移至extend表。 | |||
firmInfo.setCaChannel(param.getCaChannel()); | |||
firmInfo.setCertAlg(param.getCertAlg()); | |||
firmInfo.setStampType(String.valueOf(param.getUserStampAuto())); | |||
firmInfo.setSendSms(param.getSmsSend() == null ? "N" : (param.getSmsSend() == 1 ? "Y" : "N")); | |||
firmInfo.setStampType(param.getUserStampAuto() == null ? "0" : String.valueOf(param.getUserStampAuto())); | |||
return firmInfo; | |||
} | |||
/** | |||
* 校验业务 | |||
* 校验业务-新建 | |||
* | |||
* @param param | |||
*/ | |||
private void checkBiz(TrustFirmParam param) throws BizException { | |||
/** | |||
* 业务校验 | |||
*/ | |||
private void checkAddBiz(TrustFirmParam param) throws BizException { | |||
//clientId冲突校验 | |||
FirmInfoExample example = new FirmInfoExample(); | |||
example.createCriteria().andClientIdEqualTo(param.getClientId()).andProjectStatusNotEqualTo(ProjectStatusEnum.DEL.getCode()); | |||
Long num = firmDao.countByExample(example); | |||
if (num>0){ | |||
FirmInfo firmInfo = trustFirmDao.getFrimByClientId(param.getClientId()); | |||
if (null != firmInfo) { | |||
throw new BizException(FirmErrEum.CLIENTID_CHECK_ERR); | |||
} | |||
// clientOrgCode冲突校验 | |||
example.clear(); | |||
example.createCriteria().andClientOrgCodeEqualTo(param.getClientOrgCode()).andProjectStatusNotEqualTo(ProjectStatusEnum.DEL.getCode()); | |||
num = firmDao.countByExample(example); | |||
if (num>0){ | |||
List<FirmInfo> list = trustFirmDao.getListByOrgCode(param.getClientOrgCode()); | |||
if (null != list && list.size() > 0) { | |||
throw new BizException(FirmErrEum.CLIENT_ORG_CODE_CHECK_ERR); | |||
} | |||
// firmName冲突校验 | |||
example.clear(); | |||
example.createCriteria().andFirmNameEqualTo(param.getFirmName()).andProjectStatusNotEqualTo(ProjectStatusEnum.DEL.getCode()); | |||
num = firmDao.countByExample(example); | |||
if (num>0) { | |||
list = trustFirmDao.getListByFirmName(param.getFirmName()); | |||
if (null != list && list.size() > 0) { | |||
throw new BizException(FirmErrEum.FIRM_NAME_CHECK_ERR); | |||
} | |||
} | |||
@Override | |||
public boolean updateTrustFirm(TrustFirmParam param) { | |||
return false; | |||
/** | |||
* 校验业务-更新 | |||
* | |||
* @param param | |||
*/ | |||
private void checkUpdateBiz(TrustFirmParam param) throws BizException { | |||
//clientId冲突校验 | |||
FirmInfo firmInfo = trustFirmDao.getFrimByClientId(param.getClientId()); | |||
if (null == firmInfo) { | |||
throw new BizException(FirmErrEum.FIRM_NOT_EXIST); | |||
} | |||
// clientOrgCode冲突校验 | |||
List<FirmInfo> list = trustFirmDao.getListByOrgCode(param.getClientOrgCode()); | |||
if (list != null && (list.size() > 1 || Objects.equals(param.getClientId(), list.get(0).getClientId()))) { | |||
throw new BizException(FirmErrEum.CLIENT_ORG_CODE_CHECK_ERR); | |||
} | |||
// firmName冲突校验 | |||
list = trustFirmDao.getListByFirmName(param.getFirmName()); | |||
if (list != null && (list.size() > 1 || Objects.equals(param.getClientId(), list.get(0).getClientId()))) { | |||
throw new BizException(FirmErrEum.FIRM_NAME_CHECK_ERR); | |||
} | |||
} | |||
@Override | |||
public boolean addAuditFirm() { | |||
return false; | |||
private boolean doUpdateTrust(TrustFirmParam param) { | |||
int num = transactionTemplate.execute(new TransactionCallback<Integer>() { | |||
@Override | |||
public Integer doInTransaction(TransactionStatus transactionStatus) { | |||
// 插入firm_info表 | |||
FirmInfo firmInfo = convertToFirmInfo(param, false); | |||
int num = trustFirmDao.update(firmInfo); | |||
// 插入firm_info_extend表 | |||
Map<String, String> propMap = param.convertToMap(); | |||
firmExtendDao.batchInsert(param.getClientId(), propMap); | |||
return num; | |||
} | |||
}); | |||
return num == 1; | |||
} | |||
@Override | |||
@@ -0,0 +1,222 @@ | |||
package com.trust.ywx.customer.service.manager.impl; | |||
import com.trust.ywx.customer.common.enu.*; | |||
import com.trust.ywx.customer.commons.UniqueIdUtils; | |||
import com.trust.ywx.customer.dao.TempFirmDao; | |||
import com.trust.ywx.customer.dao.po.FirmInfoTemp; | |||
import com.trust.ywx.customer.common.model.manager.request.TempFirmParam; | |||
import com.trust.ywx.customer.common.model.manager.request.TrustFirmParam; | |||
import com.trust.ywx.customer.common.exception.BizException; | |||
import com.trust.ywx.customer.service.manager.FirmManagerService; | |||
import com.trust.ywx.customer.service.manager.TempFirmManagerService; | |||
import lombok.SneakyThrows; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.transaction.TransactionStatus; | |||
import org.springframework.transaction.support.TransactionCallbackWithoutResult; | |||
import org.springframework.transaction.support.TransactionTemplate; | |||
import javax.annotation.Resource; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmManagerServiceImpl.java | |||
* @包 路 径: com.trust.ywx.customer.service.manager.impl | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 客户管理实现类 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/20 12:50 | |||
* @Modify: | |||
*/ | |||
@Service | |||
public class TempFirmManagerServiceImpl implements TempFirmManagerService { | |||
@Resource | |||
TransactionTemplate transactionTemplate; | |||
@Resource | |||
TempFirmDao tempFirmDao; | |||
@Resource | |||
FirmManagerService firmManagerService; | |||
@Override | |||
public boolean add(TempFirmParam param) throws BizException { | |||
// 参数校验 | |||
//checkParam(param); | |||
// 业务校验 | |||
checkBiz(param); | |||
// 入库 | |||
return doAddTemp(param); | |||
} | |||
@Override | |||
public boolean update(TempFirmParam param) throws BizException { | |||
// 参数校验 | |||
//checkParam(param); | |||
// 业务校验 | |||
checkBiz(param); | |||
// 入库 | |||
return doUpdateTemp(param); | |||
} | |||
@Override | |||
public boolean audit(String clientId) throws BizException { | |||
// 校验clientId | |||
FirmInfoTemp tempFirm = tempFirmDao.getByClientId(clientId); | |||
if (null == tempFirm) { | |||
throw new BizException(FirmErrEum.FIRM_NOT_EXIST); | |||
} | |||
// 封装可信客户参数 | |||
TrustFirmParam trustFirmParam = buildTrustFirmParam(tempFirm); | |||
return doAudit(trustFirmParam, tempFirm); | |||
} | |||
@Override | |||
public boolean reject(String clientId) throws BizException { | |||
// 业务校验 | |||
FirmInfoTemp tempFirm = tempFirmDao.getByClientId(clientId); | |||
if (null == tempFirm) { | |||
throw new BizException(FirmErrEum.CLIENTID_CHECK_ERR); | |||
} | |||
int num = tempFirmDao.auditReject(clientId); | |||
return num == 1; | |||
} | |||
@Override | |||
public boolean delete(String clientId) { | |||
// fixme 此处应该为物理删除,否则客户在此添加时 客户名称就重复了 | |||
return true; | |||
} | |||
private boolean doUpdateTemp(TempFirmParam param) { | |||
FirmInfoTemp temp = convertToTempFirm(param, false); | |||
return tempFirmDao.update(temp)==1; | |||
} | |||
private void checkBiz(TempFirmParam param) throws BizException { | |||
// firmName冲突校验 | |||
List<FirmInfoTemp> list = tempFirmDao.getListByFirmName(param.getFirmName()); | |||
if (null != list && list.size() > 0) { | |||
throw new BizException(FirmErrEum.FIRM_NAME_CHECK_ERR); | |||
} | |||
} | |||
private boolean doAddTemp(TempFirmParam param) { | |||
FirmInfoTemp temp = convertToTempFirm(param, true); | |||
tempFirmDao.insert(temp); | |||
return true; | |||
} | |||
private FirmInfoTemp convertToTempFirm(TempFirmParam param, boolean isAdd) { | |||
FirmInfoTemp temp = new FirmInfoTemp(); | |||
BeanUtils.copyProperties(param, temp); | |||
if (isAdd) { | |||
temp.setUniqueid(UniqueIdUtils.genrateUniqueId()); | |||
temp.setClientId(UniqueIdUtils.generateClientId()); | |||
}else{ | |||
temp.setClientId(param.getClientId()); | |||
} | |||
temp.setFirmOrgCode(param.getFirmOrgCode()); | |||
temp.setFirmStatus(TempFirmStatusEnum.TEMP_UNAUTHEN.getCode() + ""); | |||
temp.setJuridicalName(param.getFirmPerson()); | |||
if (param.getChannelApp() != null && true == param.getChannelApp() | |||
&& param.getChannelSdk() != null && true == param.getChannelSdk()) { | |||
temp.setChannel("2"); | |||
} else if (param.getChannelSdk() != null && true == param.getChannelSdk()) { | |||
temp.setChannel("1"); //sdk | |||
} else if (param.getChannelApp() != null && false == param.getChannelApp() | |||
&& param.getChannelSdk() != null && false == param.getChannelSdk()) { | |||
temp.setChannel(null); | |||
} else { | |||
temp.setChannel("0"); //app不能默认app,可能不选channel | |||
} | |||
return temp; | |||
} | |||
private boolean doAudit(TrustFirmParam trustFirmParam, FirmInfoTemp temp) { | |||
transactionTemplate.execute(new TransactionCallbackWithoutResult() { | |||
@SneakyThrows | |||
@Override | |||
protected void doInTransactionWithoutResult(TransactionStatus transactionStatus) { | |||
// 1、添加可信客户 | |||
firmManagerService.add(trustFirmParam); | |||
// 2、更新临时客户状态为已审核 | |||
int num = tempFirmDao.auditPass(temp.getClientId()); | |||
if (num != 1) { | |||
throw new BizException(FirmErrEum.FIRM_SYN_ERR); | |||
} | |||
} | |||
}); | |||
return true; | |||
} | |||
private TrustFirmParam buildTrustFirmParam(FirmInfoTemp temp) { | |||
TrustFirmParam trustFirmParam = new TrustFirmParam(); | |||
trustFirmParam.setFirmPerson(temp.getFirmPerson()); //厂商联系人 (不是法人) | |||
trustFirmParam.setFirmName(temp.getFirmName()); | |||
trustFirmParam.setFirmEmail(temp.getFirmEmail()); | |||
String phone = StringUtils.isBlank(temp.getJuridicalPhone()) ? temp.getFirmPhone() : | |||
temp.getJuridicalPhone(); | |||
trustFirmParam.setFirmPhone(phone); | |||
trustFirmParam.setFirmAddress(temp.getFirmAddress()); | |||
trustFirmParam.setClientOrgCode(temp.getFirmOrgCode()); | |||
trustFirmParam.setAgentSaleId(temp.getAgentSaleId()); | |||
trustFirmParam.setAppIcon(temp.getFirmLogo()); | |||
// 医师端产品形态 | |||
List<String> doctorProTypeList = new ArrayList<>(); | |||
if ("1".equals(temp.getChannel())) { | |||
doctorProTypeList.add(DoctorProductTypeEnum.SDK.getName()); | |||
} else if ("2".equals(temp.getChannel())) { | |||
doctorProTypeList.add(DoctorProductTypeEnum.APP.getName()); | |||
doctorProTypeList.add(DoctorProductTypeEnum.SDK.getName()); | |||
} else { | |||
doctorProTypeList.add(DoctorProductTypeEnum.APP.getName()); | |||
} | |||
trustFirmParam.setDoctorProductType(doctorProTypeList); | |||
trustFirmParam.setCertAlg("RSA"); | |||
trustFirmParam.setAppSecret(UniqueIdUtils.generateAppSecret()); | |||
// TODO 什么时候审核临时客户会携带clientId?? | |||
String clientId = null; | |||
if (StringUtils.isBlank(temp.getClientId())) { | |||
clientId = UniqueIdUtils.generateClientId(); | |||
} else { | |||
clientId = temp.getClientId(); | |||
} | |||
trustFirmParam.setAgentClientId(temp.getAgentClientId()); | |||
trustFirmParam.setClientId(clientId); | |||
trustFirmParam.setCreateTime(new Date()); | |||
// 手动制章默认 | |||
trustFirmParam.setUserStampType(CommonStatusEnum.YES.getCode()); | |||
// 信步云默认 | |||
trustFirmParam.setCertAgency("1"); | |||
trustFirmParam.setFirmStatus(FirmStatusEnum.FIRM_SUB_NORMAL.getCode()); | |||
trustFirmParam.setSmsSend(CommonStatusEnum.YES.getCode()); | |||
String channel = temp.getChannel(); | |||
if ("1".equals(channel) || "2".equals(channel)) { | |||
//TODO 引入nacos | |||
// String msspAppid = config.getString("ywq.core.common.ywq.mssp.appid", ""); | |||
// trustFirmParam.setMsspAppid(msspAppid); | |||
} | |||
// 客户类型:互联网医院 | |||
trustFirmParam.setNetworkType(NetworkTypeEnum.IT.getCode()); | |||
// app设置图章:可以 | |||
trustFirmParam.setUserStampIsAppset(CommonStatusEnum.YES.getCode()); | |||
// 客户图章类型:圆章 | |||
trustFirmParam.setFirmStampType(FirmStampEnum.ROUND.getCode()); | |||
return trustFirmParam; | |||
} | |||
} |
@@ -1,12 +1,12 @@ | |||
package com.trust.ywx.customer.service.query; | |||
import com.fiftyonetrust.common.model.result.PageList; | |||
import com.trust.ywx.customer.service.dto.response.TrustFirmDto; | |||
import com.trust.ywx.customer.service.dto.request.SearchCrmFirmParam; | |||
import com.trust.ywx.customer.service.dto.request.SearchFirmParam; | |||
import com.trust.ywx.customer.service.dto.request.SearchTrustFirmParam; | |||
import com.trust.ywx.customer.service.dto.response.AuditFirmDto; | |||
import com.trust.ywx.customer.service.dto.response.CrmFirmDto; | |||
import com.trust.ywx.customer.common.model.manager.response.TrustFirmDto; | |||
import com.trust.ywx.customer.common.model.query.request.SearchCrmFirmParam; | |||
import com.trust.ywx.customer.common.model.query.request.SearchFirmParam; | |||
import com.trust.ywx.customer.common.model.query.request.SearchTrustFirmParam; | |||
import com.trust.ywx.customer.common.model.manager.response.TempFirmDto; | |||
import com.trust.ywx.customer.common.model.query.response.CrmFirmDto; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -14,7 +14,7 @@ import java.util.Map; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: AuditCustomerService.java | |||
* @文件名称: FirmQueryService.java | |||
* @包 路 径: com.trust.ywx.customer.service.query | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
@@ -68,12 +68,12 @@ public interface FirmQueryService { | |||
*/ | |||
List<TrustFirmDto> getFirmWhite(String firmName); | |||
//------------------------待审核客户-------------------- | |||
//------------------------临时客户-------------------- | |||
/** | |||
* 获取待审核客户列表 | |||
* @param param | |||
*/ | |||
List<AuditFirmDto> getAuditFirmList(SearchFirmParam param); | |||
List<TempFirmDto> getTempFirmList(SearchFirmParam param); | |||
//-------------------------北京CA客户------------------------ | |||
@@ -85,9 +85,6 @@ | |||
<table tableName="firm_group" domainObjectName="FirmGroup" | |||
enableCountByExample="true" enableUpdateByExample="true" | |||
enableSelectByExample="true" enableDeleteByExample="true"> | |||
<generatedKey column="uniqueid" sqlStatement="JDBC" identity="true" /> | |||
<!-- <columnOverride column="firm_name" property="CustomerName"></columnOverride>--> | |||
<!-- <property name="firm_name" value="CustomerName"/>--> | |||
<columnOverride column="is_del" property="isDel" javaType="Integer"></columnOverride> | |||
<columnOverride column="firm_role" property="firmRole" javaType="Integer"></columnOverride> | |||
<columnOverride column="group_num" property="groupId" ></columnOverride> | |||
@@ -95,37 +92,28 @@ | |||
<table tableName="firm_info" domainObjectName="FirmInfo" | |||
enableCountByExample="true" enableUpdateByExample="true" | |||
enableSelectByExample="true" enableDeleteByExample="true"> | |||
<generatedKey column="uniqueid" sqlStatement="JDBC" identity="true" /> | |||
<!-- <columnOverride column="firm_name" property="CustomerName"></columnOverride>--> | |||
<!-- <property name="firm_name" value="CustomerName"/>--> | |||
<columnOverride column="status" property="firmStatus"></columnOverride> | |||
<columnOverride column="status" property="status" javaType="Integer"></columnOverride> | |||
</table> | |||
<table tableName="firm_info_temp" domainObjectName="FirmInfoTemp" | |||
enableCountByExample="true" enableUpdateByExample="true" | |||
enableSelectByExample="true" enableDeleteByExample="true"> | |||
<generatedKey column="uniqueid" sqlStatement="JDBC" identity="true" /> | |||
<columnOverride column="firm_addr" property="firmAddress"></columnOverride> | |||
<columnOverride column="firm_client_id" property="clientId"></columnOverride> | |||
</table> | |||
<table tableName="firm_oauth_token" domainObjectName="FirmOauthToken" | |||
enableCountByExample="true" enableUpdateByExample="true" | |||
enableSelectByExample="true" enableDeleteByExample="true"> | |||
<generatedKey column="uniqueid" sqlStatement="JDBC" identity="true" /> | |||
</table> | |||
<table tableName="firm_info_extend" domainObjectName="FirmInfoExtend" | |||
enableCountByExample="true" enableUpdateByExample="true" | |||
enableSelectByExample="true" enableDeleteByExample="true"> | |||
<generatedKey column="uniqueid" sqlStatement="JDBC" identity="true" /> | |||
</table> | |||
<table tableName="firm_info_detail" domainObjectName="FirmInfoDetail" | |||
enableCountByExample="true" enableUpdateByExample="true" | |||
enableSelectByExample="true" enableDeleteByExample="true"> | |||
<generatedKey column="uniqueid" sqlStatement="JDBC" identity="true" /> | |||
</table> | |||
<table tableName="firm_usercert_channel" domainObjectName="FirmUsercertChannel" | |||
enableCountByExample="true" enableUpdateByExample="true" | |||
enableSelectByExample="true" enableDeleteByExample="true"> | |||
<generatedKey column="uniqueid" sqlStatement="JDBC" identity="true" /> | |||
<columnOverride column="channel_type" property="channelType" javaType="Integer"></columnOverride> | |||
</table> | |||
@@ -115,17 +115,20 @@ | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</delete> | |||
<insert id="insert" keyColumn="uniqueId" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_group (group_name, group_num, firm_id, | |||
firm_role, create_time, is_del | |||
) | |||
values (#{groupName,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR}, #{firmId,jdbcType=VARCHAR}, | |||
#{firmRole,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=INTEGER} | |||
) | |||
<insert id="insert"> | |||
insert into firm_group (uniqueId, group_name, group_num, | |||
firm_id, firm_role, create_time, | |||
is_del) | |||
values (#{uniqueid,jdbcType=VARCHAR}, #{groupName,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR}, | |||
#{firmId,jdbcType=VARCHAR}, #{firmRole,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, | |||
#{isDel,jdbcType=INTEGER}) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="uniqueId" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
<insert id="insertSelective"> | |||
insert into firm_group | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
uniqueId, | |||
</if> | |||
<if test="groupName != null"> | |||
group_name, | |||
</if> | |||
@@ -146,6 +149,9 @@ | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
#{uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="groupName != null"> | |||
#{groupName,jdbcType=VARCHAR}, | |||
</if> | |||
@@ -249,7 +255,7 @@ | |||
where uniqueId = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 11:32:32 ### --> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 18:12:43 ### --> | |||
@@ -267,17 +273,17 @@ | |||
</if> | |||
limit 1 | |||
</select> | |||
<insert id="batchInsert" keyColumn="uniqueId" keyProperty="uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsert" parameterType="map"> | |||
insert into firm_group | |||
(group_name, group_num, firm_id, firm_role, create_time, is_del) | |||
(uniqueId, group_name, group_num, firm_id, firm_role, create_time, is_del) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{item.groupName,jdbcType=VARCHAR}, #{item.groupId,jdbcType=VARCHAR}, #{item.firmId,jdbcType=VARCHAR}, | |||
#{item.firmRole,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.isDel,jdbcType=INTEGER} | |||
) | |||
(#{item.uniqueid,jdbcType=VARCHAR}, #{item.groupName,jdbcType=VARCHAR}, #{item.groupId,jdbcType=VARCHAR}, | |||
#{item.firmId,jdbcType=VARCHAR}, #{item.firmRole,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, | |||
#{item.isDel,jdbcType=INTEGER}) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueId" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsertSelective" parameterType="map"> | |||
insert into firm_group ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
@@ -287,6 +293,9 @@ | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'uniqueId'.toString() == column.value"> | |||
#{item.uniqueid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'group_name'.toString() == column.value"> | |||
#{item.groupName,jdbcType=VARCHAR} | |||
</if> | |||
@@ -1,639 +0,0 @@ | |||
<?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.trust.ywx.customer.dao.mapper.FirmInfoDetailMapper"> | |||
<resultMap id="BaseResultMap" type="com.trust.ywx.customer.dao.po.FirmInfoDetail"> | |||
<id column="uniqueid" jdbcType="VARCHAR" property="uniqueid" /> | |||
<result column="open_id" jdbcType="VARCHAR" property="openId" /> | |||
<!-- 组织机构代码 --> | |||
<result column="org_code_url" jdbcType="VARCHAR" property="orgCodeUrl" /> | |||
<!-- 法人身份证正面 --> | |||
<result column="juridical_idcard_front_url" jdbcType="VARCHAR" property="juridicalIdcardFrontUrl" /> | |||
<!-- 法人身份证背面 --> | |||
<result column="juridical_idcard_back_url" jdbcType="VARCHAR" property="juridicalIdcardBackUrl" /> | |||
<!-- 法人临时身份证 --> | |||
<result column="juridical_tmp_id_url" jdbcType="VARCHAR" property="juridicalTmpIdUrl" /> | |||
<!-- 工商注册号 --> | |||
<result column="firm_bus_reg_num" jdbcType="VARCHAR" property="firmBusRegNum" /> | |||
<!-- 社会信用代码 --> | |||
<result column="firm_soc_cre_code" jdbcType="VARCHAR" property="firmSocCreCode" /> | |||
<result column="firm_org_code" jdbcType="VARCHAR" property="firmOrgCode" /> | |||
<!-- 税务登记证号 --> | |||
<result column="firm_tax_reg_cert_code" jdbcType="VARCHAR" property="firmTaxRegCertCode" /> | |||
<!-- 经营范围 --> | |||
<result column="firm_bus_scope" jdbcType="VARCHAR" property="firmBusScope" /> | |||
<!-- 经营期限 --> | |||
<result column="firm_bus_time" jdbcType="TIMESTAMP" property="firmBusTime" /> | |||
<!-- 法人归属地 --> | |||
<result column="juridical_nationality" jdbcType="VARCHAR" property="juridicalNationality" /> | |||
<!-- 法人身份证号 --> | |||
<result column="juridical_idcard" jdbcType="VARCHAR" property="juridicalIdcard" /> | |||
<!-- 法人证件有效期 --> | |||
<result column="juridical_time" jdbcType="TIMESTAMP" property="juridicalTime" /> | |||
<!-- 代理人姓名 --> | |||
<result column="agent_name" jdbcType="VARCHAR" property="agentName" /> | |||
<!-- 代理人身份证号 --> | |||
<result column="agent_idcard" jdbcType="VARCHAR" property="agentIdcard" /> | |||
<!-- 代理人证件有效期 --> | |||
<result column="agent_time" jdbcType="TIMESTAMP" property="agentTime" /> | |||
<!-- 企业电话 --> | |||
<result column="firm_phone" jdbcType="VARCHAR" property="firmPhone" /> | |||
<!-- 企业营业执照 --> | |||
<result column="business_license_url" jdbcType="VARCHAR" property="businessLicenseUrl" /> | |||
<!-- 法人身份证照片(实名认证获得) --> | |||
<result column="idcard_juridical_url" jdbcType="VARCHAR" property="idcardJuridicalUrl" /> | |||
<!-- 代理人身份证照片(实名认证获取) --> | |||
<result column="idcard_agent_url" jdbcType="VARCHAR" property="idcardAgentUrl" /> | |||
</resultMap> | |||
<sql id="Example_Where_Clause"> | |||
<where> | |||
<foreach collection="oredCriteria" item="criteria" separator="or"> | |||
<if test="criteria.valid"> | |||
<trim prefix="(" prefixOverrides="and" suffix=")"> | |||
<foreach collection="criteria.criteria" item="criterion"> | |||
<choose> | |||
<when test="criterion.noValue"> | |||
and ${criterion.condition} | |||
</when> | |||
<when test="criterion.singleValue"> | |||
and ${criterion.condition} #{criterion.value} | |||
</when> | |||
<when test="criterion.betweenValue"> | |||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} | |||
</when> | |||
<when test="criterion.listValue"> | |||
and ${criterion.condition} | |||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> | |||
#{listItem} | |||
</foreach> | |||
</when> | |||
</choose> | |||
</foreach> | |||
</trim> | |||
</if> | |||
</foreach> | |||
</where> | |||
</sql> | |||
<sql id="Update_By_Example_Where_Clause"> | |||
<where> | |||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> | |||
<if test="criteria.valid"> | |||
<trim prefix="(" prefixOverrides="and" suffix=")"> | |||
<foreach collection="criteria.criteria" item="criterion"> | |||
<choose> | |||
<when test="criterion.noValue"> | |||
and ${criterion.condition} | |||
</when> | |||
<when test="criterion.singleValue"> | |||
and ${criterion.condition} #{criterion.value} | |||
</when> | |||
<when test="criterion.betweenValue"> | |||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} | |||
</when> | |||
<when test="criterion.listValue"> | |||
and ${criterion.condition} | |||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> | |||
#{listItem} | |||
</foreach> | |||
</when> | |||
</choose> | |||
</foreach> | |||
</trim> | |||
</if> | |||
</foreach> | |||
</where> | |||
</sql> | |||
<sql id="Base_Column_List"> | |||
uniqueid, open_id, org_code_url, juridical_idcard_front_url, juridical_idcard_back_url, | |||
juridical_tmp_id_url, firm_bus_reg_num, firm_soc_cre_code, firm_org_code, firm_tax_reg_cert_code, | |||
firm_bus_scope, firm_bus_time, juridical_nationality, juridical_idcard, juridical_time, | |||
agent_name, agent_idcard, agent_time, firm_phone, business_license_url, idcard_juridical_url, | |||
idcard_agent_url | |||
</sql> | |||
<select id="selectByExample" parameterType="com.trust.ywx.customer.dao.po.FirmInfoDetailExample" resultMap="BaseResultMap"> | |||
select | |||
<if test="distinct"> | |||
distinct | |||
</if> | |||
<include refid="Base_Column_List" /> | |||
from firm_info_detail | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
<if test="orderByClause != null"> | |||
order by ${orderByClause} | |||
</if> | |||
<if test="rows != null"> | |||
<if test="offset != null"> | |||
limit ${offset}, ${rows} | |||
</if> | |||
<if test="offset == null"> | |||
limit ${rows} | |||
</if> | |||
</if> | |||
</select> | |||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List" /> | |||
from firm_info_detail | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</select> | |||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | |||
delete from firm_info_detail | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</delete> | |||
<delete id="deleteByExample" parameterType="com.trust.ywx.customer.dao.po.FirmInfoDetailExample"> | |||
delete from firm_info_detail | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</delete> | |||
<insert id="insert" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_info_detail (open_id, org_code_url, juridical_idcard_front_url, | |||
juridical_idcard_back_url, juridical_tmp_id_url, | |||
firm_bus_reg_num, firm_soc_cre_code, firm_org_code, | |||
firm_tax_reg_cert_code, firm_bus_scope, firm_bus_time, | |||
juridical_nationality, juridical_idcard, | |||
juridical_time, agent_name, agent_idcard, | |||
agent_time, firm_phone, business_license_url, | |||
idcard_juridical_url, idcard_agent_url) | |||
values (#{openId,jdbcType=VARCHAR}, #{orgCodeUrl,jdbcType=VARCHAR}, #{juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
#{juridicalIdcardBackUrl,jdbcType=VARCHAR}, #{juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
#{firmBusRegNum,jdbcType=VARCHAR}, #{firmSocCreCode,jdbcType=VARCHAR}, #{firmOrgCode,jdbcType=VARCHAR}, | |||
#{firmTaxRegCertCode,jdbcType=VARCHAR}, #{firmBusScope,jdbcType=VARCHAR}, #{firmBusTime,jdbcType=TIMESTAMP}, | |||
#{juridicalNationality,jdbcType=VARCHAR}, #{juridicalIdcard,jdbcType=VARCHAR}, | |||
#{juridicalTime,jdbcType=TIMESTAMP}, #{agentName,jdbcType=VARCHAR}, #{agentIdcard,jdbcType=VARCHAR}, | |||
#{agentTime,jdbcType=TIMESTAMP}, #{firmPhone,jdbcType=VARCHAR}, #{businessLicenseUrl,jdbcType=VARCHAR}, | |||
#{idcardJuridicalUrl,jdbcType=VARCHAR}, #{idcardAgentUrl,jdbcType=VARCHAR}) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_info_detail | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="openId != null"> | |||
open_id, | |||
</if> | |||
<if test="orgCodeUrl != null"> | |||
org_code_url, | |||
</if> | |||
<if test="juridicalIdcardFrontUrl != null"> | |||
juridical_idcard_front_url, | |||
</if> | |||
<if test="juridicalIdcardBackUrl != null"> | |||
juridical_idcard_back_url, | |||
</if> | |||
<if test="juridicalTmpIdUrl != null"> | |||
juridical_tmp_id_url, | |||
</if> | |||
<if test="firmBusRegNum != null"> | |||
firm_bus_reg_num, | |||
</if> | |||
<if test="firmSocCreCode != null"> | |||
firm_soc_cre_code, | |||
</if> | |||
<if test="firmOrgCode != null"> | |||
firm_org_code, | |||
</if> | |||
<if test="firmTaxRegCertCode != null"> | |||
firm_tax_reg_cert_code, | |||
</if> | |||
<if test="firmBusScope != null"> | |||
firm_bus_scope, | |||
</if> | |||
<if test="firmBusTime != null"> | |||
firm_bus_time, | |||
</if> | |||
<if test="juridicalNationality != null"> | |||
juridical_nationality, | |||
</if> | |||
<if test="juridicalIdcard != null"> | |||
juridical_idcard, | |||
</if> | |||
<if test="juridicalTime != null"> | |||
juridical_time, | |||
</if> | |||
<if test="agentName != null"> | |||
agent_name, | |||
</if> | |||
<if test="agentIdcard != null"> | |||
agent_idcard, | |||
</if> | |||
<if test="agentTime != null"> | |||
agent_time, | |||
</if> | |||
<if test="firmPhone != null"> | |||
firm_phone, | |||
</if> | |||
<if test="businessLicenseUrl != null"> | |||
business_license_url, | |||
</if> | |||
<if test="idcardJuridicalUrl != null"> | |||
idcard_juridical_url, | |||
</if> | |||
<if test="idcardAgentUrl != null"> | |||
idcard_agent_url, | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="openId != null"> | |||
#{openId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="orgCodeUrl != null"> | |||
#{orgCodeUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalIdcardFrontUrl != null"> | |||
#{juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalIdcardBackUrl != null"> | |||
#{juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalTmpIdUrl != null"> | |||
#{juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmBusRegNum != null"> | |||
#{firmBusRegNum,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmSocCreCode != null"> | |||
#{firmSocCreCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmOrgCode != null"> | |||
#{firmOrgCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmTaxRegCertCode != null"> | |||
#{firmTaxRegCertCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmBusScope != null"> | |||
#{firmBusScope,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmBusTime != null"> | |||
#{firmBusTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="juridicalNationality != null"> | |||
#{juridicalNationality,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalIdcard != null"> | |||
#{juridicalIdcard,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalTime != null"> | |||
#{juridicalTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="agentName != null"> | |||
#{agentName,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="agentIdcard != null"> | |||
#{agentIdcard,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="agentTime != null"> | |||
#{agentTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="firmPhone != null"> | |||
#{firmPhone,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="businessLicenseUrl != null"> | |||
#{businessLicenseUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="idcardJuridicalUrl != null"> | |||
#{idcardJuridicalUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="idcardAgentUrl != null"> | |||
#{idcardAgentUrl,jdbcType=VARCHAR}, | |||
</if> | |||
</trim> | |||
</insert> | |||
<select id="countByExample" parameterType="com.trust.ywx.customer.dao.po.FirmInfoDetailExample" resultType="java.lang.Long"> | |||
select count(*) from firm_info_detail | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</select> | |||
<update id="updateByExampleSelective" parameterType="map"> | |||
update firm_info_detail | |||
<set> | |||
<if test="record.uniqueid != null"> | |||
uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.openId != null"> | |||
open_id = #{record.openId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.orgCodeUrl != null"> | |||
org_code_url = #{record.orgCodeUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.juridicalIdcardFrontUrl != null"> | |||
juridical_idcard_front_url = #{record.juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.juridicalIdcardBackUrl != null"> | |||
juridical_idcard_back_url = #{record.juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.juridicalTmpIdUrl != null"> | |||
juridical_tmp_id_url = #{record.juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmBusRegNum != null"> | |||
firm_bus_reg_num = #{record.firmBusRegNum,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmSocCreCode != null"> | |||
firm_soc_cre_code = #{record.firmSocCreCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmOrgCode != null"> | |||
firm_org_code = #{record.firmOrgCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmTaxRegCertCode != null"> | |||
firm_tax_reg_cert_code = #{record.firmTaxRegCertCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmBusScope != null"> | |||
firm_bus_scope = #{record.firmBusScope,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmBusTime != null"> | |||
firm_bus_time = #{record.firmBusTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="record.juridicalNationality != null"> | |||
juridical_nationality = #{record.juridicalNationality,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.juridicalIdcard != null"> | |||
juridical_idcard = #{record.juridicalIdcard,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.juridicalTime != null"> | |||
juridical_time = #{record.juridicalTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="record.agentName != null"> | |||
agent_name = #{record.agentName,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.agentIdcard != null"> | |||
agent_idcard = #{record.agentIdcard,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.agentTime != null"> | |||
agent_time = #{record.agentTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="record.firmPhone != null"> | |||
firm_phone = #{record.firmPhone,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.businessLicenseUrl != null"> | |||
business_license_url = #{record.businessLicenseUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.idcardJuridicalUrl != null"> | |||
idcard_juridical_url = #{record.idcardJuridicalUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.idcardAgentUrl != null"> | |||
idcard_agent_url = #{record.idcardAgentUrl,jdbcType=VARCHAR}, | |||
</if> | |||
</set> | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByExample" parameterType="map"> | |||
update firm_info_detail | |||
set uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
open_id = #{record.openId,jdbcType=VARCHAR}, | |||
org_code_url = #{record.orgCodeUrl,jdbcType=VARCHAR}, | |||
juridical_idcard_front_url = #{record.juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
juridical_idcard_back_url = #{record.juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
juridical_tmp_id_url = #{record.juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
firm_bus_reg_num = #{record.firmBusRegNum,jdbcType=VARCHAR}, | |||
firm_soc_cre_code = #{record.firmSocCreCode,jdbcType=VARCHAR}, | |||
firm_org_code = #{record.firmOrgCode,jdbcType=VARCHAR}, | |||
firm_tax_reg_cert_code = #{record.firmTaxRegCertCode,jdbcType=VARCHAR}, | |||
firm_bus_scope = #{record.firmBusScope,jdbcType=VARCHAR}, | |||
firm_bus_time = #{record.firmBusTime,jdbcType=TIMESTAMP}, | |||
juridical_nationality = #{record.juridicalNationality,jdbcType=VARCHAR}, | |||
juridical_idcard = #{record.juridicalIdcard,jdbcType=VARCHAR}, | |||
juridical_time = #{record.juridicalTime,jdbcType=TIMESTAMP}, | |||
agent_name = #{record.agentName,jdbcType=VARCHAR}, | |||
agent_idcard = #{record.agentIdcard,jdbcType=VARCHAR}, | |||
agent_time = #{record.agentTime,jdbcType=TIMESTAMP}, | |||
firm_phone = #{record.firmPhone,jdbcType=VARCHAR}, | |||
business_license_url = #{record.businessLicenseUrl,jdbcType=VARCHAR}, | |||
idcard_juridical_url = #{record.idcardJuridicalUrl,jdbcType=VARCHAR}, | |||
idcard_agent_url = #{record.idcardAgentUrl,jdbcType=VARCHAR} | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByPrimaryKeySelective"> | |||
update firm_info_detail | |||
<set> | |||
<if test="openId != null"> | |||
open_id = #{openId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="orgCodeUrl != null"> | |||
org_code_url = #{orgCodeUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalIdcardFrontUrl != null"> | |||
juridical_idcard_front_url = #{juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalIdcardBackUrl != null"> | |||
juridical_idcard_back_url = #{juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalTmpIdUrl != null"> | |||
juridical_tmp_id_url = #{juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmBusRegNum != null"> | |||
firm_bus_reg_num = #{firmBusRegNum,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmSocCreCode != null"> | |||
firm_soc_cre_code = #{firmSocCreCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmOrgCode != null"> | |||
firm_org_code = #{firmOrgCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmTaxRegCertCode != null"> | |||
firm_tax_reg_cert_code = #{firmTaxRegCertCode,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmBusScope != null"> | |||
firm_bus_scope = #{firmBusScope,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmBusTime != null"> | |||
firm_bus_time = #{firmBusTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="juridicalNationality != null"> | |||
juridical_nationality = #{juridicalNationality,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalIdcard != null"> | |||
juridical_idcard = #{juridicalIdcard,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="juridicalTime != null"> | |||
juridical_time = #{juridicalTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="agentName != null"> | |||
agent_name = #{agentName,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="agentIdcard != null"> | |||
agent_idcard = #{agentIdcard,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="agentTime != null"> | |||
agent_time = #{agentTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="firmPhone != null"> | |||
firm_phone = #{firmPhone,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="businessLicenseUrl != null"> | |||
business_license_url = #{businessLicenseUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="idcardJuridicalUrl != null"> | |||
idcard_juridical_url = #{idcardJuridicalUrl,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="idcardAgentUrl != null"> | |||
idcard_agent_url = #{idcardAgentUrl,jdbcType=VARCHAR}, | |||
</if> | |||
</set> | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<update id="updateByPrimaryKey"> | |||
update firm_info_detail | |||
set open_id = #{openId,jdbcType=VARCHAR}, | |||
org_code_url = #{orgCodeUrl,jdbcType=VARCHAR}, | |||
juridical_idcard_front_url = #{juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
juridical_idcard_back_url = #{juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
juridical_tmp_id_url = #{juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
firm_bus_reg_num = #{firmBusRegNum,jdbcType=VARCHAR}, | |||
firm_soc_cre_code = #{firmSocCreCode,jdbcType=VARCHAR}, | |||
firm_org_code = #{firmOrgCode,jdbcType=VARCHAR}, | |||
firm_tax_reg_cert_code = #{firmTaxRegCertCode,jdbcType=VARCHAR}, | |||
firm_bus_scope = #{firmBusScope,jdbcType=VARCHAR}, | |||
firm_bus_time = #{firmBusTime,jdbcType=TIMESTAMP}, | |||
juridical_nationality = #{juridicalNationality,jdbcType=VARCHAR}, | |||
juridical_idcard = #{juridicalIdcard,jdbcType=VARCHAR}, | |||
juridical_time = #{juridicalTime,jdbcType=TIMESTAMP}, | |||
agent_name = #{agentName,jdbcType=VARCHAR}, | |||
agent_idcard = #{agentIdcard,jdbcType=VARCHAR}, | |||
agent_time = #{agentTime,jdbcType=TIMESTAMP}, | |||
firm_phone = #{firmPhone,jdbcType=VARCHAR}, | |||
business_license_url = #{businessLicenseUrl,jdbcType=VARCHAR}, | |||
idcard_juridical_url = #{idcardJuridicalUrl,jdbcType=VARCHAR}, | |||
idcard_agent_url = #{idcardAgentUrl,jdbcType=VARCHAR} | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 11:32:32 ### --> | |||
<!-- Your codes goes here!!! --> | |||
<select id="selectOneByExample" parameterType="com.trust.ywx.customer.dao.po.FirmInfoDetailExample" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List" /> | |||
from firm_info_detail | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
<if test="orderByClause != null"> | |||
order by ${orderByClause} | |||
</if> | |||
limit 1 | |||
</select> | |||
<insert id="batchInsert" keyColumn="uniqueid" keyProperty="uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
insert into firm_info_detail | |||
(open_id, org_code_url, juridical_idcard_front_url, juridical_idcard_back_url, juridical_tmp_id_url, | |||
firm_bus_reg_num, firm_soc_cre_code, firm_org_code, firm_tax_reg_cert_code, firm_bus_scope, | |||
firm_bus_time, juridical_nationality, juridical_idcard, juridical_time, agent_name, | |||
agent_idcard, agent_time, firm_phone, business_license_url, idcard_juridical_url, | |||
idcard_agent_url) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{item.openId,jdbcType=VARCHAR}, #{item.orgCodeUrl,jdbcType=VARCHAR}, #{item.juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
#{item.juridicalIdcardBackUrl,jdbcType=VARCHAR}, #{item.juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
#{item.firmBusRegNum,jdbcType=VARCHAR}, #{item.firmSocCreCode,jdbcType=VARCHAR}, | |||
#{item.firmOrgCode,jdbcType=VARCHAR}, #{item.firmTaxRegCertCode,jdbcType=VARCHAR}, | |||
#{item.firmBusScope,jdbcType=VARCHAR}, #{item.firmBusTime,jdbcType=TIMESTAMP}, | |||
#{item.juridicalNationality,jdbcType=VARCHAR}, #{item.juridicalIdcard,jdbcType=VARCHAR}, | |||
#{item.juridicalTime,jdbcType=TIMESTAMP}, #{item.agentName,jdbcType=VARCHAR}, #{item.agentIdcard,jdbcType=VARCHAR}, | |||
#{item.agentTime,jdbcType=TIMESTAMP}, #{item.firmPhone,jdbcType=VARCHAR}, #{item.businessLicenseUrl,jdbcType=VARCHAR}, | |||
#{item.idcardJuridicalUrl,jdbcType=VARCHAR}, #{item.idcardAgentUrl,jdbcType=VARCHAR} | |||
) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueid" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
insert into firm_info_detail ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
</foreach> | |||
) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'open_id'.toString() == column.value"> | |||
#{item.openId,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'org_code_url'.toString() == column.value"> | |||
#{item.orgCodeUrl,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'juridical_idcard_front_url'.toString() == column.value"> | |||
#{item.juridicalIdcardFrontUrl,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'juridical_idcard_back_url'.toString() == column.value"> | |||
#{item.juridicalIdcardBackUrl,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'juridical_tmp_id_url'.toString() == column.value"> | |||
#{item.juridicalTmpIdUrl,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_bus_reg_num'.toString() == column.value"> | |||
#{item.firmBusRegNum,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_soc_cre_code'.toString() == column.value"> | |||
#{item.firmSocCreCode,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_org_code'.toString() == column.value"> | |||
#{item.firmOrgCode,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_tax_reg_cert_code'.toString() == column.value"> | |||
#{item.firmTaxRegCertCode,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_bus_scope'.toString() == column.value"> | |||
#{item.firmBusScope,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_bus_time'.toString() == column.value"> | |||
#{item.firmBusTime,jdbcType=TIMESTAMP} | |||
</if> | |||
<if test="'juridical_nationality'.toString() == column.value"> | |||
#{item.juridicalNationality,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'juridical_idcard'.toString() == column.value"> | |||
#{item.juridicalIdcard,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'juridical_time'.toString() == column.value"> | |||
#{item.juridicalTime,jdbcType=TIMESTAMP} | |||
</if> | |||
<if test="'agent_name'.toString() == column.value"> | |||
#{item.agentName,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'agent_idcard'.toString() == column.value"> | |||
#{item.agentIdcard,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'agent_time'.toString() == column.value"> | |||
#{item.agentTime,jdbcType=TIMESTAMP} | |||
</if> | |||
<if test="'firm_phone'.toString() == column.value"> | |||
#{item.firmPhone,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'business_license_url'.toString() == column.value"> | |||
#{item.businessLicenseUrl,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'idcard_juridical_url'.toString() == column.value"> | |||
#{item.idcardJuridicalUrl,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'idcard_agent_url'.toString() == column.value"> | |||
#{item.idcardAgentUrl,jdbcType=VARCHAR} | |||
</if> | |||
</foreach> | |||
) | |||
</foreach> | |||
</insert> | |||
</mapper> |
@@ -110,15 +110,18 @@ | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</delete> | |||
<insert id="insert" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_info_extend (client_id, prop_name, prop_value | |||
) | |||
values (#{clientId,jdbcType=VARCHAR}, #{propName,jdbcType=VARCHAR}, #{propValue,jdbcType=VARCHAR} | |||
) | |||
<insert id="insert"> | |||
insert into firm_info_extend (uniqueid, client_id, prop_name, | |||
prop_value) | |||
values (#{uniqueid,jdbcType=VARCHAR}, #{clientId,jdbcType=VARCHAR}, #{propName,jdbcType=VARCHAR}, | |||
#{propValue,jdbcType=VARCHAR}) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
<insert id="insertSelective"> | |||
insert into firm_info_extend | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
uniqueid, | |||
</if> | |||
<if test="clientId != null"> | |||
client_id, | |||
</if> | |||
@@ -130,6 +133,9 @@ | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
#{uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="clientId != null"> | |||
#{clientId,jdbcType=VARCHAR}, | |||
</if> | |||
@@ -200,7 +206,7 @@ | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 11:32:32 ### --> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 18:12:43 ### --> | |||
@@ -218,16 +224,16 @@ | |||
</if> | |||
limit 1 | |||
</select> | |||
<insert id="batchInsert" keyColumn="uniqueid" keyProperty="uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsert" parameterType="map"> | |||
insert into firm_info_extend | |||
(client_id, prop_name, prop_value) | |||
(uniqueid, client_id, prop_name, prop_value) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{item.clientId,jdbcType=VARCHAR}, #{item.propName,jdbcType=VARCHAR}, #{item.propValue,jdbcType=VARCHAR} | |||
) | |||
(#{item.uniqueid,jdbcType=VARCHAR}, #{item.clientId,jdbcType=VARCHAR}, #{item.propName,jdbcType=VARCHAR}, | |||
#{item.propValue,jdbcType=VARCHAR}) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueid" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsertSelective" parameterType="map"> | |||
insert into firm_info_extend ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
@@ -237,6 +243,9 @@ | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'uniqueid'.toString() == column.value"> | |||
#{item.uniqueid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'client_id'.toString() == column.value"> | |||
#{item.clientId,jdbcType=VARCHAR} | |||
</if> | |||
@@ -9,7 +9,7 @@ | |||
<!-- 第三方应用标识 --> | |||
<result column="client_id" jdbcType="VARCHAR" property="clientId" /> | |||
<!-- 厂商联系人 --> | |||
<!-- 客户联系人 --> | |||
<result column="firm_person" jdbcType="VARCHAR" property="firmPerson" /> | |||
<!-- 第三方应用APP_SECRET --> | |||
@@ -34,7 +34,7 @@ | |||
<result column="firm_email" jdbcType="VARCHAR" property="firmEmail" /> | |||
<!-- 第三方厂商状态 --> | |||
<result column="status" jdbcType="INTEGER" property="firmStatus" /> | |||
<result column="status" jdbcType="INTEGER" property="status" /> | |||
<!-- 企业组织机构号 --> | |||
<result column="client_org_code" jdbcType="VARCHAR" property="clientOrgCode" /> | |||
@@ -221,31 +221,34 @@ | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</delete> | |||
<insert id="insert" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_info (client_id, firm_person, app_secret, | |||
firm_name, firm_phone, cert_alg, | |||
firm_address, note, firm_email, | |||
status, client_org_code, mssp_appid, | |||
cert_agency, stamp_type, stamp_name, | |||
open_id, send_sms, sale_person_id, | |||
tech_person_id, create_time, update_time, | |||
agent_client_id, agent_sale_id, ca_channel, | |||
project_status, plat_app_id, app_cert, | |||
app_icon) | |||
values (#{clientId,jdbcType=VARCHAR}, #{firmPerson,jdbcType=VARCHAR}, #{appSecret,jdbcType=VARCHAR}, | |||
#{firmName,jdbcType=VARCHAR}, #{firmPhone,jdbcType=VARCHAR}, #{certAlg,jdbcType=VARCHAR}, | |||
#{firmAddress,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, #{firmEmail,jdbcType=VARCHAR}, | |||
#{firmStatus,jdbcType=INTEGER}, #{clientOrgCode,jdbcType=VARCHAR}, #{msspAppid,jdbcType=VARCHAR}, | |||
#{certAgency,jdbcType=VARCHAR}, #{stampType,jdbcType=CHAR}, #{stampName,jdbcType=VARCHAR}, | |||
#{openId,jdbcType=VARCHAR}, #{sendSms,jdbcType=VARCHAR}, #{salePersonId,jdbcType=VARCHAR}, | |||
#{techPersonId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, | |||
#{agentClientId,jdbcType=VARCHAR}, #{agentSaleId,jdbcType=VARCHAR}, #{caChannel,jdbcType=INTEGER}, | |||
#{projectStatus,jdbcType=INTEGER}, #{platAppId,jdbcType=INTEGER}, #{appCert,jdbcType=LONGVARCHAR}, | |||
#{appIcon,jdbcType=LONGVARCHAR}) | |||
<insert id="insert"> | |||
insert into firm_info (uniqueid, client_id, firm_person, | |||
app_secret, firm_name, firm_phone, | |||
cert_alg, firm_address, note, | |||
firm_email, status, client_org_code, | |||
mssp_appid, cert_agency, stamp_type, | |||
stamp_name, open_id, send_sms, | |||
sale_person_id, tech_person_id, create_time, | |||
update_time, agent_client_id, agent_sale_id, | |||
ca_channel, project_status, plat_app_id, | |||
app_cert, app_icon) | |||
values (#{uniqueid,jdbcType=VARCHAR}, #{clientId,jdbcType=VARCHAR}, #{firmPerson,jdbcType=VARCHAR}, | |||
#{appSecret,jdbcType=VARCHAR}, #{firmName,jdbcType=VARCHAR}, #{firmPhone,jdbcType=VARCHAR}, | |||
#{certAlg,jdbcType=VARCHAR}, #{firmAddress,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, | |||
#{firmEmail,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{clientOrgCode,jdbcType=VARCHAR}, | |||
#{msspAppid,jdbcType=VARCHAR}, #{certAgency,jdbcType=VARCHAR}, #{stampType,jdbcType=CHAR}, | |||
#{stampName,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{sendSms,jdbcType=VARCHAR}, | |||
#{salePersonId,jdbcType=VARCHAR}, #{techPersonId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, | |||
#{updateTime,jdbcType=TIMESTAMP}, #{agentClientId,jdbcType=VARCHAR}, #{agentSaleId,jdbcType=VARCHAR}, | |||
#{caChannel,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{platAppId,jdbcType=INTEGER}, | |||
#{appCert,jdbcType=LONGVARCHAR}, #{appIcon,jdbcType=LONGVARCHAR}) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
<insert id="insertSelective"> | |||
insert into firm_info | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
uniqueid, | |||
</if> | |||
<if test="clientId != null"> | |||
client_id, | |||
</if> | |||
@@ -273,7 +276,7 @@ | |||
<if test="firmEmail != null"> | |||
firm_email, | |||
</if> | |||
<if test="firmStatus != null"> | |||
<if test="status != null"> | |||
status, | |||
</if> | |||
<if test="clientOrgCode != null"> | |||
@@ -332,6 +335,9 @@ | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
#{uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="clientId != null"> | |||
#{clientId,jdbcType=VARCHAR}, | |||
</if> | |||
@@ -359,8 +365,8 @@ | |||
<if test="firmEmail != null"> | |||
#{firmEmail,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmStatus != null"> | |||
#{firmStatus,jdbcType=INTEGER}, | |||
<if test="status != null"> | |||
#{status,jdbcType=INTEGER}, | |||
</if> | |||
<if test="clientOrgCode != null"> | |||
#{clientOrgCode,jdbcType=VARCHAR}, | |||
@@ -457,8 +463,8 @@ | |||
<if test="record.firmEmail != null"> | |||
firm_email = #{record.firmEmail,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmStatus != null"> | |||
status = #{record.firmStatus,jdbcType=INTEGER}, | |||
<if test="record.status != null"> | |||
status = #{record.status,jdbcType=INTEGER}, | |||
</if> | |||
<if test="record.clientOrgCode != null"> | |||
client_org_code = #{record.clientOrgCode,jdbcType=VARCHAR}, | |||
@@ -531,7 +537,7 @@ | |||
firm_address = #{record.firmAddress,jdbcType=VARCHAR}, | |||
note = #{record.note,jdbcType=VARCHAR}, | |||
firm_email = #{record.firmEmail,jdbcType=VARCHAR}, | |||
status = #{record.firmStatus,jdbcType=INTEGER}, | |||
status = #{record.status,jdbcType=INTEGER}, | |||
client_org_code = #{record.clientOrgCode,jdbcType=VARCHAR}, | |||
mssp_appid = #{record.msspAppid,jdbcType=VARCHAR}, | |||
cert_agency = #{record.certAgency,jdbcType=VARCHAR}, | |||
@@ -566,7 +572,7 @@ | |||
firm_address = #{record.firmAddress,jdbcType=VARCHAR}, | |||
note = #{record.note,jdbcType=VARCHAR}, | |||
firm_email = #{record.firmEmail,jdbcType=VARCHAR}, | |||
status = #{record.firmStatus,jdbcType=INTEGER}, | |||
status = #{record.status,jdbcType=INTEGER}, | |||
client_org_code = #{record.clientOrgCode,jdbcType=VARCHAR}, | |||
mssp_appid = #{record.msspAppid,jdbcType=VARCHAR}, | |||
cert_agency = #{record.certAgency,jdbcType=VARCHAR}, | |||
@@ -617,8 +623,8 @@ | |||
<if test="firmEmail != null"> | |||
firm_email = #{firmEmail,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmStatus != null"> | |||
status = #{firmStatus,jdbcType=INTEGER}, | |||
<if test="status != null"> | |||
status = #{status,jdbcType=INTEGER}, | |||
</if> | |||
<if test="clientOrgCode != null"> | |||
client_org_code = #{clientOrgCode,jdbcType=VARCHAR}, | |||
@@ -688,7 +694,7 @@ | |||
firm_address = #{firmAddress,jdbcType=VARCHAR}, | |||
note = #{note,jdbcType=VARCHAR}, | |||
firm_email = #{firmEmail,jdbcType=VARCHAR}, | |||
status = #{firmStatus,jdbcType=INTEGER}, | |||
status = #{status,jdbcType=INTEGER}, | |||
client_org_code = #{clientOrgCode,jdbcType=VARCHAR}, | |||
mssp_appid = #{msspAppid,jdbcType=VARCHAR}, | |||
cert_agency = #{certAgency,jdbcType=VARCHAR}, | |||
@@ -720,7 +726,7 @@ | |||
firm_address = #{firmAddress,jdbcType=VARCHAR}, | |||
note = #{note,jdbcType=VARCHAR}, | |||
firm_email = #{firmEmail,jdbcType=VARCHAR}, | |||
status = #{firmStatus,jdbcType=INTEGER}, | |||
status = #{status,jdbcType=INTEGER}, | |||
client_org_code = #{clientOrgCode,jdbcType=VARCHAR}, | |||
mssp_appid = #{msspAppid,jdbcType=VARCHAR}, | |||
cert_agency = #{certAgency,jdbcType=VARCHAR}, | |||
@@ -740,7 +746,7 @@ | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 11:32:32 ### --> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 18:12:43 ### --> | |||
@@ -772,28 +778,29 @@ | |||
</if> | |||
limit 1 | |||
</select> | |||
<insert id="batchInsert" keyColumn="uniqueid" keyProperty="uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsert" parameterType="map"> | |||
insert into firm_info | |||
(client_id, firm_person, app_secret, firm_name, firm_phone, cert_alg, firm_address, | |||
(uniqueid, client_id, firm_person, app_secret, firm_name, firm_phone, cert_alg, firm_address, | |||
note, firm_email, status, client_org_code, mssp_appid, cert_agency, stamp_type, | |||
stamp_name, open_id, send_sms, sale_person_id, tech_person_id, create_time, update_time, | |||
agent_client_id, agent_sale_id, ca_channel, project_status, plat_app_id, app_cert, | |||
app_icon) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{item.clientId,jdbcType=VARCHAR}, #{item.firmPerson,jdbcType=VARCHAR}, #{item.appSecret,jdbcType=VARCHAR}, | |||
#{item.firmName,jdbcType=VARCHAR}, #{item.firmPhone,jdbcType=VARCHAR}, #{item.certAlg,jdbcType=VARCHAR}, | |||
#{item.firmAddress,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, #{item.firmEmail,jdbcType=VARCHAR}, | |||
#{item.firmStatus,jdbcType=INTEGER}, #{item.clientOrgCode,jdbcType=VARCHAR}, #{item.msspAppid,jdbcType=VARCHAR}, | |||
#{item.certAgency,jdbcType=VARCHAR}, #{item.stampType,jdbcType=CHAR}, #{item.stampName,jdbcType=VARCHAR}, | |||
#{item.openId,jdbcType=VARCHAR}, #{item.sendSms,jdbcType=VARCHAR}, #{item.salePersonId,jdbcType=VARCHAR}, | |||
#{item.techPersonId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, | |||
#{item.agentClientId,jdbcType=VARCHAR}, #{item.agentSaleId,jdbcType=VARCHAR}, #{item.caChannel,jdbcType=INTEGER}, | |||
#{item.projectStatus,jdbcType=INTEGER}, #{item.platAppId,jdbcType=INTEGER}, #{item.appCert,jdbcType=LONGVARCHAR}, | |||
#{item.appIcon,jdbcType=LONGVARCHAR}) | |||
(#{item.uniqueid,jdbcType=VARCHAR}, #{item.clientId,jdbcType=VARCHAR}, #{item.firmPerson,jdbcType=VARCHAR}, | |||
#{item.appSecret,jdbcType=VARCHAR}, #{item.firmName,jdbcType=VARCHAR}, #{item.firmPhone,jdbcType=VARCHAR}, | |||
#{item.certAlg,jdbcType=VARCHAR}, #{item.firmAddress,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, | |||
#{item.firmEmail,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER}, #{item.clientOrgCode,jdbcType=VARCHAR}, | |||
#{item.msspAppid,jdbcType=VARCHAR}, #{item.certAgency,jdbcType=VARCHAR}, #{item.stampType,jdbcType=CHAR}, | |||
#{item.stampName,jdbcType=VARCHAR}, #{item.openId,jdbcType=VARCHAR}, #{item.sendSms,jdbcType=VARCHAR}, | |||
#{item.salePersonId,jdbcType=VARCHAR}, #{item.techPersonId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, | |||
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.agentClientId,jdbcType=VARCHAR}, | |||
#{item.agentSaleId,jdbcType=VARCHAR}, #{item.caChannel,jdbcType=INTEGER}, #{item.projectStatus,jdbcType=INTEGER}, | |||
#{item.platAppId,jdbcType=INTEGER}, #{item.appCert,jdbcType=LONGVARCHAR}, #{item.appIcon,jdbcType=LONGVARCHAR} | |||
) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueid" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsertSelective" parameterType="map"> | |||
insert into firm_info ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
@@ -803,6 +810,9 @@ | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'uniqueid'.toString() == column.value"> | |||
#{item.uniqueid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'client_id'.toString() == column.value"> | |||
#{item.clientId,jdbcType=VARCHAR} | |||
</if> | |||
@@ -831,7 +841,7 @@ | |||
#{item.firmEmail,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'status'.toString() == column.value"> | |||
#{item.firmStatus,jdbcType=INTEGER} | |||
#{item.status,jdbcType=INTEGER} | |||
</if> | |||
<if test="'client_org_code'.toString() == column.value"> | |||
#{item.clientOrgCode,jdbcType=VARCHAR} | |||
@@ -240,9 +240,9 @@ | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</delete> | |||
<insert id="insert" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_info_temp (open_id, business_license_url, org_code_url, | |||
juridical_idcard_front_url, juridical_idcard_back_url, | |||
<insert id="insert"> | |||
insert into firm_info_temp (uniqueid, open_id, business_license_url, | |||
org_code_url, juridical_idcard_front_url, juridical_idcard_back_url, | |||
juridical_tmp_id_url, firm_name, firm_bus_reg_num, | |||
firm_soc_cre_code, firm_addr, firm_org_code, | |||
firm_tax_reg_cert_code, firm_bus_scope, firm_bus_time, | |||
@@ -254,8 +254,8 @@ | |||
agent_client_id, agent_sale_id, firm_client_id, | |||
create_time, update_time, firm_person, | |||
firm_logo) | |||
values (#{openId,jdbcType=VARCHAR}, #{businessLicenseUrl,jdbcType=VARCHAR}, #{orgCodeUrl,jdbcType=VARCHAR}, | |||
#{juridicalIdcardFrontUrl,jdbcType=VARCHAR}, #{juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
values (#{uniqueid,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{businessLicenseUrl,jdbcType=VARCHAR}, | |||
#{orgCodeUrl,jdbcType=VARCHAR}, #{juridicalIdcardFrontUrl,jdbcType=VARCHAR}, #{juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
#{juridicalTmpIdUrl,jdbcType=VARCHAR}, #{firmName,jdbcType=VARCHAR}, #{firmBusRegNum,jdbcType=VARCHAR}, | |||
#{firmSocCreCode,jdbcType=VARCHAR}, #{firmAddress,jdbcType=VARCHAR}, #{firmOrgCode,jdbcType=VARCHAR}, | |||
#{firmTaxRegCertCode,jdbcType=VARCHAR}, #{firmBusScope,jdbcType=VARCHAR}, #{firmBusTime,jdbcType=TIMESTAMP}, | |||
@@ -268,9 +268,12 @@ | |||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{firmPerson,jdbcType=VARCHAR}, | |||
#{firmLogo,jdbcType=LONGVARCHAR}) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
<insert id="insertSelective"> | |||
insert into firm_info_temp | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
uniqueid, | |||
</if> | |||
<if test="openId != null"> | |||
open_id, | |||
</if> | |||
@@ -381,6 +384,9 @@ | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
#{uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="openId != null"> | |||
#{openId,jdbcType=VARCHAR}, | |||
</if> | |||
@@ -895,7 +901,7 @@ | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 11:32:32 ### --> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 18:12:43 ### --> | |||
@@ -927,21 +933,21 @@ | |||
</if> | |||
limit 1 | |||
</select> | |||
<insert id="batchInsert" keyColumn="uniqueid" keyProperty="uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsert" parameterType="map"> | |||
insert into firm_info_temp | |||
(open_id, business_license_url, org_code_url, juridical_idcard_front_url, juridical_idcard_back_url, | |||
juridical_tmp_id_url, firm_name, firm_bus_reg_num, firm_soc_cre_code, firm_addr, | |||
firm_org_code, firm_tax_reg_cert_code, firm_bus_scope, firm_bus_time, juridical_nationality, | |||
juridical_name, juridical_phone, juridical_idcard, juridical_time, agent_name, | |||
agent_idcard, agent_time, firm_phone, firm_email, realname_check, firm_status, | |||
(uniqueid, open_id, business_license_url, org_code_url, juridical_idcard_front_url, | |||
juridical_idcard_back_url, juridical_tmp_id_url, firm_name, firm_bus_reg_num, firm_soc_cre_code, | |||
firm_addr, firm_org_code, firm_tax_reg_cert_code, firm_bus_scope, firm_bus_time, | |||
juridical_nationality, juridical_name, juridical_phone, juridical_idcard, juridical_time, | |||
agent_name, agent_idcard, agent_time, firm_phone, firm_email, realname_check, firm_status, | |||
juridical_realname_check, agent_phone, channel, agent_client_id, agent_sale_id, | |||
firm_client_id, create_time, update_time, firm_person, firm_logo) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{item.openId,jdbcType=VARCHAR}, #{item.businessLicenseUrl,jdbcType=VARCHAR}, #{item.orgCodeUrl,jdbcType=VARCHAR}, | |||
#{item.juridicalIdcardFrontUrl,jdbcType=VARCHAR}, #{item.juridicalIdcardBackUrl,jdbcType=VARCHAR}, | |||
#{item.juridicalTmpIdUrl,jdbcType=VARCHAR}, #{item.firmName,jdbcType=VARCHAR}, | |||
#{item.firmBusRegNum,jdbcType=VARCHAR}, #{item.firmSocCreCode,jdbcType=VARCHAR}, | |||
(#{item.uniqueid,jdbcType=VARCHAR}, #{item.openId,jdbcType=VARCHAR}, #{item.businessLicenseUrl,jdbcType=VARCHAR}, | |||
#{item.orgCodeUrl,jdbcType=VARCHAR}, #{item.juridicalIdcardFrontUrl,jdbcType=VARCHAR}, | |||
#{item.juridicalIdcardBackUrl,jdbcType=VARCHAR}, #{item.juridicalTmpIdUrl,jdbcType=VARCHAR}, | |||
#{item.firmName,jdbcType=VARCHAR}, #{item.firmBusRegNum,jdbcType=VARCHAR}, #{item.firmSocCreCode,jdbcType=VARCHAR}, | |||
#{item.firmAddress,jdbcType=VARCHAR}, #{item.firmOrgCode,jdbcType=VARCHAR}, #{item.firmTaxRegCertCode,jdbcType=VARCHAR}, | |||
#{item.firmBusScope,jdbcType=VARCHAR}, #{item.firmBusTime,jdbcType=TIMESTAMP}, | |||
#{item.juridicalNationality,jdbcType=VARCHAR}, #{item.juridicalName,jdbcType=VARCHAR}, | |||
@@ -955,7 +961,7 @@ | |||
) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueid" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsertSelective" parameterType="map"> | |||
insert into firm_info_temp ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
@@ -965,6 +971,9 @@ | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'uniqueid'.toString() == column.value"> | |||
#{item.uniqueid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'open_id'.toString() == column.value"> | |||
#{item.openId,jdbcType=VARCHAR} | |||
</if> | |||
@@ -126,17 +126,22 @@ | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</delete> | |||
<insert id="insert" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_oauth_token (client_id, access_token, access_token_expires, | |||
call_num, scope, create_time, | |||
update_time, app_secret) | |||
values (#{clientId,jdbcType=CHAR}, #{accessToken,jdbcType=CHAR}, #{accessTokenExpires,jdbcType=INTEGER}, | |||
#{callNum,jdbcType=INTEGER}, #{scope,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, | |||
#{updateTime,jdbcType=TIMESTAMP}, #{appSecret,jdbcType=VARCHAR}) | |||
<insert id="insert"> | |||
insert into firm_oauth_token (uniqueid, client_id, access_token, | |||
access_token_expires, call_num, scope, | |||
create_time, update_time, app_secret | |||
) | |||
values (#{uniqueid,jdbcType=CHAR}, #{clientId,jdbcType=CHAR}, #{accessToken,jdbcType=CHAR}, | |||
#{accessTokenExpires,jdbcType=INTEGER}, #{callNum,jdbcType=INTEGER}, #{scope,jdbcType=VARCHAR}, | |||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{appSecret,jdbcType=VARCHAR} | |||
) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
<insert id="insertSelective"> | |||
insert into firm_oauth_token | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
uniqueid, | |||
</if> | |||
<if test="clientId != null"> | |||
client_id, | |||
</if> | |||
@@ -163,6 +168,9 @@ | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
#{uniqueid,jdbcType=CHAR}, | |||
</if> | |||
<if test="clientId != null"> | |||
#{clientId,jdbcType=CHAR}, | |||
</if> | |||
@@ -288,7 +296,7 @@ | |||
where uniqueid = #{uniqueid,jdbcType=CHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 11:32:32 ### --> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 18:12:43 ### --> | |||
@@ -306,18 +314,19 @@ | |||
</if> | |||
limit 1 | |||
</select> | |||
<insert id="batchInsert" keyColumn="uniqueid" keyProperty="uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsert" parameterType="map"> | |||
insert into firm_oauth_token | |||
(client_id, access_token, access_token_expires, call_num, scope, create_time, update_time, | |||
app_secret) | |||
(uniqueid, client_id, access_token, access_token_expires, call_num, scope, create_time, | |||
update_time, app_secret) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{item.clientId,jdbcType=CHAR}, #{item.accessToken,jdbcType=CHAR}, #{item.accessTokenExpires,jdbcType=INTEGER}, | |||
#{item.callNum,jdbcType=INTEGER}, #{item.scope,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, | |||
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.appSecret,jdbcType=VARCHAR}) | |||
(#{item.uniqueid,jdbcType=CHAR}, #{item.clientId,jdbcType=CHAR}, #{item.accessToken,jdbcType=CHAR}, | |||
#{item.accessTokenExpires,jdbcType=INTEGER}, #{item.callNum,jdbcType=INTEGER}, | |||
#{item.scope,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, | |||
#{item.appSecret,jdbcType=VARCHAR}) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueid" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsertSelective" parameterType="map"> | |||
insert into firm_oauth_token ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
@@ -327,6 +336,9 @@ | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'uniqueid'.toString() == column.value"> | |||
#{item.uniqueid,jdbcType=CHAR} | |||
</if> | |||
<if test="'client_id'.toString() == column.value"> | |||
#{item.clientId,jdbcType=CHAR} | |||
</if> | |||
@@ -114,15 +114,18 @@ | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</delete> | |||
<insert id="insert" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_usercert_channel (clientid, firm_id, channel_type | |||
) | |||
values (#{clientid,jdbcType=VARCHAR}, #{firmId,jdbcType=VARCHAR}, #{channelType,jdbcType=BIT} | |||
) | |||
<insert id="insert"> | |||
insert into firm_usercert_channel (uniqueid, clientid, firm_id, | |||
channel_type) | |||
values (#{uniqueid,jdbcType=VARCHAR}, #{clientid,jdbcType=VARCHAR}, #{firmId,jdbcType=VARCHAR}, | |||
#{channelType,jdbcType=BIT}) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
<insert id="insertSelective"> | |||
insert into firm_usercert_channel | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
uniqueid, | |||
</if> | |||
<if test="clientid != null"> | |||
clientid, | |||
</if> | |||
@@ -134,6 +137,9 @@ | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="uniqueid != null"> | |||
#{uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="clientid != null"> | |||
#{clientid,jdbcType=VARCHAR}, | |||
</if> | |||
@@ -204,7 +210,7 @@ | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 11:32:32 ### --> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-20 18:12:43 ### --> | |||
@@ -222,16 +228,16 @@ | |||
</if> | |||
limit 1 | |||
</select> | |||
<insert id="batchInsert" keyColumn="uniqueid" keyProperty="uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsert" parameterType="map"> | |||
insert into firm_usercert_channel | |||
(clientid, firm_id, channel_type) | |||
(uniqueid, clientid, firm_id, channel_type) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{item.clientid,jdbcType=VARCHAR}, #{item.firmId,jdbcType=VARCHAR}, #{item.channelType,jdbcType=BIT} | |||
) | |||
(#{item.uniqueid,jdbcType=VARCHAR}, #{item.clientid,jdbcType=VARCHAR}, #{item.firmId,jdbcType=VARCHAR}, | |||
#{item.channelType,jdbcType=BIT}) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueid" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
<insert id="batchInsertSelective" parameterType="map"> | |||
insert into firm_usercert_channel ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
@@ -241,6 +247,9 @@ | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'uniqueid'.toString() == column.value"> | |||
#{item.uniqueid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'clientid'.toString() == column.value"> | |||
#{item.clientid,jdbcType=VARCHAR} | |||
</if> | |||
@@ -6,17 +6,16 @@ import com.trust.ywx.customer.dao.po.FirmInfo; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExample; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.junit.jupiter.api.Test; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.boot.test.context.SpringBootTest; | |||
import org.springframework.test.context.junit4.SpringRunner; | |||
import javax.annotation.Resource; | |||
import java.util.List; | |||
@Slf4j | |||
@SpringBootTest(classes = Application.class) | |||
class ApplicationTests { | |||
@Autowired | |||
@Resource | |||
FirmInfoMapper firmInfoMapper; | |||
@Test | |||
void contextLoads() { | |||
@@ -0,0 +1,56 @@ | |||
package com.trust.ywx.customer; | |||
import com.trust.ywx.customer.common.enu.CaChannelEnum; | |||
import com.trust.ywx.customer.common.enu.CommonStatusEnum; | |||
import com.trust.ywx.customer.common.enu.ProjectStatusEnum; | |||
import com.trust.ywx.customer.common.model.manager.request.TrustFirmParam; | |||
import com.trust.ywx.customer.common.exception.BizException; | |||
import com.trust.ywx.customer.service.manager.FirmManagerService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.junit.jupiter.api.Test; | |||
import org.springframework.boot.test.context.SpringBootTest; | |||
import javax.annotation.Resource; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmServiceTests.java | |||
* @包 路 径: com.trust.ywx.customer | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/20 17:19 | |||
* @Modify: | |||
*/ | |||
@Slf4j | |||
@SpringBootTest(classes = Application.class) | |||
public class FirmServiceTests { | |||
@Resource | |||
FirmManagerService firmManagerService; | |||
@Test | |||
public void addTest() throws BizException { | |||
TrustFirmParam param = new TrustFirmParam(); | |||
param.setClientId("12345"); | |||
param.setAppSecret("123456"); | |||
param.setClientOrgCode("678910"); | |||
param.setFirmName("莆田医院"); | |||
param.setProjectStatus(ProjectStatusEnum.NORMAL.getCode()); | |||
param.setCaChannel(CaChannelEnum.BJCA.getChannel()); | |||
param.setTechSupport(CommonStatusEnum.NO.getCode()); | |||
param.setSmsSend(CommonStatusEnum.YES.getCode()); | |||
param.setSmsCustomize(CommonStatusEnum.YES.getCode()); | |||
param.setSmsCustomizeContent("我的短信我做主"); | |||
firmManagerService.add(param); | |||
System.out.println("success"); | |||
} | |||
@Test | |||
public void delTest(){ | |||
firmManagerService.delete("12345"); | |||
} | |||
} |
@@ -0,0 +1,29 @@ | |||
package com.trust.ywx.customer; | |||
import java.util.HashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.stream.Collectors; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: StreamTests.java | |||
* @包 路 径: com.trust.ywx.customer | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/21 9:55 | |||
* @Modify: | |||
*/ | |||
public class StreamTests { | |||
public static void main(String[] args) { | |||
Map<String,Integer> map = new HashMap<>(); | |||
map.put("a",1); | |||
map.put("b",1); | |||
map.put("c",1); | |||
List<String> list = map.keySet().stream().collect(Collectors.toList()); | |||
System.out.println(list); | |||
} | |||
} |
@@ -1,35 +0,0 @@ | |||
package com.trust.ywx.customer.service; | |||
import com.trust.ywx.customer.service.dto.TrustCustomerInfoDto; | |||
import com.trust.ywx.customer.service.exception.BizException; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: TrustCustomerService.java | |||
* @包 路 径: com.trust.ywx.customer.service.exceptions | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 可信客户服务类 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/11 21:15 | |||
* @Modify: | |||
*/ | |||
public interface TrustCustomerService { | |||
/** | |||
* 添加可信客户 | |||
* @param customerInfoDto | |||
*/ | |||
void addTrustCustomer(TrustCustomerInfoDto customerInfoDto) throws BizException; | |||
/** | |||
* 根据clientId查询可信客户信息 | |||
* @param clientId | |||
* @return | |||
*/ | |||
TrustCustomerInfoDto getCustomerInfo(String clientId); | |||
} |
@@ -1,34 +0,0 @@ | |||
package com.trust.ywx.customer.service.dto; | |||
import com.fiftyonetrust.common.model.param.PageParam; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
/*************************************************************************** | |||
* <pre></pre> | |||
* @文件名称: Search1FirmParam.java | |||
* @包 路 径: cn.org.bjca.ywq.api.param.req | |||
* @版权所有:北京数字认证股份有限公司 (C) 2017 | |||
* | |||
* @类描述: | |||
* @版本: V1.5 | |||
* @创建人: hbx | |||
* @创建时间:2017年3月13日 下午1:54:17 | |||
*/ | |||
@Data | |||
public class SearchCustomerParam extends PageParam { | |||
/** | |||
* 客户名称 | |||
*/ | |||
private String customerName; | |||
/** | |||
* 代理商id | |||
*/ | |||
private String agentClientId; | |||
/** | |||
* 审核状态 | |||
*/ | |||
private String status; | |||
} |
@@ -1,71 +0,0 @@ | |||
package com.trust.ywx.customer.service.dto; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.util.List; | |||
/*************************************************************************** | |||
* <pre></pre> | |||
* @文件名称: Search1FirmParam.java | |||
* @包 路 径: cn.org.bjca.ywq.api.param.req | |||
* @版权所有:北京数字认证股份有限公司 (C) 2017 | |||
* | |||
* @类描述: | |||
* @版本: V1.5 | |||
* @创建人: hbx | |||
* @创建时间:2017年3月13日 下午1:54:17 | |||
*/ | |||
@Data | |||
public class SearchTrustCustomerParam extends SearchCustomerParam{ | |||
/** | |||
* 客户clientId | |||
*/ | |||
private String clientId; | |||
/** | |||
* 客户类型:互联网医院、实体医院等 | |||
*/ | |||
private List<String> networkType; | |||
/** | |||
* 公众产品形态 SDK\H5 | |||
*/ | |||
private List<String> publicProductType; | |||
/** | |||
* | |||
*/ | |||
private List<String> channelType; | |||
/** | |||
* 证书状态:无证书、正常、已过期、待更新 | |||
*/ | |||
private Integer certStatus; | |||
/** | |||
* 销售人员id | |||
*/ | |||
private String saleId; | |||
/** | |||
* 实施人员id | |||
*/ | |||
private String techId; | |||
/** | |||
* 计费模式 0正常 1异常 | |||
*/ | |||
private String chargingMode; | |||
/** | |||
* 客户编号/合同方/合同号 | |||
*/ | |||
private String likeCron; | |||
/** | |||
* 厂商组id | |||
*/ | |||
private String groupNum; | |||
/** | |||
* 项目状态 1、正常/2、试用/3、消亡 | |||
*/ | |||
private Integer projectStatus; | |||
} |
@@ -1,182 +0,0 @@ | |||
package com.trust.ywx.customer.service.dto; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: CustomerInfoDto.java | |||
* @包 路 径: com.trust.ywx.customer.service.exceptions | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 可信客户对象 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/11 21:15 | |||
* @Modify: | |||
*/ | |||
@Data | |||
public class TrustCustomerInfoDto implements Serializable { | |||
private static final long serialVersionUID = -4441680353421919686L; | |||
/** | |||
* 厂商唯一标识 | |||
*/ | |||
private String clientId; | |||
/** | |||
* 厂商是否制章 | |||
*/ | |||
private String isStamp; | |||
/** | |||
* 是否拒签 true 允许 | |||
*/ | |||
private String reject; | |||
/** | |||
* 是否作废 true 允许 | |||
*/ | |||
private String invalid; | |||
/** | |||
* 计费模式(0:正常 1:异常) | |||
*/ | |||
private String chargingMode; | |||
private String chargingRemark; | |||
private String feeModel; | |||
/** | |||
* app渠道 | |||
*/ | |||
private String appChecked; | |||
/** | |||
* sdk渠道 | |||
*/ | |||
private String sdkChecked; | |||
/** | |||
* 是否定制短信内容 | |||
*/ | |||
private String smsCustomize; | |||
/** | |||
* 定制短信的内容 | |||
*/ | |||
private String smsCustomizeContent; | |||
/** | |||
* 公众签名拍照 | |||
*/ | |||
private String wxIsPhoto; | |||
/** | |||
* 是否需要审核签章 | |||
*/ | |||
private String stampIsCheck; | |||
/** | |||
* 不允许appp设置签章 | |||
*/ | |||
private String stampIsAppset; | |||
/** | |||
* 内控平台名称 | |||
*/ | |||
private String hiscaName; | |||
/** | |||
* 内控平台logo图片 | |||
*/ | |||
private String hiscaLogo; | |||
/** | |||
* 内控平台宣传图片 | |||
*/ | |||
private String hiscaPublicity; | |||
/** | |||
* 内控平台回调地址 | |||
*/ | |||
private String hiscaCallUrl; | |||
/** | |||
* 公众端产品类型 | |||
*/ | |||
private String publicProductType; | |||
/** | |||
* 网络类型 | |||
*/ | |||
private String networkType=""; | |||
/** | |||
* 网络类型 | |||
*/ | |||
private String gatewayVersion; | |||
/** | |||
* 内控监控地址 | |||
*/ | |||
private String hiscaMonitorUrl; | |||
/** | |||
* 网络类型 | |||
*/ | |||
private String gatewayMonitorUrl; | |||
/** | |||
* 用户图章样式类型 stamp默认图章 stamp1样式1 stamp2样式2 | |||
*/ | |||
private String userStampType = "stamp"; | |||
/** | |||
* 用户图章压缩 0压缩(默认) 1不压缩 | |||
*/ | |||
private String userStampCompress = "0"; | |||
/** | |||
* 厂商图章类型 0 圆章 1 方章 | |||
*/ | |||
private Integer stampType; | |||
/** | |||
* 厂商图章时间戳 0否 1是 | |||
*/ | |||
private Integer firmStampTS; | |||
/** | |||
* 子厂商图章时间戳 0否 1是 | |||
*/ | |||
private Integer departStampTS; | |||
/** | |||
* 厂商类型 0 普通 1冠新 默认0 | |||
*/ | |||
private Integer firmMode; | |||
private String faceDetect; | |||
private String caType; | |||
//厂商是否允许挂靠,默认不允许,除非在IDM选中允许挂靠 | |||
private String allowUserBind = "0"; | |||
//是否在挂靠医院列表里展示 | |||
private String showFirm = "0"; | |||
//个人pdf增加水印 | |||
private String personPdfWater = "0"; | |||
//附件pdf增加水印 | |||
private String appendPdfWater = "0"; | |||
//患者签名产品形态(app sdk h5 applet 多个逗号分隔) | |||
private String[] patientSignPlatform; | |||
// private PatientClientConfig appletConfig; | |||
private String techPersonSupport = "0"; | |||
private String techSupportInfo = ""; | |||
/** | |||
* 所属厂商组 | |||
*/ | |||
private String firmGroup; | |||
/** | |||
* 厂商控制自动签 默认关闭“false” | |||
*/ | |||
private String selfSignByFirm; | |||
} |
@@ -1,30 +0,0 @@ | |||
package com.trust.ywx.customer.service.exception; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: BizException.java | |||
* @包 路 径: com.trust.ywx.customer.service.exceptions | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 客户服务返回的业务异常 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/11 21:15 | |||
* @Modify: | |||
*/ | |||
public class BizException extends Exception { | |||
private static final long serialVersionUID = -6272782690484117542L; | |||
private String status; | |||
public BizException(String status, String message) { | |||
super(message); | |||
this.status = status; | |||
} | |||
public String getStatus() { | |||
return status; | |||
} | |||
public String getMessage(){ | |||
return super.getMessage(); | |||
} | |||
} |
@@ -1,65 +0,0 @@ | |||
package com.trust.ywx.customer.service.filter; | |||
import com.trust.ywx.customer.service.dto.TrustCustomerInfoDto; | |||
import org.apache.dubbo.common.constants.CommonConstants; | |||
import org.apache.dubbo.common.extension.Activate; | |||
import org.apache.dubbo.common.extension.SPI; | |||
import org.apache.dubbo.common.logger.Logger; | |||
import org.apache.dubbo.common.logger.LoggerFactory; | |||
import org.apache.dubbo.rpc.*; | |||
import java.util.*; | |||
import java.util.concurrent.CompletableFuture; | |||
import java.util.concurrent.ConcurrentHashMap; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: DubboCustomerInvokeFilter.java | |||
* @包 路 径: com.trust.ywx.customer.service.exceptions | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 可信客户的配置属性很多,为了防止业务方频繁调用造成服务端压力,在此增加过滤器,拦截获取配置属性方法,从本地缓存获取并返回。 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/11 21:15 | |||
* @Modify: | |||
*/ | |||
public class DubboCustomerExtendsInvokeFilter implements Filter { | |||
public DubboCustomerExtendsInvokeFilter() { | |||
} | |||
/** | |||
* 将客户全量信息缓存在本地,当调用者获取某个配置项时,在此偷梁换柱! | |||
* key=clientId | |||
* value=CustomerInfoDto | |||
*/ | |||
private Map<String,TrustCustomerInfoDto> customerInfoMap = new ConcurrentHashMap(); | |||
private static final List<String> filterMethodList = Arrays.asList("getCustomerInfo"); | |||
@Override | |||
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException { | |||
// System.out.println(" client 我进来啦 开始了......"); | |||
// if(filterMethodList.contains(invocation.getMethodName())){ | |||
Object[] arguments = invocation.getArguments(); | |||
String clientId = (String) arguments[0]; | |||
TrustCustomerInfoDto customer = customerInfoMap.get(clientId); | |||
// if(customer!=null){ | |||
//// customer.getClass().getMethod(invocation.getMethodName(),"") | |||
// CompletableFuture b = new CompletableFuture(); | |||
// AsyncRpcResult asyncRpcResult = new AsyncRpcResult(b,invocation); | |||
// asyncRpcResult.setValue(customer); | |||
// return asyncRpcResult; | |||
// }else{ | |||
// //异步刷新 | |||
//// refreshCache(); | |||
// System.out.println("aaaaaaaaaaaaaaaaaaaa"); | |||
customer = new TrustCustomerInfoDto(); | |||
customer.setClientId("我是客户端代码,调用我啊 "); | |||
customer.setAllowUserBind("111111111111"); | |||
return AsyncRpcResult.newDefaultAsyncResult(customer, invocation); | |||
// } | |||
// } | |||
// Result r = | |||
// return invoker.invoke(invocation); | |||
} | |||
} |
@@ -1,21 +0,0 @@ | |||
package com.trust.ywx.customer.service.query; | |||
import com.trust.ywx.customer.service.dto.SearchCustomerParam; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: AuditCustomerService.java | |||
* @包 路 径: com.trust.ywx.customer.service.query | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/14 19:34 | |||
* @Modify: | |||
*/ | |||
public interface CustomerService { | |||
void getCustomerList(SearchCustomerParam param); | |||
} |
@@ -1,2 +1 @@ | |||
dubboProviderFilter=com.trust.ywx.customer.service.filter.DubboProviderFilter | |||
dubboCustomerExtendsInvokeFilter=com.trust.ywx.customer.service.filter.DubboCustomerExtendsInvokeFilter |