@@ -0,0 +1,54 @@ | |||
package com.trust.ywx.customer.common.enums; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: Firm.java | |||
* @包 路 径: com.trust.ywx.customer.common.enums | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 目前数据库中存的是code(varchar),希望以后改成tinyint | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 13:31 | |||
* @Modify: | |||
*/ | |||
public enum ChargingModelEnum { | |||
NORMAL(0, "规则计费"), | |||
ERROR(1, "异常计费"), | |||
; | |||
private int code; | |||
private String name; | |||
private ChargingModelEnum(int code, String name) { | |||
this.code = code; | |||
this.name = name; | |||
} | |||
public static String getNameOfCode(int code) { | |||
switch (code) { | |||
case 0: | |||
return NORMAL.getName(); | |||
case 1: | |||
return ERROR.getName(); | |||
default: | |||
return "unknow"; | |||
} | |||
} | |||
public String getName() { | |||
return name; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public void setName(String name) { | |||
this.name = name; | |||
} | |||
} |
@@ -0,0 +1,63 @@ | |||
package com.trust.ywx.customer.common.enums; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: Firm.java | |||
* @包 路 径: com.trust.ywx.customer.common.enums | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 通用枚举值 0-false;1-true | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 13:31 | |||
* @Modify: | |||
*/ | |||
public enum CommonStatusEnum { | |||
YES(1, "true"), // 是 | |||
NO(0, "false"), // 否 | |||
; | |||
private int code; | |||
private String name; | |||
private CommonStatusEnum(int code, String name) { | |||
this.code = code; | |||
this.name = name; | |||
} | |||
public static String getNameOfCode(int code) { | |||
switch (code) { | |||
case 1: | |||
return YES.getName(); | |||
case 0: | |||
return NO.getName(); | |||
default: | |||
return "unknow"; | |||
} | |||
} | |||
public static int getCodeOfName(String name) { | |||
switch (name) { | |||
case "true": | |||
return YES.getCode(); | |||
case "false": | |||
return NO.getCode(); | |||
default: | |||
return 0; | |||
} | |||
} | |||
public String getName() { | |||
return name; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public void setName(String name) { | |||
this.name = name; | |||
} | |||
} |
@@ -0,0 +1,56 @@ | |||
package com.trust.ywx.customer.common.enums; | |||
import javax.print.Doc; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: Firm.java | |||
* @包 路 径: com.trust.ywx.customer.common.enums | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 13:31 | |||
* @Modify: | |||
*/ | |||
public enum DoctorProductTypeEnum { | |||
APP(0,"APP"), | |||
SDK(1,"SDK"),; | |||
private int code; | |||
private String name; | |||
private DoctorProductTypeEnum(int code,String name){ | |||
this.code= code; | |||
this.name = name; | |||
} | |||
public static String valueOfCode(int code) { | |||
switch (code) { | |||
case 1: | |||
return APP.getName(); | |||
case 2: | |||
return SDK.getName(); | |||
default: | |||
return "unknow"; | |||
} | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getName() { | |||
return name; | |||
} | |||
public void setName(String name) { | |||
this.name = name; | |||
} | |||
} |
@@ -15,8 +15,11 @@ package com.trust.ywx.customer.common.enums; | |||
public enum FirmProperEnum { | |||
//---------------------------基础配置------------------------------------- | |||
FIRM_NETWORK_TYPE("network_type", "客户类型"),//互联网/通讯平台(网关版-gateway,网闸版-it互联网) | |||
FIRM_GATEWAY_VERSION("gateway_version", "通讯平台版本"),//网络环境,若网关或网闸版本需注明版本 | |||
NETWORK_TYPE("network_type", "客户类型"),//互联网/通讯平台(网关版-gateway,网闸版-it互联网) | |||
GATEWAY_VERSION("gateway_version", "通讯平台版本"),//网络环境,若网关或网闸版本需注明版本 | |||
PUBLIC_PRODUCT_TYPE("public_product_type", "公众产品形态"),//网络环境,若网关或网闸版本需注明版本 | |||
DOCTOR_PRODUCT_TYPE("doctor_product_type", "医师产品形态"),//网络环境,若网关或网闸版本需注明版本 | |||
CHARGING_MODEL("charging_model", "计费模式"),//网络环境,若网关或网闸版本需注明版本 | |||
//---------------------------患者签名配置------------------------------------- | |||
//---------------------------可选择配置及服务------------------------------------- | |||
@@ -0,0 +1,34 @@ | |||
package com.trust.ywx.customer.common.enums; | |||
/*************************************************************************** | |||
* <pre></pre> | |||
* @文件名称: FirmProperEnum.java | |||
* @包 路 径: cn.org.bjca.ywq.firm.cons | |||
* @版权所有:北京数字认证股份有限公司 (C) 2018 | |||
* | |||
* @类描述: | |||
* @版本: V1.5 | |||
* @创建人: hudan | |||
* @创建时间:2018年2月27日 下午7:36:58 | |||
* | |||
* @修改记录: | |||
**/ | |||
public enum FirmProperEnum2 { | |||
//---------------------------基础配置------------------------------------- | |||
NETWORK_TYPE("network_type", "客户类型"),//互联网/通讯平台(网关版-gateway,网闸版-it互联网) | |||
GATEWAY_VERSION("gateway_version", "通讯平台版本"),//网络环境,若网关或网闸版本需注明版本 | |||
PUBLIC_PRODUCT_TYPE("public_product_type", "公众产品形态"),//网络环境,若网关或网闸版本需注明版本 | |||
DOCTOR_PRODUCT_TYPE("doctor_product_type", "医师产品形态"),//网络环境,若网关或网闸版本需注明版本 | |||
CHARGING_MODEL("charging_model", "计费模式"), | |||
; | |||
private String propName; | |||
private String propDesc; | |||
private FirmProperEnum2(String propName, String propDesc) { | |||
this.propName = propName; | |||
this.propDesc = propDesc; | |||
} | |||
} |
@@ -0,0 +1,64 @@ | |||
package com.trust.ywx.customer.common.enums; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: Firm.java | |||
* @包 路 径: com.trust.ywx.customer.common.enums | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: fixme 目前数据库中存的是name,以后希望改成code(int) | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 13:31 | |||
* @Modify: | |||
*/ | |||
public enum NetworkTypeEnum { | |||
GATEWAY(1, "gateway"), | |||
IT(2, "it"), | |||
; | |||
private int code; | |||
private String name; | |||
private NetworkTypeEnum(int code, String name) { | |||
this.code = code; | |||
this.name = name; | |||
} | |||
public static String getNameOfCode(int code) { | |||
switch (code) { | |||
case 1: | |||
return GATEWAY.getName(); | |||
case 2: | |||
return IT.getName(); | |||
default: | |||
return "unknow"; | |||
} | |||
} | |||
public static int getCodeOfName(String name) { | |||
switch (name) { | |||
case "gateway": | |||
return GATEWAY.getCode(); | |||
case "it": | |||
return IT.getCode(); | |||
default: | |||
return 0; | |||
} | |||
} | |||
public String getName() { | |||
return name; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public void setName(String name) { | |||
this.name = name; | |||
} | |||
} |
@@ -0,0 +1,60 @@ | |||
package com.trust.ywx.customer.common.enums; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: Firm.java | |||
* @包 路 径: com.trust.ywx.customer.common.enums | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 项目状态 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 13:31 | |||
* @Modify: | |||
*/ | |||
public enum ProjectStatusEnum { | |||
NORMAL(1, "正常"), | |||
TRYING(2, "试用"), | |||
EXTINCT(3, "消亡"), | |||
DEL(4, "删除"), | |||
; | |||
private int code; | |||
private String name; | |||
private ProjectStatusEnum(int code, String name) { | |||
this.code = code; | |||
this.name = name; | |||
} | |||
public static String getNameOfCode(int code) { | |||
switch (code) { | |||
case 1: | |||
return NORMAL.getName(); | |||
case 2: | |||
return TRYING.getName(); | |||
case 3: | |||
return EXTINCT.getName(); | |||
case 4: | |||
return DEL.getName(); | |||
default: | |||
return "unknow"; | |||
} | |||
} | |||
public String getName() { | |||
return name; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public void setName(String name) { | |||
this.name = name; | |||
} | |||
} |
@@ -0,0 +1,55 @@ | |||
package com.trust.ywx.customer.common.enums; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: Firm.java | |||
* @包 路 径: com.trust.ywx.customer.common.enums | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 13:31 | |||
* @Modify: | |||
*/ | |||
public enum PublicProductTypeEnum { | |||
SDK(0,"SDK"), | |||
H5(1,"H5"),; | |||
private int code; | |||
private String name; | |||
private PublicProductTypeEnum(int code, String name){ | |||
this.code= code; | |||
this.name = name; | |||
} | |||
public static String getNameOfCode(int code) { | |||
switch (code) { | |||
case 1: | |||
return SDK.getName(); | |||
case 2: | |||
return H5.getName(); | |||
default: | |||
return "unknow"; | |||
} | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getName() { | |||
return name; | |||
} | |||
public void setName(String name) { | |||
this.name = name; | |||
} | |||
} |
@@ -0,0 +1,56 @@ | |||
package com.trust.ywx.customer.common.model; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmPropertyModel.java | |||
* @包 路 径: com.trust.ywx.customer.common.model | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 16:12 | |||
* @Modify: | |||
*/ | |||
public class FirmPropertyModel { | |||
/** | |||
* 医师产品形态 | |||
* see com.trust.ywx.customer.common.enums.DoctorProductTypeEnum | |||
*/ | |||
private Integer doctorProductType; | |||
/** | |||
* 公众产品形态 SDK\H5 | |||
* see com.trust.ywx.customer.common.enums.PublicProductTypeEnum | |||
*/ | |||
private Integer publicProductType; | |||
/** | |||
* 客户类型:互联网医院、实体医院等 | |||
* see com.trust.ywx.customer.common.enums.NetworkTypeEnum | |||
* | |||
*/ | |||
private Integer networkType; | |||
/** | |||
* 计费模式 0正常 1异常 | |||
* see com.trust.ywx.customer.common.enums.ChargingModelEnum | |||
*/ | |||
private Integer chargingModel; | |||
/** | |||
* 客户白名单 1:true 0:false | |||
* see com.trust.ywx.customer.common.enums.CommonStatusEnum | |||
*/ | |||
private Integer isFirmWhite; | |||
/** | |||
* 是否允许医生挂靠 | |||
* see com.trust.ywx.customer.common.enums.CommonStatusEnum | |||
*/ | |||
private Integer allowUserBind; | |||
/** | |||
* 附件PDF增加水印 | |||
* see com.trust.ywx.customer.common.enums.CommonStatusEnum | |||
*/ | |||
private Integer pdfWater; | |||
} |
@@ -19,15 +19,26 @@ | |||
<dependencies> | |||
<dependency> | |||
<groupId>com.51trust.ywx</groupId> | |||
<artifactId>ywx-customer-common</artifactId> | |||
<version>0.0.1-SNAPSHOT</version> | |||
<groupId>org.springframework.boot</groupId> | |||
<artifactId>spring-boot-starter-web</artifactId> | |||
<exclusions> | |||
<exclusion> | |||
<artifactId>spring-webmvc</artifactId> | |||
<groupId>org.springframework</groupId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.springframework.boot</groupId> | |||
<artifactId>spring-boot-starter-web</artifactId> | |||
<artifactId>spring-boot-starter</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.51trust.ywx</groupId> | |||
<artifactId>ywx-customer-common</artifactId> | |||
<version>0.0.1-SNAPSHOT</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.mybatis.spring.boot</groupId> | |||
<artifactId>mybatis-spring-boot-starter</artifactId> | |||
@@ -26,8 +26,8 @@ import org.springframework.context.annotation.ImportResource; | |||
@Slf4j | |||
@ImportResource(locations = {"classpath:spring/spring-applicationContext.xml",}) | |||
//@ComponentScan(basePackages = {"com.trust.ywx.customer",}) | |||
//@MapperScan(value = {"com.trust.ywx.customer.*.mapper"}) | |||
@SpringBootApplication(exclude = { | |||
@MapperScan(value = {"com.trust.ywx.customer.*.mapper"}) | |||
@SpringBootApplication(scanBasePackages = {"com.trust.ywx.customer"},exclude = { | |||
DataSourceAutoConfiguration.class, | |||
DataSourceTransactionManagerAutoConfiguration.class,}) | |||
public class Application { | |||
@@ -0,0 +1,54 @@ | |||
package com.trust.ywx.customer.dao; | |||
import com.trust.ywx.customer.dao.mapper.FirmGroupMapper; | |||
import com.trust.ywx.customer.dao.mapper.FirmUsercertChannelMapper; | |||
import com.trust.ywx.customer.dao.po.FirmGroup; | |||
import com.trust.ywx.customer.dao.po.FirmGroupExample; | |||
import com.trust.ywx.customer.dao.po.FirmUsercertChannel; | |||
import com.trust.ywx.customer.dao.po.FirmUsercertChannelExample; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.util.CollectionUtils; | |||
import java.util.Arrays; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmDao.java | |||
* @包 路 径: com.trust.ywx.customer.dao | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 医师产品形态dao fixme 以后要合并到firm_info_extends | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 10:31 | |||
* @Modify: | |||
*/ | |||
public class DoctorProductTypeDao { | |||
@Autowired | |||
private FirmUsercertChannelMapper usercertChannelMapper; | |||
public List<String> getClientIdByProp(List<String> clientIdList,Integer doctorProductType){ | |||
FirmUsercertChannelExample example = new FirmUsercertChannelExample(); | |||
example.createCriteria().andChannelTypeEqualTo(doctorProductType).andClientidIn(clientIdList); | |||
List<FirmUsercertChannel> list = usercertChannelMapper.selectByExample(example); | |||
if(CollectionUtils.isEmpty(list)) { | |||
return Arrays.asList(); | |||
} | |||
return list.stream().map(group->{return group.getFirmId();}).collect(Collectors.toList()); | |||
} | |||
public List<FirmUsercertChannel> getByClientId(String clientId){ | |||
FirmUsercertChannelExample example = new FirmUsercertChannelExample(); | |||
example.createCriteria().andClientidEqualTo(clientId); | |||
List<FirmUsercertChannel> list = usercertChannelMapper.selectByExample(example); | |||
if(CollectionUtils.isEmpty(list)) { | |||
return Arrays.asList(); | |||
} | |||
return list; | |||
} | |||
} |
@@ -0,0 +1,78 @@ | |||
package com.trust.ywx.customer.dao; | |||
import com.trust.ywx.customer.common.enums.ProjectStatusEnum; | |||
import com.trust.ywx.customer.dao.mapper.FirmInfoMapper; | |||
import com.trust.ywx.customer.dao.mapper.custom.FirmCustomMapper; | |||
import com.trust.ywx.customer.dao.po.FirmInfo; | |||
import com.trust.ywx.customer.dao.po.FirmInfoExample; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
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: | |||
*/ | |||
public class FirmDao { | |||
@Autowired | |||
private FirmInfoMapper firmInfoMapper; | |||
@Autowired | |||
private FirmCustomMapper firmCustomMapper; | |||
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 keyword | |||
* @return | |||
*/ | |||
public String getClientIdByKeyword(String keyword) { | |||
return firmCustomMapper.getClientIdByKeyword(keyword); | |||
} | |||
/** | |||
* 根据合同关键字查询合同表获取客户id | |||
* @param channelType | |||
* @return | |||
*/ | |||
public List<String> getClientIdByChannelType(int channelType) { | |||
return firmCustomMapper.getClientIdByChannelType(channelType); | |||
} | |||
/** | |||
* 根据客户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 propMap | |||
*/ | |||
public List<String> getClientIdByProps(Map<String, String> propMap) { | |||
// firmCustomMapper.getClientIdByProps(propMap); | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,63 @@ | |||
package com.trust.ywx.customer.dao; | |||
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 org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.util.CollectionUtils; | |||
import java.util.Arrays; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmExtendDao.java | |||
* @包 路 径: com.trust.ywx.customer.dao.mapper | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 17:31 | |||
* @Modify: | |||
*/ | |||
public class FirmExtendDao { | |||
@Autowired | |||
FirmInfoExtendMapper extendMapper; | |||
/** | |||
* 根据属性集合获取客户id | |||
* @param propName | |||
* @param 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)){ | |||
where.andClientIdIn(clientIdList); | |||
} | |||
List<FirmInfoExtend> poList = extendMapper.selectByExample(example); | |||
if(CollectionUtils.isEmpty(poList)){ | |||
return Arrays.asList(); | |||
} | |||
return poList.stream().map(extend->{ | |||
return extend.getClientId(); | |||
}).collect(Collectors.toList()); | |||
} | |||
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)){ | |||
return Arrays.asList(); | |||
} | |||
return poList; | |||
} | |||
} |
@@ -0,0 +1,46 @@ | |||
package com.trust.ywx.customer.dao; | |||
import com.trust.ywx.customer.dao.mapper.FirmGroupMapper; | |||
import com.trust.ywx.customer.dao.mapper.FirmInfoMapper; | |||
import com.trust.ywx.customer.dao.mapper.custom.FirmCustomMapper; | |||
import com.trust.ywx.customer.dao.po.FirmGroup; | |||
import com.trust.ywx.customer.dao.po.FirmGroupExample; | |||
import com.trust.ywx.customer.service.dto.request.SearchTrustFirmParam; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* <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: | |||
*/ | |||
public class FirmGroupDao { | |||
@Autowired | |||
private FirmGroupMapper firmGroupMapper; | |||
public List<String> getClientIdByGroupId(String groupId){ | |||
List<FirmGroup> groupsList = getListByGroupId(groupId); | |||
List<String > clientIdList = groupsList.stream().map(group->{return group.getFirmId();}).collect(Collectors.toList()); | |||
return clientIdList; | |||
} | |||
public List<FirmGroup> getListByGroupId(String groupId){ | |||
FirmGroupExample example = new FirmGroupExample(); | |||
example.createCriteria().andGroupIdEqualTo(groupId).andIsDelEqualTo(0); | |||
return firmGroupMapper.selectByExample(example); | |||
} | |||
} |
@@ -1,44 +0,0 @@ | |||
package com.trust.ywx.customer.dao.mapper; | |||
import com.trust.ywx.customer.dao.po.CustomerInfo; | |||
import com.trust.ywx.customer.dao.po.CustomerInfoExample; | |||
import java.util.List; | |||
import org.apache.ibatis.annotations.Param; | |||
public interface CustomerInfoMapper { | |||
long countByExample(CustomerInfoExample example); | |||
int deleteByExample(CustomerInfoExample example); | |||
int deleteByPrimaryKey(String uniqueid); | |||
int insert(CustomerInfo record); | |||
int insertSelective(CustomerInfo record); | |||
CustomerInfo selectOneByExample(CustomerInfoExample example); | |||
CustomerInfo selectOneByExampleWithBLOBs(CustomerInfoExample example); | |||
List<CustomerInfo> selectByExampleWithBLOBs(CustomerInfoExample example); | |||
List<CustomerInfo> selectByExample(CustomerInfoExample example); | |||
CustomerInfo selectByPrimaryKey(String uniqueid); | |||
int updateByExampleSelective(@Param("record") CustomerInfo record, @Param("example") CustomerInfoExample example); | |||
int updateByExampleWithBLOBs(@Param("record") CustomerInfo record, @Param("example") CustomerInfoExample example); | |||
int updateByExample(@Param("record") CustomerInfo record, @Param("example") CustomerInfoExample example); | |||
int updateByPrimaryKeySelective(CustomerInfo record); | |||
int updateByPrimaryKeyWithBLOBs(CustomerInfo record); | |||
int updateByPrimaryKey(CustomerInfo record); | |||
int batchInsert(@Param("list") List<CustomerInfo> list); | |||
int batchInsertSelective(@Param("list") List<CustomerInfo> list, @Param("selective") CustomerInfo.Column ... selective); | |||
} |
@@ -0,0 +1,36 @@ | |||
package com.trust.ywx.customer.dao.mapper; | |||
import com.trust.ywx.customer.dao.po.FirmGroup; | |||
import com.trust.ywx.customer.dao.po.FirmGroupExample; | |||
import java.util.List; | |||
import org.apache.ibatis.annotations.Param; | |||
public interface FirmGroupMapper { | |||
long countByExample(FirmGroupExample example); | |||
int deleteByExample(FirmGroupExample example); | |||
int deleteByPrimaryKey(String uniqueid); | |||
int insert(FirmGroup record); | |||
int insertSelective(FirmGroup record); | |||
FirmGroup selectOneByExample(FirmGroupExample example); | |||
List<FirmGroup> selectByExample(FirmGroupExample example); | |||
FirmGroup selectByPrimaryKey(String uniqueid); | |||
int updateByExampleSelective(@Param("record") FirmGroup record, @Param("example") FirmGroupExample example); | |||
int updateByExample(@Param("record") FirmGroup record, @Param("example") FirmGroupExample example); | |||
int updateByPrimaryKeySelective(FirmGroup record); | |||
int updateByPrimaryKey(FirmGroup record); | |||
int batchInsert(@Param("list") List<FirmGroup> list); | |||
int batchInsertSelective(@Param("list") List<FirmGroup> list, @Param("selective") FirmGroup.Column ... selective); | |||
} |
@@ -0,0 +1,36 @@ | |||
package com.trust.ywx.customer.dao.mapper; | |||
import com.trust.ywx.customer.dao.po.FirmUsercertChannel; | |||
import com.trust.ywx.customer.dao.po.FirmUsercertChannelExample; | |||
import java.util.List; | |||
import org.apache.ibatis.annotations.Param; | |||
public interface FirmUsercertChannelMapper { | |||
long countByExample(FirmUsercertChannelExample example); | |||
int deleteByExample(FirmUsercertChannelExample example); | |||
int deleteByPrimaryKey(String uniqueid); | |||
int insert(FirmUsercertChannel record); | |||
int insertSelective(FirmUsercertChannel record); | |||
FirmUsercertChannel selectOneByExample(FirmUsercertChannelExample example); | |||
List<FirmUsercertChannel> selectByExample(FirmUsercertChannelExample example); | |||
FirmUsercertChannel selectByPrimaryKey(String uniqueid); | |||
int updateByExampleSelective(@Param("record") FirmUsercertChannel record, @Param("example") FirmUsercertChannelExample example); | |||
int updateByExample(@Param("record") FirmUsercertChannel record, @Param("example") FirmUsercertChannelExample example); | |||
int updateByPrimaryKeySelective(FirmUsercertChannel record); | |||
int updateByPrimaryKey(FirmUsercertChannel record); | |||
int batchInsert(@Param("list") List<FirmUsercertChannel> list); | |||
int batchInsertSelective(@Param("list") List<FirmUsercertChannel> list, @Param("selective") FirmUsercertChannel.Column ... selective); | |||
} |
@@ -0,0 +1,38 @@ | |||
package com.trust.ywx.customer.dao.mapper.custom; | |||
import org.apache.ibatis.annotations.Mapper; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
import java.util.Map; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: FirmCustomMapper.java | |||
* @包 路 径: com.trust.ywx.customer.dao.mapper.custom | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/16 11:08 | |||
* @Modify: | |||
*/ | |||
@Mapper | |||
public interface FirmCustomMapper { | |||
/** | |||
* 根据合同关键字获取客户id | |||
* @param keyword | |||
* @return | |||
*/ | |||
String getClientIdByKeyword(@Param("keyword") String keyword); | |||
/** | |||
* 根据channelType( 医师产品形态)获取客户id | |||
* @param channelType | |||
* @return | |||
*/ | |||
List<String> getClientIdByChannelType(@Param("channelType") int channelType); | |||
} |
@@ -0,0 +1,216 @@ | |||
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_group | |||
*/ | |||
@Data | |||
public class FirmGroup implements Serializable { | |||
/** | |||
* 唯一标识 | |||
* | |||
* Table: firm_group | |||
* Column: uniqueId | |||
* Nullable: false | |||
*/ | |||
private String uniqueid; | |||
/** | |||
* Table: firm_group | |||
* Column: group_name | |||
* Nullable: false | |||
*/ | |||
private String groupName; | |||
/** | |||
* Table: firm_group | |||
* Column: group_num | |||
* Nullable: false | |||
*/ | |||
private String groupId; | |||
/** | |||
* Table: firm_group | |||
* Column: firm_id | |||
* Nullable: false | |||
*/ | |||
private String firmId; | |||
/** | |||
* 1组长 2组员 | |||
* | |||
* Table: firm_group | |||
* Column: firm_role | |||
* Nullable: false | |||
*/ | |||
private Integer firmRole; | |||
/** | |||
* Table: firm_group | |||
* Column: create_time | |||
* Nullable: false | |||
*/ | |||
private Date createTime; | |||
/** | |||
* 1已删除 0未删除 | |||
* | |||
* Table: firm_group | |||
* Column: is_del | |||
* Nullable: true | |||
*/ | |||
private Integer isDel; | |||
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(", groupName=").append(groupName); | |||
sb.append(", groupId=").append(groupId); | |||
sb.append(", firmId=").append(firmId); | |||
sb.append(", firmRole=").append(firmRole); | |||
sb.append(", createTime=").append(createTime); | |||
sb.append(", isDel=").append(isDel); | |||
sb.append(", serialVersionUID=").append(serialVersionUID); | |||
sb.append("]"); | |||
return sb.toString(); | |||
} | |||
public static FirmGroup.Builder builder() { | |||
return new FirmGroup.Builder(); | |||
} | |||
public static class Builder { | |||
private FirmGroup obj; | |||
public Builder() { | |||
this.obj = new FirmGroup(); | |||
} | |||
public Builder uniqueid(String uniqueid) { | |||
obj.setUniqueid(uniqueid); | |||
return this; | |||
} | |||
public Builder groupName(String groupName) { | |||
obj.setGroupName(groupName); | |||
return this; | |||
} | |||
public Builder groupId(String groupId) { | |||
obj.setGroupId(groupId); | |||
return this; | |||
} | |||
public Builder firmId(String firmId) { | |||
obj.setFirmId(firmId); | |||
return this; | |||
} | |||
public Builder firmRole(Integer firmRole) { | |||
obj.setFirmRole(firmRole); | |||
return this; | |||
} | |||
public Builder createTime(Date createTime) { | |||
obj.setCreateTime(createTime); | |||
return this; | |||
} | |||
public Builder isDel(Integer isDel) { | |||
obj.setIsDel(isDel); | |||
return this; | |||
} | |||
public FirmGroup build() { | |||
return this.obj; | |||
} | |||
} | |||
public enum Column { | |||
uniqueid("uniqueId", "uniqueid", "VARCHAR", false), | |||
groupName("group_name", "groupName", "VARCHAR", false), | |||
groupId("group_num", "groupId", "VARCHAR", false), | |||
firmId("firm_id", "firmId", "VARCHAR", false), | |||
firmRole("firm_role", "firmRole", "INTEGER", false), | |||
createTime("create_time", "createTime", "TIMESTAMP", false), | |||
isDel("is_del", "isDel", "INTEGER", 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(); | |||
} | |||
} | |||
} |
@@ -0,0 +1,978 @@ | |||
package com.trust.ywx.customer.dao.po; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.util.List; | |||
public class FirmGroupExample { | |||
protected String orderByClause; | |||
protected boolean distinct; | |||
protected List<Criteria> oredCriteria; | |||
protected Integer offset; | |||
protected Integer rows; | |||
public FirmGroupExample() { | |||
oredCriteria = new ArrayList<Criteria>(); | |||
} | |||
public void setOrderByClause(String orderByClause) { | |||
this.orderByClause = orderByClause; | |||
} | |||
public String getOrderByClause() { | |||
return orderByClause; | |||
} | |||
public void setDistinct(boolean distinct) { | |||
this.distinct = distinct; | |||
} | |||
public boolean isDistinct() { | |||
return distinct; | |||
} | |||
public List<Criteria> getOredCriteria() { | |||
return oredCriteria; | |||
} | |||
public void or(Criteria criteria) { | |||
oredCriteria.add(criteria); | |||
} | |||
public Criteria or() { | |||
Criteria criteria = createCriteriaInternal(); | |||
oredCriteria.add(criteria); | |||
return criteria; | |||
} | |||
public FirmGroupExample orderBy(String orderByClause) { | |||
this.setOrderByClause(orderByClause); | |||
return this; | |||
} | |||
public FirmGroupExample orderBy(String ... orderByClauses) { | |||
StringBuffer sb = new StringBuffer(); | |||
for (int i = 0; i < orderByClauses.length; i++) { | |||
sb.append(orderByClauses[i]); | |||
if (i < orderByClauses.length - 1) { | |||
sb.append(" , "); | |||
} | |||
} | |||
this.setOrderByClause(sb.toString()); | |||
return this; | |||
} | |||
public Criteria createCriteria() { | |||
Criteria criteria = createCriteriaInternal(); | |||
if (oredCriteria.size() == 0) { | |||
oredCriteria.add(criteria); | |||
} | |||
return criteria; | |||
} | |||
protected Criteria createCriteriaInternal() { | |||
Criteria criteria = new Criteria(this); | |||
return criteria; | |||
} | |||
public void clear() { | |||
oredCriteria.clear(); | |||
orderByClause = null; | |||
distinct = false; | |||
rows = null; | |||
offset = null; | |||
} | |||
public void setOffset(Integer offset) { | |||
this.offset = offset; | |||
} | |||
public Integer getOffset() { | |||
return this.offset; | |||
} | |||
public void setRows(Integer rows) { | |||
this.rows = rows; | |||
} | |||
public Integer getRows() { | |||
return this.rows; | |||
} | |||
public FirmGroupExample limit(Integer rows) { | |||
this.rows = rows; | |||
return this; | |||
} | |||
public FirmGroupExample limit(Integer offset, Integer rows) { | |||
this.offset = offset; | |||
this.rows = rows; | |||
return this; | |||
} | |||
public FirmGroupExample page(Integer page, Integer pageSize) { | |||
this.offset = page * pageSize; | |||
this.rows = pageSize; | |||
return this; | |||
} | |||
public static Criteria newAndCreateCriteria() { | |||
FirmGroupExample example = new FirmGroupExample(); | |||
return example.createCriteria(); | |||
} | |||
public FirmGroupExample when(boolean condition, IExampleWhen then) { | |||
if (condition) { | |||
then.example(this); | |||
} | |||
return this; | |||
} | |||
public FirmGroupExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) { | |||
if (condition) { | |||
then.example(this); | |||
} else { | |||
otherwise.example(this); | |||
} | |||
return this; | |||
} | |||
protected abstract static class GeneratedCriteria { | |||
protected List<Criterion> criteria; | |||
protected GeneratedCriteria() { | |||
super(); | |||
criteria = new ArrayList<Criterion>(); | |||
} | |||
public boolean isValid() { | |||
return criteria.size() > 0; | |||
} | |||
public List<Criterion> getAllCriteria() { | |||
return criteria; | |||
} | |||
public List<Criterion> getCriteria() { | |||
return criteria; | |||
} | |||
protected void addCriterion(String condition) { | |||
if (condition == null) { | |||
throw new RuntimeException("Value for condition cannot be null"); | |||
} | |||
criteria.add(new Criterion(condition)); | |||
} | |||
protected void addCriterion(String condition, Object value, String property) { | |||
if (value == null) { | |||
throw new RuntimeException("Value for " + property + " cannot be null"); | |||
} | |||
criteria.add(new Criterion(condition, value)); | |||
} | |||
protected void addCriterion(String condition, Object value1, Object value2, String property) { | |||
if (value1 == null || value2 == null) { | |||
throw new RuntimeException("Between values for " + property + " cannot be null"); | |||
} | |||
criteria.add(new Criterion(condition, value1, value2)); | |||
} | |||
public Criteria andUniqueidIsNull() { | |||
addCriterion("uniqueId is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidIsNotNull() { | |||
addCriterion("uniqueId is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidEqualTo(String value) { | |||
addCriterion("uniqueId =", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("uniqueId = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotEqualTo(String value) { | |||
addCriterion("uniqueId <>", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("uniqueId <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThan(String value) { | |||
addCriterion("uniqueId >", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("uniqueId > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThanOrEqualTo(String value) { | |||
addCriterion("uniqueId >=", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("uniqueId >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThan(String value) { | |||
addCriterion("uniqueId <", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("uniqueId < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThanOrEqualTo(String value) { | |||
addCriterion("uniqueId <=", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("uniqueId <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLike(String value) { | |||
addCriterion("uniqueId like", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotLike(String value) { | |||
addCriterion("uniqueId not like", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidIn(List<String> values) { | |||
addCriterion("uniqueId in", values, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotIn(List<String> values) { | |||
addCriterion("uniqueId not in", values, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidBetween(String value1, String value2) { | |||
addCriterion("uniqueId between", value1, value2, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotBetween(String value1, String value2) { | |||
addCriterion("uniqueId not between", value1, value2, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameIsNull() { | |||
addCriterion("group_name is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameIsNotNull() { | |||
addCriterion("group_name is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameEqualTo(String value) { | |||
addCriterion("group_name =", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_name = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameNotEqualTo(String value) { | |||
addCriterion("group_name <>", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameNotEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_name <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameGreaterThan(String value) { | |||
addCriterion("group_name >", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameGreaterThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_name > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameGreaterThanOrEqualTo(String value) { | |||
addCriterion("group_name >=", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameGreaterThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_name >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameLessThan(String value) { | |||
addCriterion("group_name <", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameLessThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_name < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameLessThanOrEqualTo(String value) { | |||
addCriterion("group_name <=", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameLessThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_name <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameLike(String value) { | |||
addCriterion("group_name like", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameNotLike(String value) { | |||
addCriterion("group_name not like", value, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameIn(List<String> values) { | |||
addCriterion("group_name in", values, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameNotIn(List<String> values) { | |||
addCriterion("group_name not in", values, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameBetween(String value1, String value2) { | |||
addCriterion("group_name between", value1, value2, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupNameNotBetween(String value1, String value2) { | |||
addCriterion("group_name not between", value1, value2, "groupName"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdIsNull() { | |||
addCriterion("group_num is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdIsNotNull() { | |||
addCriterion("group_num is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdEqualTo(String value) { | |||
addCriterion("group_num =", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_num = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdNotEqualTo(String value) { | |||
addCriterion("group_num <>", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdNotEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_num <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdGreaterThan(String value) { | |||
addCriterion("group_num >", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdGreaterThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_num > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdGreaterThanOrEqualTo(String value) { | |||
addCriterion("group_num >=", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdGreaterThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_num >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdLessThan(String value) { | |||
addCriterion("group_num <", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdLessThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_num < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdLessThanOrEqualTo(String value) { | |||
addCriterion("group_num <=", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdLessThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("group_num <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdLike(String value) { | |||
addCriterion("group_num like", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdNotLike(String value) { | |||
addCriterion("group_num not like", value, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdIn(List<String> values) { | |||
addCriterion("group_num in", values, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdNotIn(List<String> values) { | |||
addCriterion("group_num not in", values, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdBetween(String value1, String value2) { | |||
addCriterion("group_num between", value1, value2, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andGroupIdNotBetween(String value1, String value2) { | |||
addCriterion("group_num not between", value1, value2, "groupId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdIsNull() { | |||
addCriterion("firm_id is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdIsNotNull() { | |||
addCriterion("firm_id is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdEqualTo(String value) { | |||
addCriterion("firm_id =", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_id = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotEqualTo(String value) { | |||
addCriterion("firm_id <>", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_id <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThan(String value) { | |||
addCriterion("firm_id >", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_id > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThanOrEqualTo(String value) { | |||
addCriterion("firm_id >=", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_id >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThan(String value) { | |||
addCriterion("firm_id <", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_id < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThanOrEqualTo(String value) { | |||
addCriterion("firm_id <=", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_id <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLike(String value) { | |||
addCriterion("firm_id like", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotLike(String value) { | |||
addCriterion("firm_id not like", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdIn(List<String> values) { | |||
addCriterion("firm_id in", values, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotIn(List<String> values) { | |||
addCriterion("firm_id not in", values, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdBetween(String value1, String value2) { | |||
addCriterion("firm_id between", value1, value2, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotBetween(String value1, String value2) { | |||
addCriterion("firm_id not between", value1, value2, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleIsNull() { | |||
addCriterion("firm_role is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleIsNotNull() { | |||
addCriterion("firm_role is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleEqualTo(Integer value) { | |||
addCriterion("firm_role =", value, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_role = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleNotEqualTo(Integer value) { | |||
addCriterion("firm_role <>", value, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleNotEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_role <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleGreaterThan(Integer value) { | |||
addCriterion("firm_role >", value, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleGreaterThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_role > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleGreaterThanOrEqualTo(Integer value) { | |||
addCriterion("firm_role >=", value, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleGreaterThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_role >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleLessThan(Integer value) { | |||
addCriterion("firm_role <", value, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleLessThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_role < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleLessThanOrEqualTo(Integer value) { | |||
addCriterion("firm_role <=", value, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleLessThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("firm_role <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleIn(List<Integer> values) { | |||
addCriterion("firm_role in", values, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleNotIn(List<Integer> values) { | |||
addCriterion("firm_role not in", values, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleBetween(Integer value1, Integer value2) { | |||
addCriterion("firm_role between", value1, value2, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmRoleNotBetween(Integer value1, Integer value2) { | |||
addCriterion("firm_role not between", value1, value2, "firmRole"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeIsNull() { | |||
addCriterion("create_time is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeIsNotNull() { | |||
addCriterion("create_time is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeEqualTo(Date value) { | |||
addCriterion("create_time =", value, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeNotEqualTo(Date value) { | |||
addCriterion("create_time <>", value, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeNotEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeGreaterThan(Date value) { | |||
addCriterion("create_time >", value, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeGreaterThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { | |||
addCriterion("create_time >=", value, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeGreaterThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeLessThan(Date value) { | |||
addCriterion("create_time <", value, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeLessThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { | |||
addCriterion("create_time <=", value, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeLessThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeIn(List<Date> values) { | |||
addCriterion("create_time in", values, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeNotIn(List<Date> values) { | |||
addCriterion("create_time not in", values, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeBetween(Date value1, Date value2) { | |||
addCriterion("create_time between", value1, value2, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { | |||
addCriterion("create_time not between", value1, value2, "createTime"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelIsNull() { | |||
addCriterion("is_del is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelIsNotNull() { | |||
addCriterion("is_del is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelEqualTo(Integer value) { | |||
addCriterion("is_del =", value, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("is_del = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelNotEqualTo(Integer value) { | |||
addCriterion("is_del <>", value, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelNotEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("is_del <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelGreaterThan(Integer value) { | |||
addCriterion("is_del >", value, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelGreaterThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("is_del > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelGreaterThanOrEqualTo(Integer value) { | |||
addCriterion("is_del >=", value, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelGreaterThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("is_del >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelLessThan(Integer value) { | |||
addCriterion("is_del <", value, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelLessThanColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("is_del < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelLessThanOrEqualTo(Integer value) { | |||
addCriterion("is_del <=", value, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelLessThanOrEqualToColumn(FirmGroup.Column column) { | |||
addCriterion(new StringBuilder("is_del <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelIn(List<Integer> values) { | |||
addCriterion("is_del in", values, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelNotIn(List<Integer> values) { | |||
addCriterion("is_del not in", values, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelBetween(Integer value1, Integer value2) { | |||
addCriterion("is_del between", value1, value2, "isDel"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andIsDelNotBetween(Integer value1, Integer value2) { | |||
addCriterion("is_del not between", value1, value2, "isDel"); | |||
return (Criteria) this; | |||
} | |||
} | |||
public static class Criteria extends GeneratedCriteria { | |||
private FirmGroupExample example; | |||
protected Criteria(FirmGroupExample example) { | |||
super(); | |||
this.example = example; | |||
} | |||
public FirmGroupExample example() { | |||
return this.example; | |||
} | |||
public Criteria when(boolean condition, ICriteriaWhen then) { | |||
if (condition) { | |||
then.criteria(this); | |||
} | |||
return this; | |||
} | |||
public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) { | |||
if (condition) { | |||
then.criteria(this); | |||
} else { | |||
otherwise.criteria(this); | |||
} | |||
return this; | |||
} | |||
} | |||
public static class Criterion { | |||
private String condition; | |||
private Object value; | |||
private Object secondValue; | |||
private boolean noValue; | |||
private boolean singleValue; | |||
private boolean betweenValue; | |||
private boolean listValue; | |||
private String typeHandler; | |||
public String getCondition() { | |||
return condition; | |||
} | |||
public Object getValue() { | |||
return value; | |||
} | |||
public Object getSecondValue() { | |||
return secondValue; | |||
} | |||
public boolean isNoValue() { | |||
return noValue; | |||
} | |||
public boolean isSingleValue() { | |||
return singleValue; | |||
} | |||
public boolean isBetweenValue() { | |||
return betweenValue; | |||
} | |||
public boolean isListValue() { | |||
return listValue; | |||
} | |||
public String getTypeHandler() { | |||
return typeHandler; | |||
} | |||
protected Criterion(String condition) { | |||
super(); | |||
this.condition = condition; | |||
this.typeHandler = null; | |||
this.noValue = true; | |||
} | |||
protected Criterion(String condition, Object value, String typeHandler) { | |||
super(); | |||
this.condition = condition; | |||
this.value = value; | |||
this.typeHandler = typeHandler; | |||
if (value instanceof List<?>) { | |||
this.listValue = true; | |||
} else { | |||
this.singleValue = true; | |||
} | |||
} | |||
protected Criterion(String condition, Object value) { | |||
this(condition, value, null); | |||
} | |||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | |||
super(); | |||
this.condition = condition; | |||
this.value = value; | |||
this.secondValue = secondValue; | |||
this.typeHandler = typeHandler; | |||
this.betweenValue = true; | |||
} | |||
protected Criterion(String condition, Object value, Object secondValue) { | |||
this(condition, value, secondValue, null); | |||
} | |||
} | |||
public interface ICriteriaWhen { | |||
void criteria(Criteria criteria); | |||
} | |||
public interface IExampleWhen { | |||
void example(com.trust.ywx.customer.dao.po.FirmGroupExample example); | |||
} | |||
} |
@@ -0,0 +1,175 @@ | |||
package com.trust.ywx.customer.dao.po; | |||
import java.io.Serializable; | |||
import java.util.ArrayList; | |||
import java.util.Arrays; | |||
import lombok.Data; | |||
/** | |||
* Table: firm_usercert_channel | |||
*/ | |||
@Data | |||
public class FirmUsercertChannel implements Serializable { | |||
/** | |||
* 主键id | |||
* | |||
* Table: firm_usercert_channel | |||
* Column: uniqueid | |||
* Nullable: false | |||
*/ | |||
private String uniqueid; | |||
/** | |||
* 证书渠道对应厂商id | |||
* | |||
* Table: firm_usercert_channel | |||
* Column: clientid | |||
* Nullable: false | |||
*/ | |||
private String clientid; | |||
/** | |||
* 厂商表主键 | |||
* | |||
* Table: firm_usercert_channel | |||
* Column: firm_id | |||
* Nullable: false | |||
*/ | |||
private String firmId; | |||
/** | |||
* 渠道类型 0 app 1 sdk | |||
* | |||
* Table: firm_usercert_channel | |||
* Column: channel_type | |||
* Nullable: false | |||
*/ | |||
private Integer channelType; | |||
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(", firmId=").append(firmId); | |||
sb.append(", channelType=").append(channelType); | |||
sb.append(", serialVersionUID=").append(serialVersionUID); | |||
sb.append("]"); | |||
return sb.toString(); | |||
} | |||
public static FirmUsercertChannel.Builder builder() { | |||
return new FirmUsercertChannel.Builder(); | |||
} | |||
public static class Builder { | |||
private FirmUsercertChannel obj; | |||
public Builder() { | |||
this.obj = new FirmUsercertChannel(); | |||
} | |||
public Builder uniqueid(String uniqueid) { | |||
obj.setUniqueid(uniqueid); | |||
return this; | |||
} | |||
public Builder clientid(String clientid) { | |||
obj.setClientid(clientid); | |||
return this; | |||
} | |||
public Builder firmId(String firmId) { | |||
obj.setFirmId(firmId); | |||
return this; | |||
} | |||
public Builder channelType(Integer channelType) { | |||
obj.setChannelType(channelType); | |||
return this; | |||
} | |||
public FirmUsercertChannel build() { | |||
return this.obj; | |||
} | |||
} | |||
public enum Column { | |||
uniqueid("uniqueid", "uniqueid", "VARCHAR", false), | |||
clientid("clientid", "clientid", "VARCHAR", false), | |||
firmId("firm_id", "firmId", "VARCHAR", false), | |||
channelType("channel_type", "channelType", "BIT", 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(); | |||
} | |||
} | |||
} |
@@ -0,0 +1,697 @@ | |||
package com.trust.ywx.customer.dao.po; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
public class FirmUsercertChannelExample { | |||
protected String orderByClause; | |||
protected boolean distinct; | |||
protected List<Criteria> oredCriteria; | |||
protected Integer offset; | |||
protected Integer rows; | |||
public FirmUsercertChannelExample() { | |||
oredCriteria = new ArrayList<Criteria>(); | |||
} | |||
public void setOrderByClause(String orderByClause) { | |||
this.orderByClause = orderByClause; | |||
} | |||
public String getOrderByClause() { | |||
return orderByClause; | |||
} | |||
public void setDistinct(boolean distinct) { | |||
this.distinct = distinct; | |||
} | |||
public boolean isDistinct() { | |||
return distinct; | |||
} | |||
public List<Criteria> getOredCriteria() { | |||
return oredCriteria; | |||
} | |||
public void or(Criteria criteria) { | |||
oredCriteria.add(criteria); | |||
} | |||
public Criteria or() { | |||
Criteria criteria = createCriteriaInternal(); | |||
oredCriteria.add(criteria); | |||
return criteria; | |||
} | |||
public FirmUsercertChannelExample orderBy(String orderByClause) { | |||
this.setOrderByClause(orderByClause); | |||
return this; | |||
} | |||
public FirmUsercertChannelExample orderBy(String ... orderByClauses) { | |||
StringBuffer sb = new StringBuffer(); | |||
for (int i = 0; i < orderByClauses.length; i++) { | |||
sb.append(orderByClauses[i]); | |||
if (i < orderByClauses.length - 1) { | |||
sb.append(" , "); | |||
} | |||
} | |||
this.setOrderByClause(sb.toString()); | |||
return this; | |||
} | |||
public Criteria createCriteria() { | |||
Criteria criteria = createCriteriaInternal(); | |||
if (oredCriteria.size() == 0) { | |||
oredCriteria.add(criteria); | |||
} | |||
return criteria; | |||
} | |||
protected Criteria createCriteriaInternal() { | |||
Criteria criteria = new Criteria(this); | |||
return criteria; | |||
} | |||
public void clear() { | |||
oredCriteria.clear(); | |||
orderByClause = null; | |||
distinct = false; | |||
rows = null; | |||
offset = null; | |||
} | |||
public void setOffset(Integer offset) { | |||
this.offset = offset; | |||
} | |||
public Integer getOffset() { | |||
return this.offset; | |||
} | |||
public void setRows(Integer rows) { | |||
this.rows = rows; | |||
} | |||
public Integer getRows() { | |||
return this.rows; | |||
} | |||
public FirmUsercertChannelExample limit(Integer rows) { | |||
this.rows = rows; | |||
return this; | |||
} | |||
public FirmUsercertChannelExample limit(Integer offset, Integer rows) { | |||
this.offset = offset; | |||
this.rows = rows; | |||
return this; | |||
} | |||
public FirmUsercertChannelExample page(Integer page, Integer pageSize) { | |||
this.offset = page * pageSize; | |||
this.rows = pageSize; | |||
return this; | |||
} | |||
public static Criteria newAndCreateCriteria() { | |||
FirmUsercertChannelExample example = new FirmUsercertChannelExample(); | |||
return example.createCriteria(); | |||
} | |||
public FirmUsercertChannelExample when(boolean condition, IExampleWhen then) { | |||
if (condition) { | |||
then.example(this); | |||
} | |||
return this; | |||
} | |||
public FirmUsercertChannelExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) { | |||
if (condition) { | |||
then.example(this); | |||
} else { | |||
otherwise.example(this); | |||
} | |||
return this; | |||
} | |||
protected abstract static class GeneratedCriteria { | |||
protected List<Criterion> criteria; | |||
protected GeneratedCriteria() { | |||
super(); | |||
criteria = new ArrayList<Criterion>(); | |||
} | |||
public boolean isValid() { | |||
return criteria.size() > 0; | |||
} | |||
public List<Criterion> getAllCriteria() { | |||
return criteria; | |||
} | |||
public List<Criterion> getCriteria() { | |||
return criteria; | |||
} | |||
protected void addCriterion(String condition) { | |||
if (condition == null) { | |||
throw new RuntimeException("Value for condition cannot be null"); | |||
} | |||
criteria.add(new Criterion(condition)); | |||
} | |||
protected void addCriterion(String condition, Object value, String property) { | |||
if (value == null) { | |||
throw new RuntimeException("Value for " + property + " cannot be null"); | |||
} | |||
criteria.add(new Criterion(condition, value)); | |||
} | |||
protected void addCriterion(String condition, Object value1, Object value2, String property) { | |||
if (value1 == null || value2 == null) { | |||
throw new RuntimeException("Between values for " + property + " cannot be null"); | |||
} | |||
criteria.add(new Criterion(condition, value1, value2)); | |||
} | |||
public Criteria andUniqueidIsNull() { | |||
addCriterion("uniqueid is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidIsNotNull() { | |||
addCriterion("uniqueid is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidEqualTo(String value) { | |||
addCriterion("uniqueid =", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("uniqueid = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotEqualTo(String value) { | |||
addCriterion("uniqueid <>", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("uniqueid <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThan(String value) { | |||
addCriterion("uniqueid >", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("uniqueid > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThanOrEqualTo(String value) { | |||
addCriterion("uniqueid >=", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidGreaterThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("uniqueid >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThan(String value) { | |||
addCriterion("uniqueid <", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("uniqueid < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThanOrEqualTo(String value) { | |||
addCriterion("uniqueid <=", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLessThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("uniqueid <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidLike(String value) { | |||
addCriterion("uniqueid like", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotLike(String value) { | |||
addCriterion("uniqueid not like", value, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidIn(List<String> values) { | |||
addCriterion("uniqueid in", values, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotIn(List<String> values) { | |||
addCriterion("uniqueid not in", values, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidBetween(String value1, String value2) { | |||
addCriterion("uniqueid between", value1, value2, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andUniqueidNotBetween(String value1, String value2) { | |||
addCriterion("uniqueid not between", value1, value2, "uniqueid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidIsNull() { | |||
addCriterion("clientid is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidIsNotNull() { | |||
addCriterion("clientid is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidEqualTo(String value) { | |||
addCriterion("clientid =", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("clientid = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidNotEqualTo(String value) { | |||
addCriterion("clientid <>", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidNotEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("clientid <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidGreaterThan(String value) { | |||
addCriterion("clientid >", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidGreaterThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("clientid > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidGreaterThanOrEqualTo(String value) { | |||
addCriterion("clientid >=", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidGreaterThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("clientid >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidLessThan(String value) { | |||
addCriterion("clientid <", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidLessThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("clientid < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidLessThanOrEqualTo(String value) { | |||
addCriterion("clientid <=", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidLessThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("clientid <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidLike(String value) { | |||
addCriterion("clientid like", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidNotLike(String value) { | |||
addCriterion("clientid not like", value, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidIn(List<String> values) { | |||
addCriterion("clientid in", values, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidNotIn(List<String> values) { | |||
addCriterion("clientid not in", values, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidBetween(String value1, String value2) { | |||
addCriterion("clientid between", value1, value2, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andClientidNotBetween(String value1, String value2) { | |||
addCriterion("clientid not between", value1, value2, "clientid"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdIsNull() { | |||
addCriterion("firm_id is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdIsNotNull() { | |||
addCriterion("firm_id is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdEqualTo(String value) { | |||
addCriterion("firm_id =", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("firm_id = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotEqualTo(String value) { | |||
addCriterion("firm_id <>", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("firm_id <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThan(String value) { | |||
addCriterion("firm_id >", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("firm_id > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThanOrEqualTo(String value) { | |||
addCriterion("firm_id >=", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdGreaterThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("firm_id >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThan(String value) { | |||
addCriterion("firm_id <", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("firm_id < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThanOrEqualTo(String value) { | |||
addCriterion("firm_id <=", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLessThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("firm_id <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdLike(String value) { | |||
addCriterion("firm_id like", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotLike(String value) { | |||
addCriterion("firm_id not like", value, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdIn(List<String> values) { | |||
addCriterion("firm_id in", values, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotIn(List<String> values) { | |||
addCriterion("firm_id not in", values, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdBetween(String value1, String value2) { | |||
addCriterion("firm_id between", value1, value2, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andFirmIdNotBetween(String value1, String value2) { | |||
addCriterion("firm_id not between", value1, value2, "firmId"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeIsNull() { | |||
addCriterion("channel_type is null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeIsNotNull() { | |||
addCriterion("channel_type is not null"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeEqualTo(Integer value) { | |||
addCriterion("channel_type =", value, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("channel_type = ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeNotEqualTo(Integer value) { | |||
addCriterion("channel_type <>", value, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeNotEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("channel_type <> ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeGreaterThan(Integer value) { | |||
addCriterion("channel_type >", value, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeGreaterThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("channel_type > ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeGreaterThanOrEqualTo(Integer value) { | |||
addCriterion("channel_type >=", value, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeGreaterThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("channel_type >= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeLessThan(Integer value) { | |||
addCriterion("channel_type <", value, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeLessThanColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("channel_type < ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeLessThanOrEqualTo(Integer value) { | |||
addCriterion("channel_type <=", value, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeLessThanOrEqualToColumn(FirmUsercertChannel.Column column) { | |||
addCriterion(new StringBuilder("channel_type <= ").append(column.getEscapedColumnName()).toString()); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeIn(List<Integer> values) { | |||
addCriterion("channel_type in", values, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeNotIn(List<Integer> values) { | |||
addCriterion("channel_type not in", values, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeBetween(Integer value1, Integer value2) { | |||
addCriterion("channel_type between", value1, value2, "channelType"); | |||
return (Criteria) this; | |||
} | |||
public Criteria andChannelTypeNotBetween(Integer value1, Integer value2) { | |||
addCriterion("channel_type not between", value1, value2, "channelType"); | |||
return (Criteria) this; | |||
} | |||
} | |||
public static class Criteria extends GeneratedCriteria { | |||
private FirmUsercertChannelExample example; | |||
protected Criteria(FirmUsercertChannelExample example) { | |||
super(); | |||
this.example = example; | |||
} | |||
public FirmUsercertChannelExample example() { | |||
return this.example; | |||
} | |||
public Criteria when(boolean condition, ICriteriaWhen then) { | |||
if (condition) { | |||
then.criteria(this); | |||
} | |||
return this; | |||
} | |||
public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) { | |||
if (condition) { | |||
then.criteria(this); | |||
} else { | |||
otherwise.criteria(this); | |||
} | |||
return this; | |||
} | |||
} | |||
public static class Criterion { | |||
private String condition; | |||
private Object value; | |||
private Object secondValue; | |||
private boolean noValue; | |||
private boolean singleValue; | |||
private boolean betweenValue; | |||
private boolean listValue; | |||
private String typeHandler; | |||
public String getCondition() { | |||
return condition; | |||
} | |||
public Object getValue() { | |||
return value; | |||
} | |||
public Object getSecondValue() { | |||
return secondValue; | |||
} | |||
public boolean isNoValue() { | |||
return noValue; | |||
} | |||
public boolean isSingleValue() { | |||
return singleValue; | |||
} | |||
public boolean isBetweenValue() { | |||
return betweenValue; | |||
} | |||
public boolean isListValue() { | |||
return listValue; | |||
} | |||
public String getTypeHandler() { | |||
return typeHandler; | |||
} | |||
protected Criterion(String condition) { | |||
super(); | |||
this.condition = condition; | |||
this.typeHandler = null; | |||
this.noValue = true; | |||
} | |||
protected Criterion(String condition, Object value, String typeHandler) { | |||
super(); | |||
this.condition = condition; | |||
this.value = value; | |||
this.typeHandler = typeHandler; | |||
if (value instanceof List<?>) { | |||
this.listValue = true; | |||
} else { | |||
this.singleValue = true; | |||
} | |||
} | |||
protected Criterion(String condition, Object value) { | |||
this(condition, value, null); | |||
} | |||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | |||
super(); | |||
this.condition = condition; | |||
this.value = value; | |||
this.secondValue = secondValue; | |||
this.typeHandler = typeHandler; | |||
this.betweenValue = true; | |||
} | |||
protected Criterion(String condition, Object value, Object secondValue) { | |||
this(condition, value, secondValue, null); | |||
} | |||
} | |||
public interface ICriteriaWhen { | |||
void criteria(Criteria criteria); | |||
} | |||
public interface IExampleWhen { | |||
void example(com.trust.ywx.customer.dao.po.FirmUsercertChannelExample example); | |||
} | |||
} |
@@ -1,34 +0,0 @@ | |||
package com.trust.ywx.customer.service; | |||
import com.trust.ywx.customer.service.dto.TrustFirmDto; | |||
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(TrustFirmDto customerInfoDto) throws BizException; | |||
/** | |||
* 根据clientId查询可信客户信息 | |||
* @param clientId | |||
* @return | |||
*/ | |||
TrustFirmDto getCustomerInfo(String clientId); | |||
} |
@@ -31,6 +31,6 @@ public class SearchFirmParam extends PageParam { | |||
/** | |||
* 审核状态 | |||
*/ | |||
private String status; | |||
private Integer firmStatus; | |||
} |
@@ -1,5 +1,6 @@ | |||
package com.trust.ywx.customer.service.dto.request; | |||
import com.fiftyonetrust.common.model.param.PageParam; | |||
import lombok.Data; | |||
import java.util.List; | |||
@@ -10,60 +11,70 @@ import java.util.List; | |||
* @包 路 径: cn.org.bjca.ywq.api.param.req | |||
* @版权所有:北京数字认证股份有限公司 (C) 2017 | |||
* | |||
* @类描述: | |||
* @类描述: 查询可信客户参数 | |||
* @版本: V1.5 | |||
* @创建人: hbx | |||
* @创建时间:2017年3月13日 下午1:54:17 | |||
*/ | |||
@Data | |||
public class SearchTrustFirmParam extends SearchFirmParam { | |||
public class SearchTrustFirmParam extends PageParam{ | |||
/** | |||
* 客户clientId | |||
* 客户id | |||
*/ | |||
private String clientId; | |||
/** | |||
* 客户类型:互联网医院、实体医院等 | |||
*/ | |||
private List<String> networkType; | |||
/** | |||
* 公众产品形态 SDK\H5 | |||
* 客户名称 | |||
*/ | |||
private List<String> publicProductType; | |||
private String firmName; | |||
/** | |||
* | |||
* 代理商id | |||
*/ | |||
private List<String> channelType; | |||
private String agentClientId; | |||
/** | |||
* 证书状态:无证书、正常、已过期、待更新 | |||
* 审核状态 | |||
*/ | |||
private Integer certStatus; | |||
private Integer firmStatus; | |||
/** | |||
* 销售人员id | |||
*/ | |||
private String saleId; | |||
/** | |||
* 实施人员id | |||
* 实施人员id | |||
*/ | |||
private String techId; | |||
/** | |||
* 计费模式 0正常 1异常 | |||
* 客户类型:互联网医院、实体医院等 | |||
* see com.trust.ywx.customer.common.enums.NetworkTypeEnum | |||
*/ | |||
private Integer networkType; | |||
/** | |||
* 医师产品形态 | |||
* see com.trust.ywx.customer.common.enums.DoctorProductTypeEnum | |||
*/ | |||
private String chargingMode; | |||
private Integer doctorProductType; | |||
/** | |||
* 公众产品形态 SDK\H5 | |||
* see com.trust.ywx.customer.common.enums.PublicProductTypeEnum | |||
*/ | |||
private Integer publicProductType; | |||
/** | |||
* 客户编号/合同方/合同号 | |||
* 计费模式 0正常 1异常 | |||
* see com.trust.ywx.customer.common.enums.ChargingModelEnum | |||
*/ | |||
private String likeCron; | |||
private Integer chargingMode; | |||
/** | |||
* 厂商组id | |||
*/ | |||
private String groupNum; | |||
private String groupId; | |||
/** | |||
* 项目状态 1、正常/2、试用/3、消亡 | |||
* 项目状态 1、正常/2、试用/3、消亡/4、删除 | |||
* see com.trust.ywx.customer.common.enums.ChargingModelEnum | |||
*/ | |||
private Integer projectStatus; | |||
@@ -1,17 +1,29 @@ | |||
package com.trust.ywx.customer.service.impl; | |||
import com.fiftyonetrust.common.model.result.Page; | |||
import com.fiftyonetrust.common.model.result.PageList; | |||
import com.trust.ywx.customer.common.enums.FirmProperEnum; | |||
import com.trust.ywx.customer.common.enums.NetworkTypeEnum; | |||
import com.trust.ywx.customer.dao.DoctorProductTypeDao; | |||
import com.trust.ywx.customer.dao.FirmDao; | |||
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.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.service.exception.BizException; | |||
import com.trust.ywx.customer.service.query.FirmQueryService; | |||
import org.apache.commons.lang.StringUtils; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.util.CollectionUtils; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.*; | |||
/** | |||
* <pre></pre> | |||
@@ -26,23 +38,100 @@ import java.util.Map; | |||
* @Modify: | |||
*/ | |||
public class FirmQueryServiceImpl implements FirmQueryService { | |||
@Autowired | |||
private FirmDao firmDao; | |||
@Autowired | |||
private FirmGroupDao firmGroupDao; | |||
@Autowired | |||
private FirmExtendDao firmExtendDao; | |||
@Autowired | |||
private DoctorProductTypeDao doctorProductTypeDao; | |||
@Override | |||
public List<TrustFirmDto> getTrustFirmList(SearchTrustFirmParam param) { | |||
return null; | |||
List<String> clientIdList = new ArrayList<>(); | |||
// clientId筛选 | |||
if (StringUtils.isNotEmpty(param.getClientId())) { | |||
FirmInfo firmInfo = firmDao.getFrimByClientId(param.getClientId()); | |||
if (null == firmInfo) { | |||
return Arrays.asList(); | |||
} | |||
// 增加项目状态的判断 | |||
if (null != param.getFirmStatus() && Objects.equals(firmInfo.getFirmStatus(), param.getFirmStatus())) { | |||
return Arrays.asList(); | |||
} | |||
clientIdList.add(param.getClientId()); | |||
} | |||
return doSearch(param, false); | |||
} | |||
@Override | |||
public PageList<List<TrustFirmDto>> getTrustFirmListWithPage(SearchTrustFirmParam param) { | |||
List<String> clientIdList = new ArrayList<>(); | |||
// clientId筛选 | |||
if (StringUtils.isNotEmpty(param.getClientId())) { | |||
FirmInfo firmInfo = firmDao.getFrimByClientId(param.getClientId()); | |||
if (null == firmInfo) { | |||
return new PageList(); | |||
} | |||
// 增加项目状态的判断 | |||
if (null != param.getFirmStatus() && Objects.equals(firmInfo.getFirmStatus(), param.getFirmStatus())) { | |||
return new PageList(); | |||
} | |||
clientIdList.add(param.getClientId()); | |||
} | |||
List<TrustFirmDto> dtoList = doSearch(param, true); | |||
// fixme 组装好麻烦,需要改进下 | |||
PageList pageList = new PageList(); | |||
pageList.setItems(dtoList); | |||
Page page = new Page(); | |||
page.setPageNo(param.getPageNo()); | |||
page.setPageSize(param.getPageSize()); | |||
page.setTotal(dtoList.size()); | |||
pageList.setPage(page); | |||
return pageList; | |||
} | |||
private TrustFirmDto converPoToDto(FirmInfo po) { | |||
if (null == po) { | |||
return null; | |||
} | |||
TrustFirmDto dto = new TrustFirmDto(); | |||
BeanUtils.copyProperties(po, dto); | |||
// TODO 差异属性转换 | |||
return dto; | |||
} | |||
@Override | |||
public TrustFirmDto getTrustFirm(String clientId) { | |||
return null; | |||
FirmInfo po = firmDao.getFrimByClientId(clientId); | |||
return converPoToDto(po); | |||
} | |||
@Override | |||
public Map<String, String> getProp(String clientId) throws Exception{ | |||
if(StringUtils.isEmpty(clientId)){ | |||
throw new BizException("400","clientId不能为空"); | |||
public Map<String, String> getAllProp(String clientId) { | |||
if (StringUtils.isEmpty(clientId)) { | |||
return new HashMap<>(); | |||
} | |||
// 从firm_info_extend获取全量属性 | |||
return null; | |||
Map<String, String> map = new HashMap<>(64); | |||
// 1、从firm_info_extend获取全量属性 | |||
List<FirmInfoExtend> extendList = firmExtendDao.getListByClientId(clientId); | |||
for (FirmInfoExtend extendPo : extendList) { | |||
map.put(extendPo.getPropName(), extendPo.getPropValue()); | |||
} | |||
//2、从firm_usercert_channel 获取医师产品形态属性 fixme 以后要去掉 | |||
List<FirmUsercertChannel> doctorList = doctorProductTypeDao.getByClientId(clientId); | |||
for (FirmUsercertChannel doctorPo : doctorList) { | |||
map.put(FirmProperEnum.DOCTOR_PRODUCT_TYPE.getProperName(), doctorPo.getChannelType() + ""); | |||
} | |||
return map; | |||
} | |||
@Override | |||
@@ -54,4 +143,98 @@ public class FirmQueryServiceImpl implements FirmQueryService { | |||
public List<CrmFirmDto> getCrmFirmList(SearchCrmFirmParam param) { | |||
return null; | |||
} | |||
private List<String> getClientIdListByProp(String propName, Integer propValue, List<String> clientIdList) { | |||
String convertPropValue = ""; | |||
if (Objects.equals(propName, FirmProperEnum.DOCTOR_PRODUCT_TYPE.getProperName())) { | |||
//fixme,目前医师产品形态单独存储在firm_usercert_channel表,后期挪到firm_info_extends表 | |||
return doctorProductTypeDao.getClientIdByProp(clientIdList, propValue); | |||
} else { | |||
// 其他属性都在firm_info_extends表 | |||
if (Objects.equals(propName, FirmProperEnum.NETWORK_TYPE.getProperName())) { | |||
convertPropValue = NetworkTypeEnum.getNameOfCode(propValue); | |||
} else { | |||
convertPropValue = String.valueOf(propValue); | |||
} | |||
return firmExtendDao.getByPropsAndClientId(propName, convertPropValue, clientIdList); | |||
} | |||
} | |||
private List<TrustFirmDto> doSearch(SearchTrustFirmParam param, boolean isPage) { | |||
List<String> clientIdList = new ArrayList<>(); | |||
// 客户组筛选 | |||
if (StringUtils.isNotEmpty(param.getGroupId())) { | |||
List<String> groupClientIdList = firmGroupDao.getClientIdByGroupId(param.getGroupId()); | |||
if (CollectionUtils.isEmpty(clientIdList)) { | |||
clientIdList = groupClientIdList; | |||
} else { | |||
clientIdList.retainAll(groupClientIdList); | |||
if (CollectionUtils.isEmpty(clientIdList)) { | |||
return Arrays.asList(); | |||
} | |||
} | |||
} | |||
// 医师产品形态筛选 | |||
if (null != param.getDoctorProductType()) { | |||
List<String> subClientIdList; | |||
if (StringUtils.isNotEmpty(param.getClientId())) { | |||
subClientIdList = getClientIdListByProp(FirmProperEnum.DOCTOR_PRODUCT_TYPE.getProperName(), param.getDoctorProductType(), Arrays.asList(param.getClientId())); | |||
} else { | |||
subClientIdList = getClientIdListByProp(FirmProperEnum.DOCTOR_PRODUCT_TYPE.getProperName(), param.getDoctorProductType(), null); | |||
} | |||
// 与clientIdList求并集 | |||
clientIdList.retainAll(subClientIdList); | |||
if (CollectionUtils.isEmpty(clientIdList)) { | |||
return Arrays.asList(); | |||
} | |||
} | |||
/** | |||
* 属性过滤暂时没想到好办法,只能一个个去查询了 | |||
*/ | |||
if (null != param.getNetworkType()) { | |||
List<String> subClientIdList = getClientIdListByProp(FirmProperEnum.NETWORK_TYPE.getProperName(), param.getNetworkType(), clientIdList); | |||
// 与clientIdList求并集 | |||
clientIdList.retainAll(subClientIdList); | |||
if (CollectionUtils.isEmpty(clientIdList)) { | |||
return Arrays.asList(); | |||
} | |||
} | |||
if (null != param.getChargingMode()) { | |||
List<String> subClientIdList = getClientIdListByProp(FirmProperEnum.CHARGING_MODEL.getProperName(), param.getChargingMode(), clientIdList); | |||
// 与clientIdList求并集 | |||
clientIdList.retainAll(subClientIdList); | |||
if (CollectionUtils.isEmpty(clientIdList)) { | |||
return Arrays.asList(); | |||
} | |||
} | |||
if (null != param.getPublicProductType()) { | |||
List<String> subClientIdList = getClientIdListByProp(FirmProperEnum.PUBLIC_PRODUCT_TYPE.getProperName(), param.getPublicProductType(), clientIdList); | |||
// 与clientIdList求并集 | |||
clientIdList.retainAll(subClientIdList); | |||
if (CollectionUtils.isEmpty(clientIdList)) { | |||
return Arrays.asList(); | |||
} | |||
} | |||
List<FirmInfo> firmList = null; | |||
if (isPage) { | |||
firmList = firmDao.getListByIds(clientIdList, 100000, 0); | |||
} else { | |||
if (clientIdList.size() < param.getPageSize() * param.getPageNo()) { | |||
return Arrays.asList(); | |||
} | |||
firmList = firmDao.getListByIds(clientIdList, param.getPageSize(), param.getPageNo()); | |||
} | |||
List<TrustFirmDto> dtoList = new ArrayList<>(firmList.size()); | |||
if (CollectionUtils.isEmpty(firmList)) { | |||
return Arrays.asList(); | |||
} | |||
for (FirmInfo po : firmList) { | |||
TrustFirmDto dto = converPoToDto(po); | |||
dtoList.add(dto); | |||
} | |||
return dtoList; | |||
} | |||
} |
@@ -0,0 +1,202 @@ | |||
//package com.trust.ywx.customer.service.impl; | |||
// | |||
//import com.fiftyonetrust.common.model.result.Page; | |||
//import com.fiftyonetrust.common.model.result.PageList; | |||
//import com.trust.ywx.customer.common.enums.FirmProperEnum; | |||
//import com.trust.ywx.customer.common.enums.NetworkTypeEnum; | |||
//import com.trust.ywx.customer.dao.FirmDao; | |||
//import com.trust.ywx.customer.dao.FirmExtendDao; | |||
//import com.trust.ywx.customer.dao.FirmGroupDao; | |||
//import com.trust.ywx.customer.dao.mapper.FirmUsercertChannelMapper; | |||
//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.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.service.query.FirmQueryService; | |||
//import org.apache.commons.lang.StringUtils; | |||
//import org.springframework.beans.BeanUtils; | |||
//import org.springframework.beans.factory.annotation.Autowired; | |||
//import org.springframework.util.CollectionUtils; | |||
// | |||
//import java.util.ArrayList; | |||
//import java.util.List; | |||
//import java.util.Map; | |||
//import java.util.Objects; | |||
// | |||
///** | |||
// * <pre></pre> | |||
// * | |||
// * @文件名称: FirmQueryServiceImpl.java | |||
// * @包 路 径: com.trust.ywx.customer.service.impl | |||
// * @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
// * @Description: | |||
// * @Version: V1.0 | |||
// * @Author: hanzhenchao | |||
// * @Date:2022/6/15 18:43 | |||
// * @Modify: | |||
// */ | |||
//public class FirmQueryServiceImpl_bak implements FirmQueryService { | |||
// @Autowired | |||
// private FirmDao firmDao; | |||
// @Autowired | |||
// private FirmGroupDao firmGroupDao; | |||
// @Autowired | |||
// private FirmExtendDao firmExtendDao; | |||
// @Autowired | |||
// private FirmUsercertChannelMapper usercertChannelMapper; | |||
// | |||
// @Override | |||
// public PageList<List<TrustFirmDto>> getTrustFirmList(SearchTrustFirmWithPageParam param) { | |||
// List<String> clientIdList = new ArrayList<>(); | |||
// | |||
// // 客户id/合同编号/合同方 筛选 | |||
// if(!Objects.equals(param.getClientId(),param.getLikeCron())){ | |||
// // 如果clientId不为空,比较likeCron是否一致,不一致说明likeCron是合同编号/合同方 | |||
// if(StringUtils.isNotEmpty(param.getLikeCron())){ | |||
// //查询合同表 | |||
// String clientId = firmDao.getClientIdByKeyword(param.getLikeCron()); | |||
// if(StringUtils.isEmpty(clientId) || !Objects.equals(param.getClientId(),clientId)){ | |||
// // 未查到或查到的clientId和选择的客户不匹配,返回空 | |||
// return new PageList(); | |||
// } | |||
// } | |||
// } | |||
// | |||
// // clientId筛选 | |||
// if(StringUtils.isNotEmpty(param.getClientId())){ | |||
// FirmInfo firmInfo = firmDao.getFrimByClientId(param.getClientId()); | |||
// if(null == firmInfo){ | |||
// return new PageList(); | |||
// } | |||
// // 增加项目状态的判断 | |||
// if(null != param.getFirmStatus() && Objects.equals(firmInfo.getFirmStatus(),param.getFirmStatus())){ | |||
// return new PageList(); | |||
// } | |||
// clientIdList.add(param.getClientId()); | |||
// | |||
// } | |||
// | |||
// // 客户组筛选 | |||
// if(StringUtils.isNotEmpty(param.getGroupId())){ | |||
// List<String> groupClientIdList = firmGroupDao.getClientIdByGroupId(param.getGroupId()); | |||
// if(CollectionUtils.isEmpty(clientIdList)){ | |||
// clientIdList = groupClientIdList; | |||
// }else{ | |||
// clientIdList.retainAll(groupClientIdList); | |||
// if(CollectionUtils.isEmpty(clientIdList)){ | |||
// return new PageList(); | |||
// } | |||
// } | |||
// } | |||
// | |||
// // 医师产品形态筛选(fixme,目前单独存储在firm_usercert_channel表,后期挪到firm_info_extends表) | |||
// if(null!=param.getDoctorProductType()){ | |||
// if(StringUtils.isNotEmpty(param.getClientId())){ | |||
// // 携带客户Id和产品形态一起去查 | |||
// FirmUsercertChannelExample example = new FirmUsercertChannelExample(); | |||
// example.createCriteria().andChannelTypeEqualTo(param.getDoctorProductType()).andClientidEqualTo(param.getClientId()); | |||
// long count = usercertChannelMapper.countByExample(example); | |||
// if(count==0){ | |||
// return new PageList(); | |||
// }else{ | |||
// clientIdList.add(param.getClientId()); | |||
// } | |||
// }else{ | |||
// List<String> subClientIdList = firmDao.getClientIdByChannelType(param.getDoctorProductType()); | |||
// // 与clientIdList求并集 | |||
// clientIdList.retainAll(subClientIdList); | |||
// if(CollectionUtils.isEmpty(clientIdList)){ | |||
// return new PageList(); | |||
// } | |||
// } | |||
// } | |||
// | |||
// /** | |||
// * 属性过滤暂时没想到好办法,只能一个个去查询了 | |||
// */ | |||
// if(null!=param.getNetworkType()){ | |||
// List<String> subClientIdList = firmExtendDao.getByPropsAndClientId(FirmProperEnum.NETWORK_TYPE.getProperName(),NetworkTypeEnum.getNameOfCode(param.getNetworkType()),clientIdList); | |||
// // 与clientIdList求并集 | |||
// clientIdList.retainAll(subClientIdList); | |||
// if(CollectionUtils.isEmpty(clientIdList)){ | |||
// return new PageList(); | |||
// } | |||
// } | |||
// if(null!=param.getChargingMode()){ | |||
// List<String> subClientIdList = firmExtendDao.getByPropsAndClientId(FirmProperEnum.CHARGING_MODEL.getProperName(), param.getChargingMode()+"", clientIdList); | |||
// // 与clientIdList求并集 | |||
// clientIdList.retainAll(subClientIdList); | |||
// if(CollectionUtils.isEmpty(clientIdList)){ | |||
// return new PageList(); | |||
// } | |||
// } | |||
// if(null!=param.getPublicProductType()){ | |||
// List<String> subClientIdList = firmExtendDao.getByPropsAndClientId(FirmProperEnum.PUBLIC_PRODUCT_TYPE.getProperName(),param.getPublicProductType()+"",clientIdList); | |||
// // 与clientIdList求并集 | |||
// clientIdList.retainAll(subClientIdList); | |||
// if(CollectionUtils.isEmpty(clientIdList)){ | |||
// return new PageList(); | |||
// } | |||
// } | |||
// | |||
// | |||
// List<FirmInfo> firmList = firmDao.getListByIds(clientIdList); | |||
// List<TrustFirmDto> dtoList = new ArrayList<>(firmList.size()); | |||
// for (FirmInfo po: firmList) { | |||
// TrustFirmDto dto = converPoToDto(po); | |||
// dtoList.add(dto); | |||
// } | |||
// | |||
// // fixme 组装好麻烦,需要改进下 | |||
// PageList pageList = new PageList(); | |||
// pageList.setItems(dtoList); | |||
// Page page = new Page(); | |||
// page.setPageNo(param.getPageNo()); | |||
// page.setPageSize(param.getPageSize()); | |||
// page.setTotal(dtoList.size()); | |||
// pageList.setPage(page); | |||
// return pageList; | |||
// } | |||
// | |||
// | |||
// private TrustFirmDto converPoToDto(FirmInfo po) { | |||
// if(null == po){ | |||
// return null; | |||
// } | |||
// TrustFirmDto dto = new TrustFirmDto(); | |||
// BeanUtils.copyProperties(po,dto); | |||
// | |||
// // TODO 差异属性转换 | |||
// return dto; | |||
// } | |||
// | |||
// @Override | |||
// public TrustFirmDto getTrustFirm(String clientId) { | |||
// return null; | |||
// } | |||
// | |||
// @Override | |||
// public Map<String, String> getProp(String clientId) throws Exception{ | |||
// if(StringUtils.isEmpty(clientId)){ | |||
// throw new BizException("400","clientId不能为空"); | |||
// } | |||
// // 从firm_info_extend\、firm_usercert_channel获取全量属性 | |||
// | |||
// return null; | |||
// } | |||
// | |||
// @Override | |||
// public List<AuditFirmDto> getAuditFirmList(SearchFirmParam param) { | |||
// return null; | |||
// } | |||
// | |||
// @Override | |||
// public List<CrmFirmDto> getCrmFirmList(SearchCrmFirmParam param) { | |||
// return null; | |||
// } | |||
//} |
@@ -1,31 +0,0 @@ | |||
package com.trust.ywx.customer.service.impl; | |||
import com.trust.ywx.customer.service.TrustCustomerService; | |||
import com.trust.ywx.customer.service.dto.TrustFirmDto; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* <pre></pre> | |||
* | |||
* @文件名称: TrustComstomerServiceimpl.java | |||
* @包 路 径: com.trust.ywx.customer.service.exceptions | |||
* @Copyright:北京数字医信责任有限公司 (C) 2022 * | |||
* @Description: 客户服务实现类 | |||
* @Version: V1.0 | |||
* @Author: hanzhenchao | |||
* @Date:2022/6/11 21:15 | |||
* @Modify: | |||
*/ | |||
@Service | |||
public class TrustCustomerServiceimpl implements TrustCustomerService { | |||
@Override | |||
public void addTrustCustomer(TrustFirmDto customerInfoDto) { | |||
System.out.println("创建成功!"); | |||
} | |||
@Override | |||
public TrustFirmDto getCustomerInfo(String clientId) { | |||
TrustFirmDto dto = new TrustFirmDto(); | |||
dto.setCaType("carType"); | |||
return dto; | |||
} | |||
} |
@@ -17,6 +17,10 @@ public interface FirmManagerService { | |||
* 添加可信客户 | |||
*/ | |||
void addTrustFirm(); | |||
/** | |||
* 更新可信客户 | |||
*/ | |||
void updateTrustFirm(); | |||
@@ -1,5 +1,6 @@ | |||
package com.trust.ywx.customer.service.query; | |||
import com.fiftyonetrust.common.model.result.PageList; | |||
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; | |||
@@ -28,10 +29,18 @@ public interface FirmQueryService { | |||
/** | |||
* 获取可信客户列表 | |||
* @param param | |||
* @return | |||
*/ | |||
List<TrustFirmDto> getTrustFirmList(SearchTrustFirmParam param); | |||
/** | |||
* 获取可信客户列表 (分页) | |||
* @param param | |||
* @return | |||
*/ | |||
PageList<List<TrustFirmDto>> getTrustFirmListWithPage(SearchTrustFirmParam param); | |||
/** | |||
* 获取可信客户详情 | |||
* @param clientId | |||
* @return | |||
@@ -39,13 +48,17 @@ public interface FirmQueryService { | |||
TrustFirmDto getTrustFirm(String clientId); | |||
/** | |||
* 获取客户配置 | |||
* 获取客户配置属性集合 | |||
* 主要给customer-client内部使用! | |||
*/ | |||
Map<String,String> getProp(String clientId) throws Exception; | |||
Map<String,String> getAllProp(String clientId); | |||
/** | |||
* | |||
* 根据属性值获取客户列表 | |||
* fixme 要不要提供这个接口呢? | |||
* 例如:白名单 感觉最好是明确获取白名单的接口 | |||
*/ | |||
// List<TrustFirmDto> getListByProp(String propName,String propValue); | |||
//------------------------待审核客户-------------------- | |||
/** | |||
@@ -1,7 +1,7 @@ | |||
package com.trust.ywx.customer.web.controller; | |||
import com.trust.ywx.customer.service.TrustCustomerService; | |||
import com.trust.ywx.customer.service.query.FirmQueryService; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.ui.Model; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
@@ -14,15 +14,15 @@ import org.springframework.web.bind.annotation.RestController; | |||
* @author paida 派哒 zeyu.pzy@alibaba-inc.com | |||
*/ | |||
@RestController | |||
public class TrustComsumerController { | |||
public class FirmController { | |||
@Autowired | |||
private TrustCustomerService trustCustomerService; | |||
private FirmQueryService firmQueryService; | |||
@RequestMapping("/greeting") | |||
public String greeting(@RequestParam(name="name", required=false, defaultValue="1") String name, Model model) { | |||
public String greeting(@RequestParam(name="name", required=false, defaultValue="1") String name, Model model) throws Exception { | |||
trustCustomerService.getCustomerInfo(""); | |||
firmQueryService.getAllProp(""); | |||
//这里返回的数据类型是String,但实际上更多的数据通过本函数中Model model传给了前端。返回值String也会被SpringMVC整合为一个ModelAndView,以供前端使用。(Controller可以返回多种数值,比如void、String、ModelAndView。同学们可以自行搜索学习) | |||
return "greeting"; | |||
} |
@@ -81,36 +81,46 @@ | |||
</javaClientGenerator> | |||
<!--表格实体配置--> | |||
<table tableName="firm_info" domainObjectName="FirmInfo" | |||
<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="status" property="firmStatus"></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" /> | |||
<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> | |||
</table> | |||
<!-- <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>--> | |||
<!-- </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>--> | |||
</context> | |||
</generatorConfiguration> |
@@ -0,0 +1,312 @@ | |||
<?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.FirmGroupMapper"> | |||
<resultMap id="BaseResultMap" type="com.trust.ywx.customer.dao.po.FirmGroup"> | |||
<!-- 唯一标识 --> | |||
<id column="uniqueId" jdbcType="VARCHAR" property="uniqueid" /> | |||
<result column="group_name" jdbcType="VARCHAR" property="groupName" /> | |||
<result column="group_num" jdbcType="VARCHAR" property="groupId" /> | |||
<result column="firm_id" jdbcType="VARCHAR" property="firmId" /> | |||
<!-- 1组长 2组员 --> | |||
<result column="firm_role" jdbcType="INTEGER" property="firmRole" /> | |||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | |||
<!-- 1已删除 0未删除 --> | |||
<result column="is_del" jdbcType="INTEGER" property="isDel" /> | |||
</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, group_name, group_num, firm_id, firm_role, create_time, is_del | |||
</sql> | |||
<select id="selectByExample" parameterType="com.trust.ywx.customer.dao.po.FirmGroupExample" resultMap="BaseResultMap"> | |||
select | |||
<if test="distinct"> | |||
distinct | |||
</if> | |||
<include refid="Base_Column_List" /> | |||
from firm_group | |||
<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_group | |||
where uniqueId = #{uniqueid,jdbcType=VARCHAR} | |||
</select> | |||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | |||
delete from firm_group | |||
where uniqueId = #{uniqueid,jdbcType=VARCHAR} | |||
</delete> | |||
<delete id="deleteByExample" parameterType="com.trust.ywx.customer.dao.po.FirmGroupExample"> | |||
delete from firm_group | |||
<if test="_parameter != null"> | |||
<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> | |||
<insert id="insertSelective" keyColumn="uniqueId" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_group | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="groupName != null"> | |||
group_name, | |||
</if> | |||
<if test="groupId != null"> | |||
group_num, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id, | |||
</if> | |||
<if test="firmRole != null"> | |||
firm_role, | |||
</if> | |||
<if test="createTime != null"> | |||
create_time, | |||
</if> | |||
<if test="isDel != null"> | |||
is_del, | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="groupName != null"> | |||
#{groupName,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="groupId != null"> | |||
#{groupId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
#{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmRole != null"> | |||
#{firmRole,jdbcType=INTEGER}, | |||
</if> | |||
<if test="createTime != null"> | |||
#{createTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="isDel != null"> | |||
#{isDel,jdbcType=INTEGER}, | |||
</if> | |||
</trim> | |||
</insert> | |||
<select id="countByExample" parameterType="com.trust.ywx.customer.dao.po.FirmGroupExample" resultType="java.lang.Long"> | |||
select count(*) from firm_group | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</select> | |||
<update id="updateByExampleSelective" parameterType="map"> | |||
update firm_group | |||
<set> | |||
<if test="record.uniqueid != null"> | |||
uniqueId = #{record.uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.groupName != null"> | |||
group_name = #{record.groupName,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.groupId != null"> | |||
group_num = #{record.groupId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmId != null"> | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmRole != null"> | |||
firm_role = #{record.firmRole,jdbcType=INTEGER}, | |||
</if> | |||
<if test="record.createTime != null"> | |||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="record.isDel != null"> | |||
is_del = #{record.isDel,jdbcType=INTEGER}, | |||
</if> | |||
</set> | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByExample" parameterType="map"> | |||
update firm_group | |||
set uniqueId = #{record.uniqueid,jdbcType=VARCHAR}, | |||
group_name = #{record.groupName,jdbcType=VARCHAR}, | |||
group_num = #{record.groupId,jdbcType=VARCHAR}, | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
firm_role = #{record.firmRole,jdbcType=INTEGER}, | |||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, | |||
is_del = #{record.isDel,jdbcType=INTEGER} | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByPrimaryKeySelective"> | |||
update firm_group | |||
<set> | |||
<if test="groupName != null"> | |||
group_name = #{groupName,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="groupId != null"> | |||
group_num = #{groupId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmRole != null"> | |||
firm_role = #{firmRole,jdbcType=INTEGER}, | |||
</if> | |||
<if test="createTime != null"> | |||
create_time = #{createTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="isDel != null"> | |||
is_del = #{isDel,jdbcType=INTEGER}, | |||
</if> | |||
</set> | |||
where uniqueId = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<update id="updateByPrimaryKey"> | |||
update firm_group | |||
set group_name = #{groupName,jdbcType=VARCHAR}, | |||
group_num = #{groupId,jdbcType=VARCHAR}, | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
firm_role = #{firmRole,jdbcType=INTEGER}, | |||
create_time = #{createTime,jdbcType=TIMESTAMP}, | |||
is_del = #{isDel,jdbcType=INTEGER} | |||
where uniqueId = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-16 13:51:18 ### --> | |||
<!-- Your codes goes here!!! --> | |||
<select id="selectOneByExample" parameterType="com.trust.ywx.customer.dao.po.FirmGroupExample" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List" /> | |||
from firm_group | |||
<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_group | |||
(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} | |||
) | |||
</foreach> | |||
</insert> | |||
<insert id="batchInsertSelective" keyColumn="uniqueId" keyProperty="list.uniqueid" parameterType="map" useGeneratedKeys="true"> | |||
insert into firm_group ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
</foreach> | |||
) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'group_name'.toString() == column.value"> | |||
#{item.groupName,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'group_num'.toString() == column.value"> | |||
#{item.groupId,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_id'.toString() == column.value"> | |||
#{item.firmId,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_role'.toString() == column.value"> | |||
#{item.firmRole,jdbcType=INTEGER} | |||
</if> | |||
<if test="'create_time'.toString() == column.value"> | |||
#{item.createTime,jdbcType=TIMESTAMP} | |||
</if> | |||
<if test="'is_del'.toString() == column.value"> | |||
#{item.isDel,jdbcType=INTEGER} | |||
</if> | |||
</foreach> | |||
) | |||
</foreach> | |||
</insert> | |||
</mapper> |
@@ -0,0 +1,763 @@ | |||
<?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.FirmUsercertChannelMapper"> | |||
<resultMap id="BaseResultMap" type="com.trust.ywx.customer.dao.po.FirmUsercertChannel"> | |||
<!-- 主键id --> | |||
<id column="uniqueid" jdbcType="VARCHAR" property="uniqueid" /> | |||
<!-- 证书渠道对应厂商id --> | |||
<result column="clientid" jdbcType="VARCHAR" property="clientid" /> | |||
<!-- 厂商表主键 --> | |||
<result column="firm_id" jdbcType="VARCHAR" property="firmId" /> | |||
<!-- 渠道类型 0 app 1 sdk --> | |||
<result column="channel_type" jdbcType="BIT" property="channelType" /> | |||
</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, clientid, firm_id, channel_type | |||
</sql> | |||
<select id="selectByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultMap="BaseResultMap"> | |||
select | |||
<if test="distinct"> | |||
distinct | |||
</if> | |||
<include refid="Base_Column_List" /> | |||
from firm_usercert_channel | |||
<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_usercert_channel | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</select> | |||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | |||
delete from firm_usercert_channel | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</delete> | |||
<delete id="deleteByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample"> | |||
delete from firm_usercert_channel | |||
<if test="_parameter != null"> | |||
<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> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_usercert_channel | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="clientid != null"> | |||
clientid, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id, | |||
</if> | |||
<if test="channelType != null"> | |||
channel_type, | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="clientid != null"> | |||
#{clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
#{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="channelType != null"> | |||
#{channelType,jdbcType=BIT}, | |||
</if> | |||
</trim> | |||
</insert> | |||
<select id="countByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultType="java.lang.Long"> | |||
select count(*) from firm_usercert_channel | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</select> | |||
<update id="updateByExampleSelective" parameterType="map"> | |||
update firm_usercert_channel | |||
<set> | |||
<if test="record.uniqueid != null"> | |||
uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.clientid != null"> | |||
clientid = #{record.clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmId != null"> | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.channelType != null"> | |||
channel_type = #{record.channelType,jdbcType=BIT}, | |||
</if> | |||
</set> | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByExample" parameterType="map"> | |||
update firm_usercert_channel | |||
set uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
clientid = #{record.clientid,jdbcType=VARCHAR}, | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
channel_type = #{record.channelType,jdbcType=BIT} | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByPrimaryKeySelective"> | |||
update firm_usercert_channel | |||
<set> | |||
<if test="clientid != null"> | |||
clientid = #{clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="channelType != null"> | |||
channel_type = #{channelType,jdbcType=BIT}, | |||
</if> | |||
</set> | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<update id="updateByPrimaryKey"> | |||
update firm_usercert_channel | |||
set clientid = #{clientid,jdbcType=VARCHAR}, | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
channel_type = #{channelType,jdbcType=BIT} | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-16 12:05:36 ### --> | |||
<!-- Your codes goes here!!! --> | |||
<select id="selectOneByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List" /> | |||
from firm_usercert_channel | |||
<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_usercert_channel | |||
(clientid, firm_id, channel_type) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{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 into firm_usercert_channel ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
</foreach> | |||
) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'clientid'.toString() == column.value"> | |||
#{item.clientid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_id'.toString() == column.value"> | |||
#{item.firmId,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'channel_type'.toString() == column.value"> | |||
#{item.channelType,jdbcType=BIT} | |||
</if> | |||
</foreach> | |||
) | |||
</foreach> | |||
</insert> | |||
<resultMap id="BaseResultMap" type="com.trust.ywx.customer.dao.po.FirmUsercertChannel"> | |||
<!-- 主键id --> | |||
<id column="uniqueid" jdbcType="VARCHAR" property="uniqueid" /> | |||
<!-- 证书渠道对应厂商id --> | |||
<result column="clientid" jdbcType="VARCHAR" property="clientid" /> | |||
<!-- 厂商表主键 --> | |||
<result column="firm_id" jdbcType="VARCHAR" property="firmId" /> | |||
<!-- 渠道类型 0 app 1 sdk --> | |||
<result column="channel_type" jdbcType="BIT" property="channelType" /> | |||
</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, clientid, firm_id, channel_type | |||
</sql> | |||
<select id="selectByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultMap="BaseResultMap"> | |||
select | |||
<if test="distinct"> | |||
distinct | |||
</if> | |||
<include refid="Base_Column_List" /> | |||
from firm_usercert_channel | |||
<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_usercert_channel | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</select> | |||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | |||
delete from firm_usercert_channel | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</delete> | |||
<delete id="deleteByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample"> | |||
delete from firm_usercert_channel | |||
<if test="_parameter != null"> | |||
<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> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_usercert_channel | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="clientid != null"> | |||
clientid, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id, | |||
</if> | |||
<if test="channelType != null"> | |||
channel_type, | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="clientid != null"> | |||
#{clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
#{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="channelType != null"> | |||
#{channelType,jdbcType=BIT}, | |||
</if> | |||
</trim> | |||
</insert> | |||
<select id="countByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultType="java.lang.Long"> | |||
select count(*) from firm_usercert_channel | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</select> | |||
<update id="updateByExampleSelective" parameterType="map"> | |||
update firm_usercert_channel | |||
<set> | |||
<if test="record.uniqueid != null"> | |||
uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.clientid != null"> | |||
clientid = #{record.clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmId != null"> | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.channelType != null"> | |||
channel_type = #{record.channelType,jdbcType=BIT}, | |||
</if> | |||
</set> | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByExample" parameterType="map"> | |||
update firm_usercert_channel | |||
set uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
clientid = #{record.clientid,jdbcType=VARCHAR}, | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
channel_type = #{record.channelType,jdbcType=BIT} | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByPrimaryKeySelective"> | |||
update firm_usercert_channel | |||
<set> | |||
<if test="clientid != null"> | |||
clientid = #{clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="channelType != null"> | |||
channel_type = #{channelType,jdbcType=BIT}, | |||
</if> | |||
</set> | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<update id="updateByPrimaryKey"> | |||
update firm_usercert_channel | |||
set clientid = #{clientid,jdbcType=VARCHAR}, | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
channel_type = #{channelType,jdbcType=BIT} | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-16 12:01:41 ### --> | |||
<!-- Your codes goes here!!! --> | |||
<select id="selectOneByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List" /> | |||
from firm_usercert_channel | |||
<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_usercert_channel | |||
(clientid, firm_id, channel_type) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{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 into firm_usercert_channel ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
</foreach> | |||
) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'clientid'.toString() == column.value"> | |||
#{item.clientid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_id'.toString() == column.value"> | |||
#{item.firmId,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'channel_type'.toString() == column.value"> | |||
#{item.channelType,jdbcType=BIT} | |||
</if> | |||
</foreach> | |||
) | |||
</foreach> | |||
</insert> | |||
<resultMap id="BaseResultMap" type="com.trust.ywx.customer.dao.po.FirmUsercertChannel"> | |||
<!-- 主键id --> | |||
<id column="uniqueid" jdbcType="VARCHAR" property="uniqueid" /> | |||
<!-- 证书渠道对应厂商id --> | |||
<result column="clientid" jdbcType="VARCHAR" property="clientid" /> | |||
<!-- 厂商表主键 --> | |||
<result column="firm_id" jdbcType="VARCHAR" property="firmId" /> | |||
<!-- 渠道类型 0 app 1 sdk --> | |||
<result column="channel_type" jdbcType="BIT" property="channelType" /> | |||
</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, clientid, firm_id, channel_type | |||
</sql> | |||
<select id="selectByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultMap="BaseResultMap"> | |||
select | |||
<if test="distinct"> | |||
distinct | |||
</if> | |||
<include refid="Base_Column_List" /> | |||
from firm_usercert_channel | |||
<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_usercert_channel | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</select> | |||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | |||
delete from firm_usercert_channel | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</delete> | |||
<delete id="deleteByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample"> | |||
delete from firm_usercert_channel | |||
<if test="_parameter != null"> | |||
<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> | |||
<insert id="insertSelective" keyColumn="uniqueid" keyProperty="uniqueid" useGeneratedKeys="true"> | |||
insert into firm_usercert_channel | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="clientid != null"> | |||
clientid, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id, | |||
</if> | |||
<if test="channelType != null"> | |||
channel_type, | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="clientid != null"> | |||
#{clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
#{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="channelType != null"> | |||
#{channelType,jdbcType=BIT}, | |||
</if> | |||
</trim> | |||
</insert> | |||
<select id="countByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultType="java.lang.Long"> | |||
select count(*) from firm_usercert_channel | |||
<if test="_parameter != null"> | |||
<include refid="Example_Where_Clause" /> | |||
</if> | |||
</select> | |||
<update id="updateByExampleSelective" parameterType="map"> | |||
update firm_usercert_channel | |||
<set> | |||
<if test="record.uniqueid != null"> | |||
uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.clientid != null"> | |||
clientid = #{record.clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.firmId != null"> | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="record.channelType != null"> | |||
channel_type = #{record.channelType,jdbcType=BIT}, | |||
</if> | |||
</set> | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByExample" parameterType="map"> | |||
update firm_usercert_channel | |||
set uniqueid = #{record.uniqueid,jdbcType=VARCHAR}, | |||
clientid = #{record.clientid,jdbcType=VARCHAR}, | |||
firm_id = #{record.firmId,jdbcType=VARCHAR}, | |||
channel_type = #{record.channelType,jdbcType=BIT} | |||
<if test="_parameter != null"> | |||
<include refid="Update_By_Example_Where_Clause" /> | |||
</if> | |||
</update> | |||
<update id="updateByPrimaryKeySelective"> | |||
update firm_usercert_channel | |||
<set> | |||
<if test="clientid != null"> | |||
clientid = #{clientid,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="firmId != null"> | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="channelType != null"> | |||
channel_type = #{channelType,jdbcType=BIT}, | |||
</if> | |||
</set> | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<update id="updateByPrimaryKey"> | |||
update firm_usercert_channel | |||
set clientid = #{clientid,jdbcType=VARCHAR}, | |||
firm_id = #{firmId,jdbcType=VARCHAR}, | |||
channel_type = #{channelType,jdbcType=BIT} | |||
where uniqueid = #{uniqueid,jdbcType=VARCHAR} | |||
</update> | |||
<!-- ### 浠ヤ笂浠g爜鐢盡BG + CommentPlugin鑷姩鐢熸垚, 鐢熸垚鏃堕棿: 2022-06-16 12:01:28 ### --> | |||
<!-- Your codes goes here!!! --> | |||
<select id="selectOneByExample" parameterType="com.trust.ywx.customer.dao.po.FirmUsercertChannelExample" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List" /> | |||
from firm_usercert_channel | |||
<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_usercert_channel | |||
(clientid, firm_id, channel_type) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
(#{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 into firm_usercert_channel ( | |||
<foreach collection="selective" item="column" separator=","> | |||
${column.escapedColumnName} | |||
</foreach> | |||
) | |||
values | |||
<foreach collection="list" item="item" separator=","> | |||
( | |||
<foreach collection="selective" item="column" separator=","> | |||
<if test="'clientid'.toString() == column.value"> | |||
#{item.clientid,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'firm_id'.toString() == column.value"> | |||
#{item.firmId,jdbcType=VARCHAR} | |||
</if> | |||
<if test="'channel_type'.toString() == column.value"> | |||
#{item.channelType,jdbcType=BIT} | |||
</if> | |||
</foreach> | |||
) | |||
</foreach> | |||
</insert> | |||
</mapper> |
@@ -0,0 +1,19 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | |||
<mapper namespace="com.trust.ywx.customer.dao.mapper.custom.FirmCustomMapper"> | |||
<select id="getClientIdByKeyword" resultType="java.lang.String"> | |||
select firm_id | |||
from package_contract | |||
where (contract_number = #{keyword, jdbcType=VARCHAR} or contract_party = #{keyword, jdbcType=VARCHAR}) | |||
and is_del = 0 | |||
</select> | |||
<select id="getClientIdByChannelType" resultType="java.lang.String"> | |||
SELECT distinct client_id | |||
from firm_usercert_channel | |||
where | |||
channel_type = #{channelType, jdbcType=} | |||
</select> | |||
</mapper> |
@@ -15,5 +15,5 @@ | |||
<dubbo:registry protocol="nacos" address="${dubbo.registry.address.nacos}"/> | |||
<!-- <dubbo:registry address="zookeeper://192.168.126.21:2181"/>--> | |||
<!-- 提供服务 --> | |||
<dubbo:service interface="com.trust.ywx.customer.service.TrustCustomerService" ref="trustCustomerServiceimpl" timeout="30000" /> | |||
<!-- <dubbo:service interface="com.trust.ywx.customer.service.TrustCustomerService" ref="trustCustomerServiceimpl" timeout="30000" />--> | |||
</beans> |