Commit ce44cef6 by jianan

来佣比对修改比对状态

parent f6a2832c
package com.yd.api.agms.service;
import com.yd.api.agms.vo.fortune.*;
import com.yd.api.order.vo.SurrenderFortuneRequestVO;
import com.yd.api.order.vo.SurrenderFortuneResponseVO;
import com.yd.dal.entity.customer.AclCustomerFortune;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
/**
* @author xxy
......@@ -37,4 +41,9 @@ public interface AgmsFortuneService {
* @return 响应数据
*/
FortunePayToOrderResponseVO fortunePayToOrder(FortunePayToOrderRequestVO requestVO);
SurrenderFortuneResponseVO surrenderFortune(SurrenderFortuneRequestVO requestVO);
public void canPaymentUpDate(String paymentStatus, Long payoutBatchId , Long loginId, List<AclCustomerFortune> customerFortunes);
}
......@@ -2,18 +2,26 @@ package com.yd.api.agms.service.impl;
import com.yd.api.agms.service.AgmsFortuneService;
import com.yd.api.agms.vo.fortune.*;
import com.yd.api.order.vo.SurrenderFortuneRequestVO;
import com.yd.api.order.vo.SurrenderFortuneResponseVO;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.agms.fortune.*;
import com.yd.dal.entity.customer.AclCustomerFortune;
import com.yd.dal.entity.customer.AclCustomerFortunePay;
import com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch;
import com.yd.dal.entity.customer.AclCustomerFortuneWithdraw;
import com.yd.dal.entity.customer.AclPolicyholder;
import com.yd.dal.entity.meta.MdIncometaxRate;
import com.yd.dal.entity.order.PoOrder;
import com.yd.dal.entity.product.Product;
import com.yd.dal.entity.product.ProductPlan;
import com.yd.dal.service.agms.AclCustomerFortuneStatisticService;
import com.yd.dal.service.agms.AgmsFortuneDALService;
import com.yd.dal.service.customer.AclCustomerFortuneDALService;
import com.yd.dal.service.customer.AclCustomerFortunePayDALService;
import com.yd.dal.service.customer.AclCustomerFortunePayoutBatchDALService;
import com.yd.dal.service.customer.AclCustomerFortuneWithdrawDALService;
import com.yd.dal.service.customer.*;
import com.yd.dal.service.order.PoOrderDALService;
import com.yd.dal.service.product.ProductDALService;
import com.yd.dal.service.product.ProductPlanDALService;
import com.yd.rmi.ali.send.service.SendService;
import com.yd.rmi.cache.SystemConfigService;
import com.yd.util.CommonUtil;
import com.yd.util.config.ZHBErrorConfig;
......@@ -67,6 +75,19 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
this.customerFortunePayoutBatchDalService = customerFortunePayoutBatchDalService;
}
@Autowired
private PoOrderDALService poOrderDALService;
@Autowired
private AclCustomerFortuneStatisticService aclCustomerFortuneStatisticService;
@Autowired
private ProductDALService productDALService;
@Autowired
private ProductPlanDALService productPlanDALService;
@Autowired
private AclPolicyholderService aclPolicyholderService;
@Autowired
private SendService sendService;
@Override
public CommissionPayoutStatusUpdateResponseVO commissionPayoutStatusUpdate(CommissionPayoutStatusUpdateRequestVO requestVO) {
CommissionPayoutStatusUpdateResponseVO responseVO = new CommissionPayoutStatusUpdateResponseVO();
......@@ -126,7 +147,8 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
return customerFortunePayoutBatch.getId();
}
private void canPaymentUpDate(String paymentStatus, Long payoutBatchId , Long loginId, List<AclCustomerFortune> customerFortunes) {
@Override
public void canPaymentUpDate(String paymentStatus, Long payoutBatchId , Long loginId, List<AclCustomerFortune> customerFortunes) {
System.out.println("canPaymentUpDate");
//将查询出来的财富列表根据customerId经行分类
Map<Long,List<AclCustomerFortune>> customerFortuneMap = changeCustomerFortunesByFieldName(customerFortunes,"customerId");
......@@ -533,4 +555,99 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
return responseVO;
}
@Override
public SurrenderFortuneResponseVO surrenderFortune(SurrenderFortuneRequestVO requestVO) {
//退保,更新order中status=4 并更新statistic表
SurrenderFortuneResponseVO resp = new SurrenderFortuneResponseVO();
Long orderId = requestVO.getOrderId();
//判断此订单是否可以退保
//保单财富以进行提现申请,无法进行退保
PoOrder poOrder = poOrderDALService.findByIdAndStatus(orderId,3);
if(poOrder == null){
resp.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("830065")));
return resp;
}
//修改订单状态
poOrder.setStatus(4);
poOrderDALService.update(poOrder);
//财富此订单对应的财富
List<AclCustomerFortune> fortunes = agmsFortuneDalService.findByOrderId(orderId);
for (AclCustomerFortune fortune : fortunes){
//查询财富对应的customer的statistic
AclCustomerFortuneStatistic statistic = aclCustomerFortuneStatisticService.findByCustomerId(fortune.getCustomerId());
Double cancelledFortune = statistic.getCancelledFortune();
if (CommonUtil.isNullOrZero(cancelledFortune)){
cancelledFortune = 0.0;
}
cancelledFortune = BigDecimal.valueOf(cancelledFortune)
.add(fortune.getReferralAmount())
.doubleValue();
statistic.setCancelledFortune(cancelledFortune);
aclCustomerFortuneStatisticService.update(statistic);
//生成对应的负向记录 (commission_amount/fyc_amount/referral_amount)
AclCustomerFortune fortuneNew = new AclCustomerFortune();
org.springframework.beans.BeanUtils.copyProperties(fortune,fortuneNew);
Double commissionAmount = -fortune.getCommissionAmount().doubleValue();
fortuneNew.setCommissionAmount(BigDecimal.valueOf(commissionAmount));
Double fycAmount = -fortune.getFycAmount().doubleValue();
fortuneNew.setFycAmount(BigDecimal.valueOf(fycAmount));
Double referralAmount = -fortune.getReferralAmount().doubleValue();
fortuneNew.setReferralAmount(BigDecimal.valueOf(referralAmount));
fortuneNew.setCreatedAt(new Date());
fortuneNew.setWithdrawedId(null);
fortuneNew.setFortunePayedId(null);
fortuneNew.setId(null);
agmsFortuneDalService.save(fortuneNew);
}
//发送邮件
String email = systemConfigService.getSingleConfigValue("FortuneUpdateToAddress");
List<String> ccList = systemConfigService.getListConfigValue("FortuneUpdateToCCAddress");
String[] ccAddresses = ccList.toArray(new String[ccList.size()]);
PoOrder order = poOrderDALService.findByOrderId(orderId);
Integer configLevel = order.getConfigLevel();
String name = "";
if(configLevel == 2){
Long productId = order.getProductId();
Product product = productDALService.findById(productId);
name = product.getName();
}else if (configLevel == 3){
Long planId = order.getPlanId();
ProductPlan productPlan = productPlanDALService.findById(planId);
name = productPlan.getName();
}
String messageText = "订单id:" + order.getId() + "<br>" +
"订单号:" + order.getOrderNo() + "<br>" +
"产品名称:" + name + "<br>" +
"产品金额:" + order.getOrderPrice() + "<br>" ;
List<AclPolicyholder> policyHolders = aclPolicyholderService.findByOrderId(orderId);
for(AclPolicyholder policyHolder : policyHolders){
Integer type = policyHolder.getType();
if (type == 2){
messageText += "投标人:<br>" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;姓名:" + policyHolder.getName() +
"&nbsp;&nbsp;&nbsp;&nbsp;电话" + policyHolder.getMobileNo() + "<br>";
}else if (type == 3){
messageText += "被保人:<br>" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;姓名:" + policyHolder.getName();
if (!CommonUtil.isNullOrBlank(policyHolder.getMobileNo())) {
messageText += "&nbsp;&nbsp;&nbsp;&nbsp;电话" + policyHolder.getMobileNo() + "<br>";
}
}
}
String subject = "回退财富";
sendService.sendEmailOrSMS("email", email, "3", messageText, null, subject, ccAddresses, "回复财富", 99, null);
resp.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
return resp;
}
}
......@@ -40,10 +40,10 @@ public class LifeCommissionController {
*
* @return
*/
@RequestMapping("/checkComeCommission")
public Object checkComeCommission(@RequestBody CheckComeCommissionRequestVO requestVO){
@RequestMapping("/updateCommissionCheckStatus")
public Object updateCommissionCheckStatus(@RequestBody CheckComeCommissionRequestVO requestVO){
JsonResult result = new JsonResult();
CheckComeCommissionResponseVO responseVO = lifeCommissionService.checkComeCommission(requestVO);
CheckComeCommissionResponseVO responseVO = lifeCommissionService.updateCommissionCheckStatus(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
......
......@@ -8,5 +8,5 @@ import com.yd.api.commission.vo.lifecommission.QueryComeCommissionListRequestVO;
public interface LifeCommissionService {
ComeCommissionListResponseVO queryComeCommissionList(QueryComeCommissionListRequestVO requestVO);
CheckComeCommissionResponseVO checkComeCommission(CheckComeCommissionRequestVO requestVO);
CheckComeCommissionResponseVO updateCommissionCheckStatus(CheckComeCommissionRequestVO requestVO);
}
package com.yd.api.commission.service.impl;
import com.yd.api.agms.service.AgmsFortuneService;
import com.yd.api.order.vo.SurrenderFortuneRequestVO;
import com.yd.api.commission.service.LifeCommissionService;
import com.yd.api.commission.vo.lifecommission.*;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.commission.OrderCommissonCheck;
import com.yd.dal.entity.customer.AclCustomerFortune;
import com.yd.dal.entity.order.PoOrder;
import com.yd.dal.mapper.lifecommission.LifeCommissionMapper;
import com.yd.dal.service.agms.AgmsFortuneDALService;
import com.yd.dal.service.customer.AclCustomerFortuneDALService;
import com.yd.dal.service.order.PoOrderDALService;
import com.yd.util.CommonUtil;
import com.yd.util.config.ZHBErrorConfig;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -18,6 +25,15 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
@Autowired
private LifeCommissionMapper lifeCommissionMapper;
@Autowired
private AgmsFortuneDALService agmsFortuneDALService;
@Autowired
private AclCustomerFortuneDALService customerFortuneDalService;
@Autowired
private AgmsFortuneService agmsFortuneService;
@Autowired
private PoOrderDALService poOrderDALService;
@Override
public ComeCommissionListResponseVO queryComeCommissionList(QueryComeCommissionListRequestVO requestVO) {
......@@ -35,21 +51,56 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
}
@Override
public CheckComeCommissionResponseVO checkComeCommission(CheckComeCommissionRequestVO requestVO) {
public CheckComeCommissionResponseVO updateCommissionCheckStatus(CheckComeCommissionRequestVO requestVO) {
CheckComeCommissionResponseVO resp = new CheckComeCommissionResponseVO();
List<Long> orderIds = requestVO.getOrderIds();
String status = null;
String status = requestVO.getCheckStatus();
String loginId = requestVO.getLoginId();
try {
// 插入批次表信息
OrderCommissonCheck orderCommissionCheck= this.batchInsertOrderCommissionCheck(orderIds, loginId);
System.out.println("看看主键回写");
System.out.println(orderCommissionCheck);
this.checkComeCommission(orderIds, status, orderCommissionCheck);
//TODO 处理withdraw表 和 pay表
// 寿险经纪人的财富需要初始化withdraw和pay
if ("2".equals(status)) {//已比对
// 插入批次表信息
OrderCommissonCheck orderCommissionCheck= this.batchInsertOrderCommissionCheck(orderIds, loginId);
// 设置order记录的CommissionCheckId
this.setOrderCommissionCheckId(orderIds, status, orderCommissionCheck);
// 查询保单下的所有寿险经纪人的fortune记录
List<AclCustomerFortune> fortuneList = agmsFortuneDALService.queryLifeFortuneListByOrderIds(orderIds);
// 批量设置fortune为可发佣
fortuneList.forEach(f -> {
f.setCommissionPayoutStatus("2");
f.setCommissionPayoutAt(new Date());
f.setCommissionPayoutBy(Long.getLong(loginId));
});
customerFortuneDalService.updateBatch(fortuneList);
// 初始化withdraw和pay
agmsFortuneService.canPaymentUpDate("2", Long.getLong("-1"), Long.getLong(loginId), fortuneList);
} else if ("3".equals(status)) {//已退保
SurrenderFortuneRequestVO surrenderFortuneRequest = new SurrenderFortuneRequestVO();
for (Long orderId: orderIds) {
surrenderFortuneRequest.setOrderId(orderId);
agmsFortuneService.surrenderFortune(surrenderFortuneRequest);
}
} else {//待来佣
// 设置order记录为待来佣
List<PoOrder> orders = poOrderDALService.findByIds(orderIds);
orders.forEach(o -> {
o.setCommissionCheckId(null);
o.setCommissionCheckStatus("1");
o.setCommissionCheckAt(new Date());
o.setCommissionCheckBy(Long.getLong(loginId));
poOrderDALService.update(o);
});
// 查询保单下的所有寿险经纪人的fortune记录
List<AclCustomerFortune> fortuneList = agmsFortuneDALService.queryLifeFortuneListByOrderIds(orderIds);
// 批量设置fortune为b不可发佣
fortuneList.forEach(f -> {
f.setCommissionPayoutStatus("1");
f.setCommissionPayoutAt(new Date());
f.setCommissionPayoutBy(Long.getLong(loginId));
});
customerFortuneDalService.updateBatch(fortuneList);
}
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) {
......@@ -59,7 +110,7 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
return resp;
}
private void checkComeCommission(List<Long> orderIds, String status, OrderCommissonCheck orderCommissionCheck) {
private void setOrderCommissionCheckId(List<Long> orderIds, String status, OrderCommissonCheck orderCommissionCheck) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("checkId", orderCommissionCheck.getId());
......@@ -67,7 +118,7 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
paramMap.put("checkAt", orderCommissionCheck.getCreatedAt());
paramMap.put("checkBy", orderCommissionCheck.getCreatedBy());
lifeCommissionMapper.checkComeCommission(orderIds, paramMap);
lifeCommissionMapper.setOrderCommissionCheckId(orderIds, paramMap);
}
private OrderCommissonCheck batchInsertOrderCommissionCheck(List<Long> orderIds, String loginId) {
......
package com.yd.api.order.vo;
public class SurrenderFortuneRequestVO {
private Long orderId;
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
}
package com.yd.api.order.vo;
import com.yd.api.result.CommonResult;
public class SurrenderFortuneResponseVO {
private CommonResult commonResult;
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.yd.dal.entity.agms.fortune;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* ag_acl_customer_fortune_statistic
* @author
*/
public class AclCustomerFortuneStatistic implements Serializable {
/**
* serial id
*/
private Long id;
/**
* FK ag_acl_customer.id
*/
private Long customerId;
/**
* 历史累积财富
*/
private Double accumulatedFortune;
/**
* 已提现财富
*/
private Double drawnFortune;
/**
* 已退保财富
*/
private Double cancelledFortune;
private Date createdAt;
private Long createdBy;
private Date updatedAt;
/**
* 变更者 id
*/
private Long updatedBy;
/**
* 注释或补充
*/
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Double getAccumulatedFortune() {
return accumulatedFortune;
}
public void setAccumulatedFortune(Double accumulatedFortune) {
this.accumulatedFortune = accumulatedFortune;
}
public Double getDrawnFortune() {
return drawnFortune;
}
public void setDrawnFortune(Double drawnFortune) {
this.drawnFortune = drawnFortune;
}
public Double getCancelledFortune() {
return cancelledFortune;
}
public void setCancelledFortune(Double cancelledFortune) {
this.cancelledFortune = cancelledFortune;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
AclCustomerFortuneStatistic other = (AclCustomerFortuneStatistic) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
&& (this.getAccumulatedFortune() == null ? other.getAccumulatedFortune() == null : this.getAccumulatedFortune().equals(other.getAccumulatedFortune()))
&& (this.getDrawnFortune() == null ? other.getDrawnFortune() == null : this.getDrawnFortune().equals(other.getDrawnFortune()))
&& (this.getCancelledFortune() == null ? other.getCancelledFortune() == null : this.getCancelledFortune().equals(other.getCancelledFortune()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
&& (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
result = prime * result + ((getAccumulatedFortune() == null) ? 0 : getAccumulatedFortune().hashCode());
result = prime * result + ((getDrawnFortune() == null) ? 0 : getDrawnFortune().hashCode());
result = prime * result + ((getCancelledFortune() == null) ? 0 : getCancelledFortune().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", customerId=").append(customerId);
sb.append(", accumulatedFortune=").append(accumulatedFortune);
sb.append(", drawnFortune=").append(drawnFortune);
sb.append(", cancelledFortune=").append(cancelledFortune);
sb.append(", createdAt=").append(createdAt);
sb.append(", createdBy=").append(createdBy);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", updatedBy=").append(updatedBy);
sb.append(", remark=").append(remark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.yd.dal.entity.customer;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* ag_acl_policyholder
* @author
*/
public class AclPolicyholder implements Serializable {
/**
* serial id
*/
private Long id;
/**
* 规则层级 1-insurer 2-product 3-plan
*/
private Integer configLevel;
/**
* 产品ID, FK ag_product.id
*/
private Long productId;
/**
* 方案ID
*/
private Long planId;
/**
* FK ag_acl_customer.id
*/
private Long customerId;
/**
* FK ag_po_order.id
*/
private Long orderId;
/**
* 单人保费
*/
private BigDecimal policyUnitPrice;
/**
* 1. customer 2.policyholder 3. insured 4.partener 5.owmer 6.guardian, 7.agent
*/
private Integer type;
/**
* 7.agent,多个经纪人时他们的关系,销售人员,技术支持等
*/
private String agentRelation;
/**
* 是否已经只能核保过,核保结果记在status中,default:0没核过,1已经核过
*/
private Integer hasAiConfirmed;
/**
* 核保結果(2:用户取消;1-正常;0-拒保)
*/
private Integer status;
/**
* 有无社保(1-有;0-无)
*/
private Integer isSocialInsured;
private String name;
/**
* 英文名称
*/
private String englishName;
private String mobileNo;
/**
* email address
*/
private String email;
/**
* 投保健康问卷id字符串
*/
private String underwriteQuestionId;
/**
* FK ag_md_province.id 省
*/
private Long provinceId;
/**
* 省名字
*/
private String provinceName;
/**
* FK ag_md_district.id 县(区)
*/
private Long districtId;
/**
* 县(区)名字
*/
private String districtName;
/**
* FK ag_md_city.id 城市
*/
private Long cityId;
/**
* 城市名字(出生地)
*/
private String cityName;
/**
* FK ag_md_province.id 省(出生地)
*/
private Long birthProvinceId;
/**
* 省名字(出生地)
*/
private String birthProvinceName;
/**
* FK ag_md_city.id 城市(出生地)
*/
private Long birthCityId;
/**
* 城市名字(出生地)
*/
private String birthCityName;
/**
* FK ag_md_district.id 县(区)(出生地)
*/
private Long birthDistrictId;
/**
* 县(区)名字(出生地)
*/
private String birthDistrictName;
/**
* mailing address(出生地)
*/
private String birthAddress;
/**
* mailing address
*/
private String address;
/**
* FK ag_md_industry_occupation.id
*/
private Long occupationId;
/**
* 职业名称
*/
private String occupationName;
/**
* FK ag_md_id_type.id
*/
private Long idTypeId;
/**
* 证件类型
*/
private String idType;
private String idNo;
/**
* 1=Male, 2=Female
*/
private Integer gender;
/**
* FK ag_md_relation.id
*/
private Long relationId;
/**
* 投保人被保人关系
*/
private String relationType;
/**
* 0000-00-00
*/
private Date birthDate;
private Integer insuredSeq;
/**
* flag
*/
private String flag;
/**
* 被保人身高
*/
private BigDecimal insureeHeight;
/**
* 被保人体重
*/
private BigDecimal insureeWeight;
/**
* 被保人数量(线下单)
*/
private Integer insureeTotal;
/**
* 被保人证件是否长期有效? 0=No AFTER `is_social_insured` ; 1=Yes
*/
private Integer isIdLongterm;
/**
* 证件有效日期 (起)
*/
private Date idEffectiveFrom;
/**
* 证件有效日期 (终)
*/
private Date idEffectiveTo;
/**
* FK ag_md_bank.id
*/
private Long bankId;
/**
* 开户银行名= ag_md_bank.bank_name
*/
private String bankName;
/**
* 持卡人名
*/
private String bankHolder;
private String bankNo;
/**
* 绑定银行卡手机号
*/
private String bankMobileNo;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
/**
* 修改人
*/
private Long updatedBy;
/**
* 身份证区域id FK ag_md_id_areamap.id
*/
private Long idAreamapId;
private String idAreamap;
/**
* 居民税收类型 1.仅为中国税收居民 2.仅为非居民 3.既是中国税收居民又是其他国家(地区)税收居民
*/
private Integer residentTaxType;
/**
* 身份证正面照片地址
*/
private String idCardFront;
/**
* 身份证反面照片地址
*/
private String idCardBack;
/**
* 收入来源 工资=gz 奖金或分红=jj 投资=tz 其他=其他项录入值
*/
private String salaryType;
/**
* 去年总收入 (单位:万元)
*/
private BigDecimal salary;
private Long bankCityId;
/**
* 证件备份字段
*/
private String idNoBack;
/**
* 投被保人邮编
*/
private String postCode;
/**
* 投被保人为单位时的联系人
*/
private String contactName;
/**
* 备注,京东安联智能核保时,放保险公司返回的有疾病被保人的疾病状况
*/
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getConfigLevel() {
return configLevel;
}
public void setConfigLevel(Integer configLevel) {
this.configLevel = configLevel;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public Long getPlanId() {
return planId;
}
public void setPlanId(Long planId) {
this.planId = planId;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public BigDecimal getPolicyUnitPrice() {
return policyUnitPrice;
}
public void setPolicyUnitPrice(BigDecimal policyUnitPrice) {
this.policyUnitPrice = policyUnitPrice;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getAgentRelation() {
return agentRelation;
}
public void setAgentRelation(String agentRelation) {
this.agentRelation = agentRelation;
}
public Integer getHasAiConfirmed() {
return hasAiConfirmed;
}
public void setHasAiConfirmed(Integer hasAiConfirmed) {
this.hasAiConfirmed = hasAiConfirmed;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getIsSocialInsured() {
return isSocialInsured;
}
public void setIsSocialInsured(Integer isSocialInsured) {
this.isSocialInsured = isSocialInsured;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEnglishName() {
return englishName;
}
public void setEnglishName(String englishName) {
this.englishName = englishName;
}
public String getMobileNo() {
return mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getUnderwriteQuestionId() {
return underwriteQuestionId;
}
public void setUnderwriteQuestionId(String underwriteQuestionId) {
this.underwriteQuestionId = underwriteQuestionId;
}
public Long getProvinceId() {
return provinceId;
}
public void setProvinceId(Long provinceId) {
this.provinceId = provinceId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public Long getDistrictId() {
return districtId;
}
public void setDistrictId(Long districtId) {
this.districtId = districtId;
}
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
public Long getCityId() {
return cityId;
}
public void setCityId(Long cityId) {
this.cityId = cityId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public Long getBirthProvinceId() {
return birthProvinceId;
}
public void setBirthProvinceId(Long birthProvinceId) {
this.birthProvinceId = birthProvinceId;
}
public String getBirthProvinceName() {
return birthProvinceName;
}
public void setBirthProvinceName(String birthProvinceName) {
this.birthProvinceName = birthProvinceName;
}
public Long getBirthCityId() {
return birthCityId;
}
public void setBirthCityId(Long birthCityId) {
this.birthCityId = birthCityId;
}
public String getBirthCityName() {
return birthCityName;
}
public void setBirthCityName(String birthCityName) {
this.birthCityName = birthCityName;
}
public Long getBirthDistrictId() {
return birthDistrictId;
}
public void setBirthDistrictId(Long birthDistrictId) {
this.birthDistrictId = birthDistrictId;
}
public String getBirthDistrictName() {
return birthDistrictName;
}
public void setBirthDistrictName(String birthDistrictName) {
this.birthDistrictName = birthDistrictName;
}
public String getBirthAddress() {
return birthAddress;
}
public void setBirthAddress(String birthAddress) {
this.birthAddress = birthAddress;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Long getOccupationId() {
return occupationId;
}
public void setOccupationId(Long occupationId) {
this.occupationId = occupationId;
}
public String getOccupationName() {
return occupationName;
}
public void setOccupationName(String occupationName) {
this.occupationName = occupationName;
}
public Long getIdTypeId() {
return idTypeId;
}
public void setIdTypeId(Long idTypeId) {
this.idTypeId = idTypeId;
}
public String getIdType() {
return idType;
}
public void setIdType(String idType) {
this.idType = idType;
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
public Integer getGender() {
return gender;
}
public void setGender(Integer gender) {
this.gender = gender;
}
public Long getRelationId() {
return relationId;
}
public void setRelationId(Long relationId) {
this.relationId = relationId;
}
public String getRelationType() {
return relationType;
}
public void setRelationType(String relationType) {
this.relationType = relationType;
}
public Date getBirthDate() {
return birthDate;
}
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
public Integer getInsuredSeq() {
return insuredSeq;
}
public void setInsuredSeq(Integer insuredSeq) {
this.insuredSeq = insuredSeq;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public BigDecimal getInsureeHeight() {
return insureeHeight;
}
public void setInsureeHeight(BigDecimal insureeHeight) {
this.insureeHeight = insureeHeight;
}
public BigDecimal getInsureeWeight() {
return insureeWeight;
}
public void setInsureeWeight(BigDecimal insureeWeight) {
this.insureeWeight = insureeWeight;
}
public Integer getInsureeTotal() {
return insureeTotal;
}
public void setInsureeTotal(Integer insureeTotal) {
this.insureeTotal = insureeTotal;
}
public Integer getIsIdLongterm() {
return isIdLongterm;
}
public void setIsIdLongterm(Integer isIdLongterm) {
this.isIdLongterm = isIdLongterm;
}
public Date getIdEffectiveFrom() {
return idEffectiveFrom;
}
public void setIdEffectiveFrom(Date idEffectiveFrom) {
this.idEffectiveFrom = idEffectiveFrom;
}
public Date getIdEffectiveTo() {
return idEffectiveTo;
}
public void setIdEffectiveTo(Date idEffectiveTo) {
this.idEffectiveTo = idEffectiveTo;
}
public Long getBankId() {
return bankId;
}
public void setBankId(Long bankId) {
this.bankId = bankId;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getBankHolder() {
return bankHolder;
}
public void setBankHolder(String bankHolder) {
this.bankHolder = bankHolder;
}
public String getBankNo() {
return bankNo;
}
public void setBankNo(String bankNo) {
this.bankNo = bankNo;
}
public String getBankMobileNo() {
return bankMobileNo;
}
public void setBankMobileNo(String bankMobileNo) {
this.bankMobileNo = bankMobileNo;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
public Long getIdAreamapId() {
return idAreamapId;
}
public void setIdAreamapId(Long idAreamapId) {
this.idAreamapId = idAreamapId;
}
public String getIdAreamap() {
return idAreamap;
}
public void setIdAreamap(String idAreamap) {
this.idAreamap = idAreamap;
}
public Integer getResidentTaxType() {
return residentTaxType;
}
public void setResidentTaxType(Integer residentTaxType) {
this.residentTaxType = residentTaxType;
}
public String getIdCardFront() {
return idCardFront;
}
public void setIdCardFront(String idCardFront) {
this.idCardFront = idCardFront;
}
public String getIdCardBack() {
return idCardBack;
}
public void setIdCardBack(String idCardBack) {
this.idCardBack = idCardBack;
}
public String getSalaryType() {
return salaryType;
}
public void setSalaryType(String salaryType) {
this.salaryType = salaryType;
}
public BigDecimal getSalary() {
return salary;
}
public void setSalary(BigDecimal salary) {
this.salary = salary;
}
public Long getBankCityId() {
return bankCityId;
}
public void setBankCityId(Long bankCityId) {
this.bankCityId = bankCityId;
}
public String getIdNoBack() {
return idNoBack;
}
public void setIdNoBack(String idNoBack) {
this.idNoBack = idNoBack;
}
public String getPostCode() {
return postCode;
}
public void setPostCode(String postCode) {
this.postCode = postCode;
}
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
this.contactName = contactName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
AclPolicyholder other = (AclPolicyholder) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getConfigLevel() == null ? other.getConfigLevel() == null : this.getConfigLevel().equals(other.getConfigLevel()))
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getPlanId() == null ? other.getPlanId() == null : this.getPlanId().equals(other.getPlanId()))
&& (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getPolicyUnitPrice() == null ? other.getPolicyUnitPrice() == null : this.getPolicyUnitPrice().equals(other.getPolicyUnitPrice()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getAgentRelation() == null ? other.getAgentRelation() == null : this.getAgentRelation().equals(other.getAgentRelation()))
&& (this.getHasAiConfirmed() == null ? other.getHasAiConfirmed() == null : this.getHasAiConfirmed().equals(other.getHasAiConfirmed()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getIsSocialInsured() == null ? other.getIsSocialInsured() == null : this.getIsSocialInsured().equals(other.getIsSocialInsured()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getEnglishName() == null ? other.getEnglishName() == null : this.getEnglishName().equals(other.getEnglishName()))
&& (this.getMobileNo() == null ? other.getMobileNo() == null : this.getMobileNo().equals(other.getMobileNo()))
&& (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
&& (this.getUnderwriteQuestionId() == null ? other.getUnderwriteQuestionId() == null : this.getUnderwriteQuestionId().equals(other.getUnderwriteQuestionId()))
&& (this.getProvinceId() == null ? other.getProvinceId() == null : this.getProvinceId().equals(other.getProvinceId()))
&& (this.getProvinceName() == null ? other.getProvinceName() == null : this.getProvinceName().equals(other.getProvinceName()))
&& (this.getDistrictId() == null ? other.getDistrictId() == null : this.getDistrictId().equals(other.getDistrictId()))
&& (this.getDistrictName() == null ? other.getDistrictName() == null : this.getDistrictName().equals(other.getDistrictName()))
&& (this.getCityId() == null ? other.getCityId() == null : this.getCityId().equals(other.getCityId()))
&& (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName()))
&& (this.getBirthProvinceId() == null ? other.getBirthProvinceId() == null : this.getBirthProvinceId().equals(other.getBirthProvinceId()))
&& (this.getBirthProvinceName() == null ? other.getBirthProvinceName() == null : this.getBirthProvinceName().equals(other.getBirthProvinceName()))
&& (this.getBirthCityId() == null ? other.getBirthCityId() == null : this.getBirthCityId().equals(other.getBirthCityId()))
&& (this.getBirthCityName() == null ? other.getBirthCityName() == null : this.getBirthCityName().equals(other.getBirthCityName()))
&& (this.getBirthDistrictId() == null ? other.getBirthDistrictId() == null : this.getBirthDistrictId().equals(other.getBirthDistrictId()))
&& (this.getBirthDistrictName() == null ? other.getBirthDistrictName() == null : this.getBirthDistrictName().equals(other.getBirthDistrictName()))
&& (this.getBirthAddress() == null ? other.getBirthAddress() == null : this.getBirthAddress().equals(other.getBirthAddress()))
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
&& (this.getOccupationId() == null ? other.getOccupationId() == null : this.getOccupationId().equals(other.getOccupationId()))
&& (this.getOccupationName() == null ? other.getOccupationName() == null : this.getOccupationName().equals(other.getOccupationName()))
&& (this.getIdTypeId() == null ? other.getIdTypeId() == null : this.getIdTypeId().equals(other.getIdTypeId()))
&& (this.getIdType() == null ? other.getIdType() == null : this.getIdType().equals(other.getIdType()))
&& (this.getIdNo() == null ? other.getIdNo() == null : this.getIdNo().equals(other.getIdNo()))
&& (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
&& (this.getRelationId() == null ? other.getRelationId() == null : this.getRelationId().equals(other.getRelationId()))
&& (this.getRelationType() == null ? other.getRelationType() == null : this.getRelationType().equals(other.getRelationType()))
&& (this.getBirthDate() == null ? other.getBirthDate() == null : this.getBirthDate().equals(other.getBirthDate()))
&& (this.getInsuredSeq() == null ? other.getInsuredSeq() == null : this.getInsuredSeq().equals(other.getInsuredSeq()))
&& (this.getFlag() == null ? other.getFlag() == null : this.getFlag().equals(other.getFlag()))
&& (this.getInsureeHeight() == null ? other.getInsureeHeight() == null : this.getInsureeHeight().equals(other.getInsureeHeight()))
&& (this.getInsureeWeight() == null ? other.getInsureeWeight() == null : this.getInsureeWeight().equals(other.getInsureeWeight()))
&& (this.getInsureeTotal() == null ? other.getInsureeTotal() == null : this.getInsureeTotal().equals(other.getInsureeTotal()))
&& (this.getIsIdLongterm() == null ? other.getIsIdLongterm() == null : this.getIsIdLongterm().equals(other.getIsIdLongterm()))
&& (this.getIdEffectiveFrom() == null ? other.getIdEffectiveFrom() == null : this.getIdEffectiveFrom().equals(other.getIdEffectiveFrom()))
&& (this.getIdEffectiveTo() == null ? other.getIdEffectiveTo() == null : this.getIdEffectiveTo().equals(other.getIdEffectiveTo()))
&& (this.getBankId() == null ? other.getBankId() == null : this.getBankId().equals(other.getBankId()))
&& (this.getBankName() == null ? other.getBankName() == null : this.getBankName().equals(other.getBankName()))
&& (this.getBankHolder() == null ? other.getBankHolder() == null : this.getBankHolder().equals(other.getBankHolder()))
&& (this.getBankNo() == null ? other.getBankNo() == null : this.getBankNo().equals(other.getBankNo()))
&& (this.getBankMobileNo() == null ? other.getBankMobileNo() == null : this.getBankMobileNo().equals(other.getBankMobileNo()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
&& (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()))
&& (this.getIdAreamapId() == null ? other.getIdAreamapId() == null : this.getIdAreamapId().equals(other.getIdAreamapId()))
&& (this.getIdAreamap() == null ? other.getIdAreamap() == null : this.getIdAreamap().equals(other.getIdAreamap()))
&& (this.getResidentTaxType() == null ? other.getResidentTaxType() == null : this.getResidentTaxType().equals(other.getResidentTaxType()))
&& (this.getIdCardFront() == null ? other.getIdCardFront() == null : this.getIdCardFront().equals(other.getIdCardFront()))
&& (this.getIdCardBack() == null ? other.getIdCardBack() == null : this.getIdCardBack().equals(other.getIdCardBack()))
&& (this.getSalaryType() == null ? other.getSalaryType() == null : this.getSalaryType().equals(other.getSalaryType()))
&& (this.getSalary() == null ? other.getSalary() == null : this.getSalary().equals(other.getSalary()))
&& (this.getBankCityId() == null ? other.getBankCityId() == null : this.getBankCityId().equals(other.getBankCityId()))
&& (this.getIdNoBack() == null ? other.getIdNoBack() == null : this.getIdNoBack().equals(other.getIdNoBack()))
&& (this.getPostCode() == null ? other.getPostCode() == null : this.getPostCode().equals(other.getPostCode()))
&& (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getConfigLevel() == null) ? 0 : getConfigLevel().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getPlanId() == null) ? 0 : getPlanId().hashCode());
result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getPolicyUnitPrice() == null) ? 0 : getPolicyUnitPrice().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getAgentRelation() == null) ? 0 : getAgentRelation().hashCode());
result = prime * result + ((getHasAiConfirmed() == null) ? 0 : getHasAiConfirmed().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getIsSocialInsured() == null) ? 0 : getIsSocialInsured().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getEnglishName() == null) ? 0 : getEnglishName().hashCode());
result = prime * result + ((getMobileNo() == null) ? 0 : getMobileNo().hashCode());
result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
result = prime * result + ((getUnderwriteQuestionId() == null) ? 0 : getUnderwriteQuestionId().hashCode());
result = prime * result + ((getProvinceId() == null) ? 0 : getProvinceId().hashCode());
result = prime * result + ((getProvinceName() == null) ? 0 : getProvinceName().hashCode());
result = prime * result + ((getDistrictId() == null) ? 0 : getDistrictId().hashCode());
result = prime * result + ((getDistrictName() == null) ? 0 : getDistrictName().hashCode());
result = prime * result + ((getCityId() == null) ? 0 : getCityId().hashCode());
result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode());
result = prime * result + ((getBirthProvinceId() == null) ? 0 : getBirthProvinceId().hashCode());
result = prime * result + ((getBirthProvinceName() == null) ? 0 : getBirthProvinceName().hashCode());
result = prime * result + ((getBirthCityId() == null) ? 0 : getBirthCityId().hashCode());
result = prime * result + ((getBirthCityName() == null) ? 0 : getBirthCityName().hashCode());
result = prime * result + ((getBirthDistrictId() == null) ? 0 : getBirthDistrictId().hashCode());
result = prime * result + ((getBirthDistrictName() == null) ? 0 : getBirthDistrictName().hashCode());
result = prime * result + ((getBirthAddress() == null) ? 0 : getBirthAddress().hashCode());
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
result = prime * result + ((getOccupationId() == null) ? 0 : getOccupationId().hashCode());
result = prime * result + ((getOccupationName() == null) ? 0 : getOccupationName().hashCode());
result = prime * result + ((getIdTypeId() == null) ? 0 : getIdTypeId().hashCode());
result = prime * result + ((getIdType() == null) ? 0 : getIdType().hashCode());
result = prime * result + ((getIdNo() == null) ? 0 : getIdNo().hashCode());
result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
result = prime * result + ((getRelationId() == null) ? 0 : getRelationId().hashCode());
result = prime * result + ((getRelationType() == null) ? 0 : getRelationType().hashCode());
result = prime * result + ((getBirthDate() == null) ? 0 : getBirthDate().hashCode());
result = prime * result + ((getInsuredSeq() == null) ? 0 : getInsuredSeq().hashCode());
result = prime * result + ((getFlag() == null) ? 0 : getFlag().hashCode());
result = prime * result + ((getInsureeHeight() == null) ? 0 : getInsureeHeight().hashCode());
result = prime * result + ((getInsureeWeight() == null) ? 0 : getInsureeWeight().hashCode());
result = prime * result + ((getInsureeTotal() == null) ? 0 : getInsureeTotal().hashCode());
result = prime * result + ((getIsIdLongterm() == null) ? 0 : getIsIdLongterm().hashCode());
result = prime * result + ((getIdEffectiveFrom() == null) ? 0 : getIdEffectiveFrom().hashCode());
result = prime * result + ((getIdEffectiveTo() == null) ? 0 : getIdEffectiveTo().hashCode());
result = prime * result + ((getBankId() == null) ? 0 : getBankId().hashCode());
result = prime * result + ((getBankName() == null) ? 0 : getBankName().hashCode());
result = prime * result + ((getBankHolder() == null) ? 0 : getBankHolder().hashCode());
result = prime * result + ((getBankNo() == null) ? 0 : getBankNo().hashCode());
result = prime * result + ((getBankMobileNo() == null) ? 0 : getBankMobileNo().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
result = prime * result + ((getIdAreamapId() == null) ? 0 : getIdAreamapId().hashCode());
result = prime * result + ((getIdAreamap() == null) ? 0 : getIdAreamap().hashCode());
result = prime * result + ((getResidentTaxType() == null) ? 0 : getResidentTaxType().hashCode());
result = prime * result + ((getIdCardFront() == null) ? 0 : getIdCardFront().hashCode());
result = prime * result + ((getIdCardBack() == null) ? 0 : getIdCardBack().hashCode());
result = prime * result + ((getSalaryType() == null) ? 0 : getSalaryType().hashCode());
result = prime * result + ((getSalary() == null) ? 0 : getSalary().hashCode());
result = prime * result + ((getBankCityId() == null) ? 0 : getBankCityId().hashCode());
result = prime * result + ((getIdNoBack() == null) ? 0 : getIdNoBack().hashCode());
result = prime * result + ((getPostCode() == null) ? 0 : getPostCode().hashCode());
result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", configLevel=").append(configLevel);
sb.append(", productId=").append(productId);
sb.append(", planId=").append(planId);
sb.append(", customerId=").append(customerId);
sb.append(", orderId=").append(orderId);
sb.append(", policyUnitPrice=").append(policyUnitPrice);
sb.append(", type=").append(type);
sb.append(", agentRelation=").append(agentRelation);
sb.append(", hasAiConfirmed=").append(hasAiConfirmed);
sb.append(", status=").append(status);
sb.append(", isSocialInsured=").append(isSocialInsured);
sb.append(", name=").append(name);
sb.append(", englishName=").append(englishName);
sb.append(", mobileNo=").append(mobileNo);
sb.append(", email=").append(email);
sb.append(", underwriteQuestionId=").append(underwriteQuestionId);
sb.append(", provinceId=").append(provinceId);
sb.append(", provinceName=").append(provinceName);
sb.append(", districtId=").append(districtId);
sb.append(", districtName=").append(districtName);
sb.append(", cityId=").append(cityId);
sb.append(", cityName=").append(cityName);
sb.append(", birthProvinceId=").append(birthProvinceId);
sb.append(", birthProvinceName=").append(birthProvinceName);
sb.append(", birthCityId=").append(birthCityId);
sb.append(", birthCityName=").append(birthCityName);
sb.append(", birthDistrictId=").append(birthDistrictId);
sb.append(", birthDistrictName=").append(birthDistrictName);
sb.append(", birthAddress=").append(birthAddress);
sb.append(", address=").append(address);
sb.append(", occupationId=").append(occupationId);
sb.append(", occupationName=").append(occupationName);
sb.append(", idTypeId=").append(idTypeId);
sb.append(", idType=").append(idType);
sb.append(", idNo=").append(idNo);
sb.append(", gender=").append(gender);
sb.append(", relationId=").append(relationId);
sb.append(", relationType=").append(relationType);
sb.append(", birthDate=").append(birthDate);
sb.append(", insuredSeq=").append(insuredSeq);
sb.append(", flag=").append(flag);
sb.append(", insureeHeight=").append(insureeHeight);
sb.append(", insureeWeight=").append(insureeWeight);
sb.append(", insureeTotal=").append(insureeTotal);
sb.append(", isIdLongterm=").append(isIdLongterm);
sb.append(", idEffectiveFrom=").append(idEffectiveFrom);
sb.append(", idEffectiveTo=").append(idEffectiveTo);
sb.append(", bankId=").append(bankId);
sb.append(", bankName=").append(bankName);
sb.append(", bankHolder=").append(bankHolder);
sb.append(", bankNo=").append(bankNo);
sb.append(", bankMobileNo=").append(bankMobileNo);
sb.append(", createdAt=").append(createdAt);
sb.append(", createdBy=").append(createdBy);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", updatedBy=").append(updatedBy);
sb.append(", idAreamapId=").append(idAreamapId);
sb.append(", idAreamap=").append(idAreamap);
sb.append(", residentTaxType=").append(residentTaxType);
sb.append(", idCardFront=").append(idCardFront);
sb.append(", idCardBack=").append(idCardBack);
sb.append(", salaryType=").append(salaryType);
sb.append(", salary=").append(salary);
sb.append(", bankCityId=").append(bankCityId);
sb.append(", idNoBack=").append(idNoBack);
sb.append(", postCode=").append(postCode);
sb.append(", contactName=").append(contactName);
sb.append(", remark=").append(remark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
......@@ -387,6 +387,11 @@ public class PoOrder {
*/
private String autoPayFlag;
private Long commissionCheckId;
private String commissionCheckStatus;
private Date commissionCheckAt;
private Long commissionCheckBy;
public Long getId() {
return id;
}
......@@ -1026,4 +1031,36 @@ public class PoOrder {
public void setAutoPayFlag(String autoPayFlag) {
this.autoPayFlag = autoPayFlag;
}
public Long getCommissionCheckId() {
return commissionCheckId;
}
public void setCommissionCheckId(Long commissionCheckId) {
this.commissionCheckId = commissionCheckId;
}
public String getCommissionCheckStatus() {
return commissionCheckStatus;
}
public void setCommissionCheckStatus(String commissionCheckStatus) {
this.commissionCheckStatus = commissionCheckStatus;
}
public Date getCommissionCheckAt() {
return commissionCheckAt;
}
public void setCommissionCheckAt(Date commissionCheckAt) {
this.commissionCheckAt = commissionCheckAt;
}
public Long getCommissionCheckBy() {
return commissionCheckBy;
}
public void setCommissionCheckBy(Long commissionCheckBy) {
this.commissionCheckBy = commissionCheckBy;
}
}
\ No newline at end of file
package com.yd.dal.entity.sms;
import java.io.Serializable;
import java.util.Date;
/**
* ag_sms_record
* @author
*/
public class ShortMessageSendRecord implements Serializable {
/**
* serial id
*/
private Long id;
/**
* 手机号
*/
private String mobileNo;
/**
* 业务类型 1订单保存
*/
private String businessType;
/**
* 业务ID
*/
private String businessId;
/**
* 短信类型 1-校验码 2-支付提醒短信 3-承保成功短信 4-生日祝福短信 5-续保提现短信 0-临时短信
*/
private String smsType;
/**
* 短信类容
*/
private String smsContent;
/**
* 校验码
*/
private String verificationCode;
/**
* 发送时间
*/
private Date sendTime;
/**
* 失效时间
*/
private Date expireTime;
/**
* 发送状态 1成功 0失败
*/
private String sendStatus;
/**
* 发送返回信息
*/
private String returnMessage;
/**
* request_id
*/
private String requestId;
/**
* biz_id
*/
private String bizId;
/**
* 短信模板code
*/
private String templateCode;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getMobileNo() {
return mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
}
public String getBusinessType() {
return businessType;
}
public void setBusinessType(String businessType) {
this.businessType = businessType;
}
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public String getSmsType() {
return smsType;
}
public void setSmsType(String smsType) {
this.smsType = smsType;
}
public String getSmsContent() {
return smsContent;
}
public void setSmsContent(String smsContent) {
this.smsContent = smsContent;
}
public String getVerificationCode() {
return verificationCode;
}
public void setVerificationCode(String verificationCode) {
this.verificationCode = verificationCode;
}
public Date getSendTime() {
return sendTime;
}
public void setSendTime(Date sendTime) {
this.sendTime = sendTime;
}
public Date getExpireTime() {
return expireTime;
}
public void setExpireTime(Date expireTime) {
this.expireTime = expireTime;
}
public String getSendStatus() {
return sendStatus;
}
public void setSendStatus(String sendStatus) {
this.sendStatus = sendStatus;
}
public String getReturnMessage() {
return returnMessage;
}
public void setReturnMessage(String returnMessage) {
this.returnMessage = returnMessage;
}
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getBizId() {
return bizId;
}
public void setBizId(String bizId) {
this.bizId = bizId;
}
public String getTemplateCode() {
return templateCode;
}
public void setTemplateCode(String templateCode) {
this.templateCode = templateCode;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
ShortMessageSendRecord other = (ShortMessageSendRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getMobileNo() == null ? other.getMobileNo() == null : this.getMobileNo().equals(other.getMobileNo()))
&& (this.getBusinessType() == null ? other.getBusinessType() == null : this.getBusinessType().equals(other.getBusinessType()))
&& (this.getBusinessId() == null ? other.getBusinessId() == null : this.getBusinessId().equals(other.getBusinessId()))
&& (this.getSmsType() == null ? other.getSmsType() == null : this.getSmsType().equals(other.getSmsType()))
&& (this.getSmsContent() == null ? other.getSmsContent() == null : this.getSmsContent().equals(other.getSmsContent()))
&& (this.getVerificationCode() == null ? other.getVerificationCode() == null : this.getVerificationCode().equals(other.getVerificationCode()))
&& (this.getSendTime() == null ? other.getSendTime() == null : this.getSendTime().equals(other.getSendTime()))
&& (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
&& (this.getSendStatus() == null ? other.getSendStatus() == null : this.getSendStatus().equals(other.getSendStatus()))
&& (this.getReturnMessage() == null ? other.getReturnMessage() == null : this.getReturnMessage().equals(other.getReturnMessage()))
&& (this.getRequestId() == null ? other.getRequestId() == null : this.getRequestId().equals(other.getRequestId()))
&& (this.getBizId() == null ? other.getBizId() == null : this.getBizId().equals(other.getBizId()))
&& (this.getTemplateCode() == null ? other.getTemplateCode() == null : this.getTemplateCode().equals(other.getTemplateCode()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getMobileNo() == null) ? 0 : getMobileNo().hashCode());
result = prime * result + ((getBusinessType() == null) ? 0 : getBusinessType().hashCode());
result = prime * result + ((getBusinessId() == null) ? 0 : getBusinessId().hashCode());
result = prime * result + ((getSmsType() == null) ? 0 : getSmsType().hashCode());
result = prime * result + ((getSmsContent() == null) ? 0 : getSmsContent().hashCode());
result = prime * result + ((getVerificationCode() == null) ? 0 : getVerificationCode().hashCode());
result = prime * result + ((getSendTime() == null) ? 0 : getSendTime().hashCode());
result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
result = prime * result + ((getSendStatus() == null) ? 0 : getSendStatus().hashCode());
result = prime * result + ((getReturnMessage() == null) ? 0 : getReturnMessage().hashCode());
result = prime * result + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
result = prime * result + ((getBizId() == null) ? 0 : getBizId().hashCode());
result = prime * result + ((getTemplateCode() == null) ? 0 : getTemplateCode().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", mobileNo=").append(mobileNo);
sb.append(", businessType=").append(businessType);
sb.append(", businessId=").append(businessId);
sb.append(", smsType=").append(smsType);
sb.append(", smsContent=").append(smsContent);
sb.append(", verificationCode=").append(verificationCode);
sb.append(", sendTime=").append(sendTime);
sb.append(", expireTime=").append(expireTime);
sb.append(", sendStatus=").append(sendStatus);
sb.append(", returnMessage=").append(returnMessage);
sb.append(", requestId=").append(requestId);
sb.append(", bizId=").append(bizId);
sb.append(", templateCode=").append(templateCode);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.yd.dal.entity.transaction;
import java.io.Serializable;
import java.util.Date;
/**
* ag_trans_sendlist
* @author
*/
public class TransSendList implements Serializable {
private static final long serialVersionUID = 1L;
/**
* serial id
*/
private Long id;
/**
* 发送标识 sms-短信,email-邮件
*/
private String sendTag;
/**
* 寄件者
*/
private String sender;
/**
* FK ag_acl_customer.id
*/
private Long customerId;
/**
* 收件者姓名
*/
private String name;
private String mobileNo;
/**
* 1=订单 2=提现 3=客户意见 4=汽车问卷 5=活动 6=wordpress 7=生日快乐 99=其他
*/
private Integer useFor;
/**
* 对应 use_for 表中的id
*/
private Long useForId;
/**
* 短信模板code
*/
private String smsTemplateCode;
/**
* 标题
*/
private String subject;
/**
* 信息内容概要
*/
private String contentSummary;
/**
* 发送是否成功 0=No, 1=Yes
*/
private Integer isSuccess;
/**
* 失败次数
*/
private Integer failCount;
/**
* 创建时间
*/
private Date createdAt;
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
private Long updatedBy;
/**
* 收件者邮箱
*/
private String emailTo;
/**
* 抄送者邮箱
*/
private String emailCc;
/**
* 密件收件者邮箱
*/
private String emailBcc;
/**
* 信息内容
*/
private String content;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSendTag() {
return sendTag;
}
public void setSendTag(String sendTag) {
this.sendTag = sendTag;
}
public String getSender() {
return sender;
}
public void setSender(String sender) {
this.sender = sender;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMobileNo() {
return mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
}
public Integer getUseFor() {
return useFor;
}
public void setUseFor(Integer useFor) {
this.useFor = useFor;
}
public Long getUseForId() {
return useForId;
}
public void setUseForId(Long useForId) {
this.useForId = useForId;
}
public String getSmsTemplateCode() {
return smsTemplateCode;
}
public void setSmsTemplateCode(String smsTemplateCode) {
this.smsTemplateCode = smsTemplateCode;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getContentSummary() {
return contentSummary;
}
public void setContentSummary(String contentSummary) {
this.contentSummary = contentSummary;
}
public Integer getIsSuccess() {
return isSuccess;
}
public void setIsSuccess(Integer isSuccess) {
this.isSuccess = isSuccess;
}
public Integer getFailCount() {
return failCount;
}
public void setFailCount(Integer failCount) {
this.failCount = failCount;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
public String getEmailTo() {
return emailTo;
}
public void setEmailTo(String emailTo) {
this.emailTo = emailTo;
}
public String getEmailCc() {
return emailCc;
}
public void setEmailCc(String emailCc) {
this.emailCc = emailCc;
}
public String getEmailBcc() {
return emailBcc;
}
public void setEmailBcc(String emailBcc) {
this.emailBcc = emailBcc;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
\ No newline at end of file
package com.yd.dal.mapper.agms;
import com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic;
public interface AclCustomerFortuneStatisticMapper {
int deleteByPrimaryKey(Long id);
int insert(AclCustomerFortuneStatistic record);
int insertSelective(AclCustomerFortuneStatistic record);
AclCustomerFortuneStatistic selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AclCustomerFortuneStatistic record);
int updateByPrimaryKeyWithBLOBs(AclCustomerFortuneStatistic record);
int updateByPrimaryKey(AclCustomerFortuneStatistic record);
AclCustomerFortuneStatistic findByCustomerId(Long customerId);
}
\ No newline at end of file
package com.yd.dal.mapper.agms;
import com.yd.dal.entity.agms.fortune.*;
import com.yd.dal.entity.customer.AclCustomerFortune;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -37,4 +38,11 @@ public interface AgmsFortuneMapper {
* @return 返回结果
*/
List<WithdrawLabelInfo> transformForWithdrawLabel(@Param("item")WithdrawQueryInfo info);
List<AclCustomerFortune> queryLifeFortuneListByOrderIds(List<Long> orderIds);
List<AclCustomerFortune> findByOrderId(@Param("orderId")Long orderId);
void save(AclCustomerFortune fortune);
}
......@@ -23,4 +23,6 @@ public interface AclCustomerMapper {
AclCustomer findByMobileNo(String mobileNo);
List<AclCustomer> findByIds(@Param("customerIds") List<Long> customerIds);
List<AclCustomer> findByObj(AclCustomer aclCustomer);
}
\ No newline at end of file
package com.yd.dal.mapper.customer;
import com.yd.dal.entity.customer.AclPolicyholder;
import java.util.List;
public interface AclPolicyholderMapper {
int deleteByPrimaryKey(Long id);
int insert(AclPolicyholder record);
int insertSelective(AclPolicyholder record);
AclPolicyholder selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AclPolicyholder record);
int updateByPrimaryKeyWithBLOBs(AclPolicyholder record);
int updateByPrimaryKey(AclPolicyholder record);
List<AclPolicyholder> findByOrderId(Long orderId);
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ import java.util.Map;
public interface LifeCommissionMapper {
List<ComeCommissionVO> queryComeCommissionList(QueryComeCommissionListRequestVO requestVO);
void checkComeCommission(@Param("list")List<Long> orderIds, @Param("paramMap")Map<String, Object> paramMap);
void setOrderCommissionCheckId(@Param("list")List<Long> orderIds, @Param("paramMap")Map<String, Object> paramMap);
OrderCommissonCheck insertOrderCommissionCheck(OrderCommissonCheck orderCommissonCheck);
......
......@@ -26,4 +26,8 @@ public interface PoOrderMapper {
List<PolicyDetailInfoE> findPolicyDetailsInfoByOrderNoE(@Param("orderNo") String orderNo);
List<PolicyFactorInfoE> findPolicyFactorByOrderNosE(@Param("orderNoList") List<String> orderNoList);
PoOrder findByIdAndStatus(@Param("orderId")Long orderId, @Param("status")int status);
List<PoOrder> findByIds(List<Long> orderIds);
}
\ No newline at end of file
package com.yd.dal.mapper.sms;
import com.yd.dal.entity.sms.ShortMessageSendRecord;
public interface ShortMessageSendRecordMapper {
int deleteByPrimaryKey(Long id);
int insert(ShortMessageSendRecord record);
int insertSelective(ShortMessageSendRecord record);
ShortMessageSendRecord selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(ShortMessageSendRecord record);
int updateByPrimaryKey(ShortMessageSendRecord record);
}
\ No newline at end of file
package com.yd.dal.mapper.transaction;
import com.yd.dal.entity.transaction.TransSendList;
public interface TransSendlistMapper {
int deleteByPrimaryKey(Long id);
TransSendList insert(TransSendList record);
int insertSelective(TransSendList record);
TransSendList selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(TransSendList record);
int updateByPrimaryKeyWithBLOBs(TransSendList record);
int updateByPrimaryKey(TransSendList record);
}
\ No newline at end of file
package com.yd.dal.service.agms;
import com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic;
public interface AclCustomerFortuneStatisticService {
AclCustomerFortuneStatistic findByCustomerId(Long customerId);
void update(AclCustomerFortuneStatistic statistic);
}
\ No newline at end of file
package com.yd.dal.service.agms;
import com.yd.dal.entity.agms.fortune.*;
import com.yd.dal.entity.agms.fortune.CommissionPayoutStatus;
import com.yd.dal.entity.agms.fortune.CommissionPayoutStatusQueryInfo;
import com.yd.dal.entity.agms.fortune.CustomerFortuneStatisticalInfo;
import com.yd.dal.entity.customer.AclCustomerFortune;
import java.util.List;
import java.util.Map;
......@@ -24,6 +28,10 @@ public interface AgmsFortuneDALService {
*/
List<CommissionPayoutStatus> commissionPayoutStatusQuery(CommissionPayoutStatusQueryInfo requestVO);
List<AclCustomerFortune> queryLifeFortuneListByOrderIds(List<Long> orderIds);
List<AclCustomerFortune> findByOrderId(Long orderId);
/**
* 通过customerId和payId查询fortune记录
* @param customerId customerId
......@@ -38,4 +46,7 @@ public interface AgmsFortuneDALService {
* @return WithdrawLabelInfo
*/
List<WithdrawLabelInfo> transformForWithdrawLabel(WithdrawQueryInfo info);
void save(AclCustomerFortune fortune);
}
package com.yd.dal.service.agms.impl;
import com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic;
import com.yd.dal.mapper.agms.AclCustomerFortuneStatisticMapper;
import com.yd.dal.service.agms.AclCustomerFortuneStatisticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("aclCustomerFortuneStatisticService")
public class AclCustomerFortuneStatisticServiceImpl implements AclCustomerFortuneStatisticService {
@Autowired
private AclCustomerFortuneStatisticMapper aclCustomerFortuneStatisticMapper;
@Override
public AclCustomerFortuneStatistic findByCustomerId(Long customerId) {
return aclCustomerFortuneStatisticMapper.findByCustomerId(customerId);
}
@Override
public void update(AclCustomerFortuneStatistic statistic) {
aclCustomerFortuneStatisticMapper.updateByPrimaryKeySelective(statistic);
}
}
\ No newline at end of file
package com.yd.dal.service.agms.impl;
import com.yd.dal.entity.agms.fortune.*;
import com.yd.dal.entity.customer.AclCustomerFortune;
import com.yd.dal.mapper.agms.AgmsFortuneMapper;
import com.yd.dal.service.agms.AgmsFortuneDALService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -51,6 +52,16 @@ public class AgmsFortuneDALServiceImpl implements AgmsFortuneDALService {
}
@Override
public List<AclCustomerFortune> queryLifeFortuneListByOrderIds(List<Long> orderIds) {
return agmsFortuneMapper.queryLifeFortuneListByOrderIds(orderIds);
}
@Override
public List<AclCustomerFortune> findByOrderId(Long orderId) {
return agmsFortuneMapper.findByOrderId(orderId);
}
@Override
public List<FortunePayToOrderInfo> fortunePayToOrder(Long customerId, Long payId) {
return agmsFortuneMapper.fortunePayToOrder(customerId,payId);
}
......@@ -59,4 +70,9 @@ public class AgmsFortuneDALServiceImpl implements AgmsFortuneDALService {
public List<WithdrawLabelInfo> transformForWithdrawLabel(WithdrawQueryInfo info) {
return agmsFortuneMapper.transformForWithdrawLabel(info);
}
@Override
public void save(AclCustomerFortune fortune) {
agmsFortuneMapper.save(fortune);
}
}
......@@ -34,5 +34,7 @@ public interface AclCustomerDALService {
AclCustomer findByMobileNo(String mobileNo);
List<AclCustomer> findByIds(List<Long> customerIds);
List<AclCustomer> findByObj(AclCustomer aclCustomer);
}
......@@ -18,4 +18,6 @@ public interface AclCustomerFortuneDALService {
void updateBatch(List<AclCustomerFortune> fortuneUpdates);
List<AclCustomerFortune> findByWithdrawIds(List<Long> withdrawUpdateIds);
}
package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclPolicyholder;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
public interface AclPolicyholderService {
List<AclPolicyholder> findByOrderId(Long orderId);
}
\ No newline at end of file
......@@ -52,4 +52,9 @@ public class AclCustomerDALServiceImpl implements AclCustomerDALService {
return aclCustomerMapper.findByIds(customerIds);
}
@Override
public List<AclCustomer> findByObj(AclCustomer aclCustomer) {
return aclCustomerMapper.findByObj(aclCustomer);
}
}
package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclPolicyholder;
import com.yd.dal.mapper.customer.AclPolicyholderMapper;
import com.yd.dal.service.customer.AclPolicyholderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("AclPolicyholderService")
public class AclPolicyholderServiceImpl implements AclPolicyholderService {
@Autowired
private AclPolicyholderMapper AclPolicyholderMapper;
@Override
public List<AclPolicyholder> findByOrderId(Long orderId) {
return AclPolicyholderMapper.findByOrderId(orderId);
}
}
\ No newline at end of file
......@@ -56,4 +56,19 @@ public class PoOrderDALServiceImpl implements PoOrderDALService {
public List<PolicyFactorInfoE> findPolicyFactorByOrderNosE(List<String> orderNoList) {
return poOrderMapper.findPolicyFactorByOrderNosE(orderNoList);
}
@Override
public PoOrder findByIdAndStatus(Long orderId, int status) {
return poOrderMapper.findByIdAndStatus(orderId, status);
}
@Override
public void update(PoOrder poOrder) {
poOrderMapper.updateByPrimaryKeySelective(poOrder);
}
@Override
public List<PoOrder> findByIds(List<Long> orderIds) {
return poOrderMapper.findByIds(orderIds);
}
}
......@@ -21,4 +21,10 @@ public interface PoOrderDALService {
List<PolicyDetailInfoE> findPolicyDetailsInfoByOrderNoE(String orderNo);
List<PolicyFactorInfoE> findPolicyFactorByOrderNosE(List<String> orderNoList);
PoOrder findByIdAndStatus(Long orderId, int status);
void update(PoOrder poOrder);
List<PoOrder> findByIds(List<Long> orderIds);
}
......@@ -11,4 +11,6 @@ public interface ProductDALService {
List<Product> findAll();
List<ProductE> findAllE();
Product findById(Long productId);
}
......@@ -9,4 +9,6 @@ import java.util.List;
public interface ProductPlanDALService {
List<ProductPlan> findAll();
ProductPlan findById(Long planId);
}
......@@ -26,4 +26,9 @@ public class ProductDALServiceImpl implements ProductDALService {
public List<ProductE> findAllE() {
return productMapper.findAllE();
}
@Override
public Product findById(Long productId) {
return productMapper.selectByPrimaryKey(productId);
}
}
......@@ -16,4 +16,9 @@ public class ProductPlanDALServiceImpl implements ProductPlanDALService {
public List<ProductPlan> findAll() {
return productPlanMapper.findAll();
}
@Override
public ProductPlan findById(Long planId) {
return productPlanMapper.selectByPrimaryKey(planId);
}
}
package com.yd.dal.service.sms;
import com.yd.dal.entity.sms.ShortMessageSendRecord;
public interface ShortMessageSendRecordService {
void save(ShortMessageSendRecord shortMessageSendRecord);
// Boolean delete (Long id);
// ShortMessageSendRecord update(ShortMessageSendRecord shortMessageSendRecord);
// ShortMessageSendRecord findById(Long id);
}
\ No newline at end of file
package com.yd.dal.service.sms.impl;
import com.yd.dal.entity.sms.ShortMessageSendRecord;
import com.yd.dal.mapper.sms.ShortMessageSendRecordMapper;
import com.yd.dal.service.sms.ShortMessageSendRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("shortMessageSendRecordService")
public class ShortMessageSendRecordServiceImpl implements ShortMessageSendRecordService {
@Autowired
private ShortMessageSendRecordMapper shortMessageSendRecordMapper;
@Override
public void save(ShortMessageSendRecord shortMessageSendRecord) {
shortMessageSendRecordMapper.insert(shortMessageSendRecord);
}
}
\ No newline at end of file
package com.yd.dal.service.transaction.Impl;
import com.yd.dal.entity.transaction.TransSendList;
import com.yd.dal.mapper.transaction.TransSendlistMapper;
import com.yd.dal.service.transaction.TransSendListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("transSendListService")
public class TransSendListServiceImpl implements TransSendListService {
@Autowired
private TransSendlistMapper transSendlistMapper;
@Override
public TransSendList save(TransSendList transSendList) {
return transSendlistMapper.insert(transSendList);
}
@Override
public Boolean delete(Long id) {
return null;
}
@Override
public TransSendList update(TransSendList transSendList) {
return null;
}
@Override
public TransSendList findById(Long id) {
return null;
}
}
\ No newline at end of file
package com.yd.dal.service.transaction;
import com.yd.dal.entity.transaction.TransSendList;
import java.util.List;
public interface TransSendListService {
/**
* 保存对象
* @param transSendList
* @return
*/
TransSendList save(TransSendList transSendList);
/**
* 按id删除对象
* @param id
* @return
*/
Boolean delete (Long id);
/**
* 更新对象
* @param transSendList
* @return
*/
TransSendList update(TransSendList transSendList);
/**
* 按id查找对象
* @param id
* @return
*/
TransSendList findById(Long id);
}
\ No newline at end of file
......@@ -70,14 +70,14 @@ public class MailServiceImpl implements MailService {
@Override
public void sysException(String warningSubject, String warningMessage) {
// if("prod".equals(SpringContextUtil.getActiveProfile())){
String toAddress = "water.wang@ydinsurance.cn";//"simon.cheng@autogeneral.cn";
List<String> ccList = systemConfigService.getListConfigValue("SysWarningCCAddress");
String[] ccAddresses = new String[ccList.size()];
ccList.toArray(ccAddresses);
String toAddress = "water.wang@ydinsurance.cn";//"simon.cheng@autogeneral.cn";
List<String> ccList = systemConfigService.getListConfigValue("SysWarningCCAddress");
String[] ccAddresses = new String[ccList.size()];
ccList.toArray(ccAddresses);
// String[] ccAddress = new String[]{"water.wang@autogeneral.cn","sweet.zhang@autogeneral.cn","jerold.chen@autogeneral.cn"};
String subject = "【"+SpringContextUtil.getEnvironmentName()+"环境】"+warningSubject;
String messageText = CommonUtil.currentIP()+" "+warningMessage;
String imageFile = null;
String subject = "【"+SpringContextUtil.getEnvironmentName()+"环境】"+warningSubject;
String messageText = CommonUtil.currentIP()+" "+warningMessage;
String imageFile = null;
try {
aliMailInterfService.smtpSend(toAddress, ccAddresses,subject, messageText, null, imageFile);
} catch (Exception e) {
......
package com.yd.rmi.ali.send.service;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("sendService")
public interface SendService {
/**
* 发送Email和SMS综合接口
* @param category 【邮件】填写email,【短信】则填写sms
* @param number 【邮箱】--邮箱号,【短信】--手机号
* @param type 【邮箱】信件类型【填3】:1-单封邮件发送,2-批量邮件发送,3-SMTP邮件发送,【短信】格式为:1-验证码短信,2-支付提醒短信,3-承保成功短信,4-生日祝福短信,5-续保提现短信,0-临时短信,6-蒙哥方案分析完成短信
* @param content 【邮箱】则为邮箱的正文部分,【短信】则为替换短信模板中变量的JSON字符串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 "{\"name\":\""+name+"\",\"code\":\""+code+"\"}";
* @param templateCode 【邮箱】--不填,【短信】--短信模板代码
* @param subject 【邮箱】--邮箱标题,【短信】--签名信息,最惠比、银盾保险经纪、安吉保、银盾保险在线
* @param ccAddress 【邮箱】--抄送的账户,【短信】--不填
* @param contentSummary 内容概要
* @param useFor 该短信和邮件主要是为了什么发送的,1=订单 2=提现 3=客户意见 4=汽车问卷 5=活动 6=wordpress 7=生日快乐 99=其他'
* @param useForId 相应的主键ID,如:订单id等
*/
void sendEmailOrSMS(String category,String number,String type,String content,String templateCode,String subject,String[] ccAddress,String contentSummary,Integer useFor,Long useForId);
/**
* 发送短信
* @param mobile 手机号
* @param type 格式为:1-验证码短信,2-支付提醒短信,3-承保成功短信,4-生日祝福短信,5-续保提现短信,0-临时短信,6-蒙哥方案分析完成短信
* @param content 则为替换短信模板中变量的JSON字符串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 "{\"name\":\""+name+"\",\"code\":\""+code+"\"}";
* @param templateCode 短信模板代码
* @param subject 签名信息,最惠比、银盾保险经纪、最惠比、银盾保险经纪、安吉保、银盾保险在线
* @param contentSummary 内容概要
* @param useFor 该短信和邮件主要是为了什么发送的,1=订单 2=提现 3=客户意见 4=汽车问卷 5=活动 6=wordpress 7=生日快乐 99=其他'
* @param useForId 相应的主键ID,如:订单id等
*/
void sendSMS(String mobile, String type, String content, String templateCode, String subject, String contentSummary, Integer useFor, Long useForId);
void sendEmail(String category, String number, String content, String subject, String[] ccAddress, String contentSummary, Integer useFor, List<String> attachmentFiles);
boolean sendEmail(String email, String messageText, String subject, String[] ccAddresses);
}
package com.yd.rmi.ali.send.service.impl;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.yd.dal.entity.customer.AclCustomer;
import com.yd.dal.entity.sms.ShortMessageSendRecord;
import com.yd.dal.entity.transaction.TransSendList;
import com.yd.dal.service.customer.AclCustomerDALService;
import com.yd.dal.service.transaction.TransSendListService;
import com.yd.rmi.ali.mailinterf.service.AliMailInterfService;
import com.yd.rmi.ali.send.service.SendService;
import com.yd.rmi.ali.sms.service.AliSmsInterfService;
import com.yd.rmi.cache.SystemConfigService;
import com.yd.util.CommonUtil;
import com.yd.util.SpringContextUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Service("sendService")
public class SendServiceImpl implements SendService {
private static final Logger LOGGER = LoggerFactory.getLogger(SendServiceImpl.class);
@Autowired
private AclCustomerDALService aclCustomerService;
@Autowired
private TransSendListService transSendListService;
@Autowired
private AliSmsInterfService aliSmsInterfService;
@Autowired
private AliMailInterfService aliMailInterfService;
@Autowired
private SystemConfigService systemConfigService;
/**
* 发送Email和SMS综合接口
* @param category 【邮件】填写email,【短信】则填写sms
* @param number 【邮箱】--邮箱号,【短信】--手机号
* @param type 【邮箱】信件类型【填3】:1-单封邮件发送,2-批量邮件发送,3-SMTP邮件发送,【短信】格式为:1-验证码短信,2-支付提醒短信,3-承保成功短信,4-生日祝福短信,5-续保提现短信,0-临时短信,6-蒙哥方案分析完成短信
* @param content 【邮箱】则为邮箱的正文部分,【短信】则为替换短信模板中变量的JSON字符串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 "{\"name\":\""+name+"\",\"code\":\""+code+"\"}";
* @param templateCode 【邮箱】--不填,【短信】--短信模板代码
* @param subject 【邮箱】--邮箱标题,【短信】--签名信息,最惠比、银盾保险经纪、安吉保、银盾保险在线
* @param ccAddress 【邮箱】--抄送的账户,【短信】--不填
* @param contentSummary 内容概要
* @param useFor 该短信和邮件主要是为了什么发送的,1=订单 2=提现 3=客户意见 4=汽车问卷 5=活动 6=wordPress 7=生日快乐 99=其他'
* @param useForId 相应的主键ID,如:订单id等
*/
@Override
@Async("sendAsyncServiceExecutor")
public void sendEmailOrSMS(String category, String number, String type, String content, String templateCode,
String subject, String[] ccAddress, String contentSummary, Integer useFor, Long useForId) {
int failCount = 0;
boolean sendResult = false;
if(CommonUtil.isNullOrBlank(category) || CommonUtil.isNullOrBlank(number) || CommonUtil.isNullOrBlank(type)){
LOGGER.error("发送类型category不能为空[sms=短信,email=邮件],number、type 都不能为空!");
}else{
//获取用户信息
AclCustomer aclCustomer = getCustomerInfo(category,number);
//发送email
if("email".equals(category)){
if(!CommonUtil.isNullOrBlank(subject) && !CommonUtil.isNullOrBlank(content) ){
try {
aliMailInterfService.smtpSend(number,ccAddress, subject, content, null, null);
sendResult = true;
LOGGER.info("执行成功!");
} catch (Exception e) {
sendResult = false;
e.printStackTrace();
}
}else{
sendResult = false;
LOGGER.error("如果发送的是邮件,则subject,content这些信息都不能为空!!!");
}
//发送短信
}else if("sms".equals(category)){
//如果是非正式环境,校验该手机号码是否可以发送
boolean isCanSend = canSendForMobile(number);
if(isCanSend){
if(!CommonUtil.isNullOrBlank(templateCode)){
List<String> smsResult = executeSendSMS(number,type,content,templateCode,subject);
// result = smsResult.get(0);
failCount = Integer.parseInt(smsResult.get(1));
sendResult = Boolean.parseBoolean(smsResult.get(2));
LOGGER.info("执行成功!");
}else{
LOGGER.error("如果发送的是邮件,则templateCode(短信模板代码)这些信息都不能为空!!!");
}
}
}else{
LOGGER.error("该发送类型不存在!category = sms 为短信,category = email 为邮件!");
}
//保存结果信息到ag_trans_sendList_temp表中
saveSendInfo(aclCustomer,category,ccAddress,number,subject,templateCode,useFor,useForId,content,contentSummary,sendResult,failCount);
}
}
@Override
@Async("sendAsyncServiceExecutor")
public void sendEmail(String category, String number, String content,
String subject, String[] ccAddress, String contentSummary, Integer useFor,List<String> attachmentFiles) {
int failCount = 0;
boolean sendResult = false;
//获取用户信息
AclCustomer aclCustomer = getCustomerInfo(category, number);
//发送email
if ("email".equals(category)) {
if (!CommonUtil.isNullOrBlank(subject) && !CommonUtil.isNullOrBlank(content)) {
try {
aliMailInterfService.smtpSend(number, ccAddress, subject, content, attachmentFiles, null);
sendResult = true;
LOGGER.info("执行成功!");
} catch (Exception e) {
sendResult = false;
e.printStackTrace();
}
} else {
LOGGER.error("如果发送的是邮件,则subject,content这些信息都不能为空!!!");
}
}
//保存结果信息到ag_trans_sendList_temp表中
saveSendInfo(aclCustomer, category, ccAddress, number, subject, null, useFor, null, content, contentSummary, sendResult, failCount);
}
@Override
public boolean sendEmail(String email, String messageText, String subject, String[] ccAddresses) {
int failCount = 0;
boolean sendResult = false;
String category = "email";
//获取用户信息
AclCustomer aclCustomer = getCustomerInfo(category, email);
if (!CommonUtil.isNullOrBlank(subject) && !CommonUtil.isNullOrBlank(messageText)) {
try {
aliMailInterfService.smtpSend(email, ccAddresses, subject, messageText, null, null);
sendResult = true;
LOGGER.info("执行成功!");
} catch (Exception e) {
sendResult = false;
e.printStackTrace();
}
} else {
LOGGER.error("如果发送的是邮件,则subject,content这些信息都不能为空!!!");
}
//保存结果信息到ag_trans_sendList_temp表中
saveSendInfo(aclCustomer, category, ccAddresses, email, subject, null, 99, null, messageText, "EGolden", sendResult, failCount);
return sendResult;
}
/**
* 发送短信
* @param mobile 手机号
* @param type 格式为:(临时短信一定填"0")0-临时短信,1-验证码短信,2-支付提醒短信,3-承保成功短信,4-生日祝福短信,5-续保提现短信,6-蒙哥方案分析完成短信
* @param content 则为替换短信模板中变量的JSON字符串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 "{\"name\":\""+name+"\",\"code\":\""+code+"\"}";
* @param templateCode 短信模板代码
* @param subject 签名信息,最惠比、银盾保险经纪
* @param contentSummary 内容概要
* @param useFor 该短信和邮件主要是为了什么发送的,1=订单 2=提现 3=客户意见 4=汽车问卷 5=活动 6=wordPress 7=生日快乐 99=其他'
* @param useForId 相应的主键ID,如:订单id等
*/
@Override
@Async("testAsyncServiceExecutor")
public void sendSMS(String mobile, String type, String content, String templateCode, String subject, String contentSummary, Integer useFor, Long useForId) {
if(CommonUtil.isNullOrBlank(mobile) || CommonUtil.isNullOrBlank(type) || CommonUtil.isNullOrBlank(templateCode) || useFor == null || useForId == null){
LOGGER.error("mobile、type、templateCode、useFor、useForId 都不能为空!");
}else {//根据手机号和邮箱号查询用户的详细信息。
if (mobile.length() != 11 || !mobile.startsWith("1")) {
LOGGER.error("手机号码错误!");
} else {
AclCustomer customer = getCustomerInfo("sms", mobile);
if (!CommonUtil.isNullOrBlank(templateCode)) {
List<String> smsResult = executeSendSMS(mobile, type, content, templateCode, subject);
// result = smsResult.get(0);
int failCount = Integer.parseInt(smsResult.get(1));
boolean sendResult = Boolean.parseBoolean(smsResult.get(2));
//保存结果信息到ag_trans_sendList_temp表中
saveSendInfo(customer, "sms", null, mobile, subject, templateCode, useFor, useForId, content, contentSummary, sendResult, failCount);
LOGGER.info("发送成功!");
} else {
LOGGER.error("如果发送的是邮件,则templateCode(短信模板代码)这些信息都不能为空!!!");
}
}
}
}
/**
* 保存信息进数据库中
* @param aclCustomer
* @param category
* @param ccAddress
* @param number
* @param subject
* @param templateCode
* @param useFor
* @param useForId
* @param content
* @param contentSummary
* @param sendResult
* @param failCount
*/
private void saveSendInfo(AclCustomer aclCustomer, String category, String[] ccAddress, String number, String subject, String templateCode, Integer useFor, Long useForId, String content, String contentSummary, boolean sendResult, Integer failCount) {
//将邮件和短信直接保存到ag_trans_sendList_temp表中
TransSendList transSendList = new TransSendList();
transSendList.setSendTag(category);
transSendList.setSender("zuihuibi");
if(aclCustomer != null){
transSendList.setCustomerId(aclCustomer.getId());
transSendList.setName(aclCustomer.getName());
if("email".equals(category)){
transSendList.setMobileNo(aclCustomer.getMobileNo());
}else{
transSendList.setEmailTo(aclCustomer.getEmail());
}
}
if("email".equals(category)){
transSendList.setEmailCc(Arrays.toString(ccAddress) +"");
transSendList.setEmailTo(number);
transSendList.setSubject(subject);
}else{
transSendList.setMobileNo(number);
transSendList.setSmsTemplateCode(templateCode);
}
transSendList.setUseFor(useFor);
transSendList.setUseForId(useForId);
transSendList.setContent(content);
transSendList.setContentSummary(contentSummary);
transSendList.setIsSuccess(sendResult ? 1 : 0);
transSendList.setFailCount(failCount);
transSendList.setCreatedAt(new Date());
transSendList.setCreatedBy(-1L);
transSendList.setUpdatedAt(new Date());
transSendList.setUpdatedBy(-1L);
transSendListService.save(transSendList);
}
/**
* 执行短信发送,如果执行执行4次都失败,则放弃执行
* @param number
* @param type
* @param content
* @param templateCode
* @param subject
* @return
*/
private List<String> executeSendSMS(String number, String type, String content, String templateCode, String subject) {
List<String> resultInfo = new ArrayList<>();
String result = null;
int failCount = 0;
ShortMessageSendRecord smsRecord = new ShortMessageSendRecord();
smsRecord.setMobileNo(number);
smsRecord.setSmsType(type);
smsRecord.setSmsContent(content);
smsRecord.setTemplateCode(templateCode);
boolean smsResult = false;
while (!smsResult && (failCount < 4)){
SendSmsResponse response =aliSmsInterfService.sendSms(smsRecord,subject);
result = response.getMessage();
if ("OK".equals(response.getCode())) {
smsResult = true;
}else{
failCount++;
System.out.println(">>>>>>>>>>>>第"+failCount+"次失败原因:"+response.getMessage());
}
}
resultInfo.add(result);
resultInfo.add(String.valueOf(failCount));
resultInfo.add(String.valueOf(smsResult));
return resultInfo;
}
/**
* 校验在非正式环境下该手机号码是否能够发送
* @param mobileNo
* @return
*/
private boolean canSendForMobile(String mobileNo) {
if(!SpringContextUtil.isProd()){
String mobileNos = systemConfigService.getSingleConfigValue("SMS_TEST_MOBILES");
if(!mobileNos.isEmpty()){
List<String> mobileNoList = Arrays.asList(mobileNos.split(","));
return mobileNoList.contains(mobileNo);//在dev和stage环境只给数据库配置的员工发送短信
}else{
return true;
}
}else{
return true;
}
}
/**
* 根据类别和手机号码或邮箱,查询用户在系统中的信息
* @param category
* @param number
* @return
*/
private AclCustomer getCustomerInfo(String category, String number) {
AclCustomer aclCustomer = new AclCustomer();
aclCustomer.setIsActive(1);
if("email".equals(category)){
aclCustomer.setEmail(number);
}else if("sms".equals(category)){
aclCustomer.setMobileNo(number);
}
List<AclCustomer> customerList = aclCustomerService.findByObj(aclCustomer);
aclCustomer = customerList.isEmpty() ? aclCustomer : customerList.get(0);
return aclCustomer;
}
}
package com.yd.rmi.ali.sms.service;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.yd.dal.entity.sms.ShortMessageSendRecord;
public interface AliSmsInterfService {
public SendSmsResponse sendSms(ShortMessageSendRecord smsRecord, String signName);
// public QuerySendDetailsResponse querySmsDetail(ShortMessageSendRecord smsRecord);
}
package com.yd.rmi.ali.sms.service.impl;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import com.yd.dal.entity.sms.ShortMessageSendRecord;
import com.yd.dal.service.sms.ShortMessageSendRecordService;
import com.yd.rmi.ali.sms.service.AliSmsInterfService;
import com.yd.rmi.cache.SystemConfigService;
import com.yd.util.CommonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
@Service("aliSmsInterfService")
public class AliSmsInterfServiceImpl implements AliSmsInterfService {
@Autowired
private SystemConfigService systemConfigService;
@Autowired
private ShortMessageSendRecordService shortMessageSendRecordService;
/**
*
* @param phoneNumber
* @param signName
* @param templateCode
* @param templateParam
* @param outId
* @return SendSmsResponse
* @throws ClientException
*/
private SendSmsResponse send(String phoneNumber,String signName,String templateCode,String templateParam,String outId) throws ClientException {
//可自助调整超时时间
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
//初始化acsClient,暂不支持region化
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", systemConfigService.getSingleConfigValue("ALI_SMS_ACCESS_KEY_ID"), systemConfigService.getSingleConfigValue("ALI_SMS_ACCESS_KEY_SECRET"));
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", systemConfigService.getSingleConfigValue("ALI_SMS_PRODUCT"), systemConfigService.getSingleConfigValue("ALI_SMS_DOMAIN"));
IAcsClient acsClient = new DefaultAcsClient(profile);
//组装请求对象-具体描述见控制台-文档部分内容
SendSmsRequest request = new SendSmsRequest();
request.setPhoneNumbers(phoneNumber);//必填:待发送手机号 "13917505984"
request.setSignName(signName);//必填:短信签名-可在短信控制台中找到 "安吉保"
request.setTemplateCode(templateCode); //必填:短信模板-可在短信控制台中找到 "SMS_76610855"
request.setTemplateParam(templateParam);//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 "{\"code\":\"231145\"}"
request.setOutId(outId);//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者 "zxh_out_id"
SendSmsResponse sendSmsResponse = new SendSmsResponse();
try{
sendSmsResponse = acsClient.getAcsResponse(request);//hint 此处可能会抛出异常,注意catch
}catch(Exception e){
e.printStackTrace();
sendSmsResponse.setCode("Exception");
sendSmsResponse.setMessage(e.getMessage());
}
return sendSmsResponse;
}
/**
* @param phoneNumber
* @param bizId
* @param sendDate 必填-发送日期 支持30天内记录查询,格式yyyyMMdd
* @return
* @throws ClientException
*/
private QuerySendDetailsResponse querySendDetails(String phoneNumber,String bizId,String sendDate) throws ClientException {
//可自助调整超时时间
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
//初始化acsClient,暂不支持region化
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", systemConfigService.getSingleConfigValue("ALI_SMS_ACCESS_KEY_ID"), systemConfigService.getSingleConfigValue("ALI_SMS_ACCESS_KEY_SECRET"));
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", systemConfigService.getSingleConfigValue("ALI_SMS_PRODUCT"), systemConfigService.getSingleConfigValue("ALI_SMS_DOMAIN"));
IAcsClient acsClient = new DefaultAcsClient(profile);
//组装请求对象
QuerySendDetailsRequest request = new QuerySendDetailsRequest();
request.setPhoneNumber(phoneNumber);//必填-号码 "13917505984"
request.setBizId(bizId);//可选-流水号
// SimpleDateFormat ft = new SimpleDateFormat("yyyyMMdd");//必填-发送日期 支持30天内记录查询,格式yyyyMMdd
request.setSendDate(sendDate);//ft.format(new Date())
request.setPageSize(10L);//必填-页大小
request.setCurrentPage(1L);//必填-当前页码从1开始计数
QuerySendDetailsResponse querySendDetailsResponse = new QuerySendDetailsResponse();
try{
querySendDetailsResponse = acsClient.getAcsResponse(request);//hint 此处可能会抛出异常,注意catch
}catch(Exception e){
e.printStackTrace();
querySendDetailsResponse.setCode("Exception");
querySendDetailsResponse.setMessage(e.getMessage());
}
return querySendDetailsResponse;
}
/**
*
* @param smsRecord
* @return QuerySendDetailsResponse
*/
@Override
public SendSmsResponse sendSms(ShortMessageSendRecord smsRecord, String signName) {
String phoneNumber = smsRecord.getMobileNo();
String templateParam;
String outId = "ajb";
String templateCode;
SendSmsResponse sendSmsResponse = null;
if("1".equals(smsRecord.getSmsType())){//验证码短信
templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_VERIFICATION_CODE_TEMPLATECODE");
templateParam = "{\"code\":\""+smsRecord.getVerificationCode()+"\"}";
}else if("2".equals(smsRecord.getSmsType())){//支付提醒短信
templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_PAY_NOTIFY_TEMPLATECODE");
templateParam = smsRecord.getSmsContent();
}else if("3".equals(smsRecord.getSmsType())){//承保成功短信
templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_POLICY_SUCCESS_NOTIFY_TEMPLATECODE");
templateParam = smsRecord.getSmsContent();
}else if("4".equals(smsRecord.getSmsType())){//生日祝福短信
templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_BIRTHDAY_TEMPLATECODE");
templateParam = smsRecord.getSmsContent();
}else if("5".equals(smsRecord.getSmsType())){//提醒续保ALI_SMS_RENEWAL
templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_RENEWAL");
templateParam = smsRecord.getSmsContent();
}else if("0".equals(smsRecord.getSmsType())){//其他临时短信
templateCode = smsRecord.getTemplateCode();
templateParam = smsRecord.getSmsContent();
}else{
templateCode = smsRecord.getTemplateCode();
templateParam = smsRecord.getSmsContent();
}
try {
signName = (CommonUtil.isNullOrBlank(signName)) ? systemConfigService.getSingleConfigValue("ALI_SMS_SIGN_NAME") : signName;
sendSmsResponse = send(phoneNumber, signName, templateCode, templateParam, outId);
smsRecord.setSendTime(new Date());
smsRecord.setSendStatus(sendSmsResponse.getCode());
smsRecord.setReturnMessage(sendSmsResponse.getMessage());
smsRecord.setRequestId(sendSmsResponse.getRequestId());
smsRecord.setBizId(sendSmsResponse.getBizId());
smsRecord.setSmsContent(templateParam);
smsRecord.setTemplateCode(templateCode);
shortMessageSendRecordService.save(smsRecord);
} catch (ClientException e) {
e.printStackTrace();
}
return sendSmsResponse;
}
public QuerySendDetailsResponse querySmsDetail(ShortMessageSendRecord smsRecord){
QuerySendDetailsResponse response = null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");//必填-发送日期 支持30天内记录查询,格式yyyyMMdd
String sendDate = sdf.format(smsRecord.getSendTime());
try {
response = querySendDetails(smsRecord.getMobileNo(),null, sendDate);
System.out.println("短信明细查询接口返回数据----------------");
System.out.println("Code=" + response.getCode());
System.out.println("Message=" + response.getMessage());
int i = 0;
for(QuerySendDetailsResponse.SmsSendDetailDTO smsSendDetailDTO : response.getSmsSendDetailDTOs())
{
System.out.println("SmsSendDetailDTO["+i+"]:");
System.out.println("Content=" + smsSendDetailDTO.getContent());
System.out.println("ErrCode=" + smsSendDetailDTO.getErrCode());
System.out.println("OutId=" + smsSendDetailDTO.getOutId());
System.out.println("PhoneNum=" + smsSendDetailDTO.getPhoneNum());
System.out.println("ReceiveDate=" + smsSendDetailDTO.getReceiveDate());
System.out.println("SendDate=" + smsSendDetailDTO.getSendDate());
System.out.println("SendStatus=" + smsSendDetailDTO.getSendStatus());
System.out.println("Template=" + smsSendDetailDTO.getTemplateCode());
}
System.out.println("TotalCount=" + response.getTotalCount());
System.out.println("RequestId=" + response.getRequestId());
} catch (ClientException e) {
e.printStackTrace();
}
return response;
}
public static void main(String[] args) {
}
}
<?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.yd.dal.mapper.agms.AclCustomerFortuneStatisticMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<result column="accumulated_fortune" jdbcType="DECIMAL" property="accumulatedFortune" />
<result column="drawn_fortune" jdbcType="DECIMAL" property="drawnFortune" />
<result column="cancelled_fortune" jdbcType="DECIMAL" property="cancelledFortune" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic">
<result column="remark" jdbcType="LONGVARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, customer_id, accumulated_fortune, drawn_fortune, cancelled_fortune, created_at,
created_by, updated_at, updated_by
</sql>
<sql id="Blob_Column_List">
remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ag_acl_customer_fortune_statistic
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_customer_fortune_statistic
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic" useGeneratedKeys="true">
insert into ag_acl_customer_fortune_statistic (customer_id, accumulated_fortune, drawn_fortune,
cancelled_fortune, created_at, created_by,
updated_at, updated_by, remark
)
values (#{customerId,jdbcType=BIGINT}, #{accumulatedFortune,jdbcType=DECIMAL}, #{drawnFortune,jdbcType=DECIMAL},
#{cancelledFortune,jdbcType=DECIMAL}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}, #{remark,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic" useGeneratedKeys="true">
insert into ag_acl_customer_fortune_statistic
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="customerId != null">
customer_id,
</if>
<if test="accumulatedFortune != null">
accumulated_fortune,
</if>
<if test="drawnFortune != null">
drawn_fortune,
</if>
<if test="cancelledFortune != null">
cancelled_fortune,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="accumulatedFortune != null">
#{accumulatedFortune,jdbcType=DECIMAL},
</if>
<if test="drawnFortune != null">
#{drawnFortune,jdbcType=DECIMAL},
</if>
<if test="cancelledFortune != null">
#{cancelledFortune,jdbcType=DECIMAL},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
<if test="remark != null">
#{remark,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic">
update ag_acl_customer_fortune_statistic
<set>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="accumulatedFortune != null">
accumulated_fortune = #{accumulatedFortune,jdbcType=DECIMAL},
</if>
<if test="drawnFortune != null">
drawn_fortune = #{drawnFortune,jdbcType=DECIMAL},
</if>
<if test="cancelledFortune != null">
cancelled_fortune = #{cancelledFortune,jdbcType=DECIMAL},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic">
update ag_acl_customer_fortune_statistic
set customer_id = #{customerId,jdbcType=BIGINT},
accumulated_fortune = #{accumulatedFortune,jdbcType=DECIMAL},
drawn_fortune = #{drawnFortune,jdbcType=DECIMAL},
cancelled_fortune = #{cancelledFortune,jdbcType=DECIMAL},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
remark = #{remark,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic">
update ag_acl_customer_fortune_statistic
set customer_id = #{customerId,jdbcType=BIGINT},
accumulated_fortune = #{accumulatedFortune,jdbcType=DECIMAL},
drawn_fortune = #{drawnFortune,jdbcType=DECIMAL},
cancelled_fortune = #{cancelledFortune,jdbcType=DECIMAL},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByCustomerId" resultMap="ResultMapWithBLOBs">
select * from ag_acl_customer_fortune_statistic
where customer_id = #{customerId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
......@@ -166,4 +166,50 @@
</if>
group by pay.id
</select>
<select id="queryLifeFortuneListByOrderIds" resultType="com.yd.dal.entity.customer.AclCustomerFortune">
select f.*
from ag_acl_customer_fortune f
left join (select p.customer_id, s.practitioner_type_id from ag_acl_practitioner p left join ag_acl_practitioner_setting s on p.id = s.practitioner_id) p
on f.customer_id = p.customer_id
where 1=1
and p.practitioner_type_id = 28
and f.order_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="findByOrderId" resultType="com.yd.dal.entity.customer.AclCustomerFortune">
select f.*
from ag_acl_customer_fortune f
left join ag_po_order o on o.id = f.order_id
where f.order_id = #{orderId}
</select>
<insert id="save" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.agms.fortune.AclCustomerFortuneStatistic" useGeneratedKeys="true">
insert into ag_acl_customer_fortune (share_id, customer_id, order_id,
order_date, order_price, commission_rate,
commission_amount, fyc_rate, fyc_amount,
grade_commission_rate, share_rate, referral_rate,
referral_amount, month_period, commission_type,
drop_option_code, practitioner_level, is_tax,
tax_amount, net_amount, campaign_id,
campaign_name, withdrawable_date, payout_batch_id,
commission_payout_status, commission_payout_at,
commission_payout_by, withdrawed_id, fortune_payed_id,
created_at, created_by)
values (#{shareId,jdbcType=BIGINT}, #{customerId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT},
#{orderDate,jdbcType=TIMESTAMP}, #{orderPrice,jdbcType=DECIMAL}, #{commissionRate,jdbcType=DECIMAL},
#{commissionAmount,jdbcType=DECIMAL}, #{fycRate,jdbcType=DECIMAL}, #{fycAmount,jdbcType=DECIMAL},
#{gradeCommissionRate,jdbcType=DECIMAL}, #{shareRate,jdbcType=DECIMAL}, #{referralRate,jdbcType=DECIMAL},
#{referralAmount,jdbcType=DECIMAL}, #{monthPeriod,jdbcType=VARCHAR}, #{commissionType,jdbcType=VARCHAR},
#{dropOptionCode,jdbcType=VARCHAR}, #{practitionerLevel,jdbcType=VARCHAR}, #{isTax,jdbcType=INTEGER},
#{taxAmount,jdbcType=DECIMAL}, #{netAmount,jdbcType=DECIMAL}, #{campaignId,jdbcType=BIGINT},
#{campaignName,jdbcType=VARCHAR}, #{withdrawableDate,jdbcType=TIMESTAMP}, #{payoutBatchId,jdbcType=BIGINT},
#{commissionPayoutStatus,jdbcType=VARCHAR}, #{commissionPayoutAt,jdbcType=TIMESTAMP},
#{commissionPayoutBy,jdbcType=BIGINT}, #{withdrawedId,jdbcType=BIGINT}, #{fortunePayedId,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT})
</insert>
</mapper>
\ No newline at end of file
......@@ -771,13 +771,27 @@
from ag_acl_customer
where mobile_no = #{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}
</select>
<select id="findByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_customer
where id in
<foreach collection="customerIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="findByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_customer
where id in
<foreach collection="customerIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="findByObj" parameterType="com.yd.dal.entity.customer.AclCustomer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_customer
where 1=1
<if test="mobileNo != null">
mobile_no = #{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
</select>
</mapper>
\ No newline at end of file
<?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.yd.dal.mapper.customer.AclPolicyholderMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclPolicyholder">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="config_level" jdbcType="INTEGER" property="configLevel" />
<result column="product_id" jdbcType="BIGINT" property="productId" />
<result column="plan_id" jdbcType="BIGINT" property="planId" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<result column="order_id" jdbcType="BIGINT" property="orderId" />
<result column="policy_unit_price" jdbcType="DECIMAL" property="policyUnitPrice" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="agent_relation" jdbcType="VARCHAR" property="agentRelation" />
<result column="has_ai_confirmed" jdbcType="INTEGER" property="hasAiConfirmed" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="is_social_insured" jdbcType="INTEGER" property="isSocialInsured" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="english_name" jdbcType="VARCHAR" property="englishName" />
<result column="mobile_no" jdbcType="VARCHAR" property="mobileNo" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="underwrite_question_id" jdbcType="VARCHAR" property="underwriteQuestionId" />
<result column="province_id" jdbcType="BIGINT" property="provinceId" />
<result column="province_name" jdbcType="VARCHAR" property="provinceName" />
<result column="district_id" jdbcType="BIGINT" property="districtId" />
<result column="district_name" jdbcType="VARCHAR" property="districtName" />
<result column="city_id" jdbcType="BIGINT" property="cityId" />
<result column="city_name" jdbcType="VARCHAR" property="cityName" />
<result column="birth_province_id" jdbcType="BIGINT" property="birthProvinceId" />
<result column="birth_province_name" jdbcType="VARCHAR" property="birthProvinceName" />
<result column="birth_city_id" jdbcType="BIGINT" property="birthCityId" />
<result column="birth_city_name" jdbcType="VARCHAR" property="birthCityName" />
<result column="birth_district_id" jdbcType="BIGINT" property="birthDistrictId" />
<result column="birth_district_name" jdbcType="VARCHAR" property="birthDistrictName" />
<result column="birth_address" jdbcType="VARCHAR" property="birthAddress" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="occupation_id" jdbcType="BIGINT" property="occupationId" />
<result column="occupation_name" jdbcType="VARCHAR" property="occupationName" />
<result column="id_type_id" jdbcType="BIGINT" property="idTypeId" />
<result column="id_type" jdbcType="VARCHAR" property="idType" />
<result column="id_no" jdbcType="VARCHAR" property="idNo" />
<result column="gender" jdbcType="INTEGER" property="gender" />
<result column="relation_id" jdbcType="BIGINT" property="relationId" />
<result column="relation_type" jdbcType="VARCHAR" property="relationType" />
<result column="birth_date" jdbcType="DATE" property="birthDate" />
<result column="insured_seq" jdbcType="INTEGER" property="insuredSeq" />
<result column="flag" jdbcType="VARCHAR" property="flag" />
<result column="insuree_height" jdbcType="DECIMAL" property="insureeHeight" />
<result column="insuree_weight" jdbcType="DECIMAL" property="insureeWeight" />
<result column="insuree_total" jdbcType="INTEGER" property="insureeTotal" />
<result column="is_id_longterm" jdbcType="INTEGER" property="isIdLongterm" />
<result column="id_effective_from" jdbcType="DATE" property="idEffectiveFrom" />
<result column="id_effective_to" jdbcType="DATE" property="idEffectiveTo" />
<result column="bank_id" jdbcType="BIGINT" property="bankId" />
<result column="bank_name" jdbcType="VARCHAR" property="bankName" />
<result column="bank_holder" jdbcType="VARCHAR" property="bankHolder" />
<result column="bank_no" jdbcType="VARCHAR" property="bankNo" />
<result column="bank_mobile_no" jdbcType="VARCHAR" property="bankMobileNo" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
<result column="id_areamap_id" jdbcType="BIGINT" property="idAreamapId" />
<result column="id_areamap" jdbcType="VARCHAR" property="idAreamap" />
<result column="resident_tax_type" jdbcType="INTEGER" property="residentTaxType" />
<result column="id_card_front" jdbcType="VARCHAR" property="idCardFront" />
<result column="id_card_back" jdbcType="VARCHAR" property="idCardBack" />
<result column="salary_type" jdbcType="VARCHAR" property="salaryType" />
<result column="salary" jdbcType="DECIMAL" property="salary" />
<result column="bank_city_id" jdbcType="BIGINT" property="bankCityId" />
<result column="id_no_back" jdbcType="VARCHAR" property="idNoBack" />
<result column="post_code" jdbcType="VARCHAR" property="postCode" />
<result column="contact_name" jdbcType="VARCHAR" property="contactName" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.yd.dal.entity.customer.AclPolicyholder">
<result column="remark" jdbcType="LONGVARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, config_level, product_id, plan_id, customer_id, order_id, policy_unit_price,
`type`, agent_relation, has_ai_confirmed, `status`, is_social_insured, `name`, english_name,
mobile_no, email, underwrite_question_id, province_id, province_name, district_id,
district_name, city_id, city_name, birth_province_id, birth_province_name, birth_city_id,
birth_city_name, birth_district_id, birth_district_name, birth_address, address,
occupation_id, occupation_name, id_type_id, id_type, id_no, gender, relation_id,
relation_type, birth_date, insured_seq, flag, insuree_height, insuree_weight, insuree_total,
is_id_longterm, id_effective_from, id_effective_to, bank_id, bank_name, bank_holder,
bank_no, bank_mobile_no, created_at, created_by, updated_at, updated_by, id_areamap_id,
id_areamap, resident_tax_type, id_card_front, id_card_back, salary_type, salary,
bank_city_id, id_no_back, post_code, contact_name
</sql>
<sql id="Blob_Column_List">
remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ag_acl_policyholder
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_policyholder
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPolicyholder" useGeneratedKeys="true">
insert into ag_acl_policyholder (config_level, product_id, plan_id,
customer_id, order_id, policy_unit_price,
`type`, agent_relation, has_ai_confirmed,
`status`, is_social_insured, `name`,
english_name, mobile_no, email,
underwrite_question_id, province_id, province_name,
district_id, district_name, city_id,
city_name, birth_province_id, birth_province_name,
birth_city_id, birth_city_name, birth_district_id,
birth_district_name, birth_address, address,
occupation_id, occupation_name, id_type_id,
id_type, id_no, gender,
relation_id, relation_type, birth_date,
insured_seq, flag, insuree_height,
insuree_weight, insuree_total, is_id_longterm,
id_effective_from, id_effective_to, bank_id,
bank_name, bank_holder, bank_no,
bank_mobile_no, created_at, created_by,
updated_at, updated_by, id_areamap_id,
id_areamap, resident_tax_type, id_card_front,
id_card_back, salary_type, salary,
bank_city_id, id_no_back, post_code,
contact_name, remark)
values (#{configLevel,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT},
#{customerId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{policyUnitPrice,jdbcType=DECIMAL},
#{type,jdbcType=INTEGER}, #{agentRelation,jdbcType=VARCHAR}, #{hasAiConfirmed,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{isSocialInsured,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{englishName,jdbcType=VARCHAR}, #{mobileNo,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{underwriteQuestionId,jdbcType=VARCHAR}, #{provinceId,jdbcType=BIGINT}, #{provinceName,jdbcType=VARCHAR},
#{districtId,jdbcType=BIGINT}, #{districtName,jdbcType=VARCHAR}, #{cityId,jdbcType=BIGINT},
#{cityName,jdbcType=VARCHAR}, #{birthProvinceId,jdbcType=BIGINT}, #{birthProvinceName,jdbcType=VARCHAR},
#{birthCityId,jdbcType=BIGINT}, #{birthCityName,jdbcType=VARCHAR}, #{birthDistrictId,jdbcType=BIGINT},
#{birthDistrictName,jdbcType=VARCHAR}, #{birthAddress,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{occupationId,jdbcType=BIGINT}, #{occupationName,jdbcType=VARCHAR}, #{idTypeId,jdbcType=BIGINT},
#{idType,jdbcType=VARCHAR}, #{idNo,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
#{relationId,jdbcType=BIGINT}, #{relationType,jdbcType=VARCHAR}, #{birthDate,jdbcType=DATE},
#{insuredSeq,jdbcType=INTEGER}, #{flag,jdbcType=VARCHAR}, #{insureeHeight,jdbcType=DECIMAL},
#{insureeWeight,jdbcType=DECIMAL}, #{insureeTotal,jdbcType=INTEGER}, #{isIdLongterm,jdbcType=INTEGER},
#{idEffectiveFrom,jdbcType=DATE}, #{idEffectiveTo,jdbcType=DATE}, #{bankId,jdbcType=BIGINT},
#{bankName,jdbcType=VARCHAR}, #{bankHolder,jdbcType=VARCHAR}, #{bankNo,jdbcType=VARCHAR},
#{bankMobileNo,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}, #{idAreamapId,jdbcType=BIGINT},
#{idAreamap,jdbcType=VARCHAR}, #{residentTaxType,jdbcType=INTEGER}, #{idCardFront,jdbcType=VARCHAR},
#{idCardBack,jdbcType=VARCHAR}, #{salaryType,jdbcType=VARCHAR}, #{salary,jdbcType=DECIMAL},
#{bankCityId,jdbcType=BIGINT}, #{idNoBack,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR},
#{contactName,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPolicyholder" useGeneratedKeys="true">
insert into ag_acl_policyholder
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configLevel != null">
config_level,
</if>
<if test="productId != null">
product_id,
</if>
<if test="planId != null">
plan_id,
</if>
<if test="customerId != null">
customer_id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="policyUnitPrice != null">
policy_unit_price,
</if>
<if test="type != null">
`type`,
</if>
<if test="agentRelation != null">
agent_relation,
</if>
<if test="hasAiConfirmed != null">
has_ai_confirmed,
</if>
<if test="status != null">
`status`,
</if>
<if test="isSocialInsured != null">
is_social_insured,
</if>
<if test="name != null">
`name`,
</if>
<if test="englishName != null">
english_name,
</if>
<if test="mobileNo != null">
mobile_no,
</if>
<if test="email != null">
email,
</if>
<if test="underwriteQuestionId != null">
underwrite_question_id,
</if>
<if test="provinceId != null">
province_id,
</if>
<if test="provinceName != null">
province_name,
</if>
<if test="districtId != null">
district_id,
</if>
<if test="districtName != null">
district_name,
</if>
<if test="cityId != null">
city_id,
</if>
<if test="cityName != null">
city_name,
</if>
<if test="birthProvinceId != null">
birth_province_id,
</if>
<if test="birthProvinceName != null">
birth_province_name,
</if>
<if test="birthCityId != null">
birth_city_id,
</if>
<if test="birthCityName != null">
birth_city_name,
</if>
<if test="birthDistrictId != null">
birth_district_id,
</if>
<if test="birthDistrictName != null">
birth_district_name,
</if>
<if test="birthAddress != null">
birth_address,
</if>
<if test="address != null">
address,
</if>
<if test="occupationId != null">
occupation_id,
</if>
<if test="occupationName != null">
occupation_name,
</if>
<if test="idTypeId != null">
id_type_id,
</if>
<if test="idType != null">
id_type,
</if>
<if test="idNo != null">
id_no,
</if>
<if test="gender != null">
gender,
</if>
<if test="relationId != null">
relation_id,
</if>
<if test="relationType != null">
relation_type,
</if>
<if test="birthDate != null">
birth_date,
</if>
<if test="insuredSeq != null">
insured_seq,
</if>
<if test="flag != null">
flag,
</if>
<if test="insureeHeight != null">
insuree_height,
</if>
<if test="insureeWeight != null">
insuree_weight,
</if>
<if test="insureeTotal != null">
insuree_total,
</if>
<if test="isIdLongterm != null">
is_id_longterm,
</if>
<if test="idEffectiveFrom != null">
id_effective_from,
</if>
<if test="idEffectiveTo != null">
id_effective_to,
</if>
<if test="bankId != null">
bank_id,
</if>
<if test="bankName != null">
bank_name,
</if>
<if test="bankHolder != null">
bank_holder,
</if>
<if test="bankNo != null">
bank_no,
</if>
<if test="bankMobileNo != null">
bank_mobile_no,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="idAreamapId != null">
id_areamap_id,
</if>
<if test="idAreamap != null">
id_areamap,
</if>
<if test="residentTaxType != null">
resident_tax_type,
</if>
<if test="idCardFront != null">
id_card_front,
</if>
<if test="idCardBack != null">
id_card_back,
</if>
<if test="salaryType != null">
salary_type,
</if>
<if test="salary != null">
salary,
</if>
<if test="bankCityId != null">
bank_city_id,
</if>
<if test="idNoBack != null">
id_no_back,
</if>
<if test="postCode != null">
post_code,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configLevel != null">
#{configLevel,jdbcType=INTEGER},
</if>
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>
<if test="planId != null">
#{planId,jdbcType=BIGINT},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="orderId != null">
#{orderId,jdbcType=BIGINT},
</if>
<if test="policyUnitPrice != null">
#{policyUnitPrice,jdbcType=DECIMAL},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="agentRelation != null">
#{agentRelation,jdbcType=VARCHAR},
</if>
<if test="hasAiConfirmed != null">
#{hasAiConfirmed,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="isSocialInsured != null">
#{isSocialInsured,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="englishName != null">
#{englishName,jdbcType=VARCHAR},
</if>
<if test="mobileNo != null">
#{mobileNo,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="underwriteQuestionId != null">
#{underwriteQuestionId,jdbcType=VARCHAR},
</if>
<if test="provinceId != null">
#{provinceId,jdbcType=BIGINT},
</if>
<if test="provinceName != null">
#{provinceName,jdbcType=VARCHAR},
</if>
<if test="districtId != null">
#{districtId,jdbcType=BIGINT},
</if>
<if test="districtName != null">
#{districtName,jdbcType=VARCHAR},
</if>
<if test="cityId != null">
#{cityId,jdbcType=BIGINT},
</if>
<if test="cityName != null">
#{cityName,jdbcType=VARCHAR},
</if>
<if test="birthProvinceId != null">
#{birthProvinceId,jdbcType=BIGINT},
</if>
<if test="birthProvinceName != null">
#{birthProvinceName,jdbcType=VARCHAR},
</if>
<if test="birthCityId != null">
#{birthCityId,jdbcType=BIGINT},
</if>
<if test="birthCityName != null">
#{birthCityName,jdbcType=VARCHAR},
</if>
<if test="birthDistrictId != null">
#{birthDistrictId,jdbcType=BIGINT},
</if>
<if test="birthDistrictName != null">
#{birthDistrictName,jdbcType=VARCHAR},
</if>
<if test="birthAddress != null">
#{birthAddress,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="occupationId != null">
#{occupationId,jdbcType=BIGINT},
</if>
<if test="occupationName != null">
#{occupationName,jdbcType=VARCHAR},
</if>
<if test="idTypeId != null">
#{idTypeId,jdbcType=BIGINT},
</if>
<if test="idType != null">
#{idType,jdbcType=VARCHAR},
</if>
<if test="idNo != null">
#{idNo,jdbcType=VARCHAR},
</if>
<if test="gender != null">
#{gender,jdbcType=INTEGER},
</if>
<if test="relationId != null">
#{relationId,jdbcType=BIGINT},
</if>
<if test="relationType != null">
#{relationType,jdbcType=VARCHAR},
</if>
<if test="birthDate != null">
#{birthDate,jdbcType=DATE},
</if>
<if test="insuredSeq != null">
#{insuredSeq,jdbcType=INTEGER},
</if>
<if test="flag != null">
#{flag,jdbcType=VARCHAR},
</if>
<if test="insureeHeight != null">
#{insureeHeight,jdbcType=DECIMAL},
</if>
<if test="insureeWeight != null">
#{insureeWeight,jdbcType=DECIMAL},
</if>
<if test="insureeTotal != null">
#{insureeTotal,jdbcType=INTEGER},
</if>
<if test="isIdLongterm != null">
#{isIdLongterm,jdbcType=INTEGER},
</if>
<if test="idEffectiveFrom != null">
#{idEffectiveFrom,jdbcType=DATE},
</if>
<if test="idEffectiveTo != null">
#{idEffectiveTo,jdbcType=DATE},
</if>
<if test="bankId != null">
#{bankId,jdbcType=BIGINT},
</if>
<if test="bankName != null">
#{bankName,jdbcType=VARCHAR},
</if>
<if test="bankHolder != null">
#{bankHolder,jdbcType=VARCHAR},
</if>
<if test="bankNo != null">
#{bankNo,jdbcType=VARCHAR},
</if>
<if test="bankMobileNo != null">
#{bankMobileNo,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
<if test="idAreamapId != null">
#{idAreamapId,jdbcType=BIGINT},
</if>
<if test="idAreamap != null">
#{idAreamap,jdbcType=VARCHAR},
</if>
<if test="residentTaxType != null">
#{residentTaxType,jdbcType=INTEGER},
</if>
<if test="idCardFront != null">
#{idCardFront,jdbcType=VARCHAR},
</if>
<if test="idCardBack != null">
#{idCardBack,jdbcType=VARCHAR},
</if>
<if test="salaryType != null">
#{salaryType,jdbcType=VARCHAR},
</if>
<if test="salary != null">
#{salary,jdbcType=DECIMAL},
</if>
<if test="bankCityId != null">
#{bankCityId,jdbcType=BIGINT},
</if>
<if test="idNoBack != null">
#{idNoBack,jdbcType=VARCHAR},
</if>
<if test="postCode != null">
#{postCode,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPolicyholder">
update ag_acl_policyholder
<set>
<if test="configLevel != null">
config_level = #{configLevel,jdbcType=INTEGER},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=BIGINT},
</if>
<if test="planId != null">
plan_id = #{planId,jdbcType=BIGINT},
</if>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=BIGINT},
</if>
<if test="policyUnitPrice != null">
policy_unit_price = #{policyUnitPrice,jdbcType=DECIMAL},
</if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="agentRelation != null">
agent_relation = #{agentRelation,jdbcType=VARCHAR},
</if>
<if test="hasAiConfirmed != null">
has_ai_confirmed = #{hasAiConfirmed,jdbcType=INTEGER},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="isSocialInsured != null">
is_social_insured = #{isSocialInsured,jdbcType=INTEGER},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="englishName != null">
english_name = #{englishName,jdbcType=VARCHAR},
</if>
<if test="mobileNo != null">
mobile_no = #{mobileNo,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="underwriteQuestionId != null">
underwrite_question_id = #{underwriteQuestionId,jdbcType=VARCHAR},
</if>
<if test="provinceId != null">
province_id = #{provinceId,jdbcType=BIGINT},
</if>
<if test="provinceName != null">
province_name = #{provinceName,jdbcType=VARCHAR},
</if>
<if test="districtId != null">
district_id = #{districtId,jdbcType=BIGINT},
</if>
<if test="districtName != null">
district_name = #{districtName,jdbcType=VARCHAR},
</if>
<if test="cityId != null">
city_id = #{cityId,jdbcType=BIGINT},
</if>
<if test="cityName != null">
city_name = #{cityName,jdbcType=VARCHAR},
</if>
<if test="birthProvinceId != null">
birth_province_id = #{birthProvinceId,jdbcType=BIGINT},
</if>
<if test="birthProvinceName != null">
birth_province_name = #{birthProvinceName,jdbcType=VARCHAR},
</if>
<if test="birthCityId != null">
birth_city_id = #{birthCityId,jdbcType=BIGINT},
</if>
<if test="birthCityName != null">
birth_city_name = #{birthCityName,jdbcType=VARCHAR},
</if>
<if test="birthDistrictId != null">
birth_district_id = #{birthDistrictId,jdbcType=BIGINT},
</if>
<if test="birthDistrictName != null">
birth_district_name = #{birthDistrictName,jdbcType=VARCHAR},
</if>
<if test="birthAddress != null">
birth_address = #{birthAddress,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="occupationId != null">
occupation_id = #{occupationId,jdbcType=BIGINT},
</if>
<if test="occupationName != null">
occupation_name = #{occupationName,jdbcType=VARCHAR},
</if>
<if test="idTypeId != null">
id_type_id = #{idTypeId,jdbcType=BIGINT},
</if>
<if test="idType != null">
id_type = #{idType,jdbcType=VARCHAR},
</if>
<if test="idNo != null">
id_no = #{idNo,jdbcType=VARCHAR},
</if>
<if test="gender != null">
gender = #{gender,jdbcType=INTEGER},
</if>
<if test="relationId != null">
relation_id = #{relationId,jdbcType=BIGINT},
</if>
<if test="relationType != null">
relation_type = #{relationType,jdbcType=VARCHAR},
</if>
<if test="birthDate != null">
birth_date = #{birthDate,jdbcType=DATE},
</if>
<if test="insuredSeq != null">
insured_seq = #{insuredSeq,jdbcType=INTEGER},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=VARCHAR},
</if>
<if test="insureeHeight != null">
insuree_height = #{insureeHeight,jdbcType=DECIMAL},
</if>
<if test="insureeWeight != null">
insuree_weight = #{insureeWeight,jdbcType=DECIMAL},
</if>
<if test="insureeTotal != null">
insuree_total = #{insureeTotal,jdbcType=INTEGER},
</if>
<if test="isIdLongterm != null">
is_id_longterm = #{isIdLongterm,jdbcType=INTEGER},
</if>
<if test="idEffectiveFrom != null">
id_effective_from = #{idEffectiveFrom,jdbcType=DATE},
</if>
<if test="idEffectiveTo != null">
id_effective_to = #{idEffectiveTo,jdbcType=DATE},
</if>
<if test="bankId != null">
bank_id = #{bankId,jdbcType=BIGINT},
</if>
<if test="bankName != null">
bank_name = #{bankName,jdbcType=VARCHAR},
</if>
<if test="bankHolder != null">
bank_holder = #{bankHolder,jdbcType=VARCHAR},
</if>
<if test="bankNo != null">
bank_no = #{bankNo,jdbcType=VARCHAR},
</if>
<if test="bankMobileNo != null">
bank_mobile_no = #{bankMobileNo,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if test="idAreamapId != null">
id_areamap_id = #{idAreamapId,jdbcType=BIGINT},
</if>
<if test="idAreamap != null">
id_areamap = #{idAreamap,jdbcType=VARCHAR},
</if>
<if test="residentTaxType != null">
resident_tax_type = #{residentTaxType,jdbcType=INTEGER},
</if>
<if test="idCardFront != null">
id_card_front = #{idCardFront,jdbcType=VARCHAR},
</if>
<if test="idCardBack != null">
id_card_back = #{idCardBack,jdbcType=VARCHAR},
</if>
<if test="salaryType != null">
salary_type = #{salaryType,jdbcType=VARCHAR},
</if>
<if test="salary != null">
salary = #{salary,jdbcType=DECIMAL},
</if>
<if test="bankCityId != null">
bank_city_id = #{bankCityId,jdbcType=BIGINT},
</if>
<if test="idNoBack != null">
id_no_back = #{idNoBack,jdbcType=VARCHAR},
</if>
<if test="postCode != null">
post_code = #{postCode,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.yd.dal.entity.customer.AclPolicyholder">
update ag_acl_policyholder
set config_level = #{configLevel,jdbcType=INTEGER},
product_id = #{productId,jdbcType=BIGINT},
plan_id = #{planId,jdbcType=BIGINT},
customer_id = #{customerId,jdbcType=BIGINT},
order_id = #{orderId,jdbcType=BIGINT},
policy_unit_price = #{policyUnitPrice,jdbcType=DECIMAL},
`type` = #{type,jdbcType=INTEGER},
agent_relation = #{agentRelation,jdbcType=VARCHAR},
has_ai_confirmed = #{hasAiConfirmed,jdbcType=INTEGER},
`status` = #{status,jdbcType=INTEGER},
is_social_insured = #{isSocialInsured,jdbcType=INTEGER},
`name` = #{name,jdbcType=VARCHAR},
english_name = #{englishName,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
underwrite_question_id = #{underwriteQuestionId,jdbcType=VARCHAR},
province_id = #{provinceId,jdbcType=BIGINT},
province_name = #{provinceName,jdbcType=VARCHAR},
district_id = #{districtId,jdbcType=BIGINT},
district_name = #{districtName,jdbcType=VARCHAR},
city_id = #{cityId,jdbcType=BIGINT},
city_name = #{cityName,jdbcType=VARCHAR},
birth_province_id = #{birthProvinceId,jdbcType=BIGINT},
birth_province_name = #{birthProvinceName,jdbcType=VARCHAR},
birth_city_id = #{birthCityId,jdbcType=BIGINT},
birth_city_name = #{birthCityName,jdbcType=VARCHAR},
birth_district_id = #{birthDistrictId,jdbcType=BIGINT},
birth_district_name = #{birthDistrictName,jdbcType=VARCHAR},
birth_address = #{birthAddress,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
occupation_id = #{occupationId,jdbcType=BIGINT},
occupation_name = #{occupationName,jdbcType=VARCHAR},
id_type_id = #{idTypeId,jdbcType=BIGINT},
id_type = #{idType,jdbcType=VARCHAR},
id_no = #{idNo,jdbcType=VARCHAR},
gender = #{gender,jdbcType=INTEGER},
relation_id = #{relationId,jdbcType=BIGINT},
relation_type = #{relationType,jdbcType=VARCHAR},
birth_date = #{birthDate,jdbcType=DATE},
insured_seq = #{insuredSeq,jdbcType=INTEGER},
flag = #{flag,jdbcType=VARCHAR},
insuree_height = #{insureeHeight,jdbcType=DECIMAL},
insuree_weight = #{insureeWeight,jdbcType=DECIMAL},
insuree_total = #{insureeTotal,jdbcType=INTEGER},
is_id_longterm = #{isIdLongterm,jdbcType=INTEGER},
id_effective_from = #{idEffectiveFrom,jdbcType=DATE},
id_effective_to = #{idEffectiveTo,jdbcType=DATE},
bank_id = #{bankId,jdbcType=BIGINT},
bank_name = #{bankName,jdbcType=VARCHAR},
bank_holder = #{bankHolder,jdbcType=VARCHAR},
bank_no = #{bankNo,jdbcType=VARCHAR},
bank_mobile_no = #{bankMobileNo,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
id_areamap_id = #{idAreamapId,jdbcType=BIGINT},
id_areamap = #{idAreamap,jdbcType=VARCHAR},
resident_tax_type = #{residentTaxType,jdbcType=INTEGER},
id_card_front = #{idCardFront,jdbcType=VARCHAR},
id_card_back = #{idCardBack,jdbcType=VARCHAR},
salary_type = #{salaryType,jdbcType=VARCHAR},
salary = #{salary,jdbcType=DECIMAL},
bank_city_id = #{bankCityId,jdbcType=BIGINT},
id_no_back = #{idNoBack,jdbcType=VARCHAR},
post_code = #{postCode,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
remark = #{remark,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclPolicyholder">
update ag_acl_policyholder
set config_level = #{configLevel,jdbcType=INTEGER},
product_id = #{productId,jdbcType=BIGINT},
plan_id = #{planId,jdbcType=BIGINT},
customer_id = #{customerId,jdbcType=BIGINT},
order_id = #{orderId,jdbcType=BIGINT},
policy_unit_price = #{policyUnitPrice,jdbcType=DECIMAL},
`type` = #{type,jdbcType=INTEGER},
agent_relation = #{agentRelation,jdbcType=VARCHAR},
has_ai_confirmed = #{hasAiConfirmed,jdbcType=INTEGER},
`status` = #{status,jdbcType=INTEGER},
is_social_insured = #{isSocialInsured,jdbcType=INTEGER},
`name` = #{name,jdbcType=VARCHAR},
english_name = #{englishName,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
underwrite_question_id = #{underwriteQuestionId,jdbcType=VARCHAR},
province_id = #{provinceId,jdbcType=BIGINT},
province_name = #{provinceName,jdbcType=VARCHAR},
district_id = #{districtId,jdbcType=BIGINT},
district_name = #{districtName,jdbcType=VARCHAR},
city_id = #{cityId,jdbcType=BIGINT},
city_name = #{cityName,jdbcType=VARCHAR},
birth_province_id = #{birthProvinceId,jdbcType=BIGINT},
birth_province_name = #{birthProvinceName,jdbcType=VARCHAR},
birth_city_id = #{birthCityId,jdbcType=BIGINT},
birth_city_name = #{birthCityName,jdbcType=VARCHAR},
birth_district_id = #{birthDistrictId,jdbcType=BIGINT},
birth_district_name = #{birthDistrictName,jdbcType=VARCHAR},
birth_address = #{birthAddress,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
occupation_id = #{occupationId,jdbcType=BIGINT},
occupation_name = #{occupationName,jdbcType=VARCHAR},
id_type_id = #{idTypeId,jdbcType=BIGINT},
id_type = #{idType,jdbcType=VARCHAR},
id_no = #{idNo,jdbcType=VARCHAR},
gender = #{gender,jdbcType=INTEGER},
relation_id = #{relationId,jdbcType=BIGINT},
relation_type = #{relationType,jdbcType=VARCHAR},
birth_date = #{birthDate,jdbcType=DATE},
insured_seq = #{insuredSeq,jdbcType=INTEGER},
flag = #{flag,jdbcType=VARCHAR},
insuree_height = #{insureeHeight,jdbcType=DECIMAL},
insuree_weight = #{insureeWeight,jdbcType=DECIMAL},
insuree_total = #{insureeTotal,jdbcType=INTEGER},
is_id_longterm = #{isIdLongterm,jdbcType=INTEGER},
id_effective_from = #{idEffectiveFrom,jdbcType=DATE},
id_effective_to = #{idEffectiveTo,jdbcType=DATE},
bank_id = #{bankId,jdbcType=BIGINT},
bank_name = #{bankName,jdbcType=VARCHAR},
bank_holder = #{bankHolder,jdbcType=VARCHAR},
bank_no = #{bankNo,jdbcType=VARCHAR},
bank_mobile_no = #{bankMobileNo,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
id_areamap_id = #{idAreamapId,jdbcType=BIGINT},
id_areamap = #{idAreamap,jdbcType=VARCHAR},
resident_tax_type = #{residentTaxType,jdbcType=INTEGER},
id_card_front = #{idCardFront,jdbcType=VARCHAR},
id_card_back = #{idCardBack,jdbcType=VARCHAR},
salary_type = #{salaryType,jdbcType=VARCHAR},
salary = #{salary,jdbcType=DECIMAL},
bank_city_id = #{bankCityId,jdbcType=BIGINT},
id_no_back = #{idNoBack,jdbcType=VARCHAR},
post_code = #{postCode,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByOrderId" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ag_acl_policyholder
where order_id = #{orderId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
......@@ -70,7 +70,7 @@
</insert>
<update id="checkComeCommission">
<update id="setOrderCommissionCheckId">
update ag_po_order
<set>
<if test="isSuccess != null">
......
<?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.yd.dal.mapper.order.PoOrderMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.order.PoOrder">
<!--@mbg.generated-->
<!--@Table ag_po_order-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="config_level" jdbcType="INTEGER" property="configLevel" />
<result column="product_id" jdbcType="BIGINT" property="productId" />
<result column="plan_id" jdbcType="BIGINT" property="planId" />
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="order_date" jdbcType="TIMESTAMP" property="orderDate" />
<result column="order_price" jdbcType="DECIMAL" property="orderPrice" />
<result column="quotation_id" jdbcType="BIGINT" property="quotationId" />
<result column="quote_no" jdbcType="BIGINT" property="quoteNo" />
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
<result column="destination" jdbcType="VARCHAR" property="destination" />
<result column="destination_continent_id" jdbcType="BIGINT" property="destinationContinentId" />
<result column="destination_region_id" jdbcType="BIGINT" property="destinationRegionId" />
<result column="destination_country_id" jdbcType="BIGINT" property="destinationCountryId" />
<result column="effective_start_date" jdbcType="TIMESTAMP" property="effectiveStartDate" />
<result column="effective_end_date" jdbcType="TIMESTAMP" property="effectiveEndDate" />
<result column="cover_length" jdbcType="INTEGER" property="coverLength" />
<result column="cover_adult_qty" jdbcType="INTEGER" property="coverAdultQty" />
<result column="cover_underage_qty" jdbcType="INTEGER" property="coverUnderageQty" />
<result column="payment_method_id" jdbcType="BIGINT" property="paymentMethodId" />
<result column="pay_url" jdbcType="VARCHAR" property="payUrl" />
<result column="pay_from" jdbcType="INTEGER" property="payFrom" />
<result column="insurer_pdf_url" jdbcType="VARCHAR" property="insurerPdfUrl" />
<result column="is_msg_sent" jdbcType="INTEGER" property="isMsgSent" />
<result column="is_car_tax" jdbcType="INTEGER" property="isCarTax" />
<result column="commission_rate" jdbcType="DECIMAL" property="commissionRate" />
<result column="commission_amount" jdbcType="DECIMAL" property="commissionAmount" />
<result column="fyc_rate" jdbcType="DECIMAL" property="fycRate" />
<result column="fyc_amount" jdbcType="DECIMAL" property="fycAmount" />
<result column="b2c_rate" jdbcType="DECIMAL" property="b2cRate" />
<result column="grade_commission_rate" jdbcType="DECIMAL" property="gradeCommissionRate" />
<result column="referral_rate" jdbcType="DECIMAL" property="referralRate" />
<result column="referral_amount" jdbcType="DECIMAL" property="referralAmount" />
<result column="policy_id" jdbcType="BIGINT" property="policyId" />
<result column="policy_no" jdbcType="VARCHAR" property="policyNo" />
<result column="mkt_campaign" jdbcType="VARCHAR" property="mktCampaign" />
<result column="mkt_task" jdbcType="VARCHAR" property="mktTask" />
<result column="is_converted" jdbcType="INTEGER" property="isConverted" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="payment_status" jdbcType="INTEGER" property="paymentStatus" />
<result column="flag" jdbcType="VARCHAR" property="flag" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<result column="referral_customer_id" jdbcType="BIGINT" property="referralCustomerId" />
<result column="share_code" jdbcType="VARCHAR" property="shareCode" />
<result column="insurer_id" jdbcType="BIGINT" property="insurerId" />
<result column="data_source" jdbcType="VARCHAR" property="dataSource" />
<result column="is_social_insured" jdbcType="INTEGER" property="isSocialInsured" />
<result column="cover_term" jdbcType="INTEGER" property="coverTerm" />
<result column="payment_term" jdbcType="INTEGER" property="paymentTerm" />
<result column="payment_term_unit" jdbcType="VARCHAR" property="paymentTermUnit" />
<result column="pay_interval" jdbcType="INTEGER" property="payInterval" />
<result column="view_flag" jdbcType="VARCHAR" property="viewFlag" />
<result column="dynamic_field_a" jdbcType="VARCHAR" property="dynamicFieldA" />
<result column="dynamic_field_b" jdbcType="VARCHAR" property="dynamicFieldB" />
<result column="dynamic_field_c" jdbcType="VARCHAR" property="dynamicFieldC" />
<result column="dynamic_field_d" jdbcType="VARCHAR" property="dynamicFieldD" />
<result column="plate_no" jdbcType="VARCHAR" property="plateNo" />
<result column="memo" jdbcType="LONGVARCHAR" property="memo" />
<result column="product_table_request_json" jdbcType="LONGVARCHAR" property="productTableRequestJson" />
<result column="verified_seats" jdbcType="INTEGER" property="verifiedSeats" />
<result column="frame_no" jdbcType="VARCHAR" property="frameNo" />
<result column="subject_province_id" jdbcType="BIGINT" property="subjectProvinceId" />
<result column="subject_city_id" jdbcType="BIGINT" property="subjectCityId" />
<result column="subject_address" jdbcType="VARCHAR" property="subjectAddress" />
<result column="room_qty" jdbcType="VARCHAR" property="roomQty" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
<result column="source_channel" jdbcType="VARCHAR" property="sourceChannel" />
<result column="source_plan_name" jdbcType="VARCHAR" property="sourcePlanName" />
<result column="source_publishdate" jdbcType="VARCHAR" property="sourcePublishdate" />
<result column="source_article" jdbcType="VARCHAR" property="sourceArticle" />
<result column="ip_address" jdbcType="VARCHAR" property="ipAddress" />
<result column="ip_region" jdbcType="VARCHAR" property="ipRegion" />
<result column="renew_order_id" jdbcType="BIGINT" property="renewOrderId" />
<result column="is_renew_complete" jdbcType="INTEGER" property="isRenewComplete" />
<result column="is_pay_to_yd" jdbcType="INTEGER" property="isPayToYd" />
<result column="auto_pay_flag" jdbcType="VARCHAR" property="autoPayFlag" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, config_level, product_id, plan_id, order_no, order_date, order_price, quotation_id,
quote_no, product_category_id, destination, destination_continent_id, destination_region_id,
destination_country_id, effective_start_date, effective_end_date, cover_length, cover_adult_qty,
cover_underage_qty, payment_method_id, pay_url, pay_from, insurer_pdf_url, is_msg_sent,
is_car_tax, commission_rate, commission_amount, fyc_rate, fyc_amount,
b2c_rate, grade_commission_rate, referral_rate, referral_amount, policy_id, policy_no,
mkt_campaign, mkt_task, is_converted, `status`, payment_status, flag, customer_id,
referral_customer_id, share_code, insurer_id, data_source, is_social_insured, cover_term,
payment_term, payment_term_unit, pay_interval, view_flag, dynamic_field_a, dynamic_field_b,
dynamic_field_c, dynamic_field_d, plate_no, memo, product_table_request_json, verified_seats,
frame_no, subject_province_id, subject_city_id, subject_address, room_qty, created_at,
created_by, updated_at, updated_by, source_channel, source_plan_name, source_publishdate,
source_article, ip_address, ip_region, renew_order_id, is_renew_complete, is_pay_to_yd,
auto_pay_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from ag_po_order
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_po_order
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.order.PoOrder" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_po_order (config_level, product_id, plan_id,
order_no, order_date, order_price,
quotation_id, quote_no, product_category_id,
destination, destination_continent_id, destination_region_id,
destination_country_id, effective_start_date,
effective_end_date, cover_length, cover_adult_qty,
cover_underage_qty, payment_method_id, pay_url,
pay_from, insurer_pdf_url, is_msg_sent,
is_car_tax, commission_rate,
commission_amount, fyc_rate, fyc_amount,
b2c_rate, grade_commission_rate, referral_rate,
referral_amount, policy_id, policy_no,
mkt_campaign, mkt_task, is_converted,
`status`, payment_status, flag,
customer_id, referral_customer_id, share_code,
insurer_id, data_source, is_social_insured,
cover_term, payment_term, payment_term_unit,
pay_interval, view_flag, dynamic_field_a,
dynamic_field_b, dynamic_field_c, dynamic_field_d,
plate_no, memo, product_table_request_json,
verified_seats, frame_no, subject_province_id,
subject_city_id, subject_address, room_qty,
created_at, created_by, updated_at,
updated_by, source_channel, source_plan_name,
source_publishdate, source_article, ip_address,
ip_region, renew_order_id, is_renew_complete,
is_pay_to_yd, auto_pay_flag)
values (#{configLevel,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT},
#{orderNo,jdbcType=VARCHAR}, #{orderDate,jdbcType=TIMESTAMP}, #{orderPrice,jdbcType=DECIMAL},
#{quotationId,jdbcType=BIGINT}, #{quoteNo,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT},
#{destination,jdbcType=VARCHAR}, #{destinationContinentId,jdbcType=BIGINT}, #{destinationRegionId,jdbcType=BIGINT},
#{destinationCountryId,jdbcType=BIGINT}, #{effectiveStartDate,jdbcType=TIMESTAMP},
#{effectiveEndDate,jdbcType=TIMESTAMP}, #{coverLength,jdbcType=INTEGER}, #{coverAdultQty,jdbcType=INTEGER},
#{coverUnderageQty,jdbcType=INTEGER}, #{paymentMethodId,jdbcType=BIGINT}, #{payUrl,jdbcType=VARCHAR},
#{payFrom,jdbcType=INTEGER}, #{insurerPdfUrl,jdbcType=VARCHAR}, #{isMsgSent,jdbcType=INTEGER},
#{isCarTax,jdbcType=INTEGER}, #{ydValueAddedTax,jdbcType=DECIMAL}, #{commissionRate,jdbcType=DECIMAL},
#{commissionAmount,jdbcType=DECIMAL}, #{fycRate,jdbcType=DECIMAL}, #{fycAmount,jdbcType=DECIMAL},
#{b2cRate,jdbcType=DECIMAL}, #{gradeCommissionRate,jdbcType=DECIMAL}, #{referralRate,jdbcType=DECIMAL},
#{referralAmount,jdbcType=DECIMAL}, #{policyId,jdbcType=BIGINT}, #{policyNo,jdbcType=VARCHAR},
#{mktCampaign,jdbcType=VARCHAR}, #{mktTask,jdbcType=VARCHAR}, #{isConverted,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{paymentStatus,jdbcType=INTEGER}, #{flag,jdbcType=VARCHAR},
#{customerId,jdbcType=BIGINT}, #{referralCustomerId,jdbcType=BIGINT}, #{shareCode,jdbcType=VARCHAR},
#{insurerId,jdbcType=BIGINT}, #{dataSource,jdbcType=VARCHAR}, #{isSocialInsured,jdbcType=INTEGER},
#{coverTerm,jdbcType=INTEGER}, #{paymentTerm,jdbcType=INTEGER}, #{paymentTermUnit,jdbcType=VARCHAR},
#{payInterval,jdbcType=INTEGER}, #{viewFlag,jdbcType=VARCHAR}, #{dynamicFieldA,jdbcType=VARCHAR},
#{dynamicFieldB,jdbcType=VARCHAR}, #{dynamicFieldC,jdbcType=VARCHAR}, #{dynamicFieldD,jdbcType=VARCHAR},
#{plateNo,jdbcType=VARCHAR}, #{memo,jdbcType=LONGVARCHAR}, #{productTableRequestJson,jdbcType=LONGVARCHAR},
#{verifiedSeats,jdbcType=INTEGER}, #{frameNo,jdbcType=VARCHAR}, #{subjectProvinceId,jdbcType=BIGINT},
#{subjectCityId,jdbcType=BIGINT}, #{subjectAddress,jdbcType=VARCHAR}, #{roomQty,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT}, #{sourceChannel,jdbcType=VARCHAR}, #{sourcePlanName,jdbcType=VARCHAR},
#{sourcePublishdate,jdbcType=VARCHAR}, #{sourceArticle,jdbcType=VARCHAR}, #{ipAddress,jdbcType=VARCHAR},
#{ipRegion,jdbcType=VARCHAR}, #{renewOrderId,jdbcType=BIGINT}, #{isRenewComplete,jdbcType=INTEGER},
#{isPayToYd,jdbcType=INTEGER}, #{autoPayFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.order.PoOrder" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_po_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configLevel != null">
config_level,
</if>
<if test="productId != null">
product_id,
</if>
<if test="planId != null">
plan_id,
</if>
<if test="orderNo != null">
order_no,
</if>
<if test="orderDate != null">
order_date,
</if>
<if test="orderPrice != null">
order_price,
</if>
<if test="quotationId != null">
quotation_id,
</if>
<if test="quoteNo != null">
quote_no,
</if>
<if test="productCategoryId != null">
product_category_id,
</if>
<if test="destination != null">
destination,
</if>
<if test="destinationContinentId != null">
destination_continent_id,
</if>
<if test="destinationRegionId != null">
destination_region_id,
</if>
<if test="destinationCountryId != null">
destination_country_id,
</if>
<if test="effectiveStartDate != null">
effective_start_date,
</if>
<if test="effectiveEndDate != null">
effective_end_date,
</if>
<if test="coverLength != null">
cover_length,
</if>
<if test="coverAdultQty != null">
cover_adult_qty,
</if>
<if test="coverUnderageQty != null">
cover_underage_qty,
</if>
<if test="paymentMethodId != null">
payment_method_id,
</if>
<if test="payUrl != null">
pay_url,
</if>
<if test="payFrom != null">
pay_from,
</if>
<if test="insurerPdfUrl != null">
insurer_pdf_url,
</if>
<if test="isMsgSent != null">
is_msg_sent,
</if>
<if test="isCarTax != null">
is_car_tax,
</if>
<if test="commissionRate != null">
commission_rate,
</if>
<if test="commissionAmount != null">
commission_amount,
</if>
<if test="fycRate != null">
fyc_rate,
</if>
<if test="fycAmount != null">
fyc_amount,
</if>
<if test="b2cRate != null">
b2c_rate,
</if>
<if test="gradeCommissionRate != null">
grade_commission_rate,
</if>
<if test="referralRate != null">
referral_rate,
</if>
<if test="referralAmount != null">
referral_amount,
</if>
<if test="policyId != null">
policy_id,
</if>
<if test="policyNo != null">
policy_no,
</if>
<if test="mktCampaign != null">
mkt_campaign,
</if>
<if test="mktTask != null">
mkt_task,
</if>
<if test="isConverted != null">
is_converted,
</if>
<if test="status != null">
`status`,
</if>
<if test="paymentStatus != null">
payment_status,
</if>
<if test="flag != null">
flag,
</if>
<if test="customerId != null">
customer_id,
</if>
<if test="referralCustomerId != null">
referral_customer_id,
</if>
<if test="shareCode != null">
share_code,
</if>
<if test="insurerId != null">
insurer_id,
</if>
<if test="dataSource != null">
data_source,
</if>
<if test="isSocialInsured != null">
is_social_insured,
</if>
<if test="coverTerm != null">
cover_term,
</if>
<if test="paymentTerm != null">
payment_term,
</if>
<if test="paymentTermUnit != null">
payment_term_unit,
</if>
<if test="payInterval != null">
pay_interval,
</if>
<if test="viewFlag != null">
view_flag,
</if>
<if test="dynamicFieldA != null">
dynamic_field_a,
</if>
<if test="dynamicFieldB != null">
dynamic_field_b,
</if>
<if test="dynamicFieldC != null">
dynamic_field_c,
</if>
<if test="dynamicFieldD != null">
dynamic_field_d,
</if>
<if test="plateNo != null">
plate_no,
</if>
<if test="memo != null">
memo,
</if>
<if test="productTableRequestJson != null">
product_table_request_json,
</if>
<if test="verifiedSeats != null">
verified_seats,
</if>
<if test="frameNo != null">
frame_no,
</if>
<if test="subjectProvinceId != null">
subject_province_id,
</if>
<if test="subjectCityId != null">
subject_city_id,
</if>
<if test="subjectAddress != null">
subject_address,
</if>
<if test="roomQty != null">
room_qty,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="sourceChannel != null">
source_channel,
</if>
<if test="sourcePlanName != null">
source_plan_name,
</if>
<if test="sourcePublishdate != null">
source_publishdate,
</if>
<if test="sourceArticle != null">
source_article,
</if>
<if test="ipAddress != null">
ip_address,
</if>
<if test="ipRegion != null">
ip_region,
</if>
<if test="renewOrderId != null">
renew_order_id,
</if>
<if test="isRenewComplete != null">
is_renew_complete,
</if>
<if test="isPayToYd != null">
is_pay_to_yd,
</if>
<if test="autoPayFlag != null">
auto_pay_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configLevel != null">
#{configLevel,jdbcType=INTEGER},
</if>
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>
<if test="planId != null">
#{planId,jdbcType=BIGINT},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
<if test="orderDate != null">
#{orderDate,jdbcType=TIMESTAMP},
</if>
<if test="orderPrice != null">
#{orderPrice,jdbcType=DECIMAL},
</if>
<if test="quotationId != null">
#{quotationId,jdbcType=BIGINT},
</if>
<if test="quoteNo != null">
#{quoteNo,jdbcType=BIGINT},
</if>
<if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT},
</if>
<if test="destination != null">
#{destination,jdbcType=VARCHAR},
</if>
<if test="destinationContinentId != null">
#{destinationContinentId,jdbcType=BIGINT},
</if>
<if test="destinationRegionId != null">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.order.PoOrder">
<!--@mbg.generated-->
<!--@Table ag_po_order-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="config_level" jdbcType="INTEGER" property="configLevel"/>
<result column="product_id" jdbcType="BIGINT" property="productId"/>
<result column="plan_id" jdbcType="BIGINT" property="planId"/>
<result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
<result column="order_date" jdbcType="TIMESTAMP" property="orderDate"/>
<result column="order_price" jdbcType="DECIMAL" property="orderPrice"/>
<result column="quotation_id" jdbcType="BIGINT" property="quotationId"/>
<result column="quote_no" jdbcType="BIGINT" property="quoteNo"/>
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId"/>
<result column="destination" jdbcType="VARCHAR" property="destination"/>
<result column="destination_continent_id" jdbcType="BIGINT" property="destinationContinentId"/>
<result column="destination_region_id" jdbcType="BIGINT" property="destinationRegionId"/>
<result column="destination_country_id" jdbcType="BIGINT" property="destinationCountryId"/>
<result column="effective_start_date" jdbcType="TIMESTAMP" property="effectiveStartDate"/>
<result column="effective_end_date" jdbcType="TIMESTAMP" property="effectiveEndDate"/>
<result column="cover_length" jdbcType="INTEGER" property="coverLength"/>
<result column="cover_adult_qty" jdbcType="INTEGER" property="coverAdultQty"/>
<result column="cover_underage_qty" jdbcType="INTEGER" property="coverUnderageQty"/>
<result column="payment_method_id" jdbcType="BIGINT" property="paymentMethodId"/>
<result column="pay_url" jdbcType="VARCHAR" property="payUrl"/>
<result column="pay_from" jdbcType="INTEGER" property="payFrom"/>
<result column="insurer_pdf_url" jdbcType="VARCHAR" property="insurerPdfUrl"/>
<result column="is_msg_sent" jdbcType="INTEGER" property="isMsgSent"/>
<result column="is_car_tax" jdbcType="INTEGER" property="isCarTax"/>
<result column="commission_rate" jdbcType="DECIMAL" property="commissionRate"/>
<result column="commission_amount" jdbcType="DECIMAL" property="commissionAmount"/>
<result column="fyc_rate" jdbcType="DECIMAL" property="fycRate"/>
<result column="fyc_amount" jdbcType="DECIMAL" property="fycAmount"/>
<result column="b2c_rate" jdbcType="DECIMAL" property="b2cRate"/>
<result column="grade_commission_rate" jdbcType="DECIMAL" property="gradeCommissionRate"/>
<result column="referral_rate" jdbcType="DECIMAL" property="referralRate"/>
<result column="referral_amount" jdbcType="DECIMAL" property="referralAmount"/>
<result column="policy_id" jdbcType="BIGINT" property="policyId"/>
<result column="policy_no" jdbcType="VARCHAR" property="policyNo"/>
<result column="mkt_campaign" jdbcType="VARCHAR" property="mktCampaign"/>
<result column="mkt_task" jdbcType="VARCHAR" property="mktTask"/>
<result column="is_converted" jdbcType="INTEGER" property="isConverted"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="payment_status" jdbcType="INTEGER" property="paymentStatus"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="customer_id" jdbcType="BIGINT" property="customerId"/>
<result column="referral_customer_id" jdbcType="BIGINT" property="referralCustomerId"/>
<result column="share_code" jdbcType="VARCHAR" property="shareCode"/>
<result column="insurer_id" jdbcType="BIGINT" property="insurerId"/>
<result column="data_source" jdbcType="VARCHAR" property="dataSource"/>
<result column="is_social_insured" jdbcType="INTEGER" property="isSocialInsured"/>
<result column="cover_term" jdbcType="INTEGER" property="coverTerm"/>
<result column="payment_term" jdbcType="INTEGER" property="paymentTerm"/>
<result column="payment_term_unit" jdbcType="VARCHAR" property="paymentTermUnit"/>
<result column="pay_interval" jdbcType="INTEGER" property="payInterval"/>
<result column="view_flag" jdbcType="VARCHAR" property="viewFlag"/>
<result column="dynamic_field_a" jdbcType="VARCHAR" property="dynamicFieldA"/>
<result column="dynamic_field_b" jdbcType="VARCHAR" property="dynamicFieldB"/>
<result column="dynamic_field_c" jdbcType="VARCHAR" property="dynamicFieldC"/>
<result column="dynamic_field_d" jdbcType="VARCHAR" property="dynamicFieldD"/>
<result column="plate_no" jdbcType="VARCHAR" property="plateNo"/>
<result column="memo" jdbcType="LONGVARCHAR" property="memo"/>
<result column="product_table_request_json" jdbcType="LONGVARCHAR" property="productTableRequestJson"/>
<result column="verified_seats" jdbcType="INTEGER" property="verifiedSeats"/>
<result column="frame_no" jdbcType="VARCHAR" property="frameNo"/>
<result column="subject_province_id" jdbcType="BIGINT" property="subjectProvinceId"/>
<result column="subject_city_id" jdbcType="BIGINT" property="subjectCityId"/>
<result column="subject_address" jdbcType="VARCHAR" property="subjectAddress"/>
<result column="room_qty" jdbcType="VARCHAR" property="roomQty"/>
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt"/>
<result column="created_by" jdbcType="BIGINT" property="createdBy"/>
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt"/>
<result column="updated_by" jdbcType="BIGINT" property="updatedBy"/>
<result column="source_channel" jdbcType="VARCHAR" property="sourceChannel"/>
<result column="source_plan_name" jdbcType="VARCHAR" property="sourcePlanName"/>
<result column="source_publishdate" jdbcType="VARCHAR" property="sourcePublishdate"/>
<result column="source_article" jdbcType="VARCHAR" property="sourceArticle"/>
<result column="ip_address" jdbcType="VARCHAR" property="ipAddress"/>
<result column="ip_region" jdbcType="VARCHAR" property="ipRegion"/>
<result column="renew_order_id" jdbcType="BIGINT" property="renewOrderId"/>
<result column="is_renew_complete" jdbcType="INTEGER" property="isRenewComplete"/>
<result column="is_pay_to_yd" jdbcType="INTEGER" property="isPayToYd"/>
<result column="auto_pay_flag" jdbcType="VARCHAR" property="autoPayFlag"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, config_level, product_id, plan_id, order_no, order_date, order_price, quotation_id,
quote_no, product_category_id, destination, destination_continent_id, destination_region_id,
destination_country_id, effective_start_date, effective_end_date, cover_length, cover_adult_qty,
cover_underage_qty, payment_method_id, pay_url, pay_from, insurer_pdf_url, is_msg_sent,
is_car_tax, commission_rate, commission_amount, fyc_rate, fyc_amount,
b2c_rate, grade_commission_rate, referral_rate, referral_amount, policy_id, policy_no,
mkt_campaign, mkt_task, is_converted, `status`, payment_status, flag, customer_id,
referral_customer_id, share_code, insurer_id, data_source, is_social_insured, cover_term,
payment_term, payment_term_unit, pay_interval, view_flag, dynamic_field_a, dynamic_field_b,
dynamic_field_c, dynamic_field_d, plate_no, memo, product_table_request_json, verified_seats,
frame_no, subject_province_id, subject_city_id, subject_address, room_qty, created_at,
created_by, updated_at, updated_by, source_channel, source_plan_name, source_publishdate,
source_article, ip_address, ip_region, renew_order_id, is_renew_complete, is_pay_to_yd,
auto_pay_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List"/>
from ag_po_order
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_po_order
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.order.PoOrder"
useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_po_order (config_level, product_id, plan_id,
order_no, order_date, order_price,
quotation_id, quote_no, product_category_id,
destination, destination_continent_id, destination_region_id,
destination_country_id, effective_start_date,
effective_end_date, cover_length, cover_adult_qty,
cover_underage_qty, payment_method_id, pay_url,
pay_from, insurer_pdf_url, is_msg_sent,
is_car_tax, commission_rate,
commission_amount, fyc_rate, fyc_amount,
b2c_rate, grade_commission_rate, referral_rate,
referral_amount, policy_id, policy_no,
mkt_campaign, mkt_task, is_converted,
`status`, payment_status, flag,
customer_id, referral_customer_id, share_code,
insurer_id, data_source, is_social_insured,
cover_term, payment_term, payment_term_unit,
pay_interval, view_flag, dynamic_field_a,
dynamic_field_b, dynamic_field_c, dynamic_field_d,
plate_no, memo, product_table_request_json,
verified_seats, frame_no, subject_province_id,
subject_city_id, subject_address, room_qty,
created_at, created_by, updated_at,
updated_by, source_channel, source_plan_name,
source_publishdate, source_article, ip_address,
ip_region, renew_order_id, is_renew_complete,
is_pay_to_yd, auto_pay_flag)
values (#{configLevel,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT},
#{orderNo,jdbcType=VARCHAR}, #{orderDate,jdbcType=TIMESTAMP}, #{orderPrice,jdbcType=DECIMAL},
#{quotationId,jdbcType=BIGINT}, #{quoteNo,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT},
#{destination,jdbcType=VARCHAR}, #{destinationContinentId,jdbcType=BIGINT},
#{destinationRegionId,jdbcType=BIGINT},
</if>
<if test="destinationCountryId != null">
#{destinationCountryId,jdbcType=BIGINT},
</if>
<if test="effectiveStartDate != null">
#{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
#{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="coverLength != null">
#{coverLength,jdbcType=INTEGER},
</if>
<if test="coverAdultQty != null">
#{coverAdultQty,jdbcType=INTEGER},
</if>
<if test="coverUnderageQty != null">
#{coverUnderageQty,jdbcType=INTEGER},
</if>
<if test="paymentMethodId != null">
#{paymentMethodId,jdbcType=BIGINT},
</if>
<if test="payUrl != null">
#{payUrl,jdbcType=VARCHAR},
</if>
<if test="payFrom != null">
#{payFrom,jdbcType=INTEGER},
</if>
<if test="insurerPdfUrl != null">
#{insurerPdfUrl,jdbcType=VARCHAR},
</if>
<if test="isMsgSent != null">
#{isMsgSent,jdbcType=INTEGER},
</if>
<if test="isCarTax != null">
#{isCarTax,jdbcType=INTEGER},
</if>
<if test="ydValueAddedTax != null">
#{ydValueAddedTax,jdbcType=DECIMAL},
</if>
<if test="commissionRate != null">
#{commissionRate,jdbcType=DECIMAL},
</if>
<if test="commissionAmount != null">
#{commissionAmount,jdbcType=DECIMAL},
</if>
<if test="fycRate != null">
#{fycRate,jdbcType=DECIMAL},
</if>
<if test="fycAmount != null">
#{fycAmount,jdbcType=DECIMAL},
</if>
<if test="b2cRate != null">
#{b2cRate,jdbcType=DECIMAL},
</if>
<if test="gradeCommissionRate != null">
#{gradeCommissionRate,jdbcType=DECIMAL},
</if>
<if test="referralRate != null">
#{referralRate,jdbcType=DECIMAL},
</if>
<if test="referralAmount != null">
#{referralAmount,jdbcType=DECIMAL},
</if>
<if test="policyId != null">
#{policyId,jdbcType=BIGINT},
</if>
<if test="policyNo != null">
#{policyNo,jdbcType=VARCHAR},
</if>
<if test="mktCampaign != null">
#{mktCampaign,jdbcType=VARCHAR},
</if>
<if test="mktTask != null">
#{mktTask,jdbcType=VARCHAR},
</if>
<if test="isConverted != null">
#{isConverted,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="paymentStatus != null">
#{paymentStatus,jdbcType=INTEGER},
</if>
<if test="flag != null">
#{flag,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="referralCustomerId != null">
#{referralCustomerId,jdbcType=BIGINT},
</if>
<if test="shareCode != null">
#{shareCode,jdbcType=VARCHAR},
</if>
<if test="insurerId != null">
#{insurerId,jdbcType=BIGINT},
</if>
<if test="dataSource != null">
#{dataSource,jdbcType=VARCHAR},
</if>
<if test="isSocialInsured != null">
#{isSocialInsured,jdbcType=INTEGER},
</if>
<if test="coverTerm != null">
#{coverTerm,jdbcType=INTEGER},
</if>
<if test="paymentTerm != null">
#{paymentTerm,jdbcType=INTEGER},
</if>
<if test="paymentTermUnit != null">
#{paymentTermUnit,jdbcType=VARCHAR},
</if>
<if test="payInterval != null">
#{payInterval,jdbcType=INTEGER},
</if>
<if test="viewFlag != null">
#{viewFlag,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldA != null">
#{dynamicFieldA,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldB != null">
#{dynamicFieldB,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldC != null">
#{dynamicFieldC,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldD != null">
#{dynamicFieldD,jdbcType=VARCHAR},
</if>
<if test="plateNo != null">
#{plateNo,jdbcType=VARCHAR},
</if>
<if test="memo != null">
#{memo,jdbcType=LONGVARCHAR},
</if>
<if test="productTableRequestJson != null">
#{productTableRequestJson,jdbcType=LONGVARCHAR},
</if>
<if test="verifiedSeats != null">
#{verifiedSeats,jdbcType=INTEGER},
</if>
<if test="frameNo != null">
#{frameNo,jdbcType=VARCHAR},
</if>
<if test="subjectProvinceId != null">
#{subjectProvinceId,jdbcType=BIGINT},
</if>
<if test="subjectCityId != null">
#{subjectCityId,jdbcType=BIGINT},
</if>
<if test="subjectAddress != null">
#{subjectAddress,jdbcType=VARCHAR},
</if>
<if test="roomQty != null">
#{roomQty,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
<if test="sourceChannel != null">
#{sourceChannel,jdbcType=VARCHAR},
</if>
<if test="sourcePlanName != null">
#{sourcePlanName,jdbcType=VARCHAR},
</if>
<if test="sourcePublishdate != null">
#{sourcePublishdate,jdbcType=VARCHAR},
</if>
<if test="sourceArticle != null">
#{sourceArticle,jdbcType=VARCHAR},
</if>
<if test="ipAddress != null">
#{ipAddress,jdbcType=VARCHAR},
</if>
<if test="ipRegion != null">
#{ipRegion,jdbcType=VARCHAR},
</if>
<if test="renewOrderId != null">
#{renewOrderId,jdbcType=BIGINT},
</if>
<if test="isRenewComplete != null">
#{isRenewComplete,jdbcType=INTEGER},
</if>
<if test="isPayToYd != null">
#{isPayToYd,jdbcType=INTEGER},
</if>
<if test="autoPayFlag != null">
#{autoPayFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.order.PoOrder">
<!--@mbg.generated-->
update ag_po_order
<set>
<if test="configLevel != null">
config_level = #{configLevel,jdbcType=INTEGER},
</if>
<if test="productId != null">
#{destinationCountryId,jdbcType=BIGINT}, #{effectiveStartDate,jdbcType=TIMESTAMP},
#{effectiveEndDate,jdbcType=TIMESTAMP}, #{coverLength,jdbcType=INTEGER}, #{coverAdultQty,jdbcType=INTEGER},
#{coverUnderageQty,jdbcType=INTEGER}, #{paymentMethodId,jdbcType=BIGINT}, #{payUrl,jdbcType=VARCHAR},
#{payFrom,jdbcType=INTEGER}, #{insurerPdfUrl,jdbcType=VARCHAR}, #{isMsgSent,jdbcType=INTEGER},
#{isCarTax,jdbcType=INTEGER}, #{ydValueAddedTax,jdbcType=DECIMAL}, #{commissionRate,jdbcType=DECIMAL},
#{commissionAmount,jdbcType=DECIMAL}, #{fycRate,jdbcType=DECIMAL}, #{fycAmount,jdbcType=DECIMAL},
#{b2cRate,jdbcType=DECIMAL}, #{gradeCommissionRate,jdbcType=DECIMAL}, #{referralRate,jdbcType=DECIMAL},
#{referralAmount,jdbcType=DECIMAL}, #{policyId,jdbcType=BIGINT}, #{policyNo,jdbcType=VARCHAR},
#{mktCampaign,jdbcType=VARCHAR}, #{mktTask,jdbcType=VARCHAR}, #{isConverted,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{paymentStatus,jdbcType=INTEGER}, #{flag,jdbcType=VARCHAR},
#{customerId,jdbcType=BIGINT}, #{referralCustomerId,jdbcType=BIGINT}, #{shareCode,jdbcType=VARCHAR},
#{insurerId,jdbcType=BIGINT}, #{dataSource,jdbcType=VARCHAR}, #{isSocialInsured,jdbcType=INTEGER},
#{coverTerm,jdbcType=INTEGER}, #{paymentTerm,jdbcType=INTEGER}, #{paymentTermUnit,jdbcType=VARCHAR},
#{payInterval,jdbcType=INTEGER}, #{viewFlag,jdbcType=VARCHAR}, #{dynamicFieldA,jdbcType=VARCHAR},
#{dynamicFieldB,jdbcType=VARCHAR}, #{dynamicFieldC,jdbcType=VARCHAR}, #{dynamicFieldD,jdbcType=VARCHAR},
#{plateNo,jdbcType=VARCHAR}, #{memo,jdbcType=LONGVARCHAR}, #{productTableRequestJson,jdbcType=LONGVARCHAR},
#{verifiedSeats,jdbcType=INTEGER}, #{frameNo,jdbcType=VARCHAR}, #{subjectProvinceId,jdbcType=BIGINT},
#{subjectCityId,jdbcType=BIGINT}, #{subjectAddress,jdbcType=VARCHAR}, #{roomQty,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT}, #{sourceChannel,jdbcType=VARCHAR}, #{sourcePlanName,jdbcType=VARCHAR},
#{sourcePublishdate,jdbcType=VARCHAR}, #{sourceArticle,jdbcType=VARCHAR}, #{ipAddress,jdbcType=VARCHAR},
#{ipRegion,jdbcType=VARCHAR}, #{renewOrderId,jdbcType=BIGINT}, #{isRenewComplete,jdbcType=INTEGER},
#{isPayToYd,jdbcType=INTEGER}, #{autoPayFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.order.PoOrder"
useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_po_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configLevel != null">
config_level,
</if>
<if test="productId != null">
product_id,
</if>
<if test="planId != null">
plan_id,
</if>
<if test="orderNo != null">
order_no,
</if>
<if test="orderDate != null">
order_date,
</if>
<if test="orderPrice != null">
order_price,
</if>
<if test="quotationId != null">
quotation_id,
</if>
<if test="quoteNo != null">
quote_no,
</if>
<if test="productCategoryId != null">
product_category_id,
</if>
<if test="destination != null">
destination,
</if>
<if test="destinationContinentId != null">
destination_continent_id,
</if>
<if test="destinationRegionId != null">
destination_region_id,
</if>
<if test="destinationCountryId != null">
destination_country_id,
</if>
<if test="effectiveStartDate != null">
effective_start_date,
</if>
<if test="effectiveEndDate != null">
effective_end_date,
</if>
<if test="coverLength != null">
cover_length,
</if>
<if test="coverAdultQty != null">
cover_adult_qty,
</if>
<if test="coverUnderageQty != null">
cover_underage_qty,
</if>
<if test="paymentMethodId != null">
payment_method_id,
</if>
<if test="payUrl != null">
pay_url,
</if>
<if test="payFrom != null">
pay_from,
</if>
<if test="insurerPdfUrl != null">
insurer_pdf_url,
</if>
<if test="isMsgSent != null">
is_msg_sent,
</if>
<if test="isCarTax != null">
is_car_tax,
</if>
<if test="commissionRate != null">
commission_rate,
</if>
<if test="commissionAmount != null">
commission_amount,
</if>
<if test="fycRate != null">
fyc_rate,
</if>
<if test="fycAmount != null">
fyc_amount,
</if>
<if test="b2cRate != null">
b2c_rate,
</if>
<if test="gradeCommissionRate != null">
grade_commission_rate,
</if>
<if test="referralRate != null">
referral_rate,
</if>
<if test="referralAmount != null">
referral_amount,
</if>
<if test="policyId != null">
policy_id,
</if>
<if test="policyNo != null">
policy_no,
</if>
<if test="mktCampaign != null">
mkt_campaign,
</if>
<if test="mktTask != null">
mkt_task,
</if>
<if test="isConverted != null">
is_converted,
</if>
<if test="status != null">
`status`,
</if>
<if test="paymentStatus != null">
payment_status,
</if>
<if test="flag != null">
flag,
</if>
<if test="customerId != null">
customer_id,
</if>
<if test="referralCustomerId != null">
referral_customer_id,
</if>
<if test="shareCode != null">
share_code,
</if>
<if test="insurerId != null">
insurer_id,
</if>
<if test="dataSource != null">
data_source,
</if>
<if test="isSocialInsured != null">
is_social_insured,
</if>
<if test="coverTerm != null">
cover_term,
</if>
<if test="paymentTerm != null">
payment_term,
</if>
<if test="paymentTermUnit != null">
payment_term_unit,
</if>
<if test="payInterval != null">
pay_interval,
</if>
<if test="viewFlag != null">
view_flag,
</if>
<if test="dynamicFieldA != null">
dynamic_field_a,
</if>
<if test="dynamicFieldB != null">
dynamic_field_b,
</if>
<if test="dynamicFieldC != null">
dynamic_field_c,
</if>
<if test="dynamicFieldD != null">
dynamic_field_d,
</if>
<if test="plateNo != null">
plate_no,
</if>
<if test="memo != null">
memo,
</if>
<if test="productTableRequestJson != null">
product_table_request_json,
</if>
<if test="verifiedSeats != null">
verified_seats,
</if>
<if test="frameNo != null">
frame_no,
</if>
<if test="subjectProvinceId != null">
subject_province_id,
</if>
<if test="subjectCityId != null">
subject_city_id,
</if>
<if test="subjectAddress != null">
subject_address,
</if>
<if test="roomQty != null">
room_qty,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="sourceChannel != null">
source_channel,
</if>
<if test="sourcePlanName != null">
source_plan_name,
</if>
<if test="sourcePublishdate != null">
source_publishdate,
</if>
<if test="sourceArticle != null">
source_article,
</if>
<if test="ipAddress != null">
ip_address,
</if>
<if test="ipRegion != null">
ip_region,
</if>
<if test="renewOrderId != null">
renew_order_id,
</if>
<if test="isRenewComplete != null">
is_renew_complete,
</if>
<if test="isPayToYd != null">
is_pay_to_yd,
</if>
<if test="autoPayFlag != null">
auto_pay_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configLevel != null">
#{configLevel,jdbcType=INTEGER},
</if>
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>
<if test="planId != null">
#{planId,jdbcType=BIGINT},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
<if test="orderDate != null">
#{orderDate,jdbcType=TIMESTAMP},
</if>
<if test="orderPrice != null">
#{orderPrice,jdbcType=DECIMAL},
</if>
<if test="quotationId != null">
#{quotationId,jdbcType=BIGINT},
</if>
<if test="quoteNo != null">
#{quoteNo,jdbcType=BIGINT},
</if>
<if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT},
</if>
<if test="destination != null">
#{destination,jdbcType=VARCHAR},
</if>
<if test="destinationContinentId != null">
#{destinationContinentId,jdbcType=BIGINT},
</if>
<if test="destinationRegionId != null">
#{destinationRegionId,jdbcType=BIGINT},
</if>
<if test="destinationCountryId != null">
#{destinationCountryId,jdbcType=BIGINT},
</if>
<if test="effectiveStartDate != null">
#{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
#{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="coverLength != null">
#{coverLength,jdbcType=INTEGER},
</if>
<if test="coverAdultQty != null">
#{coverAdultQty,jdbcType=INTEGER},
</if>
<if test="coverUnderageQty != null">
#{coverUnderageQty,jdbcType=INTEGER},
</if>
<if test="paymentMethodId != null">
#{paymentMethodId,jdbcType=BIGINT},
</if>
<if test="payUrl != null">
#{payUrl,jdbcType=VARCHAR},
</if>
<if test="payFrom != null">
#{payFrom,jdbcType=INTEGER},
</if>
<if test="insurerPdfUrl != null">
#{insurerPdfUrl,jdbcType=VARCHAR},
</if>
<if test="isMsgSent != null">
#{isMsgSent,jdbcType=INTEGER},
</if>
<if test="isCarTax != null">
#{isCarTax,jdbcType=INTEGER},
</if>
<if test="ydValueAddedTax != null">
#{ydValueAddedTax,jdbcType=DECIMAL},
</if>
<if test="commissionRate != null">
#{commissionRate,jdbcType=DECIMAL},
</if>
<if test="commissionAmount != null">
#{commissionAmount,jdbcType=DECIMAL},
</if>
<if test="fycRate != null">
#{fycRate,jdbcType=DECIMAL},
</if>
<if test="fycAmount != null">
#{fycAmount,jdbcType=DECIMAL},
</if>
<if test="b2cRate != null">
#{b2cRate,jdbcType=DECIMAL},
</if>
<if test="gradeCommissionRate != null">
#{gradeCommissionRate,jdbcType=DECIMAL},
</if>
<if test="referralRate != null">
#{referralRate,jdbcType=DECIMAL},
</if>
<if test="referralAmount != null">
#{referralAmount,jdbcType=DECIMAL},
</if>
<if test="policyId != null">
#{policyId,jdbcType=BIGINT},
</if>
<if test="policyNo != null">
#{policyNo,jdbcType=VARCHAR},
</if>
<if test="mktCampaign != null">
#{mktCampaign,jdbcType=VARCHAR},
</if>
<if test="mktTask != null">
#{mktTask,jdbcType=VARCHAR},
</if>
<if test="isConverted != null">
#{isConverted,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="paymentStatus != null">
#{paymentStatus,jdbcType=INTEGER},
</if>
<if test="flag != null">
#{flag,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="referralCustomerId != null">
#{referralCustomerId,jdbcType=BIGINT},
</if>
<if test="shareCode != null">
#{shareCode,jdbcType=VARCHAR},
</if>
<if test="insurerId != null">
#{insurerId,jdbcType=BIGINT},
</if>
<if test="dataSource != null">
#{dataSource,jdbcType=VARCHAR},
</if>
<if test="isSocialInsured != null">
#{isSocialInsured,jdbcType=INTEGER},
</if>
<if test="coverTerm != null">
#{coverTerm,jdbcType=INTEGER},
</if>
<if test="paymentTerm != null">
#{paymentTerm,jdbcType=INTEGER},
</if>
<if test="paymentTermUnit != null">
#{paymentTermUnit,jdbcType=VARCHAR},
</if>
<if test="payInterval != null">
#{payInterval,jdbcType=INTEGER},
</if>
<if test="viewFlag != null">
#{viewFlag,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldA != null">
#{dynamicFieldA,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldB != null">
#{dynamicFieldB,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldC != null">
#{dynamicFieldC,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldD != null">
#{dynamicFieldD,jdbcType=VARCHAR},
</if>
<if test="plateNo != null">
#{plateNo,jdbcType=VARCHAR},
</if>
<if test="memo != null">
#{memo,jdbcType=LONGVARCHAR},
</if>
<if test="productTableRequestJson != null">
#{productTableRequestJson,jdbcType=LONGVARCHAR},
</if>
<if test="verifiedSeats != null">
#{verifiedSeats,jdbcType=INTEGER},
</if>
<if test="frameNo != null">
#{frameNo,jdbcType=VARCHAR},
</if>
<if test="subjectProvinceId != null">
#{subjectProvinceId,jdbcType=BIGINT},
</if>
<if test="subjectCityId != null">
#{subjectCityId,jdbcType=BIGINT},
</if>
<if test="subjectAddress != null">
#{subjectAddress,jdbcType=VARCHAR},
</if>
<if test="roomQty != null">
#{roomQty,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
<if test="sourceChannel != null">
#{sourceChannel,jdbcType=VARCHAR},
</if>
<if test="sourcePlanName != null">
#{sourcePlanName,jdbcType=VARCHAR},
</if>
<if test="sourcePublishdate != null">
#{sourcePublishdate,jdbcType=VARCHAR},
</if>
<if test="sourceArticle != null">
#{sourceArticle,jdbcType=VARCHAR},
</if>
<if test="ipAddress != null">
#{ipAddress,jdbcType=VARCHAR},
</if>
<if test="ipRegion != null">
#{ipRegion,jdbcType=VARCHAR},
</if>
<if test="renewOrderId != null">
#{renewOrderId,jdbcType=BIGINT},
</if>
<if test="isRenewComplete != null">
#{isRenewComplete,jdbcType=INTEGER},
</if>
<if test="isPayToYd != null">
#{isPayToYd,jdbcType=INTEGER},
</if>
<if test="autoPayFlag != null">
#{autoPayFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.order.PoOrder">
<!--@mbg.generated-->
update ag_po_order
<set>
<if test="configLevel != null">
config_level = #{configLevel,jdbcType=INTEGER},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=BIGINT},
</if>
<if test="planId != null">
plan_id = #{planId,jdbcType=BIGINT},
</if>
<if test="orderNo != null">
order_no = #{orderNo,jdbcType=VARCHAR},
</if>
<if test="orderDate != null">
order_date = #{orderDate,jdbcType=TIMESTAMP},
</if>
<if test="orderPrice != null">
order_price = #{orderPrice,jdbcType=DECIMAL},
</if>
<if test="quotationId != null">
quotation_id = #{quotationId,jdbcType=BIGINT},
</if>
<if test="quoteNo != null">
quote_no = #{quoteNo,jdbcType=BIGINT},
</if>
<if test="productCategoryId != null">
product_category_id = #{productCategoryId,jdbcType=BIGINT},
</if>
<if test="destination != null">
destination = #{destination,jdbcType=VARCHAR},
</if>
<if test="destinationContinentId != null">
destination_continent_id = #{destinationContinentId,jdbcType=BIGINT},
</if>
<if test="destinationRegionId != null">
destination_region_id = #{destinationRegionId,jdbcType=BIGINT},
</if>
<if test="destinationCountryId != null">
destination_country_id = #{destinationCountryId,jdbcType=BIGINT},
</if>
<if test="effectiveStartDate != null">
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="coverLength != null">
cover_length = #{coverLength,jdbcType=INTEGER},
</if>
<if test="coverAdultQty != null">
cover_adult_qty = #{coverAdultQty,jdbcType=INTEGER},
</if>
<if test="coverUnderageQty != null">
cover_underage_qty = #{coverUnderageQty,jdbcType=INTEGER},
</if>
<if test="paymentMethodId != null">
payment_method_id = #{paymentMethodId,jdbcType=BIGINT},
</if>
<if test="payUrl != null">
pay_url = #{payUrl,jdbcType=VARCHAR},
</if>
<if test="payFrom != null">
pay_from = #{payFrom,jdbcType=INTEGER},
</if>
<if test="insurerPdfUrl != null">
insurer_pdf_url = #{insurerPdfUrl,jdbcType=VARCHAR},
</if>
<if test="isMsgSent != null">
is_msg_sent = #{isMsgSent,jdbcType=INTEGER},
</if>
<if test="isCarTax != null">
is_car_tax = #{isCarTax,jdbcType=INTEGER},
</if>
<if test="commissionRate != null">
commission_rate = #{commissionRate,jdbcType=DECIMAL},
</if>
<if test="commissionAmount != null">
commission_amount = #{commissionAmount,jdbcType=DECIMAL},
</if>
<if test="fycRate != null">
fyc_rate = #{fycRate,jdbcType=DECIMAL},
</if>
<if test="fycAmount != null">
fyc_amount = #{fycAmount,jdbcType=DECIMAL},
</if>
<if test="b2cRate != null">
b2c_rate = #{b2cRate,jdbcType=DECIMAL},
</if>
<if test="gradeCommissionRate != null">
grade_commission_rate = #{gradeCommissionRate,jdbcType=DECIMAL},
</if>
<if test="referralRate != null">
referral_rate = #{referralRate,jdbcType=DECIMAL},
</if>
<if test="referralAmount != null">
referral_amount = #{referralAmount,jdbcType=DECIMAL},
</if>
<if test="policyId != null">
policy_id = #{policyId,jdbcType=BIGINT},
</if>
<if test="policyNo != null">
policy_no = #{policyNo,jdbcType=VARCHAR},
</if>
<if test="mktCampaign != null">
mkt_campaign = #{mktCampaign,jdbcType=VARCHAR},
</if>
<if test="mktTask != null">
mkt_task = #{mktTask,jdbcType=VARCHAR},
</if>
<if test="isConverted != null">
is_converted = #{isConverted,jdbcType=INTEGER},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="paymentStatus != null">
payment_status = #{paymentStatus,jdbcType=INTEGER},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="referralCustomerId != null">
referral_customer_id = #{referralCustomerId,jdbcType=BIGINT},
</if>
<if test="shareCode != null">
share_code = #{shareCode,jdbcType=VARCHAR},
</if>
<if test="insurerId != null">
insurer_id = #{insurerId,jdbcType=BIGINT},
</if>
<if test="dataSource != null">
data_source = #{dataSource,jdbcType=VARCHAR},
</if>
<if test="isSocialInsured != null">
is_social_insured = #{isSocialInsured,jdbcType=INTEGER},
</if>
<if test="coverTerm != null">
cover_term = #{coverTerm,jdbcType=INTEGER},
</if>
<if test="paymentTerm != null">
payment_term = #{paymentTerm,jdbcType=INTEGER},
</if>
<if test="paymentTermUnit != null">
payment_term_unit = #{paymentTermUnit,jdbcType=VARCHAR},
</if>
<if test="payInterval != null">
pay_interval = #{payInterval,jdbcType=INTEGER},
</if>
<if test="viewFlag != null">
view_flag = #{viewFlag,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldA != null">
dynamic_field_a = #{dynamicFieldA,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldB != null">
dynamic_field_b = #{dynamicFieldB,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldC != null">
dynamic_field_c = #{dynamicFieldC,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldD != null">
dynamic_field_d = #{dynamicFieldD,jdbcType=VARCHAR},
</if>
<if test="plateNo != null">
plate_no = #{plateNo,jdbcType=VARCHAR},
</if>
<if test="memo != null">
memo = #{memo,jdbcType=LONGVARCHAR},
</if>
<if test="productTableRequestJson != null">
product_table_request_json = #{productTableRequestJson,jdbcType=LONGVARCHAR},
</if>
<if test="verifiedSeats != null">
verified_seats = #{verifiedSeats,jdbcType=INTEGER},
</if>
<if test="frameNo != null">
frame_no = #{frameNo,jdbcType=VARCHAR},
</if>
<if test="subjectProvinceId != null">
subject_province_id = #{subjectProvinceId,jdbcType=BIGINT},
</if>
<if test="subjectCityId != null">
subject_city_id = #{subjectCityId,jdbcType=BIGINT},
</if>
<if test="subjectAddress != null">
subject_address = #{subjectAddress,jdbcType=VARCHAR},
</if>
<if test="roomQty != null">
room_qty = #{roomQty,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if test="sourceChannel != null">
source_channel = #{sourceChannel,jdbcType=VARCHAR},
</if>
<if test="sourcePlanName != null">
source_plan_name = #{sourcePlanName,jdbcType=VARCHAR},
</if>
<if test="sourcePublishdate != null">
source_publishdate = #{sourcePublishdate,jdbcType=VARCHAR},
</if>
<if test="sourceArticle != null">
source_article = #{sourceArticle,jdbcType=VARCHAR},
</if>
<if test="ipAddress != null">
ip_address = #{ipAddress,jdbcType=VARCHAR},
</if>
<if test="ipRegion != null">
ip_region = #{ipRegion,jdbcType=VARCHAR},
</if>
<if test="renewOrderId != null">
renew_order_id = #{renewOrderId,jdbcType=BIGINT},
</if>
<if test="isRenewComplete != null">
is_renew_complete = #{isRenewComplete,jdbcType=INTEGER},
</if>
<if test="isPayToYd != null">
is_pay_to_yd = #{isPayToYd,jdbcType=INTEGER},
</if>
<if test="autoPayFlag != null">
auto_pay_flag = #{autoPayFlag,jdbcType=VARCHAR},
</if>
<if test="commissionCheckId != null">
commission_check_id = #{commissionCheckId,jdbcType=BIGINT},
</if>
<if test="commissionCheckStatus != null">
commission_check_status = #{commissionCheckStatus,jdbcType=VARCHAR},
</if>
<if test="commissionCheckAt != null">
commission_check_at = #{commissionCheckAt,jdbcType=TIMESTAMP},
</if>
<if test="commissionCheckBy != null">
commission_check_by = #{commissionCheckBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.order.PoOrder">
<!--@mbg.generated-->
update ag_po_order
set config_level = #{configLevel,jdbcType=INTEGER},
product_id = #{productId,jdbcType=BIGINT},
</if>
<if test="planId != null">
plan_id = #{planId,jdbcType=BIGINT},
</if>
<if test="orderNo != null">
order_no = #{orderNo,jdbcType=VARCHAR},
</if>
<if test="orderDate != null">
order_date = #{orderDate,jdbcType=TIMESTAMP},
</if>
<if test="orderPrice != null">
order_price = #{orderPrice,jdbcType=DECIMAL},
</if>
<if test="quotationId != null">
quotation_id = #{quotationId,jdbcType=BIGINT},
</if>
<if test="quoteNo != null">
quote_no = #{quoteNo,jdbcType=BIGINT},
</if>
<if test="productCategoryId != null">
product_category_id = #{productCategoryId,jdbcType=BIGINT},
</if>
<if test="destination != null">
destination = #{destination,jdbcType=VARCHAR},
</if>
<if test="destinationContinentId != null">
destination_continent_id = #{destinationContinentId,jdbcType=BIGINT},
</if>
<if test="destinationRegionId != null">
destination_region_id = #{destinationRegionId,jdbcType=BIGINT},
</if>
<if test="destinationCountryId != null">
destination_country_id = #{destinationCountryId,jdbcType=BIGINT},
</if>
<if test="effectiveStartDate != null">
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="coverLength != null">
cover_length = #{coverLength,jdbcType=INTEGER},
</if>
<if test="coverAdultQty != null">
cover_adult_qty = #{coverAdultQty,jdbcType=INTEGER},
</if>
<if test="coverUnderageQty != null">
cover_underage_qty = #{coverUnderageQty,jdbcType=INTEGER},
</if>
<if test="paymentMethodId != null">
payment_method_id = #{paymentMethodId,jdbcType=BIGINT},
</if>
<if test="payUrl != null">
pay_url = #{payUrl,jdbcType=VARCHAR},
</if>
<if test="payFrom != null">
pay_from = #{payFrom,jdbcType=INTEGER},
</if>
<if test="insurerPdfUrl != null">
insurer_pdf_url = #{insurerPdfUrl,jdbcType=VARCHAR},
</if>
<if test="isMsgSent != null">
is_msg_sent = #{isMsgSent,jdbcType=INTEGER},
</if>
<if test="isCarTax != null">
is_car_tax = #{isCarTax,jdbcType=INTEGER},
</if>
<if test="commissionRate != null">
commission_rate = #{commissionRate,jdbcType=DECIMAL},
</if>
<if test="commissionAmount != null">
commission_amount = #{commissionAmount,jdbcType=DECIMAL},
</if>
<if test="fycRate != null">
fyc_rate = #{fycRate,jdbcType=DECIMAL},
</if>
<if test="fycAmount != null">
fyc_amount = #{fycAmount,jdbcType=DECIMAL},
</if>
<if test="b2cRate != null">
b2c_rate = #{b2cRate,jdbcType=DECIMAL},
</if>
<if test="gradeCommissionRate != null">
grade_commission_rate = #{gradeCommissionRate,jdbcType=DECIMAL},
</if>
<if test="referralRate != null">
referral_rate = #{referralRate,jdbcType=DECIMAL},
</if>
<if test="referralAmount != null">
referral_amount = #{referralAmount,jdbcType=DECIMAL},
</if>
<if test="policyId != null">
policy_id = #{policyId,jdbcType=BIGINT},
</if>
<if test="policyNo != null">
policy_no = #{policyNo,jdbcType=VARCHAR},
</if>
<if test="mktCampaign != null">
mkt_campaign = #{mktCampaign,jdbcType=VARCHAR},
</if>
<if test="mktTask != null">
mkt_task = #{mktTask,jdbcType=VARCHAR},
</if>
<if test="isConverted != null">
is_converted = #{isConverted,jdbcType=INTEGER},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="paymentStatus != null">
payment_status = #{paymentStatus,jdbcType=INTEGER},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="referralCustomerId != null">
referral_customer_id = #{referralCustomerId,jdbcType=BIGINT},
</if>
<if test="shareCode != null">
share_code = #{shareCode,jdbcType=VARCHAR},
</if>
<if test="insurerId != null">
insurer_id = #{insurerId,jdbcType=BIGINT},
</if>
<if test="dataSource != null">
data_source = #{dataSource,jdbcType=VARCHAR},
</if>
<if test="isSocialInsured != null">
is_social_insured = #{isSocialInsured,jdbcType=INTEGER},
</if>
<if test="coverTerm != null">
cover_term = #{coverTerm,jdbcType=INTEGER},
</if>
<if test="paymentTerm != null">
payment_term = #{paymentTerm,jdbcType=INTEGER},
</if>
<if test="paymentTermUnit != null">
payment_term_unit = #{paymentTermUnit,jdbcType=VARCHAR},
</if>
<if test="payInterval != null">
pay_interval = #{payInterval,jdbcType=INTEGER},
</if>
<if test="viewFlag != null">
view_flag = #{viewFlag,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldA != null">
dynamic_field_a = #{dynamicFieldA,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldB != null">
dynamic_field_b = #{dynamicFieldB,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldC != null">
dynamic_field_c = #{dynamicFieldC,jdbcType=VARCHAR},
</if>
<if test="dynamicFieldD != null">
dynamic_field_d = #{dynamicFieldD,jdbcType=VARCHAR},
</if>
<if test="plateNo != null">
plate_no = #{plateNo,jdbcType=VARCHAR},
</if>
<if test="memo != null">
memo = #{memo,jdbcType=LONGVARCHAR},
</if>
<if test="productTableRequestJson != null">
product_table_request_json = #{productTableRequestJson,jdbcType=LONGVARCHAR},
</if>
<if test="verifiedSeats != null">
verified_seats = #{verifiedSeats,jdbcType=INTEGER},
</if>
<if test="frameNo != null">
frame_no = #{frameNo,jdbcType=VARCHAR},
</if>
<if test="subjectProvinceId != null">
subject_province_id = #{subjectProvinceId,jdbcType=BIGINT},
</if>
<if test="subjectCityId != null">
subject_city_id = #{subjectCityId,jdbcType=BIGINT},
</if>
<if test="subjectAddress != null">
subject_address = #{subjectAddress,jdbcType=VARCHAR},
</if>
<if test="roomQty != null">
room_qty = #{roomQty,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if test="sourceChannel != null">
source_channel = #{sourceChannel,jdbcType=VARCHAR},
</if>
<if test="sourcePlanName != null">
source_plan_name = #{sourcePlanName,jdbcType=VARCHAR},
</if>
<if test="sourcePublishdate != null">
source_publishdate = #{sourcePublishdate,jdbcType=VARCHAR},
</if>
<if test="sourceArticle != null">
source_article = #{sourceArticle,jdbcType=VARCHAR},
</if>
<if test="ipAddress != null">
ip_address = #{ipAddress,jdbcType=VARCHAR},
</if>
<if test="ipRegion != null">
ip_region = #{ipRegion,jdbcType=VARCHAR},
</if>
<if test="renewOrderId != null">
renew_order_id = #{renewOrderId,jdbcType=BIGINT},
</if>
<if test="isRenewComplete != null">
is_renew_complete = #{isRenewComplete,jdbcType=INTEGER},
</if>
<if test="isPayToYd != null">
is_pay_to_yd = #{isPayToYd,jdbcType=INTEGER},
</if>
<if test="autoPayFlag != null">
auto_pay_flag = #{autoPayFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.order.PoOrder">
<!--@mbg.generated-->
update ag_po_order
set config_level = #{configLevel,jdbcType=INTEGER},
product_id = #{productId,jdbcType=BIGINT},
plan_id = #{planId,jdbcType=BIGINT},
order_no = #{orderNo,jdbcType=VARCHAR},
order_date = #{orderDate,jdbcType=TIMESTAMP},
order_price = #{orderPrice,jdbcType=DECIMAL},
quotation_id = #{quotationId,jdbcType=BIGINT},
quote_no = #{quoteNo,jdbcType=BIGINT},
product_category_id = #{productCategoryId,jdbcType=BIGINT},
destination = #{destination,jdbcType=VARCHAR},
destination_continent_id = #{destinationContinentId,jdbcType=BIGINT},
destination_region_id = #{destinationRegionId,jdbcType=BIGINT},
destination_country_id = #{destinationCountryId,jdbcType=BIGINT},
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
cover_length = #{coverLength,jdbcType=INTEGER},
cover_adult_qty = #{coverAdultQty,jdbcType=INTEGER},
cover_underage_qty = #{coverUnderageQty,jdbcType=INTEGER},
payment_method_id = #{paymentMethodId,jdbcType=BIGINT},
pay_url = #{payUrl,jdbcType=VARCHAR},
pay_from = #{payFrom,jdbcType=INTEGER},
insurer_pdf_url = #{insurerPdfUrl,jdbcType=VARCHAR},
is_msg_sent = #{isMsgSent,jdbcType=INTEGER},
is_car_tax = #{isCarTax,jdbcType=INTEGER},
commission_rate = #{commissionRate,jdbcType=DECIMAL},
commission_amount = #{commissionAmount,jdbcType=DECIMAL},
fyc_rate = #{fycRate,jdbcType=DECIMAL},
fyc_amount = #{fycAmount,jdbcType=DECIMAL},
b2c_rate = #{b2cRate,jdbcType=DECIMAL},
grade_commission_rate = #{gradeCommissionRate,jdbcType=DECIMAL},
referral_rate = #{referralRate,jdbcType=DECIMAL},
referral_amount = #{referralAmount,jdbcType=DECIMAL},
policy_id = #{policyId,jdbcType=BIGINT},
policy_no = #{policyNo,jdbcType=VARCHAR},
mkt_campaign = #{mktCampaign,jdbcType=VARCHAR},
mkt_task = #{mktTask,jdbcType=VARCHAR},
is_converted = #{isConverted,jdbcType=INTEGER},
`status` = #{status,jdbcType=INTEGER},
payment_status = #{paymentStatus,jdbcType=INTEGER},
flag = #{flag,jdbcType=VARCHAR},
customer_id = #{customerId,jdbcType=BIGINT},
referral_customer_id = #{referralCustomerId,jdbcType=BIGINT},
share_code = #{shareCode,jdbcType=VARCHAR},
insurer_id = #{insurerId,jdbcType=BIGINT},
data_source = #{dataSource,jdbcType=VARCHAR},
is_social_insured = #{isSocialInsured,jdbcType=INTEGER},
cover_term = #{coverTerm,jdbcType=INTEGER},
payment_term = #{paymentTerm,jdbcType=INTEGER},
payment_term_unit = #{paymentTermUnit,jdbcType=VARCHAR},
pay_interval = #{payInterval,jdbcType=INTEGER},
view_flag = #{viewFlag,jdbcType=VARCHAR},
dynamic_field_a = #{dynamicFieldA,jdbcType=VARCHAR},
dynamic_field_b = #{dynamicFieldB,jdbcType=VARCHAR},
dynamic_field_c = #{dynamicFieldC,jdbcType=VARCHAR},
dynamic_field_d = #{dynamicFieldD,jdbcType=VARCHAR},
plate_no = #{plateNo,jdbcType=VARCHAR},
memo = #{memo,jdbcType=LONGVARCHAR},
product_table_request_json = #{productTableRequestJson,jdbcType=LONGVARCHAR},
verified_seats = #{verifiedSeats,jdbcType=INTEGER},
frame_no = #{frameNo,jdbcType=VARCHAR},
subject_province_id = #{subjectProvinceId,jdbcType=BIGINT},
subject_city_id = #{subjectCityId,jdbcType=BIGINT},
subject_address = #{subjectAddress,jdbcType=VARCHAR},
room_qty = #{roomQty,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
source_channel = #{sourceChannel,jdbcType=VARCHAR},
source_plan_name = #{sourcePlanName,jdbcType=VARCHAR},
source_publishdate = #{sourcePublishdate,jdbcType=VARCHAR},
source_article = #{sourceArticle,jdbcType=VARCHAR},
ip_address = #{ipAddress,jdbcType=VARCHAR},
ip_region = #{ipRegion,jdbcType=VARCHAR},
renew_order_id = #{renewOrderId,jdbcType=BIGINT},
is_renew_complete = #{isRenewComplete,jdbcType=INTEGER},
is_pay_to_yd = #{isPayToYd,jdbcType=INTEGER},
auto_pay_flag = #{autoPayFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
auto_pay_flag = #{autoPayFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByStatusAndShareCodeInGroupByCustomerId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_po_order
where
select
<include refid="Base_Column_List"/>
from ag_po_order
where
status = #{status}
<if test="customerShareCodes != null">
and share_code in
<foreach close=")" collection="customerShareCodes" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
<if test="customerShareCodes != null">
and share_code in
<foreach close=")" collection="customerShareCodes" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</select>
<select id="findPolicyInfoByCustomerId" resultType="com.yd.dal.entity.order.CustomerPolicyInfo">
SELECT
o.id as orderId,
o.order_no as orderNo ,
o.policy_no as policyNo ,
p.name as holderName,
o.destination as destination,
date_format(o.order_date, '%Y-%m-%d %H:%i:%s') as orderDate,
date_format(o.effective_start_date, '%Y-%m-%d %H:%i:%s') as startDate,
date_format(o.effective_end_date, '%Y-%m-%d %H:%i:%s') as endDate,
f.referral_amount as referralAmount,
f.order_price as orderPrice,
o.plan_id as planId,
o.product_id as productId ,
f.id as fortuneId
FROM ag_acl_customer_fortune f INNER JOIN ag_po_order o ON f.order_id = o.id and o.status = 3 and o.order_price
&gt; 0 and o.insurer_id != 888
inner JOIN ag_acl_policyholder p ON o.id = p.order_id and p.type = 2
WHERE f.drop_option_code = 'S01' AND f.customer_id = #{customerId,jdbcType=BIGINT}
<choose>
<when test="time == 1">
and DATE_FORMAT(f.order_date, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
</when>
<when test="time == 3">
and QUARTER(f.order_date) = QUARTER(NOW()) AND year(f.order_date)=year(now())
</when>
<when test="time == 2">
and YEAR(f.order_date) = YEAR(now())
</when>
<otherwise>
</otherwise>
</choose>
</select>
<select id="findPolicyInfoByMobileNoE" resultType="com.yd.dal.entity.order.CustomerPolicyInfo">
SELECT
policy.INS_MST_ID as orderNo ,
policy.INS_MST_POLICY_NUM as policyNo ,
c.CUS_MST_NAME as holderName,
date_format(policy.INS_MST_ACCEPT_DATE, '%Y-%m-%d %H:%i:%s') as orderDate,
date_format(policy.INS_MST_EFFECT_DATE, '%Y-%m-%d %H:%i:%s') as startDate,
date_format(policy.INS_MST_INVALID_DATE, '%Y-%m-%d %H:%i:%s') as endDate,
sum(m.MON025_405) as referralAmount,
sum(m.MON025_401) as orderPrice,
m.MON025_004 as productName
FROM sal001 p INNER JOIN MON025 m on m.MON025_007 = p.SAL_MST_ID AND m.MON025_303 = 1 AND m.mon025_108 = 'S01'
inner JOIN ins001 policy on m.MON025_002 = policy.INS_MST_ID -- 保单id
inner join cus001 c on policy.FK_CUS_PRO_ID = c.CUS_MST_ID
WHERE p.SAL_MST_MOBILE like concat(concat('%',#{mobileNo,jdbcType=VARCHAR}),'%')
<choose>
<when test="time == 1">
and DATE_FORMAT(policy.INS_MST_ACCEPT_DATE, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
</when>
<when test="time == 3">
and QUARTER(policy.INS_MST_ACCEPT_DATE) = QUARTER(NOW()) AND
year(policy.INS_MST_ACCEPT_DATE)=year(now())
</when>
<when test="time == 2">
and YEAR(policy.INS_MST_ACCEPT_DATE) = YEAR(now())
</when>
<otherwise>
</otherwise>
</choose>
group by policy.ins_mst_id
</select>
<select id="findPolicyInfoByCustomerId" resultType="com.yd.dal.entity.order.CustomerPolicyInfo">
SELECT
o.id as orderId,
o.order_no as orderNo ,
o.policy_no as policyNo ,
p.name as holderName,
o.destination as destination,
date_format(o.order_date, '%Y-%m-%d %H:%i:%s') as orderDate,
date_format(o.effective_start_date, '%Y-%m-%d %H:%i:%s') as startDate,
date_format(o.effective_end_date, '%Y-%m-%d %H:%i:%s') as endDate,
f.referral_amount as referralAmount,
f.order_price as orderPrice,
o.plan_id as planId,
o.product_id as productId ,
f.id as fortuneId
FROM ag_acl_customer_fortune f INNER JOIN ag_po_order o ON f.order_id = o.id and o.status = 3 and o.order_price &gt; 0 and o.insurer_id != 888
inner JOIN ag_acl_policyholder p ON o.id = p.order_id and p.type = 2
WHERE f.drop_option_code = 'S01' AND f.customer_id = #{customerId,jdbcType=BIGINT}
<choose>
<when test="time == 1">
and DATE_FORMAT(f.order_date, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
</when>
<when test="time == 3">
and QUARTER(f.order_date) = QUARTER(NOW()) AND year(f.order_date)=year(now())
</when>
<when test="time == 2">
and YEAR(f.order_date) = YEAR(now())
</when>
<otherwise>
</otherwise>
</choose>
</select>
<select id="findPolicyInfoByMobileNoE" resultType="com.yd.dal.entity.order.CustomerPolicyInfo">
SELECT
policy.INS_MST_ID as orderNo ,
policy.INS_MST_POLICY_NUM as policyNo ,
c.CUS_MST_NAME as holderName,
date_format(policy.INS_MST_ACCEPT_DATE, '%Y-%m-%d %H:%i:%s') as orderDate,
date_format(policy.INS_MST_EFFECT_DATE, '%Y-%m-%d %H:%i:%s') as startDate,
date_format(policy.INS_MST_INVALID_DATE, '%Y-%m-%d %H:%i:%s') as endDate,
sum(m.MON025_405) as referralAmount,
sum(m.MON025_401) as orderPrice,
m.MON025_004 as productName
FROM sal001 p INNER JOIN MON025 m on m.MON025_007 = p.SAL_MST_ID AND m.MON025_303 = 1 AND m.mon025_108 = 'S01'
inner JOIN ins001 policy on m.MON025_002 = policy.INS_MST_ID -- 保单id
inner join cus001 c on policy.FK_CUS_PRO_ID = c.CUS_MST_ID
WHERE p.SAL_MST_MOBILE like concat(concat('%',#{mobileNo,jdbcType=VARCHAR}),'%')
<choose>
<when test="time == 1">
and DATE_FORMAT(policy.INS_MST_ACCEPT_DATE, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
</when>
<when test="time == 3">
and QUARTER(policy.INS_MST_ACCEPT_DATE) = QUARTER(NOW()) AND year(policy.INS_MST_ACCEPT_DATE)=year(now())
</when>
<when test="time == 2">
and YEAR(policy.INS_MST_ACCEPT_DATE) = YEAR(now())
</when>
<otherwise>
</otherwise>
</choose>
group by policy.ins_mst_id
</select>
<select id="findOrderNoByPolicyNo" resultType="java.lang.String">
select
INS_MST_ID
from ins001
where INS_MST_POLICY_NUM = #{policyNo,jdbcType=VARCHAR};
</select>
<select id="findPolicyDetailsInfoByOrderNoE" resultType="com.yd.dal.entity.order.PolicyDetailInfoE">
SELECT
policy.INS_MST_ID as orderNo , -- 订单号
policy.INS_MST_POLICY_NUM as policyNo , -- 保单号
policy.INS_MST_STATUS as policyStatus, -- 保单状态
date_format(policy.INS_MST_ACCEPT_DATE, '%Y-%m-%d %H:%i:%s') as orderDate, -- 下单日期
date_format(policy.INS_MST_EFFECT_DATE, '%Y-%m-%d %H:%i:%s') as startDate, -- 保险起期
date_format(policy.INS_MST_INVALID_DATE, '%Y-%m-%d %H:%i:%s') as endDate, -- 保险止期
product.PRD_MST_ID as productId , -- 产品编号
product.PRD_MST_INS_CODE as productCode , -- 产品code
product.PRD_MST_PRO_NAME as productName , -- 产品名字
insurer.PRD_SUP_ID as insurerId , -- 保险公司编号
insurer.PRD_SUP_NAME as insurerName , -- 保险公司名称
holder.CUS_MST_NAME as holderName, -- 投保人姓名
holder.CUS_MST_POSTTYPE as holderIdNoType, -- 投保人证件类型
holder.CUS_MST_ID as holderId, -- 投保人编码
holder.CUS_MST_ID_NUM as holderIdNo, -- 投保人编码
holder.CUS_MST_SEX as holderSex, -- 投保人性别
date_format(holder.CUS_MST_BIRTHDAY, '%Y-%m-%d') as holderBirthday, -- 投保人出生年月
holder.CUS_MST_CELL_NUM as holderMobileNo, -- 投保人手机号码
insured.CUS_MST_NAME as insuredName, -- 被保人姓名
insured.CUS_MST_ID as insuredId, -- 被保人编码
insured.CUS_MST_POSTTYPE as insuredIdNoType, -- 被保人证件类型
insured.CUS_MST_ID_NUM as insuredIdNo, -- 被保人编码
insured.CUS_MST_SEX as insuredSex, -- 被保人性别
date_format(insured.CUS_MST_BIRTHDAY, '%Y-%m-%d') as insuredBirthday, -- 被保人出生年月
insured.CUS_MST_CELL_NUM as insuredMobileNo, -- 被保人手机号码
m.MON025_405 as commission, -- 佣金
m.MON025_404 as commissionRate, -- 佣金率
m.MON025_004 as productId, -- 产品ID
m.MON025_401 as premium, -- 保费
m.MON025_101 as policyType, -- 保单类型
m.MON025_102 as payFrequency, -- 缴费频率
m.MON025_109 as payCommissionStatus, -- 发佣状态
m.mon025_108 as commissionType -- 佣金项目代码
FROM ins001 policy INNER JOIN MON025 m on m.MON025_002 = policy.INS_MST_ID AND m.MON025_303 = 1 AND m.mon025_108 = 'S01'
inner join cus001 holder on policy.FK_CUS_PRO_ID = holder.CUS_MST_ID
inner join cus001 insured on policy.FK_CUS_PRO_ID = insured.CUS_MST_ID
inner join prd001 product on m.MON025_004 = product.PRD_MST_ID
inner join prd004 insurer on product.FK_PRD_SUP_ID = insurer.PRD_SUP_ID
WHERE policy.INS_MST_ID = #{orderNo,jdbcType=VARCHAR};
<select id="findPolicyDetailsInfoByOrderNoE" resultType="com.yd.dal.entity.order.PolicyDetailInfoE">
SELECT
policy.INS_MST_ID as orderNo , -- 订单号
policy.INS_MST_POLICY_NUM as policyNo , -- 保单号
policy.INS_MST_STATUS as policyStatus, -- 保单状态
date_format(policy.INS_MST_ACCEPT_DATE, '%Y-%m-%d %H:%i:%s') as orderDate, -- 下单日期
date_format(policy.INS_MST_EFFECT_DATE, '%Y-%m-%d %H:%i:%s') as startDate, -- 保险起期
date_format(policy.INS_MST_INVALID_DATE, '%Y-%m-%d %H:%i:%s') as endDate, -- 保险止期
product.PRD_MST_ID as productId , -- 产品编号
product.PRD_MST_INS_CODE as productCode , -- 产品code
product.PRD_MST_PRO_NAME as productName , -- 产品名字
insurer.PRD_SUP_ID as insurerId , -- 保险公司编号
insurer.PRD_SUP_NAME as insurerName , -- 保险公司名称
holder.CUS_MST_NAME as holderName, -- 投保人姓名
holder.CUS_MST_POSTTYPE as holderIdNoType, -- 投保人证件类型
holder.CUS_MST_ID as holderId, -- 投保人编码
holder.CUS_MST_ID_NUM as holderIdNo, -- 投保人编码
holder.CUS_MST_SEX as holderSex, -- 投保人性别
date_format(holder.CUS_MST_BIRTHDAY, '%Y-%m-%d') as holderBirthday, -- 投保人出生年月
holder.CUS_MST_CELL_NUM as holderMobileNo, -- 投保人手机号码
insured.CUS_MST_NAME as insuredName, -- 被保人姓名
insured.CUS_MST_ID as insuredId, -- 被保人编码
insured.CUS_MST_POSTTYPE as insuredIdNoType, -- 被保人证件类型
insured.CUS_MST_ID_NUM as insuredIdNo, -- 被保人编码
insured.CUS_MST_SEX as insuredSex, -- 被保人性别
date_format(insured.CUS_MST_BIRTHDAY, '%Y-%m-%d') as insuredBirthday, -- 被保人出生年月
insured.CUS_MST_CELL_NUM as insuredMobileNo, -- 被保人手机号码
m.MON025_405 as commission, -- 佣金
m.MON025_404 as commissionRate, -- 佣金率
m.MON025_004 as productId, -- 产品ID
m.MON025_401 as premium, -- 保费
m.MON025_101 as policyType, -- 保单类型
m.MON025_102 as payFrequency, -- 缴费频率
m.MON025_109 as payCommissionStatus, -- 发佣状态
m.mon025_108 as commissionType -- 佣金项目代码
FROM ins001 policy INNER JOIN MON025 m on m.MON025_002 = policy.INS_MST_ID AND m.MON025_303 = 1 AND m.mon025_108 = 'S01'
inner join cus001 holder on policy.FK_CUS_PRO_ID = holder.CUS_MST_ID
inner join cus001 insured on policy.FK_CUS_PRO_ID = insured.CUS_MST_ID
inner join prd001 product on m.MON025_004 = product.PRD_MST_ID
inner join prd004 insurer on product.FK_PRD_SUP_ID = insurer.PRD_SUP_ID
WHERE policy.INS_MST_ID = #{orderNo,jdbcType=VARCHAR};
</select>
<select id="findPolicyFactorByOrderNosE" resultType="com.yd.dal.entity.order.PolicyFactorInfoE">
SELECT policy2.FK_INS_MST_ID as orderNo, -- 保单id
policy2.FK_PRD_MST_ID as productId, -- 产品ID
policy2.INS_IND_RELATIONSHIP as relationship,-- 与被保人关系
policy2.INS_IND_INSURED_AMOUNT as insuredAmount, -- 保费
policy2.INS_IND_AMOUNT_UNIT as amountUnit, -- 保费单位
policy2.INS_IND_PERIOD as period -- 缴费年限
from ins002 policy2 where policy2.FK_INS_MST_ID in
<foreach close=")" collection="orderNoList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
SELECT policy2.FK_INS_MST_ID as orderNo, -- 保单id
policy2.FK_PRD_MST_ID as productId, -- 产品ID
policy2.INS_IND_RELATIONSHIP as relationship,-- 与被保人关系
policy2.INS_IND_INSURED_AMOUNT as insuredAmount, -- 保费
policy2.INS_IND_AMOUNT_UNIT as amountUnit, -- 保费单位
policy2.INS_IND_PERIOD as period -- 缴费年限
from ins002 policy2 where policy2.FK_INS_MST_ID in
<foreach close=")" collection="orderNoList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</select>
<select id="findByIdAndStatus" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from ag_po_order
where id = #{id,jdbcType=BIGINT} and status = #{status,jdbcType=INTEGER}
</select>
<select id="findByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from ag_po_order
where id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
<?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.yd.dal.mapper.sms.ShortMessageSendRecordMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.sms.ShortMessageSendRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="mobile_no" jdbcType="VARCHAR" property="mobileNo" />
<result column="business_type" jdbcType="VARCHAR" property="businessType" />
<result column="business_id" jdbcType="VARCHAR" property="businessId" />
<result column="sms_type" jdbcType="VARCHAR" property="smsType" />
<result column="sms_content" jdbcType="VARCHAR" property="smsContent" />
<result column="verification_code" jdbcType="VARCHAR" property="verificationCode" />
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<result column="expire_time" jdbcType="TIMESTAMP" property="expireTime" />
<result column="send_status" jdbcType="VARCHAR" property="sendStatus" />
<result column="return_message" jdbcType="VARCHAR" property="returnMessage" />
<result column="request_id" jdbcType="VARCHAR" property="requestId" />
<result column="biz_id" jdbcType="VARCHAR" property="bizId" />
<result column="template_code" jdbcType="VARCHAR" property="templateCode" />
</resultMap>
<sql id="Base_Column_List">
id, mobile_no, business_type, business_id, sms_type, sms_content, verification_code,
send_time, expire_time, send_status, return_message, request_id, biz_id, template_code
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_sms_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_sms_record
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.sms.ShortMessageSendRecord" useGeneratedKeys="true">
insert into ag_sms_record (mobile_no, business_type, business_id,
sms_type, sms_content, verification_code,
send_time, expire_time, send_status,
return_message, request_id, biz_id,
template_code)
values (#{mobileNo,jdbcType=VARCHAR}, #{businessType,jdbcType=VARCHAR}, #{businessId,jdbcType=VARCHAR},
#{smsType,jdbcType=VARCHAR}, #{smsContent,jdbcType=VARCHAR}, #{verificationCode,jdbcType=VARCHAR},
#{sendTime,jdbcType=TIMESTAMP}, #{expireTime,jdbcType=TIMESTAMP}, #{sendStatus,jdbcType=VARCHAR},
#{returnMessage,jdbcType=VARCHAR}, #{requestId,jdbcType=VARCHAR}, #{bizId,jdbcType=VARCHAR},
#{templateCode,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.sms.ShortMessageSendRecord" useGeneratedKeys="true">
insert into ag_sms_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="mobileNo != null">
mobile_no,
</if>
<if test="businessType != null">
business_type,
</if>
<if test="businessId != null">
business_id,
</if>
<if test="smsType != null">
sms_type,
</if>
<if test="smsContent != null">
sms_content,
</if>
<if test="verificationCode != null">
verification_code,
</if>
<if test="sendTime != null">
send_time,
</if>
<if test="expireTime != null">
expire_time,
</if>
<if test="sendStatus != null">
send_status,
</if>
<if test="returnMessage != null">
return_message,
</if>
<if test="requestId != null">
request_id,
</if>
<if test="bizId != null">
biz_id,
</if>
<if test="templateCode != null">
template_code,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="mobileNo != null">
#{mobileNo,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
#{businessType,jdbcType=VARCHAR},
</if>
<if test="businessId != null">
#{businessId,jdbcType=VARCHAR},
</if>
<if test="smsType != null">
#{smsType,jdbcType=VARCHAR},
</if>
<if test="smsContent != null">
#{smsContent,jdbcType=VARCHAR},
</if>
<if test="verificationCode != null">
#{verificationCode,jdbcType=VARCHAR},
</if>
<if test="sendTime != null">
#{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="expireTime != null">
#{expireTime,jdbcType=TIMESTAMP},
</if>
<if test="sendStatus != null">
#{sendStatus,jdbcType=VARCHAR},
</if>
<if test="returnMessage != null">
#{returnMessage,jdbcType=VARCHAR},
</if>
<if test="requestId != null">
#{requestId,jdbcType=VARCHAR},
</if>
<if test="bizId != null">
#{bizId,jdbcType=VARCHAR},
</if>
<if test="templateCode != null">
#{templateCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.sms.ShortMessageSendRecord">
update ag_sms_record
<set>
<if test="mobileNo != null">
mobile_no = #{mobileNo,jdbcType=VARCHAR},
</if>
<if test="businessType != null">
business_type = #{businessType,jdbcType=VARCHAR},
</if>
<if test="businessId != null">
business_id = #{businessId,jdbcType=VARCHAR},
</if>
<if test="smsType != null">
sms_type = #{smsType,jdbcType=VARCHAR},
</if>
<if test="smsContent != null">
sms_content = #{smsContent,jdbcType=VARCHAR},
</if>
<if test="verificationCode != null">
verification_code = #{verificationCode,jdbcType=VARCHAR},
</if>
<if test="sendTime != null">
send_time = #{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="expireTime != null">
expire_time = #{expireTime,jdbcType=TIMESTAMP},
</if>
<if test="sendStatus != null">
send_status = #{sendStatus,jdbcType=VARCHAR},
</if>
<if test="returnMessage != null">
return_message = #{returnMessage,jdbcType=VARCHAR},
</if>
<if test="requestId != null">
request_id = #{requestId,jdbcType=VARCHAR},
</if>
<if test="bizId != null">
biz_id = #{bizId,jdbcType=VARCHAR},
</if>
<if test="templateCode != null">
template_code = #{templateCode,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.sms.ShortMessageSendRecord">
update ag_sms_record
set mobile_no = #{mobileNo,jdbcType=VARCHAR},
business_type = #{businessType,jdbcType=VARCHAR},
business_id = #{businessId,jdbcType=VARCHAR},
sms_type = #{smsType,jdbcType=VARCHAR},
sms_content = #{smsContent,jdbcType=VARCHAR},
verification_code = #{verificationCode,jdbcType=VARCHAR},
send_time = #{sendTime,jdbcType=TIMESTAMP},
expire_time = #{expireTime,jdbcType=TIMESTAMP},
send_status = #{sendStatus,jdbcType=VARCHAR},
return_message = #{returnMessage,jdbcType=VARCHAR},
request_id = #{requestId,jdbcType=VARCHAR},
biz_id = #{bizId,jdbcType=VARCHAR},
template_code = #{templateCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?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.yd.dal.mapper.transaction.TransSendlistMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.transaction.TransSendList">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="send_tag" jdbcType="VARCHAR" property="sendTag" />
<result column="sender" jdbcType="VARCHAR" property="sender" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="mobile_no" jdbcType="VARCHAR" property="mobileNo" />
<result column="use_for" jdbcType="INTEGER" property="useFor" />
<result column="use_for_id" jdbcType="BIGINT" property="useForId" />
<result column="sms_template_code" jdbcType="VARCHAR" property="smsTemplateCode" />
<result column="subject" jdbcType="VARCHAR" property="subject" />
<result column="content_summary" jdbcType="VARCHAR" property="contentSummary" />
<result column="is_success" jdbcType="INTEGER" property="isSuccess" />
<result column="fail_count" jdbcType="INTEGER" property="failCount" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.yd.dal.entity.transaction.TransSendList">
<result column="email_to" jdbcType="LONGVARCHAR" property="emailTo" />
<result column="email_cc" jdbcType="LONGVARCHAR" property="emailCc" />
<result column="email_bcc" jdbcType="LONGVARCHAR" property="emailBcc" />
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Base_Column_List">
id, send_tag, sender, customer_id, `name`, mobile_no, use_for, use_for_id, sms_template_code,
subject, content_summary, is_success, fail_count, created_at, created_by, updated_at,
updated_by
</sql>
<sql id="Blob_Column_List">
email_to, email_cc, email_bcc, content
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ag_trans_sendlist
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_trans_sendlist
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.transaction.TransSendList" useGeneratedKeys="true">
insert into ag_trans_sendlist (send_tag, sender, customer_id,
`name`, mobile_no, use_for,
use_for_id, sms_template_code, subject,
content_summary, is_success, fail_count,
created_at, created_by, updated_at,
updated_by, email_to, email_cc,
email_bcc, content)
values (#{sendTag,jdbcType=VARCHAR}, #{sender,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{mobileNo,jdbcType=VARCHAR}, #{useFor,jdbcType=INTEGER},
#{useForId,jdbcType=BIGINT}, #{smsTemplateCode,jdbcType=VARCHAR}, #{subject,jdbcType=VARCHAR},
#{contentSummary,jdbcType=VARCHAR}, #{isSuccess,jdbcType=INTEGER}, #{failCount,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT}, #{emailTo,jdbcType=LONGVARCHAR}, #{emailCc,jdbcType=LONGVARCHAR},
#{emailBcc,jdbcType=LONGVARCHAR}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.transaction.TransSendList" useGeneratedKeys="true">
insert into ag_trans_sendlist
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sendTag != null">
send_tag,
</if>
<if test="sender != null">
sender,
</if>
<if test="customerId != null">
customer_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="mobileNo != null">
mobile_no,
</if>
<if test="useFor != null">
use_for,
</if>
<if test="useForId != null">
use_for_id,
</if>
<if test="smsTemplateCode != null">
sms_template_code,
</if>
<if test="subject != null">
subject,
</if>
<if test="contentSummary != null">
content_summary,
</if>
<if test="isSuccess != null">
is_success,
</if>
<if test="failCount != null">
fail_count,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="emailTo != null">
email_to,
</if>
<if test="emailCc != null">
email_cc,
</if>
<if test="emailBcc != null">
email_bcc,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sendTag != null">
#{sendTag,jdbcType=VARCHAR},
</if>
<if test="sender != null">
#{sender,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="mobileNo != null">
#{mobileNo,jdbcType=VARCHAR},
</if>
<if test="useFor != null">
#{useFor,jdbcType=INTEGER},
</if>
<if test="useForId != null">
#{useForId,jdbcType=BIGINT},
</if>
<if test="smsTemplateCode != null">
#{smsTemplateCode,jdbcType=VARCHAR},
</if>
<if test="subject != null">
#{subject,jdbcType=VARCHAR},
</if>
<if test="contentSummary != null">
#{contentSummary,jdbcType=VARCHAR},
</if>
<if test="isSuccess != null">
#{isSuccess,jdbcType=INTEGER},
</if>
<if test="failCount != null">
#{failCount,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
<if test="emailTo != null">
#{emailTo,jdbcType=LONGVARCHAR},
</if>
<if test="emailCc != null">
#{emailCc,jdbcType=LONGVARCHAR},
</if>
<if test="emailBcc != null">
#{emailBcc,jdbcType=LONGVARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.transaction.TransSendList">
update ag_trans_sendlist
<set>
<if test="sendTag != null">
send_tag = #{sendTag,jdbcType=VARCHAR},
</if>
<if test="sender != null">
sender = #{sender,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="mobileNo != null">
mobile_no = #{mobileNo,jdbcType=VARCHAR},
</if>
<if test="useFor != null">
use_for = #{useFor,jdbcType=INTEGER},
</if>
<if test="useForId != null">
use_for_id = #{useForId,jdbcType=BIGINT},
</if>
<if test="smsTemplateCode != null">
sms_template_code = #{smsTemplateCode,jdbcType=VARCHAR},
</if>
<if test="subject != null">
subject = #{subject,jdbcType=VARCHAR},
</if>
<if test="contentSummary != null">
content_summary = #{contentSummary,jdbcType=VARCHAR},
</if>
<if test="isSuccess != null">
is_success = #{isSuccess,jdbcType=INTEGER},
</if>
<if test="failCount != null">
fail_count = #{failCount,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if test="emailTo != null">
email_to = #{emailTo,jdbcType=LONGVARCHAR},
</if>
<if test="emailCc != null">
email_cc = #{emailCc,jdbcType=LONGVARCHAR},
</if>
<if test="emailBcc != null">
email_bcc = #{emailBcc,jdbcType=LONGVARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.yd.dal.entity.transaction.TransSendList">
update ag_trans_sendlist
set send_tag = #{sendTag,jdbcType=VARCHAR},
sender = #{sender,jdbcType=VARCHAR},
customer_id = #{customerId,jdbcType=BIGINT},
`name` = #{name,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR},
use_for = #{useFor,jdbcType=INTEGER},
use_for_id = #{useForId,jdbcType=BIGINT},
sms_template_code = #{smsTemplateCode,jdbcType=VARCHAR},
subject = #{subject,jdbcType=VARCHAR},
content_summary = #{contentSummary,jdbcType=VARCHAR},
is_success = #{isSuccess,jdbcType=INTEGER},
fail_count = #{failCount,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
email_to = #{emailTo,jdbcType=LONGVARCHAR},
email_cc = #{emailCc,jdbcType=LONGVARCHAR},
email_bcc = #{emailBcc,jdbcType=LONGVARCHAR},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.transaction.TransSendList">
update ag_trans_sendlist
set send_tag = #{sendTag,jdbcType=VARCHAR},
sender = #{sender,jdbcType=VARCHAR},
customer_id = #{customerId,jdbcType=BIGINT},
`name` = #{name,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR},
use_for = #{useFor,jdbcType=INTEGER},
use_for_id = #{useForId,jdbcType=BIGINT},
sms_template_code = #{smsTemplateCode,jdbcType=VARCHAR},
subject = #{subject,jdbcType=VARCHAR},
content_summary = #{contentSummary,jdbcType=VARCHAR},
is_success = #{isSuccess,jdbcType=INTEGER},
fail_count = #{failCount,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment