Commit ad4aaee9 by yao.xiao

增加-H5商机列表查询

parent 409b2a18
......@@ -5,6 +5,8 @@ import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO;
import com.yd.api.practitioner.vo.media.MediaGetRespVO;
import com.yd.api.practitioner.vo.opportunity.OwnOpportunityQueryRequestVO;
import com.yd.api.practitioner.vo.opportunity.OwnOpportunityQueryResponseVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO;
import com.yd.api.practitioner.vo.setting.*;
......@@ -99,4 +101,18 @@ public class PractitionerController {
result.setData(responseVO);
return result;
}
/***
* 经纪人查询自己的商机
* @param requestVO
* @return
*/
@RequestMapping("/ownOpportunityQuery")
public Object ownOpportunityQuery(@RequestBody OwnOpportunityQueryRequestVO requestVO){
JsonResult result = new JsonResult();
OwnOpportunityQueryResponseVO responseVO = practitionerService.ownOpportunityQuery(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
}
......@@ -4,6 +4,8 @@ import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO;
import com.yd.api.practitioner.vo.media.MediaGetRespVO;
import com.yd.api.practitioner.vo.opportunity.OwnOpportunityQueryRequestVO;
import com.yd.api.practitioner.vo.opportunity.OwnOpportunityQueryResponseVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO;
import com.yd.api.practitioner.vo.setting.*;
......@@ -53,4 +55,11 @@ public interface PractitionerService {
* @return
*/
MediaGetRespVO mediaGet(MediaGetReqVO requestVO);
/**
* 经纪人查询自己的商机
* @param requestVO
* @return
*/
OwnOpportunityQueryResponseVO ownOpportunityQuery(OwnOpportunityQueryRequestVO requestVO);
}
......@@ -4,6 +4,8 @@ import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO;
import com.yd.api.practitioner.vo.media.MediaGetRespVO;
import com.yd.api.practitioner.vo.opportunity.OwnOpportunityQueryRequestVO;
import com.yd.api.practitioner.vo.opportunity.OwnOpportunityQueryResponseVO;
import com.yd.api.practitioner.vo.rank.AclCustomerFortuneStatistics;
import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO;
......@@ -11,18 +13,22 @@ import com.yd.api.practitioner.vo.rank.PractitionerInfoForAchievement;
import com.yd.api.practitioner.vo.setting.*;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.customer.AclCustomerLog;
import com.yd.dal.entity.customer.AclCustomerShare;
import com.yd.dal.entity.customer.AclFileUpload;
import com.yd.dal.entity.customer.CustomerFileUpload;
import com.yd.dal.entity.opportunity.OwnOpportunityInfo;
import com.yd.dal.entity.order.PoOrder;
import com.yd.dal.entity.practitioner.*;
import com.yd.dal.entity.tencent.TenInterfRecord;
import com.yd.dal.service.customer.AclCustomerLogDALService;
import com.yd.dal.service.customer.AclCustomerShareDALService;
import com.yd.dal.service.customer.AclFileUploadDALService;
import com.yd.dal.service.meta.MdCodeDALService;
import com.yd.dal.service.opportunity.OpportunityDALService;
import com.yd.dal.service.order.PoOrderDALService;
import com.yd.dal.service.practitioner.PractitionerDALService;
import com.yd.dal.service.practitioner.PractitionerSubordinateDALService;
import com.yd.dal.service.tencent.TenInterfRecordDALService;
import com.yd.dal.service.transaction.TranLogDALService;
import com.yd.rmi.ali.oss.service.OssService;
import com.yd.rmi.cache.SystemConfigService;
import com.yd.rmi.tencent.wechat.service.WechatService;
import com.yd.rmi.tencent.wechatinterf.pojo.ticket.TicketRequest;
import com.yd.rmi.tencent.wechatinterf.pojo.token.TokenRequest;
......@@ -65,6 +71,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private OssService ossService;
@Autowired
private WechatService wechatService;
@Autowired
private AclCustomerShareDALService aclCustomerShareDALService;
@Autowired
private PoOrderDALService poOrderDALService;
@Override
public PractitionerLoginResponseVO practitionerLogin(PractitionerLoginRequestVO requestVO) {
......@@ -395,6 +405,45 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return mediaGetRespVO;
}
@Autowired
private OpportunityDALService opportunityDALService;
@Override
public OwnOpportunityQueryResponseVO ownOpportunityQuery(OwnOpportunityQueryRequestVO requestVO) {
//查询自己的商机列表
OwnOpportunityQueryResponseVO responseVO = new OwnOpportunityQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId();
//经纪人查询通过自己分享成为自己商机的客户
AclPractitionerInfo practitioner = practitionerDALService.findPractitionerById(practitionerId);
Long customerId = practitioner.getCustomerId();
//查询自己的分享码,仅银盾服务产品
List<AclCustomerShare> aclCustomerShareList = aclCustomerShareDALService.findByCustomerIdAndInsurerId(customerId,888L);
List<String> customerShareCodes = new ArrayList<>();
for ( AclCustomerShare aclCustomerShare:aclCustomerShareList ) {
customerShareCodes.add(aclCustomerShare.getShareCode());
}
//此map存放customerId及订单id
Map<Long,Long> opportunityDateMap = new HashMap<>();
if (!customerShareCodes.isEmpty()){
//通过shareCodeId查询成交的订单
List<PoOrder> poOrderList = poOrderDALService.findByStatusAndShareCodeInGroupByCustomerId(3,customerShareCodes);
//便利order,查询商机客户,及服务订单id
for (PoOrder poOrder:poOrderList) {
if (poOrder.getCustomerId().longValue() == customerId.longValue()){
continue;
}
opportunityDateMap.put(poOrder.getCustomerId(), poOrder.getId());
}
}
List<OwnOpportunityInfo> ownOpportunityInfos = opportunityDALService.ownOpportunityQuery(practitionerId);
for (OwnOpportunityInfo info : ownOpportunityInfos){
info.setOrderId(opportunityDateMap.get(info.getOpportunityId()));
}
responseVO.setOwnOpportunityInfos(ownOpportunityInfos);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO;
}
private CommonResult paramCheck(SettingSaveRequestVO requestVO) {
//检查入参判断
Long practitionerId = requestVO.getPractitionerId();
......
package com.yd.api.practitioner.vo.opportunity;
import lombok.Data;
@Data
public class OwnOpportunityQueryRequestVO {
private Long practitionerId;//经纪人id
private Long customerId;//经纪人的customerId
}
package com.yd.api.practitioner.vo.opportunity;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.opportunity.OwnOpportunityInfo;
import lombok.Data;
import java.util.List;
@Data
public class OwnOpportunityQueryResponseVO {
private List<OwnOpportunityInfo> ownOpportunityInfos;
private CommonResult commonResult;
}
package com.yd.dal.entity.customer;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ag_acl_customer_share
* @author
*/
@Data
public class AclCustomerShare 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;
/**
* 猛哥方案订单ID
*/
private Long orderId;
/**
* 分享码
*/
private String shareCode;
/**
* FK ag_acl_customer.id
*/
private Long customerId;
/**
* assigned account id
*/
private String accountId;
/**
* 目的地类型
*/
private Integer destinationType;
/**
* 目的地ID
*/
private Long destinationId;
/**
* 1. list 2. confirm 3. order 4.non-product
*/
private Integer shareType;
/**
* 1. ios, 2.android 3.windows 4. mac os 5. Linux 6. other
*/
private Integer os;
/**
* 1. wechat 2. wechat friend 3.QQ 4. QZone 5.weibo
*/
private Integer channel;
/**
* entire url of shared link
*/
private String url;
/**
* 参数过多直接存参数的JSON字符串
*/
private String jsonParams;
/**
* 存试算结果的JSON字符串tableRateDetails
*/
private String jsonParamsCoverageInfo;
/**
* 0=No, 1=Yes
*/
private Long isOrder;
/**
* 起保日期
*/
private Date effectiveStartDate;
/**
* 终保日期
*/
private Date effectiveEndDate;
/**
* 成年人数目
*/
private Integer adultCount;
/**
* 未成年人数目
*/
private Integer childCount;
/**
* 老年人数目
*/
private Integer eldCount;
/**
* 天数
*/
private Integer dayCount;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
/**
* 修改人
*/
private Long updatedBy;
/**
* 名宿无忧房间数量
*/
private String levelCodeForBuilding;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yd.dal.entity.opportunity;
import lombok.Data;
@Data
public class OwnOpportunityInfo {
private Long opportunityId;
private Long orderId;
private String name;
private String mobileNo;
private String opportunityFrom;//商机来源
private String opportunityDate;//商机时间
private Long mdDropOptionId;
private Long leadsAssignedId;
}
\ No newline at end of file
package com.yd.dal.entity.order;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* ag_po_order
* @author
*/
@Data
public class PoOrder 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;
/**
* order#
*/
private String orderNo;
/**
* order datetime 0000-00-00 00:00:00
*/
private Date orderDate;
/**
* order price
*/
private BigDecimal orderPrice;
/**
* 报价单ag_po_quotation.id
*/
private Long quotationId;
/**
* 报价单ag_po_quotation.quote_no
*/
private Long quoteNo;
/**
* ag_product_category.id,id = 3车险
*/
private Long productCategoryId;
/**
* 目的地
*/
private String destination;
/**
* FK ag_md_continent.id
*/
private Long destinationContinentId;
/**
* FK ag_md_region.id
*/
private Long destinationRegionId;
/**
* FK ag_md_country.id
*/
private Long destinationCountryId;
/**
* 起保日期
*/
private Date effectiveStartDate;
/**
* 终保日期
*/
private Date effectiveEndDate;
/**
* 1-365 days
*/
private Integer coverLength;
private Integer coverAdultQty;
private Integer coverUnderageQty;
/**
* 1.Wechat 2.AliPay 3.Bank
*/
private Long paymentMethodId;
/**
* pay url
*/
private String payUrl;
/**
* 统一支付落地页1:H5,2:group
*/
private Integer payFrom;
private String insurerPdfUrl;
/**
* 0=No, 1=Yes
*/
private Integer isMsgSent;
/**
* 0=无车船税, 1=有车船税
*/
private Integer isCarTax;
/**
* 银盾企业增值税缺省为0,小数
*/
private BigDecimal ydValueAddedTax;
/**
* FK ag_product_plan_commission,ag_product_life_plan_commission银盾来佣佣金率
*/
private BigDecimal commissionRate;
/**
* 银盾来佣佣金
*/
private BigDecimal commissionAmount;
/**
* FK ag_product_plan_commission,ag_product_life_plan_commission公告佣金率
*/
private BigDecimal announcementCommissionRate;
/**
* 公告佣金
*/
private BigDecimal announcementCommissionAmount;
/**
* FK ag_acl_channel_referral_rate个人职级佣金率
*/
private BigDecimal gradeCommissionRate;
/**
* 最终个人佣金率 = 银盾来佣率 * (1 + yd_value_added_tax) * 银盾公告佣金率 * 个人职级佣金率
*/
private BigDecimal referralRate;
/**
* 最终个人佣金 = order_price / (1 + yd_value_added_tax) * 银盾来佣率 * 银盾公告佣金率 * 个人职级佣金率
*/
private BigDecimal referralAmount;
/**
* FK ag_order_policy.id
*/
private Long policyId;
private String policyNo;
/**
* 市场活动
*/
private String mktCampaign;
/**
* 市场活动任务
*/
private String mktTask;
/**
* 0=No, 1=Yes
*/
private Integer isConverted;
/**
* 1=open 2=confirm 3=completed 4=cancelled 5=overdue 9=error
*/
private Integer status;
/**
* 1=pending 2=paid 3=received 9=error
*/
private Integer paymentStatus;
/**
* flag
*/
private String flag;
private Long customerId;
/**
* 分享人customer_id
*/
private Long referralCustomerId;
/**
* 分享码
*/
private String shareCode;
private Long insurerId;
/**
* 数据来源
*/
private String dataSource;
/**
* 有无社保(1-有;0-无)
*/
private Integer isSocialInsured;
/**
* 保障计划 1=终身 2=保障至70岁 3=保障至80岁
*/
private Integer coverTerm;
/**
* 缴费期限
*/
private Integer paymentTerm;
/**
* Y=年, M=月, D=日, A=岁
*/
private String paymentTermUnit;
/**
* 缴费间隔; -1-不定期交、0-一次交清、1-月交、3-季交、6-半年交、12-年交
*/
private Integer payInterval;
/**
* ERP系统是否可见 1-可见 2-不可见
*/
private String viewFlag;
/**
* 动态字段A
*/
private String dynamicFieldA;
/**
* 动态字段B
*/
private String dynamicFieldB;
private String dynamicFieldC;
/**
* 动态字段D
*/
private String dynamicFieldD;
/**
* 驾乘险车牌号码
*/
private String plateNo;
/**
* group团单添加订单说明
*/
private String memo;
/**
* 试算参数报文
*/
private String productTableRequestJson;
/**
* 核定座位数
*/
private Integer verifiedSeats;
/**
* 驾乘险车架号
*/
private String frameNo;
/**
* 保障标的物所在省份, FK ag_md_province.id
*/
private Long subjectProvinceId;
/**
* 保障标的物所在城市, FK ag_md_city.id
*/
private Long subjectCityId;
/**
* 保障标的物所在详细地址
*/
private String subjectAddress;
/**
* 民宿房间数
*/
private String roomQty;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
/**
* 修改人
*/
private Long updatedBy;
/**
* 营销投放渠道来源 hmsr
*/
private String sourceChannel;
/**
* 营销投放产品名 hmpl
*/
private String sourcePlanName;
/**
* 营销投放推送日期 hmkw
*/
private String sourcePublishdate;
/**
* 营销投放推送文章或其他 hmci
*/
private String sourceArticle;
/**
* 访问IP
*/
private String ipAddress;
/**
* 访问IP所属的地域
*/
private String ipRegion;
/**
* 续保去年的order id
*/
private Long renewOrderId;
/**
* 0=No, 1=Yes 是否已续保完成? 会针对去年订单做异动
*/
private Integer isRenewComplete;
/**
* 是否银盾收保费 0=No, 1=Yes
*/
private Integer isPayToYd;
/**
* 保险费过期未付选择 保险单借款垫缴:Y中止合同:N
*/
private String autoPayFlag;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yd.dal.mapper.customer;
import com.yd.dal.entity.customer.AclCustomerShare;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface AclCustomerShareMapper {
int deleteByPrimaryKey(Long id);
int insert(AclCustomerShare record);
int insertSelective(AclCustomerShare record);
AclCustomerShare selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AclCustomerShare record);
int updateByPrimaryKey(AclCustomerShare record);
List<AclCustomerShare> findByCustomerIdAndInsurerId(@Param("customerId") Long customerId,@Param("insurerId") long insurerId);
}
\ No newline at end of file
package com.yd.dal.mapper.opportunity;
import com.yd.dal.entity.opportunity.OwnOpportunityInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface OpportunityMapper {
List<OwnOpportunityInfo> ownOpportunityQuery(@Param("practitionerId") Long practitionerId);
}
package com.yd.dal.mapper.order;
import com.yd.dal.entity.order.PoOrder;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface PoOrderMapper {
int deleteByPrimaryKey(Long id);
int insert(PoOrder record);
int insertSelective(PoOrder record);
PoOrder selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(PoOrder record);
int updateByPrimaryKey(PoOrder record);
List<PoOrder> findByStatusAndShareCodeInGroupByCustomerId(@Param("status") int status, @Param("customerShareCodes") List<String> customerShareCodes);
}
\ No newline at end of file
package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclCustomerShare;
import java.util.List;
public interface AclCustomerShareDALService {
List<AclCustomerShare> findByCustomerIdAndInsurerId(Long customerId, long insurerId);
}
package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclCustomerShare;
import com.yd.dal.mapper.customer.AclCustomerShareMapper;
import com.yd.dal.service.customer.AclCustomerShareDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("aclCustomerShareDALService")
public class AclCustomerShareDALServiceImpl implements AclCustomerShareDALService {
@Resource
private AclCustomerShareMapper aclCustomerShareMapper;
@Override
public List<AclCustomerShare> findByCustomerIdAndInsurerId(Long customerId, long insurerId) {
return aclCustomerShareMapper.findByCustomerIdAndInsurerId(customerId, insurerId);
}
}
package com.yd.dal.service.opportunity.Impl;
import com.yd.dal.entity.opportunity.OwnOpportunityInfo;
import com.yd.dal.mapper.opportunity.OpportunityMapper;
import com.yd.dal.service.opportunity.OpportunityDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("opportunityDALService")
public class OpportunityDALServiceImpl implements OpportunityDALService {
@Resource
private OpportunityMapper opportunityMapper;
@Override
public List<OwnOpportunityInfo> ownOpportunityQuery(Long practitionerId) {
return opportunityMapper.ownOpportunityQuery(practitionerId);
}
}
package com.yd.dal.service.opportunity;
import com.yd.dal.entity.opportunity.OwnOpportunityInfo;
import java.util.List;
public interface OpportunityDALService {
List<OwnOpportunityInfo> ownOpportunityQuery(Long practitionerId);
}
package com.yd.dal.service.order.Impl;
import com.yd.dal.entity.order.PoOrder;
import com.yd.dal.mapper.order.PoOrderMapper;
import com.yd.dal.service.order.PoOrderDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("poOrderDALService")
public class PoOrderDALServiceImpl implements PoOrderDALService {
@Resource
private PoOrderMapper poOrderMapper;
@Override
public List<PoOrder> findByStatusAndShareCodeInGroupByCustomerId(int status, List<String> customerShareCodes) {
return poOrderMapper.findByStatusAndShareCodeInGroupByCustomerId(status , customerShareCodes);
}
}
package com.yd.dal.service.order;
import com.yd.dal.entity.order.PoOrder;
import java.util.List;
public interface PoOrderDALService {
List<PoOrder> findByStatusAndShareCodeInGroupByCustomerId(int status, List<String> customerShareCodes);
}
<?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.AclCustomerShareMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclCustomerShare">
<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_id" jdbcType="BIGINT" property="orderId" />
<result column="share_code" jdbcType="VARCHAR" property="shareCode" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<result column="account_id" jdbcType="VARCHAR" property="accountId" />
<result column="destination_type" jdbcType="INTEGER" property="destinationType" />
<result column="destination_id" jdbcType="BIGINT" property="destinationId" />
<result column="share_type" jdbcType="INTEGER" property="shareType" />
<result column="os" jdbcType="INTEGER" property="os" />
<result column="channel" jdbcType="INTEGER" property="channel" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="json_params" jdbcType="VARCHAR" property="jsonParams" />
<result column="json_params_coverage_info" jdbcType="VARCHAR" property="jsonParamsCoverageInfo" />
<result column="is_order" jdbcType="BIGINT" property="isOrder" />
<result column="effective_start_date" jdbcType="TIMESTAMP" property="effectiveStartDate" />
<result column="effective_end_date" jdbcType="TIMESTAMP" property="effectiveEndDate" />
<result column="adult_count" jdbcType="INTEGER" property="adultCount" />
<result column="child_count" jdbcType="INTEGER" property="childCount" />
<result column="eld_count" jdbcType="INTEGER" property="eldCount" />
<result column="day_count" jdbcType="INTEGER" property="dayCount" />
<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="level_code_for_building" jdbcType="VARCHAR" property="levelCodeForBuilding" />
</resultMap>
<sql id="Base_Column_List">
id, config_level, product_id, plan_id, order_id, share_code, customer_id, account_id,
destination_type, destination_id, share_type, os, channel, url, json_params, json_params_coverage_info,
is_order, effective_start_date, effective_end_date, adult_count, child_count, eld_count,
day_count, created_at, created_by, updated_at, updated_by, level_code_for_building
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_customer_share
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_customer_share
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerShare" useGeneratedKeys="true">
insert into ag_acl_customer_share (config_level, product_id, plan_id,
order_id, share_code, customer_id,
account_id, destination_type, destination_id,
share_type, os, channel,
url, json_params, json_params_coverage_info,
is_order, effective_start_date, effective_end_date,
adult_count, child_count, eld_count,
day_count, created_at, created_by,
updated_at, updated_by, level_code_for_building
)
values (#{configLevel,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT},
#{orderId,jdbcType=BIGINT}, #{shareCode,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT},
#{accountId,jdbcType=VARCHAR}, #{destinationType,jdbcType=INTEGER}, #{destinationId,jdbcType=BIGINT},
#{shareType,jdbcType=INTEGER}, #{os,jdbcType=INTEGER}, #{channel,jdbcType=INTEGER},
#{url,jdbcType=VARCHAR}, #{jsonParams,jdbcType=VARCHAR}, #{jsonParamsCoverageInfo,jdbcType=VARCHAR},
#{isOrder,jdbcType=BIGINT}, #{effectiveStartDate,jdbcType=TIMESTAMP}, #{effectiveEndDate,jdbcType=TIMESTAMP},
#{adultCount,jdbcType=INTEGER}, #{childCount,jdbcType=INTEGER}, #{eldCount,jdbcType=INTEGER},
#{dayCount,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}, #{levelCodeForBuilding,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerShare" useGeneratedKeys="true">
insert into ag_acl_customer_share
<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="orderId != null">
order_id,
</if>
<if test="shareCode != null">
share_code,
</if>
<if test="customerId != null">
customer_id,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="destinationType != null">
destination_type,
</if>
<if test="destinationId != null">
destination_id,
</if>
<if test="shareType != null">
share_type,
</if>
<if test="os != null">
os,
</if>
<if test="channel != null">
channel,
</if>
<if test="url != null">
url,
</if>
<if test="jsonParams != null">
json_params,
</if>
<if test="jsonParamsCoverageInfo != null">
json_params_coverage_info,
</if>
<if test="isOrder != null">
is_order,
</if>
<if test="effectiveStartDate != null">
effective_start_date,
</if>
<if test="effectiveEndDate != null">
effective_end_date,
</if>
<if test="adultCount != null">
adult_count,
</if>
<if test="childCount != null">
child_count,
</if>
<if test="eldCount != null">
eld_count,
</if>
<if test="dayCount != null">
day_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="levelCodeForBuilding != null">
level_code_for_building,
</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="orderId != null">
#{orderId,jdbcType=BIGINT},
</if>
<if test="shareCode != null">
#{shareCode,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="accountId != null">
#{accountId,jdbcType=VARCHAR},
</if>
<if test="destinationType != null">
#{destinationType,jdbcType=INTEGER},
</if>
<if test="destinationId != null">
#{destinationId,jdbcType=BIGINT},
</if>
<if test="shareType != null">
#{shareType,jdbcType=INTEGER},
</if>
<if test="os != null">
#{os,jdbcType=INTEGER},
</if>
<if test="channel != null">
#{channel,jdbcType=INTEGER},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="jsonParams != null">
#{jsonParams,jdbcType=VARCHAR},
</if>
<if test="jsonParamsCoverageInfo != null">
#{jsonParamsCoverageInfo,jdbcType=VARCHAR},
</if>
<if test="isOrder != null">
#{isOrder,jdbcType=BIGINT},
</if>
<if test="effectiveStartDate != null">
#{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
#{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="adultCount != null">
#{adultCount,jdbcType=INTEGER},
</if>
<if test="childCount != null">
#{childCount,jdbcType=INTEGER},
</if>
<if test="eldCount != null">
#{eldCount,jdbcType=INTEGER},
</if>
<if test="dayCount != null">
#{dayCount,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="levelCodeForBuilding != null">
#{levelCodeForBuilding,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclCustomerShare">
update ag_acl_customer_share
<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="orderId != null">
order_id = #{orderId,jdbcType=BIGINT},
</if>
<if test="shareCode != null">
share_code = #{shareCode,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="accountId != null">
account_id = #{accountId,jdbcType=VARCHAR},
</if>
<if test="destinationType != null">
destination_type = #{destinationType,jdbcType=INTEGER},
</if>
<if test="destinationId != null">
destination_id = #{destinationId,jdbcType=BIGINT},
</if>
<if test="shareType != null">
share_type = #{shareType,jdbcType=INTEGER},
</if>
<if test="os != null">
os = #{os,jdbcType=INTEGER},
</if>
<if test="channel != null">
channel = #{channel,jdbcType=INTEGER},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="jsonParams != null">
json_params = #{jsonParams,jdbcType=VARCHAR},
</if>
<if test="jsonParamsCoverageInfo != null">
json_params_coverage_info = #{jsonParamsCoverageInfo,jdbcType=VARCHAR},
</if>
<if test="isOrder != null">
is_order = #{isOrder,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="adultCount != null">
adult_count = #{adultCount,jdbcType=INTEGER},
</if>
<if test="childCount != null">
child_count = #{childCount,jdbcType=INTEGER},
</if>
<if test="eldCount != null">
eld_count = #{eldCount,jdbcType=INTEGER},
</if>
<if test="dayCount != null">
day_count = #{dayCount,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="levelCodeForBuilding != null">
level_code_for_building = #{levelCodeForBuilding,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclCustomerShare">
update ag_acl_customer_share
set config_level = #{configLevel,jdbcType=INTEGER},
product_id = #{productId,jdbcType=BIGINT},
plan_id = #{planId,jdbcType=BIGINT},
order_id = #{orderId,jdbcType=BIGINT},
share_code = #{shareCode,jdbcType=VARCHAR},
customer_id = #{customerId,jdbcType=BIGINT},
account_id = #{accountId,jdbcType=VARCHAR},
destination_type = #{destinationType,jdbcType=INTEGER},
destination_id = #{destinationId,jdbcType=BIGINT},
share_type = #{shareType,jdbcType=INTEGER},
os = #{os,jdbcType=INTEGER},
channel = #{channel,jdbcType=INTEGER},
url = #{url,jdbcType=VARCHAR},
json_params = #{jsonParams,jdbcType=VARCHAR},
json_params_coverage_info = #{jsonParamsCoverageInfo,jdbcType=VARCHAR},
is_order = #{isOrder,jdbcType=BIGINT},
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
adult_count = #{adultCount,jdbcType=INTEGER},
child_count = #{childCount,jdbcType=INTEGER},
eld_count = #{eldCount,jdbcType=INTEGER},
day_count = #{dayCount,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
level_code_for_building = #{levelCodeForBuilding,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByCustomerIdAndInsurerId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_customer_share
where
customer_id = #{customerId}
and
plan_id in (SELECT id FROM ag_product_plan WHERE insurer_id = #{insurerId} )
</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.opportunity.OpportunityMapper">
<resultMap id="opportunityQuery" type="com.yd.dal.entity.opportunity.OwnOpportunityInfo">
<result column="opportunityId" property="opportunityId"/>
<result column="name" property="name"/>
<result column="mobileNo" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="opportunityFrom" property="opportunityFrom"/>
<result column="opportunityDate" property="opportunityDate"/>
<result column="mdDropOptionId" property="mdDropOptionId"/>
<result column="leadsAssignedId" property="leadsAssignedId"/>
</resultMap>
<select id="ownOpportunityQuery" resultMap="opportunityQuery">
SELECT
a.customer_id opportunityId,
c.NAME name,
c.mobile_no mobileNo,
p.mkt_campaign opportunityFrom,
date_format(a.created_at, '%Y-%m-%d %H:%i:%s') opportunityDate,
if (p.mkt_campaign is null ,'',(SELECT cam.name from ag_md_mk_campaign cam where cam.id = p.mkt_campaign )) mdDropOptionId,
a.id leadsAssignedId
FROM
ag_mkt_leads_assigneds a
LEFT JOIN ag_mkt_leads_pool p ON p.customer_id = a.customer_id
LEFT JOIN ag_acl_customer c ON c.id = a.customer_id
where a.is_active=1
<if test="practitionerId != null">
and a.assigned_practitioner_id = #{practitionerId}
</if>
</select>
</mapper>
<?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">
<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="yd_value_added_tax" jdbcType="DECIMAL" property="ydValueAddedTax" />
<result column="commission_rate" jdbcType="DECIMAL" property="commissionRate" />
<result column="commission_amount" jdbcType="DECIMAL" property="commissionAmount" />
<result column="announcement_commission_rate" jdbcType="DECIMAL" property="announcementCommissionRate" />
<result column="announcement_commission_amount" jdbcType="DECIMAL" property="announcementCommissionAmount" />
<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="VARCHAR" property="memo" />
<result column="product_table_request_json" jdbcType="VARCHAR" 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">
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, yd_value_added_tax, commission_rate, commission_amount, announcement_commission_rate,
announcement_commission_amount, 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">
select
<include refid="Base_Column_List" />
from ag_po_order
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
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">
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, yd_value_added_tax, commission_rate,
commission_amount, announcement_commission_rate,
announcement_commission_amount, 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}, #{announcementCommissionRate,jdbcType=DECIMAL},
#{announcementCommissionAmount,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=VARCHAR},
#{productTableRequestJson,jdbcType=VARCHAR}, #{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">
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="ydValueAddedTax != null">
yd_value_added_tax,
</if>
<if test="commissionRate != null">
commission_rate,
</if>
<if test="commissionAmount != null">
commission_amount,
</if>
<if test="announcementCommissionRate != null">
announcement_commission_rate,
</if>
<if test="announcementCommissionAmount != null">
announcement_commission_amount,
</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="announcementCommissionRate != null">
#{announcementCommissionRate,jdbcType=DECIMAL},
</if>
<if test="announcementCommissionAmount != null">
#{announcementCommissionAmount,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=VARCHAR},
</if>
<if test="productTableRequestJson != null">
#{productTableRequestJson,jdbcType=VARCHAR},
</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">
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="ydValueAddedTax != null">
yd_value_added_tax = #{ydValueAddedTax,jdbcType=DECIMAL},
</if>
<if test="commissionRate != null">
commission_rate = #{commissionRate,jdbcType=DECIMAL},
</if>
<if test="commissionAmount != null">
commission_amount = #{commissionAmount,jdbcType=DECIMAL},
</if>
<if test="announcementCommissionRate != null">
announcement_commission_rate = #{announcementCommissionRate,jdbcType=DECIMAL},
</if>
<if test="announcementCommissionAmount != null">
announcement_commission_amount = #{announcementCommissionAmount,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=VARCHAR},
</if>
<if test="productTableRequestJson != null">
product_table_request_json = #{productTableRequestJson,jdbcType=VARCHAR},
</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">
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},
yd_value_added_tax = #{ydValueAddedTax,jdbcType=DECIMAL},
commission_rate = #{commissionRate,jdbcType=DECIMAL},
commission_amount = #{commissionAmount,jdbcType=DECIMAL},
announcement_commission_rate = #{announcementCommissionRate,jdbcType=DECIMAL},
announcement_commission_amount = #{announcementCommissionAmount,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=VARCHAR},
product_table_request_json = #{productTableRequestJson,jdbcType=VARCHAR},
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>
<select id="findByStatusAndShareCodeInGroupByCustomerId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_po_order
where
status = #{status}
<if test="customerShareCodes != null">
and share_code in
<foreach item="item" collection="customerShareCodes" separator="," open="(" close=")" index="index">
#{item}
</foreach>
</if>
</select>
</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