Commit fdfc3604 by yao.xiao

增加-经纪人手动添加商机增加跟进初始信息/统计pojo建立

parent b84dd1a0
...@@ -220,4 +220,7 @@ public class PractitionerController { ...@@ -220,4 +220,7 @@ public class PractitionerController {
return result; return result;
} }
/**
* 保存商机目标
*/
} }
...@@ -38,6 +38,7 @@ import com.yd.dal.entity.customer.practitioner.*; ...@@ -38,6 +38,7 @@ import com.yd.dal.entity.customer.practitioner.*;
import com.yd.dal.service.meta.MdCodeDALService; import com.yd.dal.service.meta.MdCodeDALService;
import com.yd.dal.service.meta.MdDropOptionsDALService; import com.yd.dal.service.meta.MdDropOptionsDALService;
import com.yd.rmi.ali.oss.service.OssService; 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.wechat.service.WechatService;
import com.yd.rmi.tencent.wechat.vo.WeChatInfoByENV; import com.yd.rmi.tencent.wechat.vo.WeChatInfoByENV;
import com.yd.rmi.tencent.wechatinterf.pojo.ticket.TicketRequest; import com.yd.rmi.tencent.wechatinterf.pojo.ticket.TicketRequest;
...@@ -114,6 +115,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -114,6 +115,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private AclUserDALService aclUserDALService; private AclUserDALService aclUserDALService;
@Autowired @Autowired
private AclPractitionerPotentialAssignedsDALService aclPractitionerPotentialAssignedsDALService; private AclPractitionerPotentialAssignedsDALService aclPractitionerPotentialAssignedsDALService;
@Autowired
private SystemConfigService systemConfigService;
@Override @Override
public PractitionerLoginResponseVO practitionerLogin(PractitionerLoginRequestVO requestVO) { public PractitionerLoginResponseVO practitionerLogin(PractitionerLoginRequestVO requestVO) {
...@@ -1140,8 +1143,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1140,8 +1143,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
pool.setAddedBy(-1L); pool.setAddedBy(-1L);
mktLeadsPoolDALService.save(pool); mktLeadsPoolDALService.save(pool);
} }
//获取线索库id
Long poolId = pool.getId();
//保存至指派表 //保存至指派表
MktLeadsAssigneds assigneds = new MktLeadsAssigneds(); MktLeadsAssigneds assigneds = new MktLeadsAssigneds();
assigneds.setAssignedPractitionerId(requestVO.getAssignedPractitionerId()); assigneds.setAssignedPractitionerId(requestVO.getAssignedPractitionerId());
...@@ -1152,6 +1153,23 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1152,6 +1153,23 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
assigneds.setUpdatedAt(new Date()); assigneds.setUpdatedAt(new Date());
assigneds.setUpdatedBy(-1L); assigneds.setUpdatedBy(-1L);
mktLeadsAssignedsDALService.save(assigneds); mktLeadsAssignedsDALService.save(assigneds);
//更新跟进表初始值
String mdDropOptionsId = systemConfigService.getSingleConfigValue("OpportunityToBeFollowedUp");
MktLeadsAssignedTrack leadsAssignedTrack = new MktLeadsAssignedTrack();
leadsAssignedTrack.setSalesNotice("获得此商机,"+CommonUtil.dateParseString(new Date(),"yyyy-MM-dd HH:mm:ss"));
leadsAssignedTrack.setIsActive(1);
leadsAssignedTrack.setCreatedAt(new Date());
leadsAssignedTrack.setCreatedBy(requestVO.getAssignedPractitionerId());
leadsAssignedTrack.setUpdatedAt(new Date());
leadsAssignedTrack.setUpdatedBy(requestVO.getAssignedPractitionerId());
leadsAssignedTrack.setPractitionerId(requestVO.getAssignedPractitionerId());
leadsAssignedTrack.setCustomerId(customerId);
leadsAssignedTrack.setMdDropOptionId(Long.valueOf(mdDropOptionsId));
leadsAssignedTrack.setLeadsAssignedId(assigneds.getId());
leadsAssignedTrack.setTrackTime(new Date());
leadsAssignedTrack.setCreatorType(2);
leadsAssignedTrack.setUpdatorType(2);
mktLeadsAssignedTrackDALService.saveTrack(leadsAssignedTrack);
requestVO.setOpportunityId(customerId); requestVO.setOpportunityId(customerId);
requestVO.setLeadsAssignedId(assigneds.getId()); requestVO.setLeadsAssignedId(assigneds.getId());
return new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")); return new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000"));
...@@ -1247,10 +1265,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1247,10 +1265,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
CommonUtil.simpleObjectCopy(requestVO,track); CommonUtil.simpleObjectCopy(requestVO,track);
track.setCustomerId(requestVO.getOpportunityId()); track.setCustomerId(requestVO.getOpportunityId());
track.setTrackTime(CommonUtil.stringParseDate(requestVO.getNoticeDate()+" 00:00:00", "yyyy-MM-dd HH:mm:ss")); track.setTrackTime(CommonUtil.stringParseDate(requestVO.getNoticeDate()+" 00:00:00", "yyyy-MM-dd HH:mm:ss"));
track.setCreatedBy(-1L); track.setCreatedBy(requestVO.getPractitionerId());
track.setCreatedAt(new Date()); track.setCreatedAt(new Date());
track.setCreatorType(2); track.setCreatorType(2);
track.setUpdatedBy(-1L); track.setUpdatedBy(requestVO.getPractitionerId());
track.setUpdatorType(2); track.setUpdatorType(2);
track.setUpdatedAt(new Date()); track.setUpdatedAt(new Date());
MdDropOptions dropOtions = mdDropOptionsDALService.findByDropOptionId(requestVO.getMdDropOptionId()); MdDropOptions dropOtions = mdDropOptionsDALService.findByDropOptionId(requestVO.getMdDropOptionId());
......
package com.yd.dal.entity.marketing;
import java.util.Date;
import lombok.Data;
/**
* 经纪人商机增员目标分摊计算公式
*/
@Data
public class MktGoalsCalculateExpression {
/**
* serial id
*/
private Long id;
/**
* 目标所属年度
*/
private Integer currentYear;
/**
* FK ag_md_drop_master.id 商机销售行动drop_master id = 14 or 经纪人增员活动16
*/
private Integer dropMasterId;
/**
* FK ag_md_drop_options.id 商机销售行动drop_master id = 14 or 16
*/
private Integer actionId;
/**
* javascript计算公式,参数:成交件数,
成交件数a
建议书数量b = a * 3
见面沟通次数c = a * 3
电话/微信沟通次数d = a * 9
安排见面次数f = a * 27
获取商机次数g = a * 27
报聘(a)= 年目标增员对象/12
报聘面谈 b = a
OPP创说会 c = a * 3
甄选面谈 d = a * 3
增员面谈 e = a * 9
建立名单 f = a * 9
*/
private String calculateScriptExpression;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
private Long updatedBy;
}
\ No newline at end of file
package com.yd.dal.entity.marketing;
import java.util.Date;
import lombok.Data;
/**
* 经纪人商机目标设定
*/
@Data
public class MktLeadsGoals {
/**
* serial id
*/
private Long id;
/**
* FK ag_acl_practitioner.id 经纪人
*/
private String practitionerId;
/**
* 目标所属年度
*/
private Integer currentYear;
/**
* 1:年度,3:月度
*/
private Integer statisticTimeUnit;
/**
* 保费
*/
private Integer premium;
/**
* 佣金
*/
private Integer commission;
/**
* 件数
*/
private Integer pieces;
/**
* 件均保费: 计算生成 FYP/件数
*/
private Integer pieceAveragePremium;
/**
* 版本控制
*/
private Date currentVersion;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
private Long updatedBy;
}
\ No newline at end of file
package com.yd.dal.entity.marketing;
import java.util.Date;
import lombok.Data;
/**
* 经纪人商机活动量分摊细化设置
*/
@Data
public class MktLeadsGoalsActions {
/**
* serial id
*/
private Long id;
/**
* FK ag_acl_practitioner.id 经纪人
*/
private String practitionerId;
/**
* 目标所属年度
*/
private Integer currentYear;
/**
* 2:季度,3:月度
*/
private Integer statisticTimeUnit;
/**
* FK ag_md_drop_options.id 商机销售行动drop_master id = 14
*/
private Integer leadsActionId;
/**
* FK ag_md_drop_options.drop_option_name 团队长发掘活动drop_master id = 14
*/
private Integer leadsActionName;
/**
* 成交件数a
建议书数量b = a * 3
见面沟通次数c = b
电话/微信沟通次数d = c * 3
安排见面次数f = c * 3
获取商机次数g = f
*/
private Integer actionStandards;
/**
* 版本控制
*/
private Date currentVersion;
/**
* 创建时间
*/
private Date createdAt;
/**
* 创建人
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
private Long updatedBy;
}
\ No newline at end of file
package com.yd.dal.mapper.marketing;
import com.yd.dal.entity.marketing.MktGoalsCalculateExpression;
public interface MktGoalsCalculateExpressionMapper {
int deleteByPrimaryKey(Long id);
int insert(MktGoalsCalculateExpression record);
int insertSelective(MktGoalsCalculateExpression record);
MktGoalsCalculateExpression selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(MktGoalsCalculateExpression record);
int updateByPrimaryKey(MktGoalsCalculateExpression record);
}
\ No newline at end of file
package com.yd.dal.mapper.marketing;
import com.yd.dal.entity.marketing.MktLeadsGoalsActions;
public interface MktLeadsGoalsActionsMapper {
int deleteByPrimaryKey(Long id);
int insert(MktLeadsGoalsActions record);
int insertSelective(MktLeadsGoalsActions record);
MktLeadsGoalsActions selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(MktLeadsGoalsActions record);
int updateByPrimaryKey(MktLeadsGoalsActions record);
}
\ No newline at end of file
package com.yd.dal.mapper.marketing;
import com.yd.dal.entity.marketing.MktLeadsGoals;
public interface MktLeadsGoalsMapper {
int deleteByPrimaryKey(Long id);
int insert(MktLeadsGoals record);
int insertSelective(MktLeadsGoals record);
MktLeadsGoals selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(MktLeadsGoals record);
int updateByPrimaryKey(MktLeadsGoals record);
}
\ 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.marketing.MktGoalsCalculateExpressionMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.marketing.MktGoalsCalculateExpression">
<!--@mbg.generated-->
<!--@Table ag_mkt_goals_calculate_expression-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="drop_master id" jdbcType="INTEGER" property="dropMasterId" />
<result column="action_id" jdbcType="INTEGER" property="actionId" />
<result column="calculate_script_expression" jdbcType="LONGVARCHAR" property="calculateScriptExpression" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, current_year, `drop_master id`, action_id, calculate_script_expression, created_at,
created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from ag_mkt_goals_calculate_expression
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_mkt_goals_calculate_expression
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktGoalsCalculateExpression" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_goals_calculate_expression (current_year, `drop_master id`, action_id,
calculate_script_expression, created_at,
created_by, updated_at, updated_by
)
values (#{currentYear,jdbcType=INTEGER}, #{dropMasterId,jdbcType=INTEGER}, #{actionId,jdbcType=INTEGER},
#{calculateScriptExpression,jdbcType=LONGVARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktGoalsCalculateExpression" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_goals_calculate_expression
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="currentYear != null">
current_year,
</if>
<if test="dropMasterId != null">
`drop_master id`,
</if>
<if test="actionId != null">
action_id,
</if>
<if test="calculateScriptExpression != null">
calculate_script_expression,
</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="currentYear != null">
#{currentYear,jdbcType=INTEGER},
</if>
<if test="dropMasterId != null">
#{dropMasterId,jdbcType=INTEGER},
</if>
<if test="actionId != null">
#{actionId,jdbcType=INTEGER},
</if>
<if test="calculateScriptExpression != null">
#{calculateScriptExpression,jdbcType=LONGVARCHAR},
</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>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.marketing.MktGoalsCalculateExpression">
<!--@mbg.generated-->
update ag_mkt_goals_calculate_expression
<set>
<if test="currentYear != null">
current_year = #{currentYear,jdbcType=INTEGER},
</if>
<if test="dropMasterId != null">
`drop_master id` = #{dropMasterId,jdbcType=INTEGER},
</if>
<if test="actionId != null">
action_id = #{actionId,jdbcType=INTEGER},
</if>
<if test="calculateScriptExpression != null">
calculate_script_expression = #{calculateScriptExpression,jdbcType=LONGVARCHAR},
</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>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.marketing.MktGoalsCalculateExpression">
<!--@mbg.generated-->
update ag_mkt_goals_calculate_expression
set current_year = #{currentYear,jdbcType=INTEGER},
`drop_master id` = #{dropMasterId,jdbcType=INTEGER},
action_id = #{actionId,jdbcType=INTEGER},
calculate_script_expression = #{calculateScriptExpression,jdbcType=LONGVARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?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.marketing.MktLeadsGoalsActionsMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.marketing.MktLeadsGoalsActions">
<!--@mbg.generated-->
<!--@Table ag_mkt_leads_goals_actions-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="practitioner_id" jdbcType="VARCHAR" property="practitionerId" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" />
<result column="leads_action_id" jdbcType="INTEGER" property="leadsActionId" />
<result column="leads_action_name" jdbcType="INTEGER" property="leadsActionName" />
<result column="action_standards" jdbcType="INTEGER" property="actionStandards" />
<result column="current_version" jdbcType="TIMESTAMP" property="currentVersion" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, practitioner_id, current_year, statistic_time_unit, leads_action_id, leads_action_name,
action_standards, current_version, created_at, created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from ag_mkt_leads_goals_actions
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_mkt_leads_goals_actions
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_leads_goals_actions (practitioner_id, current_year, statistic_time_unit,
leads_action_id, leads_action_name, action_standards,
current_version, created_at, created_by,
updated_at, updated_by)
values (#{practitionerId,jdbcType=VARCHAR}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
#{leadsActionId,jdbcType=INTEGER}, #{leadsActionName,jdbcType=INTEGER}, #{actionStandards,jdbcType=INTEGER},
#{currentVersion,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_leads_goals_actions
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
practitioner_id,
</if>
<if test="currentYear != null">
current_year,
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit,
</if>
<if test="leadsActionId != null">
leads_action_id,
</if>
<if test="leadsActionName != null">
leads_action_name,
</if>
<if test="actionStandards != null">
action_standards,
</if>
<if test="currentVersion != null">
current_version,
</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
#{practitionerId,jdbcType=VARCHAR},
</if>
<if test="currentYear != null">
#{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
#{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="leadsActionId != null">
#{leadsActionId,jdbcType=INTEGER},
</if>
<if test="leadsActionName != null">
#{leadsActionName,jdbcType=INTEGER},
</if>
<if test="actionStandards != null">
#{actionStandards,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
#{currentVersion,jdbcType=TIMESTAMP},
</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>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions">
<!--@mbg.generated-->
update ag_mkt_leads_goals_actions
<set>
<if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=VARCHAR},
</if>
<if test="currentYear != null">
current_year = #{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="leadsActionId != null">
leads_action_id = #{leadsActionId,jdbcType=INTEGER},
</if>
<if test="leadsActionName != null">
leads_action_name = #{leadsActionName,jdbcType=INTEGER},
</if>
<if test="actionStandards != null">
action_standards = #{actionStandards,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
current_version = #{currentVersion,jdbcType=TIMESTAMP},
</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>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.marketing.MktLeadsGoalsActions">
<!--@mbg.generated-->
update ag_mkt_leads_goals_actions
set practitioner_id = #{practitionerId,jdbcType=VARCHAR},
current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
leads_action_id = #{leadsActionId,jdbcType=INTEGER},
leads_action_name = #{leadsActionName,jdbcType=INTEGER},
action_standards = #{actionStandards,jdbcType=INTEGER},
current_version = #{currentVersion,jdbcType=TIMESTAMP},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?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.marketing.MktLeadsGoalsMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.marketing.MktLeadsGoals">
<!--@mbg.generated-->
<!--@Table ag_mkt_leads_goals-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="practitioner_id" jdbcType="VARCHAR" property="practitionerId" />
<result column="current_year" jdbcType="INTEGER" property="currentYear" />
<result column="statistic_time_unit" jdbcType="INTEGER" property="statisticTimeUnit" />
<result column="premium" jdbcType="INTEGER" property="premium" />
<result column="commission" jdbcType="INTEGER" property="commission" />
<result column="pieces" jdbcType="INTEGER" property="pieces" />
<result column="piece_average_premium" jdbcType="INTEGER" property="pieceAveragePremium" />
<result column="current_version" jdbcType="TIMESTAMP" property="currentVersion" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, practitioner_id, current_year, statistic_time_unit, premium, commission, pieces,
piece_average_premium, current_version, created_at, created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from ag_mkt_leads_goals
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_mkt_leads_goals
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_leads_goals (practitioner_id, current_year, statistic_time_unit,
premium, commission, pieces,
piece_average_premium, current_version,
created_at, created_by, updated_at,
updated_by)
values (#{practitionerId,jdbcType=VARCHAR}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
#{premium,jdbcType=INTEGER}, #{commission,jdbcType=INTEGER}, #{pieces,jdbcType=INTEGER},
#{pieceAveragePremium,jdbcType=INTEGER}, #{currentVersion,jdbcType=TIMESTAMP},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_mkt_leads_goals
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
practitioner_id,
</if>
<if test="currentYear != null">
current_year,
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit,
</if>
<if test="premium != null">
premium,
</if>
<if test="commission != null">
commission,
</if>
<if test="pieces != null">
pieces,
</if>
<if test="pieceAveragePremium != null">
piece_average_premium,
</if>
<if test="currentVersion != null">
current_version,
</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
#{practitionerId,jdbcType=VARCHAR},
</if>
<if test="currentYear != null">
#{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
#{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="premium != null">
#{premium,jdbcType=INTEGER},
</if>
<if test="commission != null">
#{commission,jdbcType=INTEGER},
</if>
<if test="pieces != null">
#{pieces,jdbcType=INTEGER},
</if>
<if test="pieceAveragePremium != null">
#{pieceAveragePremium,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
#{currentVersion,jdbcType=TIMESTAMP},
</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>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals">
<!--@mbg.generated-->
update ag_mkt_leads_goals
<set>
<if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=VARCHAR},
</if>
<if test="currentYear != null">
current_year = #{currentYear,jdbcType=INTEGER},
</if>
<if test="statisticTimeUnit != null">
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
</if>
<if test="premium != null">
premium = #{premium,jdbcType=INTEGER},
</if>
<if test="commission != null">
commission = #{commission,jdbcType=INTEGER},
</if>
<if test="pieces != null">
pieces = #{pieces,jdbcType=INTEGER},
</if>
<if test="pieceAveragePremium != null">
piece_average_premium = #{pieceAveragePremium,jdbcType=INTEGER},
</if>
<if test="currentVersion != null">
current_version = #{currentVersion,jdbcType=TIMESTAMP},
</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>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.marketing.MktLeadsGoals">
<!--@mbg.generated-->
update ag_mkt_leads_goals
set practitioner_id = #{practitionerId,jdbcType=VARCHAR},
current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
premium = #{premium,jdbcType=INTEGER},
commission = #{commission,jdbcType=INTEGER},
pieces = #{pieces,jdbcType=INTEGER},
piece_average_premium = #{pieceAveragePremium,jdbcType=INTEGER},
current_version = #{currentVersion,jdbcType=TIMESTAMP},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment