Commit 831b02c4 by guanchen

调试

parent 0da03f0a
......@@ -186,11 +186,11 @@
<id>prod</id>
<properties>
<profiles.active>prod</profiles.active>
<mysql.server>jdbc:mysql://172.21.0.4:3306/huhu</mysql.server>
<mysql.server>jdbc:mysql://10.9.63.72:3306/huhu</mysql.server>
<mysql.username>huhu</mysql.username>
<mysql.password>huhu</mysql.password>
<redis.host>172.21.0.17</redis.host>
<redis.password>huhu</redis.password>
<mysql.password>Huhu123~</mysql.password>
<redis.host>10.9.48.21</redis.host>
<redis.password>Ws_LrqD_20180319_REdis_MQLRd</redis.password>
<spring.profiles.active>prod</spring.profiles.active>
<logfile_path>/data/logs/huhu/lanren</logfile_path>
<providers-path>/data/java/service</providers-path>
......
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentExpandDaily;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
@Mapper
public interface AgentExpandDailyMapper extends BaseMapper<AgentExpandDaily> {
int updateBatch(List<AgentExpandDaily> list);
int batchInsert(@Param("list") List<AgentExpandDaily> list);
int insertOrUpdate(AgentExpandDaily record);
int insertOrUpdateSelective(AgentExpandDaily record);
@Update("INSERT INTO agent_expand_daily(dat, agent_id, user_id, cnt_expand, created_at, updated_at, year_str, month_str, day_str) " +
"SELECT * " +
"FROM ( " +
" SELECT '#{datStr}' dat_, " +
" a.agent_id, " +
" b.user_id, " +
" a.cnt_expand_, " +
" UNIX_TIMESTAMP(now()), " +
" UNIX_TIMESTAMP(now()) updated_at_, " +
" SUBSTR('#{datStr}', 1, 4), " +
" SUBSTR('#{datStr}', 6, 2), " +
" SUBSTR('#{datStr}', 9, 2) " +
" FROM " +
" (SELECT agent_id, " +
" COUNT(*) cnt_expand_ " +
" FROM agent_expand_detail " +
" WHERE dat='#{datStr}' " +
" GROUP BY 1) a " +
" JOIN user_agent b ON a.agent_id=b.agent_id " +
") a ON DUPLICATE KEY " +
"UPDATE updated_at=updated_at_;")
int updateByDatByDetail(String datStr);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentExpandDetail;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AgentExpandDetailMapper extends BaseMapper<AgentExpandDetail> {
int updateBatch(List<AgentExpandDetail> list);
int batchInsert(@Param("list") List<AgentExpandDetail> list);
int saveOrUpdate(AgentExpandDetail record);
int insertOrUpdateSelective(AgentExpandDetail record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.PartnerInviteRelation;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
@Mapper
public interface PartnerInviteRelationMapper extends BaseMapper<PartnerInviteRelation> {
int updateBatch(List<PartnerInviteRelation> list);
int batchInsert(@Param("list") List<PartnerInviteRelation> list);
int insertOrUpdate(PartnerInviteRelation record);
int insertOrUpdateSelective(PartnerInviteRelation record);
@SelectProvider(type = PartnerInviteRelationSqlProvider.class, method = "getPartnerInviteRelationListByRegDay")
List<PartnerInviteRelation> getPartnerInviteRelationListByRegDay(String datStr);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* @author chen
* @title: PartnerInviteRelationSqlProvider
* @projectName partner
* @description: TODO
* @package com.lanren.huhu.partner.dao
* @date 2019-07-08 17:57
*/
public class PartnerInviteRelationSqlProvider {
public String getPartnerInviteRelationListByRegDay(@Param("datStr") String datStr) {
return "SELECT * " +
"FROM partner_invite_relation " +
"WHERE regiter_time " +
"BETWEEN UNIX_TIMESTAMP('" + datStr + " 00:00:00') " +
"AND UNIX_TIMESTAMP('" + datStr + " 23:59:59');";
}
}
package com.lanren.huhu.partner.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
@Data
@TableName(value = "agent_expand_daily")
public class AgentExpandDaily implements Serializable {
@TableId(value = "dat", type = IdType.INPUT)
private Date dat;
@TableId(value = "agent_id", type = IdType.INPUT)
private Integer agentId;
@TableField(value = "user_id")
private Integer userId;
@TableField(value = "cnt_expand")
private Integer cntExpand;
@TableField(value = "created_at")
private Integer createdAt;
@TableField(value = "updated_at")
private Integer updatedAt;
@TableField(value = "year_str")
private String yearStr;
@TableField(value = "month_str")
private String monthStr;
@TableField(value = "day_str")
private String dayStr;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_CNT_EXPAND = "cnt_expand";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_YEAR_STR = "year_str";
public static final String COL_MONTH_STR = "month_str";
public static final String COL_DAY_STR = "day_str";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
@Data
@TableName(value = "agent_expand_detail")
public class AgentExpandDetail implements Serializable {
@TableId(value = "dat", type = IdType.INPUT)
private Date dat;
@TableId(value = "agent_id", type = IdType.INPUT)
private Integer agentId;
@TableId(value = "expand_user_id", type = IdType.INPUT)
private Integer expandUserId;
@TableField(value = "user_id")
private Integer userId;
@TableField(value = "expand_user_reg_time")
private Date expandUserRegTime;
@TableField(value = "created_at")
private Integer createdAt;
@TableField(value = "updated_at")
private Integer updatedAt;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_EXPAND_USER_REG_TIME = "expand_user_reg_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
@TableName(value = "partner_invite_relation")
public class PartnerInviteRelation implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 用户ID
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 直接邀请的数量
*/
@TableField(value = "direct_num")
private Integer directNum;
/**
* 间接邀请的数量
*/
@TableField(value = "indirect_num")
private Integer indirectNum;
/**
* 合伙人等级 普通10 高级20 超级30
*/
@TableField(value = "partner_level")
private Integer partnerLevel;
/**
* 邀请类型 默认0无邀请 ,10邀请码邀请 20绑卡邀请
*/
@TableField(value = "invite_type")
private Integer inviteType;
/**
* 注册时间 用户注册时间
*/
@TableField(value = "regiter_time")
private Integer regiterTime;
/**
* 代理商ID
*/
@TableField(value = "agent_id")
private Integer agentId;
/**
* 关联代理商等级
*/
@TableField(value = "parent_agent_list")
private String parentAgentList;
/**
* 激活得订单号
*/
@TableField(value = "active_order_id")
private String activeOrderId;
/**
* 邀请者ID
*/
@TableField(value = "invite_user_id")
private Integer inviteUserId;
/**
* 邀请者得合伙人等级 默认0 10普通 20 高级 30超级
*/
@TableField(value = "invite_partner_level")
private Integer invitePartnerLevel;
/**
* 奖励金额
*/
@TableField(value = "amount")
private BigDecimal amount;
/**
* 默认0、10现金 20 红包
*/
@TableField(value = "reward_type")
private Integer rewardType;
/**
* 直接邀请奖励对应产品Id
*/
@TableField(value = "coupon_id")
private Integer couponId;
/**
* 间接邀请者id
*/
@TableField(value = "indirect_invite_uid")
private Integer indirectInviteUid;
/**
* 邀请者得合伙人等级 默认0 10普通 20 高级 30超级
*/
@TableField(value = "indirect_partner_level")
private Integer indirectPartnerLevel;
/**
* 奖励金额
*/
@TableField(value = "indirect_amount")
private BigDecimal indirectAmount;
/**
* 默认0、10现金 20 红包
*/
@TableField(value = "indirect_reward_type")
private Integer indirectRewardType;
/**
* 间接邀请奖励对应产品Id
*/
@TableField(value = "indirect_coupon_id")
private Integer indirectCouponId;
/**
* 默认0 90已注册 100待奖励 120 已奖励 激活时由90->100
*/
@TableField(value = "state")
private Integer state;
/**
* 激活时间 首单激活时间 张高伟写入
*/
@TableField(value = "active_time")
private Integer activeTime;
/**
* 结算时间 有关晨更新
*/
@TableField(value = "settle_time")
private Integer settleTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Integer createdAt;
/**
* 修改时间
*/
@TableField(value = "updated_at")
private Integer updatedAt;
/**
* 最后有效的订单贡献奖励
*/
@TableField(value = "last_active_order_id")
private String lastActiveOrderId;
/**
* level1 id
*/
@TableField(value = "agent_level_one")
private Integer agentLevelOne;
/**
* level2 id
*/
@TableField(value = "agent_level_two")
private Integer agentLevelTwo;
/**
* level3 id
*/
@TableField(value = "agent_level_three")
private Integer agentLevelThree;
/**
* level4 id
*/
@TableField(value = "agent_level_four")
private Integer agentLevelFour;
/**
* level5 id
*/
@TableField(value = "agent_level_five")
private Integer agentLevelFive;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_DIRECT_NUM = "direct_num";
public static final String COL_INDIRECT_NUM = "indirect_num";
public static final String COL_PARTNER_LEVEL = "partner_level";
public static final String COL_INVITE_TYPE = "invite_type";
public static final String COL_REGITER_TIME = "regiter_time";
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_PARENT_AGENT_LIST = "parent_agent_list";
public static final String COL_ACTIVE_ORDER_ID = "active_order_id";
public static final String COL_INVITE_USER_ID = "invite_user_id";
public static final String COL_INVITE_PARTNER_LEVEL = "invite_partner_level";
public static final String COL_AMOUNT = "amount";
public static final String COL_REWARD_TYPE = "reward_type";
public static final String COL_COUPON_ID = "coupon_id";
public static final String COL_INDIRECT_INVITE_UID = "indirect_invite_uid";
public static final String COL_INDIRECT_PARTNER_LEVEL = "indirect_partner_level";
public static final String COL_INDIRECT_AMOUNT = "indirect_amount";
public static final String COL_INDIRECT_REWARD_TYPE = "indirect_reward_type";
public static final String COL_INDIRECT_COUPON_ID = "indirect_coupon_id";
public static final String COL_STATE = "state";
public static final String COL_ACTIVE_TIME = "active_time";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_LAST_ACTIVE_ORDER_ID = "last_active_order_id";
public static final String COL_AGENT_LEVEL_ONE = "agent_level_one";
public static final String COL_AGENT_LEVEL_TWO = "agent_level_two";
public static final String COL_AGENT_LEVEL_THREE = "agent_level_three";
public static final String COL_AGENT_LEVEL_FOUR = "agent_level_four";
public static final String COL_AGENT_LEVEL_FIVE = "agent_level_five";
}
\ No newline at end of file
package com.lanren.huhu.partner.schedule;
import com.lanren.huhu.partner.constants.Constants;
import com.lanren.huhu.partner.domain.AgentExpandDaily;
import com.lanren.huhu.partner.domain.AgentExpandDetail;
import com.lanren.huhu.partner.domain.PartnerInviteRelation;
import com.lanren.huhu.partner.domain.UserAgent;
import com.lanren.huhu.partner.model.User;
import com.lanren.huhu.partner.service.AgentExpandDailyService;
import com.lanren.huhu.partner.service.AgentExpandDetailService;
import com.lanren.huhu.partner.service.PartnerInviteRelationService;
import com.lanren.huhu.partner.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import static com.lanren.huhu.partner.constants.Constants.PARENT_COLUMN_NAME_CENGJI;
/**
* @author chen
* @title: AgentDailyExpandTask
* @projectName partner
* @description: 代理商每日拓展用户数, 按用户的代理商层次查找归属
* @package com.lanren.huhu.partner.schedule
* @date 2019-07-08 15:50
*/
@Component
public class AgentDailyExpandTask {
private static Logger logger = LoggerFactory.getLogger(AgentDailyExpandTask.class);
@Autowired
PartnerInviteRelationService partnerInviteRelationService;
@Autowired
UserService userService;
@Autowired
AgentExpandDetailService agentExpandDetailService;
@Autowired
AgentExpandDailyService agentExpandDailyService;
// @Scheduled(cron="0 5 */2 * * *")
@Scheduled(fixedDelay = 10000L)
public void runScheduledTask() {
logger.info("run AgentDailyExpandTask");
runSummary();
}
@Async
public void runSummary() {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
int now = (int)(System.currentTimeMillis() / 1000L);
Date dat = new Date(System.currentTimeMillis() - 10 * 60 * 1000L);
String datStr = df.format(dat);
datStr = "2019-07-06";
List<PartnerInviteRelation> partnerInviteRelationList = partnerInviteRelationService.getPartnerInviteRelationListByRegDay(datStr);
for (PartnerInviteRelation partnerInviteRelation : partnerInviteRelationList) {
List<UserAgent> userAgentList = userService.getUserAgentChildListByUserId(partnerInviteRelation.getUserId(), PARENT_COLUMN_NAME_CENGJI);
for (UserAgent userAgent : userAgentList) {
AgentExpandDetail detail = new AgentExpandDetail();
detail.setDat(dat);
detail.setAgentId(userAgent.getAgentId());
detail.setUserId(userAgent.getUserId());
detail.setExpandUserId(partnerInviteRelation.getUserId());
detail.setExpandUserRegTime(new Date(partnerInviteRelation.getRegiterTime() * 1000L));
detail.setCreatedAt(now);
detail.setUpdatedAt(now);
agentExpandDetailService.insertOrUpdate(detail);
}
}
if (partnerInviteRelationList.size() > 0) {
agentExpandDailyService.updateByDatByDetail(datStr);
}
}
}
package com.lanren.huhu.partner.service;
import java.util.List;
import com.lanren.huhu.partner.domain.AgentExpandDaily;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author chen
* @title: ${NAME}
* @projectName partner
* @description: TODO
* @package ${PACKAGE_NAME}
* @date 2019-07-08 16:38
*/
public interface AgentExpandDailyService extends IService<AgentExpandDaily> {
int updateBatch(List<AgentExpandDaily> list);
int batchInsert(List<AgentExpandDaily> list);
int insertOrUpdate(AgentExpandDaily record);
int insertOrUpdateSelective(AgentExpandDaily record);
int updateByDatByDetail(String datStr);
}
package com.lanren.huhu.partner.service;
import java.util.List;
import com.lanren.huhu.partner.domain.AgentExpandDetail;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @title: ${NAME}
* @projectName partner
* @description: TODO
* @author chen
* @package ${PACKAGE_NAME}
* @date 2019-07-08 17:02
*/
public interface AgentExpandDetailService extends IService<AgentExpandDetail>{
int updateBatch(List<AgentExpandDetail> list);
int batchInsert(List<AgentExpandDetail> list);
int insertOrUpdate(AgentExpandDetail record);
int insertOrUpdateSelective(AgentExpandDetail record);
}
package com.lanren.huhu.partner.service;
import com.lanren.huhu.partner.domain.PartnerInviteRelation;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @title: ${NAME}
* @projectName partner
* @description: 合伙人邀请关系
* @author chen
* @package ${PACKAGE_NAME}
* @date 2019-07-08 16:02
*/
public interface PartnerInviteRelationService extends IService<PartnerInviteRelation>{
int updateBatch(List<PartnerInviteRelation> list);
int batchInsert(List<PartnerInviteRelation> list);
int insertOrUpdate(PartnerInviteRelation record);
int insertOrUpdateSelective(PartnerInviteRelation record);
/**
* 根据日期查找新增用户
* @param datStr
* @return
*/
List<PartnerInviteRelation> getPartnerInviteRelationListByRegDay(String datStr);
}
package com.lanren.huhu.partner.service.impl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lanren.huhu.partner.dao.AgentExpandDailyMapper;
import java.util.List;
import com.lanren.huhu.partner.domain.AgentExpandDaily;
import com.lanren.huhu.partner.service.AgentExpandDailyService;
/**
* @author chen
* @title: ${NAME}
* @projectName partner
* @description: TODO
* @package ${PACKAGE_NAME}
* @date 2019-07-08 16:38
*/
@Service
public class AgentExpandDailyServiceImpl extends ServiceImpl<AgentExpandDailyMapper, AgentExpandDaily> implements AgentExpandDailyService {
@Override
public int updateBatch(List<AgentExpandDaily> list) {
return baseMapper.updateBatch(list);
}
@Override
public int batchInsert(List<AgentExpandDaily> list) {
return baseMapper.batchInsert(list);
}
@Override
public int insertOrUpdate(AgentExpandDaily record) {
return baseMapper.insertOrUpdate(record);
}
@Override
public int insertOrUpdateSelective(AgentExpandDaily record) {
return baseMapper.insertOrUpdateSelective(record);
}
@Override
public int updateByDatByDetail(String datStr) {
return baseMapper.updateByDatByDetail(datStr);
}
}
package com.lanren.huhu.partner.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import com.lanren.huhu.partner.dao.AgentExpandDetailMapper;
import com.lanren.huhu.partner.domain.AgentExpandDetail;
import com.lanren.huhu.partner.service.AgentExpandDetailService;
/**
* @title: ${NAME}
* @projectName partner
* @description: TODO
* @author chen
* @package ${PACKAGE_NAME}
* @date 2019-07-08 17:02
*/
@Service
public class AgentExpandDetailServiceImpl extends ServiceImpl<AgentExpandDetailMapper, AgentExpandDetail> implements AgentExpandDetailService{
@Autowired
AgentExpandDetailMapper agentExpandDetailMapper;
@Override
public int updateBatch(List<AgentExpandDetail> list) {
return baseMapper.updateBatch(list);
}
@Override
public int batchInsert(List<AgentExpandDetail> list) {
return baseMapper.batchInsert(list);
}
@Override
public int insertOrUpdate(AgentExpandDetail record) {
return agentExpandDetailMapper.saveOrUpdate(record);
}
@Override
public int insertOrUpdateSelective(AgentExpandDetail record) {
return baseMapper.insertOrUpdateSelective(record);
}
}
package com.lanren.huhu.partner.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lanren.huhu.partner.domain.PartnerInviteRelation;
import java.util.List;
import com.lanren.huhu.partner.dao.PartnerInviteRelationMapper;
import com.lanren.huhu.partner.service.PartnerInviteRelationService;
/**
* @title: ${NAME}
* @projectName partner
* @description: 合伙人邀请关系
* @author chen
* @package ${PACKAGE_NAME}
* @date 2019-07-08 16:02
*/
@Service
public class PartnerInviteRelationServiceImpl extends ServiceImpl<PartnerInviteRelationMapper, PartnerInviteRelation> implements PartnerInviteRelationService{
private static Logger logger = LoggerFactory.getLogger(PartnerInviteRelationServiceImpl.class);
@Override
public int updateBatch(List<PartnerInviteRelation> list) {
return baseMapper.updateBatch(list);
}
@Override
public int batchInsert(List<PartnerInviteRelation> list) {
return baseMapper.batchInsert(list);
}
@Override
public int insertOrUpdate(PartnerInviteRelation record) {
return baseMapper.insertOrUpdate(record);
}
@Override
public int insertOrUpdateSelective(PartnerInviteRelation record) {
return baseMapper.insertOrUpdateSelective(record);
}
@Override
public List<PartnerInviteRelation> getPartnerInviteRelationListByRegDay(String datStr) {
logger.info("datStr is: {}", datStr);
return baseMapper.getPartnerInviteRelationListByRegDay(datStr);
}
}
<?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.lanren.huhu.partner.dao.AgentExpandDailyMapper">
<resultMap id="BaseResultMap" type="com.lanren.huhu.partner.domain.AgentExpandDaily">
<!--@mbg.generated-->
<id column="dat" property="dat" />
<id column="agent_id" property="agentId" />
<result column="user_id" property="userId" />
<result column="cnt_expand" property="cntExpand" />
<result column="created_at" property="createdAt" />
<result column="updated_at" property="updatedAt" />
<result column="year_str" property="yearStr" />
<result column="month_str" property="monthStr" />
<result column="day_str" property="dayStr" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
dat, agent_id, user_id, cnt_expand, created_at, updated_at, year_str, month_str,
day_str
</sql>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update agent_expand_daily
<trim prefix="set" suffixOverrides=",">
<trim prefix="user_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.userId}
</foreach>
</trim>
<trim prefix="cnt_expand = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.cntExpand}
</foreach>
</trim>
<trim prefix="created_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.createdAt}
</foreach>
</trim>
<trim prefix="updated_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.updatedAt}
</foreach>
</trim>
<trim prefix="year_str = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.yearStr}
</foreach>
</trim>
<trim prefix="month_str = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.monthStr}
</foreach>
</trim>
<trim prefix="day_str = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.dayStr}
</foreach>
</trim>
</trim>
where dat in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.dat}
</foreach>
</update>
<insert id="batchInsert" parameterType="map">
<!--@mbg.generated-->
insert into agent_expand_daily
(dat, agent_id, user_id, cnt_expand, created_at, updated_at, year_str, month_str,
day_str)
values
<foreach collection="list" item="item" separator=",">
(#{item.dat}, #{item.agentId}, #{item.userId}, #{item.cntExpand}, #{item.createdAt},
#{item.updatedAt}, #{item.yearStr}, #{item.monthStr}, #{item.dayStr})
</foreach>
</insert>
<insert id="insertOrUpdate" parameterType="com.lanren.huhu.partner.domain.AgentExpandDaily">
<!--@mbg.generated-->
insert into agent_expand_daily
(dat, agent_id, user_id, cnt_expand, created_at, updated_at, year_str, month_str,
day_str)
values
(#{dat}, #{agentId}, #{userId}, #{cntExpand}, #{createdAt}, #{updatedAt}, #{yearStr},
#{monthStr}, #{dayStr})
on duplicate key update
cnt_expand = #{cntExpand},
updated_at = #{updatedAt}
</insert>
<insert id="insertOrUpdateSelective" parameterType="com.lanren.huhu.partner.domain.AgentExpandDaily">
<!--@mbg.generated-->
insert into agent_expand_daily
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dat != null">
dat,
</if>
<if test="agentId != null">
agent_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="cntExpand != null">
cnt_expand,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="yearStr != null">
year_str,
</if>
<if test="monthStr != null">
month_str,
</if>
<if test="dayStr != null">
day_str,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dat != null">
#{dat},
</if>
<if test="agentId != null">
#{agentId},
</if>
<if test="userId != null">
#{userId},
</if>
<if test="cntExpand != null">
#{cntExpand},
</if>
<if test="createdAt != null">
#{createdAt},
</if>
<if test="updatedAt != null">
#{updatedAt},
</if>
<if test="yearStr != null">
#{yearStr},
</if>
<if test="monthStr != null">
#{monthStr},
</if>
<if test="dayStr != null">
#{dayStr},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="dat != null">
dat = #{dat},
</if>
<if test="agentId != null">
agent_id = #{agentId},
</if>
<if test="userId != null">
user_id = #{userId},
</if>
<if test="cntExpand != null">
cnt_expand = #{cntExpand},
</if>
<if test="createdAt != null">
created_at = #{createdAt},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt},
</if>
<if test="yearStr != null">
year_str = #{yearStr},
</if>
<if test="monthStr != null">
month_str = #{monthStr},
</if>
<if test="dayStr != null">
day_str = #{dayStr},
</if>
</trim>
</insert>
</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.lanren.huhu.partner.dao.AgentExpandDetailMapper">
<resultMap id="BaseResultMap" type="com.lanren.huhu.partner.domain.AgentExpandDetail">
<!--@mbg.generated-->
<id column="dat" property="dat" />
<id column="agent_id" property="agentId" />
<id column="expand_user_id" property="expandUserId" />
<result column="user_id" property="userId" />
<result column="expand_user_reg_time" property="expandUserRegTime" />
<result column="created_at" property="createdAt" />
<result column="updated_at" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
dat, agent_id, expand_user_id, user_id, expand_user_reg_time, created_at, updated_at
</sql>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update agent_expand_detail
<trim prefix="set" suffixOverrides=",">
<trim prefix="user_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.userId}
</foreach>
</trim>
<trim prefix="expand_user_reg_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.expandUserRegTime}
</foreach>
</trim>
<trim prefix="created_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.createdAt}
</foreach>
</trim>
<trim prefix="updated_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when dat = #{item.dat} then #{item.updatedAt}
</foreach>
</trim>
</trim>
where dat in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.dat}
</foreach>
</update>
<insert id="batchInsert" parameterType="map">
<!--@mbg.generated-->
insert into agent_expand_detail
(dat, agent_id, expand_user_id, user_id, expand_user_reg_time, created_at, updated_at
)
values
<foreach collection="list" item="item" separator=",">
(#{item.dat}, #{item.agentId}, #{item.expandUserId}, #{item.userId}, #{item.expandUserRegTime},
#{item.createdAt}, #{item.updatedAt})
</foreach>
</insert>
<insert id="saveOrUpdate" parameterType="com.lanren.huhu.partner.domain.AgentExpandDetail">
<!--@mbg.generated-->
insert into agent_expand_detail
(dat, agent_id, expand_user_id, user_id, expand_user_reg_time, created_at, updated_at)
values
(#{dat}, #{agentId}, #{expandUserId}, #{userId}, #{expandUserRegTime}, #{createdAt},
#{updatedAt})
on duplicate key update
dat = #{dat},
agent_id = #{agentId},
expand_user_id = #{expandUserId},
user_id = #{userId},
expand_user_reg_time = #{expandUserRegTime},
created_at = #{createdAt},
updated_at = #{updatedAt}
</insert>
<insert id="insertOrUpdateSelective" parameterType="com.lanren.huhu.partner.domain.AgentExpandDetail">
<!--@mbg.generated-->
insert into agent_expand_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dat != null">
dat,
</if>
<if test="agentId != null">
agent_id,
</if>
<if test="expandUserId != null">
expand_user_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="expandUserRegTime != null">
expand_user_reg_time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dat != null">
#{dat},
</if>
<if test="agentId != null">
#{agentId},
</if>
<if test="expandUserId != null">
#{expandUserId},
</if>
<if test="userId != null">
#{userId},
</if>
<if test="expandUserRegTime != null">
#{expandUserRegTime},
</if>
<if test="createdAt != null">
#{createdAt},
</if>
<if test="updatedAt != null">
#{updatedAt},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="dat != null">
dat = #{dat},
</if>
<if test="agentId != null">
agent_id = #{agentId},
</if>
<if test="expandUserId != null">
expand_user_id = #{expandUserId},
</if>
<if test="userId != null">
user_id = #{userId},
</if>
<if test="expandUserRegTime != null">
expand_user_reg_time = #{expandUserRegTime},
</if>
<if test="createdAt != null">
created_at = #{createdAt},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt},
</if>
</trim>
</insert>
</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.lanren.huhu.partner.dao.PartnerInviteRelationMapper">
<resultMap id="BaseResultMap" type="com.lanren.huhu.partner.domain.PartnerInviteRelation">
<!--@mbg.generated-->
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="direct_num" property="directNum" />
<result column="indirect_num" property="indirectNum" />
<result column="partner_level" property="partnerLevel" />
<result column="invite_type" property="inviteType" />
<result column="regiter_time" property="regiterTime" />
<result column="agent_id" property="agentId" />
<result column="parent_agent_list" property="parentAgentList" />
<result column="active_order_id" property="activeOrderId" />
<result column="invite_user_id" property="inviteUserId" />
<result column="invite_partner_level" property="invitePartnerLevel" />
<result column="amount" property="amount" />
<result column="reward_type" property="rewardType" />
<result column="coupon_id" property="couponId" />
<result column="indirect_invite_uid" property="indirectInviteUid" />
<result column="indirect_partner_level" property="indirectPartnerLevel" />
<result column="indirect_amount" property="indirectAmount" />
<result column="indirect_reward_type" property="indirectRewardType" />
<result column="indirect_coupon_id" property="indirectCouponId" />
<result column="state" property="state" />
<result column="active_time" property="activeTime" />
<result column="settle_time" property="settleTime" />
<result column="created_at" property="createdAt" />
<result column="updated_at" property="updatedAt" />
<result column="last_active_order_id" property="lastActiveOrderId" />
<result column="agent_level_one" property="agentLevelOne" />
<result column="agent_level_two" property="agentLevelTwo" />
<result column="agent_level_three" property="agentLevelThree" />
<result column="agent_level_four" property="agentLevelFour" />
<result column="agent_level_five" property="agentLevelFive" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, user_id, direct_num, indirect_num, partner_level, invite_type, regiter_time,
agent_id, parent_agent_list, active_order_id, invite_user_id, invite_partner_level,
amount, reward_type, coupon_id, indirect_invite_uid, indirect_partner_level, indirect_amount,
indirect_reward_type, indirect_coupon_id, `state`, active_time, settle_time, created_at,
updated_at, last_active_order_id, agent_level_one, agent_level_two, agent_level_three,
agent_level_four, agent_level_five
</sql>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update partner_invite_relation
<trim prefix="set" suffixOverrides=",">
<trim prefix="user_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.userId}
</foreach>
</trim>
<trim prefix="direct_num = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.directNum}
</foreach>
</trim>
<trim prefix="indirect_num = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.indirectNum}
</foreach>
</trim>
<trim prefix="partner_level = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.partnerLevel}
</foreach>
</trim>
<trim prefix="invite_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.inviteType}
</foreach>
</trim>
<trim prefix="regiter_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.regiterTime}
</foreach>
</trim>
<trim prefix="agent_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.agentId}
</foreach>
</trim>
<trim prefix="parent_agent_list = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.parentAgentList}
</foreach>
</trim>
<trim prefix="active_order_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.activeOrderId}
</foreach>
</trim>
<trim prefix="invite_user_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.inviteUserId}
</foreach>
</trim>
<trim prefix="invite_partner_level = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.invitePartnerLevel}
</foreach>
</trim>
<trim prefix="amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.amount}
</foreach>
</trim>
<trim prefix="reward_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.rewardType}
</foreach>
</trim>
<trim prefix="coupon_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.couponId}
</foreach>
</trim>
<trim prefix="indirect_invite_uid = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.indirectInviteUid}
</foreach>
</trim>
<trim prefix="indirect_partner_level = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.indirectPartnerLevel}
</foreach>
</trim>
<trim prefix="indirect_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.indirectAmount}
</foreach>
</trim>
<trim prefix="indirect_reward_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.indirectRewardType}
</foreach>
</trim>
<trim prefix="indirect_coupon_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.indirectCouponId}
</foreach>
</trim>
<trim prefix="`state` = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.state}
</foreach>
</trim>
<trim prefix="active_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.activeTime}
</foreach>
</trim>
<trim prefix="settle_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.settleTime}
</foreach>
</trim>
<trim prefix="created_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.createdAt}
</foreach>
</trim>
<trim prefix="updated_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.updatedAt}
</foreach>
</trim>
<trim prefix="last_active_order_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.lastActiveOrderId}
</foreach>
</trim>
<trim prefix="agent_level_one = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.agentLevelOne}
</foreach>
</trim>
<trim prefix="agent_level_two = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.agentLevelTwo}
</foreach>
</trim>
<trim prefix="agent_level_three = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.agentLevelThree}
</foreach>
</trim>
<trim prefix="agent_level_four = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.agentLevelFour}
</foreach>
</trim>
<trim prefix="agent_level_five = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id} then #{item.agentLevelFive}
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id}
</foreach>
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into partner_invite_relation
(user_id, direct_num, indirect_num, partner_level, invite_type, regiter_time, agent_id,
parent_agent_list, active_order_id, invite_user_id, invite_partner_level, amount,
reward_type, coupon_id, indirect_invite_uid, indirect_partner_level, indirect_amount,
indirect_reward_type, indirect_coupon_id, `state`, active_time, settle_time, created_at,
updated_at, last_active_order_id, agent_level_one, agent_level_two, agent_level_three,
agent_level_four, agent_level_five)
values
<foreach collection="list" item="item" separator=",">
(#{item.userId}, #{item.directNum}, #{item.indirectNum}, #{item.partnerLevel}, #{item.inviteType},
#{item.regiterTime}, #{item.agentId}, #{item.parentAgentList}, #{item.activeOrderId},
#{item.inviteUserId}, #{item.invitePartnerLevel}, #{item.amount}, #{item.rewardType},
#{item.couponId}, #{item.indirectInviteUid}, #{item.indirectPartnerLevel}, #{item.indirectAmount},
#{item.indirectRewardType}, #{item.indirectCouponId}, #{item.state}, #{item.activeTime},
#{item.settleTime}, #{item.createdAt}, #{item.updatedAt}, #{item.lastActiveOrderId},
#{item.agentLevelOne}, #{item.agentLevelTwo}, #{item.agentLevelThree}, #{item.agentLevelFour},
#{item.agentLevelFive})
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.lanren.huhu.partner.domain.PartnerInviteRelation" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into partner_invite_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
user_id,
direct_num,
indirect_num,
partner_level,
invite_type,
regiter_time,
agent_id,
parent_agent_list,
active_order_id,
invite_user_id,
invite_partner_level,
amount,
reward_type,
coupon_id,
indirect_invite_uid,
indirect_partner_level,
indirect_amount,
indirect_reward_type,
indirect_coupon_id,
`state`,
active_time,
settle_time,
created_at,
updated_at,
last_active_order_id,
agent_level_one,
agent_level_two,
agent_level_three,
agent_level_four,
agent_level_five,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
#{userId},
#{directNum},
#{indirectNum},
#{partnerLevel},
#{inviteType},
#{regiterTime},
#{agentId},
#{parentAgentList},
#{activeOrderId},
#{inviteUserId},
#{invitePartnerLevel},
#{amount},
#{rewardType},
#{couponId},
#{indirectInviteUid},
#{indirectPartnerLevel},
#{indirectAmount},
#{indirectRewardType},
#{indirectCouponId},
#{state},
#{activeTime},
#{settleTime},
#{createdAt},
#{updatedAt},
#{lastActiveOrderId},
#{agentLevelOne},
#{agentLevelTwo},
#{agentLevelThree},
#{agentLevelFour},
#{agentLevelFive},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id},
</if>
user_id = #{userId},
direct_num = #{directNum},
indirect_num = #{indirectNum},
partner_level = #{partnerLevel},
invite_type = #{inviteType},
regiter_time = #{regiterTime},
agent_id = #{agentId},
parent_agent_list = #{parentAgentList},
active_order_id = #{activeOrderId},
invite_user_id = #{inviteUserId},
invite_partner_level = #{invitePartnerLevel},
amount = #{amount},
reward_type = #{rewardType},
coupon_id = #{couponId},
indirect_invite_uid = #{indirectInviteUid},
indirect_partner_level = #{indirectPartnerLevel},
indirect_amount = #{indirectAmount},
indirect_reward_type = #{indirectRewardType},
indirect_coupon_id = #{indirectCouponId},
`state` = #{state},
active_time = #{activeTime},
settle_time = #{settleTime},
created_at = #{createdAt},
updated_at = #{updatedAt},
last_active_order_id = #{lastActiveOrderId},
agent_level_one = #{agentLevelOne},
agent_level_two = #{agentLevelTwo},
agent_level_three = #{agentLevelThree},
agent_level_four = #{agentLevelFour},
agent_level_five = #{agentLevelFive},
</trim>
</insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.lanren.huhu.partner.domain.PartnerInviteRelation" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into partner_invite_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="directNum != null">
direct_num,
</if>
<if test="indirectNum != null">
indirect_num,
</if>
<if test="partnerLevel != null">
partner_level,
</if>
<if test="inviteType != null">
invite_type,
</if>
<if test="regiterTime != null">
regiter_time,
</if>
<if test="agentId != null">
agent_id,
</if>
<if test="parentAgentList != null">
parent_agent_list,
</if>
<if test="activeOrderId != null">
active_order_id,
</if>
<if test="inviteUserId != null">
invite_user_id,
</if>
<if test="invitePartnerLevel != null">
invite_partner_level,
</if>
<if test="amount != null">
amount,
</if>
<if test="rewardType != null">
reward_type,
</if>
<if test="couponId != null">
coupon_id,
</if>
<if test="indirectInviteUid != null">
indirect_invite_uid,
</if>
<if test="indirectPartnerLevel != null">
indirect_partner_level,
</if>
<if test="indirectAmount != null">
indirect_amount,
</if>
<if test="indirectRewardType != null">
indirect_reward_type,
</if>
<if test="indirectCouponId != null">
indirect_coupon_id,
</if>
<if test="state != null">
`state`,
</if>
<if test="activeTime != null">
active_time,
</if>
<if test="settleTime != null">
settle_time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="lastActiveOrderId != null">
last_active_order_id,
</if>
<if test="agentLevelOne != null">
agent_level_one,
</if>
<if test="agentLevelTwo != null">
agent_level_two,
</if>
<if test="agentLevelThree != null">
agent_level_three,
</if>
<if test="agentLevelFour != null">
agent_level_four,
</if>
<if test="agentLevelFive != null">
agent_level_five,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="userId != null">
#{userId},
</if>
<if test="directNum != null">
#{directNum},
</if>
<if test="indirectNum != null">
#{indirectNum},
</if>
<if test="partnerLevel != null">
#{partnerLevel},
</if>
<if test="inviteType != null">
#{inviteType},
</if>
<if test="regiterTime != null">
#{regiterTime},
</if>
<if test="agentId != null">
#{agentId},
</if>
<if test="parentAgentList != null">
#{parentAgentList},
</if>
<if test="activeOrderId != null">
#{activeOrderId},
</if>
<if test="inviteUserId != null">
#{inviteUserId},
</if>
<if test="invitePartnerLevel != null">
#{invitePartnerLevel},
</if>
<if test="amount != null">
#{amount},
</if>
<if test="rewardType != null">
#{rewardType},
</if>
<if test="couponId != null">
#{couponId},
</if>
<if test="indirectInviteUid != null">
#{indirectInviteUid},
</if>
<if test="indirectPartnerLevel != null">
#{indirectPartnerLevel},
</if>
<if test="indirectAmount != null">
#{indirectAmount},
</if>
<if test="indirectRewardType != null">
#{indirectRewardType},
</if>
<if test="indirectCouponId != null">
#{indirectCouponId},
</if>
<if test="state != null">
#{state},
</if>
<if test="activeTime != null">
#{activeTime},
</if>
<if test="settleTime != null">
#{settleTime},
</if>
<if test="createdAt != null">
#{createdAt},
</if>
<if test="updatedAt != null">
#{updatedAt},
</if>
<if test="lastActiveOrderId != null">
#{lastActiveOrderId},
</if>
<if test="agentLevelOne != null">
#{agentLevelOne},
</if>
<if test="agentLevelTwo != null">
#{agentLevelTwo},
</if>
<if test="agentLevelThree != null">
#{agentLevelThree},
</if>
<if test="agentLevelFour != null">
#{agentLevelFour},
</if>
<if test="agentLevelFive != null">
#{agentLevelFive},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id},
</if>
<if test="userId != null">
user_id = #{userId},
</if>
<if test="directNum != null">
direct_num = #{directNum},
</if>
<if test="indirectNum != null">
indirect_num = #{indirectNum},
</if>
<if test="partnerLevel != null">
partner_level = #{partnerLevel},
</if>
<if test="inviteType != null">
invite_type = #{inviteType},
</if>
<if test="regiterTime != null">
regiter_time = #{regiterTime},
</if>
<if test="agentId != null">
agent_id = #{agentId},
</if>
<if test="parentAgentList != null">
parent_agent_list = #{parentAgentList},
</if>
<if test="activeOrderId != null">
active_order_id = #{activeOrderId},
</if>
<if test="inviteUserId != null">
invite_user_id = #{inviteUserId},
</if>
<if test="invitePartnerLevel != null">
invite_partner_level = #{invitePartnerLevel},
</if>
<if test="amount != null">
amount = #{amount},
</if>
<if test="rewardType != null">
reward_type = #{rewardType},
</if>
<if test="couponId != null">
coupon_id = #{couponId},
</if>
<if test="indirectInviteUid != null">
indirect_invite_uid = #{indirectInviteUid},
</if>
<if test="indirectPartnerLevel != null">
indirect_partner_level = #{indirectPartnerLevel},
</if>
<if test="indirectAmount != null">
indirect_amount = #{indirectAmount},
</if>
<if test="indirectRewardType != null">
indirect_reward_type = #{indirectRewardType},
</if>
<if test="indirectCouponId != null">
indirect_coupon_id = #{indirectCouponId},
</if>
<if test="state != null">
`state` = #{state},
</if>
<if test="activeTime != null">
active_time = #{activeTime},
</if>
<if test="settleTime != null">
settle_time = #{settleTime},
</if>
<if test="createdAt != null">
created_at = #{createdAt},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt},
</if>
<if test="lastActiveOrderId != null">
last_active_order_id = #{lastActiveOrderId},
</if>
<if test="agentLevelOne != null">
agent_level_one = #{agentLevelOne},
</if>
<if test="agentLevelTwo != null">
agent_level_two = #{agentLevelTwo},
</if>
<if test="agentLevelThree != null">
agent_level_three = #{agentLevelThree},
</if>
<if test="agentLevelFour != null">
agent_level_four = #{agentLevelFour},
</if>
<if test="agentLevelFive != null">
agent_level_five = #{agentLevelFive},
</if>
</trim>
</insert>
</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