Commit 0fd2ec53 by wenyang

可回溯录频2

parent fc9048dd
package com.yd.api.customer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yd.api.customer.service.CustomerTrackVideoService;
import com.yd.api.customer.vo.trackvideo.AddCustomerTrackVideoRequestVO;
import com.yd.api.customer.vo.trackvideo.QueryDetailsByIdResponseVO;
......@@ -7,11 +13,10 @@ import com.yd.api.customer.vo.trackvideo.QueryTrackListRequestVO;
import com.yd.api.customer.vo.trackvideo.QueryTrackListResponseVO;
import com.yd.api.result.CommonResultResponseVO;
import com.yd.api.result.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
/**
* rrWeb 可回溯录屏服务
*/
@RestController
@RequestMapping("/customerTrackVideo")
public class CustomerTrackVideoController {
......@@ -20,21 +25,24 @@ public class CustomerTrackVideoController {
private CustomerTrackVideoService customerTrackVideoService;
/**
* 保存
* @param requestVO
* @param dataFile
* @return
* rrWeb录屏数据保存与更新
* @param AddCustomerTrackVideoRequestVO
* @return CommonResultResponseVO
*/
@RequestMapping("/add")
public Object add(AddCustomerTrackVideoRequestVO requestVO,
@RequestParam(value = "dataFile") MultipartFile dataFile){
@RequestMapping("/rrwebInfo")
public Object rrWebInfo(@RequestBody AddCustomerTrackVideoRequestVO requestVO){
JsonResult result = new JsonResult();
CommonResultResponseVO responseVO = customerTrackVideoService.add(requestVO, dataFile);
CommonResultResponseVO responseVO = customerTrackVideoService.rrWebInfo(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/**
* 可回溯录屏列表查询接口
* @param QueryTrackListRequestVO
* @return QueryTrackListResponseVO
*/
@RequestMapping("/queryTrackList")
public Object queryTrackList(@RequestBody QueryTrackListRequestVO requestVO){
JsonResult result = new JsonResult();
......@@ -44,6 +52,11 @@ public class CustomerTrackVideoController {
return result;
}
/**
* 根据录屏ID查询可回溯录屏明细数据接口
* @param id
* @return QueryDetailsByIdResponseVO
*/
@RequestMapping("/queryDetailsById/{id}")
public Object queryDetailsById(@PathVariable Long id){
JsonResult result = new JsonResult();
......
......@@ -5,13 +5,28 @@ import com.yd.api.customer.vo.trackvideo.QueryDetailsByIdResponseVO;
import com.yd.api.customer.vo.trackvideo.QueryTrackListRequestVO;
import com.yd.api.customer.vo.trackvideo.QueryTrackListResponseVO;
import com.yd.api.result.CommonResultResponseVO;
import org.springframework.web.multipart.MultipartFile;
public interface CustomerTrackVideoService {
CommonResultResponseVO add(AddCustomerTrackVideoRequestVO requestVO, MultipartFile dataFile);
/**
* rrWeb录屏数据保存与更新
* @param AddCustomerTrackVideoRequestVO
* @return CommonResultResponseVO
*/
CommonResultResponseVO rrWebInfo(AddCustomerTrackVideoRequestVO requestVO);
/**
* 可回溯录屏列表查询接口
* @param QueryTrackListRequestVO
* @return QueryTrackListResponseVO
*/
QueryTrackListResponseVO queryTrackList(QueryTrackListRequestVO requestVO);
/**
* 根据录屏ID查询可回溯录屏明细数据接口
* @param id
* @return QueryDetailsByIdResponseVO
*/
QueryDetailsByIdResponseVO queryDetailsById(Long id);
}
package com.yd.api.customer.service.impl;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yd.api.customer.service.CustomerTrackVideoService;
import com.yd.api.customer.vo.trackvideo.AddCustomerTrackVideoRequestVO;
import com.yd.api.customer.vo.trackvideo.QueryDetailsByIdResponseVO;
......@@ -10,55 +22,67 @@ import com.yd.api.result.CommonResultResponseVO;
import com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo;
import com.yd.dal.mapper.customer.trackvideo.AgAclCustomerBehaviorTrackVideoMapper;
import com.yd.rmi.ali.oss.service.OssService;
import com.yd.util.CommonUtil;
import com.yd.util.HttpUtil;
import com.yd.util.SpringContextUtil;
import com.yd.util.config.ZHBErrorConfig;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Service("CustomerTrackVideoService")
public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService {
@Autowired
private OssService ossService;
@Autowired
private AgAclCustomerBehaviorTrackVideoMapper customerBehaviorTrackVideoMapper;
/**
* rrWeb录屏数据保存与更新
* @param AddCustomerTrackVideoRequestVO
* @return CommonResultResponseVO
*/
@Override
public CommonResultResponseVO add(AddCustomerTrackVideoRequestVO requestVO, MultipartFile dataFile) {
public CommonResultResponseVO rrWebInfo(AddCustomerTrackVideoRequestVO requestVO) {
CommonResultResponseVO resp = new CommonResultResponseVO();
CommonResult commonResult = new CommonResult();
rrWebInfoCheck(requestVO, commonResult);
if (!commonResult.isSuccess()){
resp.setCommonResult(commonResult);
return resp;
}
AgAclCustomerBehaviorTrackVideo trackVideo = new AgAclCustomerBehaviorTrackVideo();
BeanUtils.copyProperties(requestVO, trackVideo);
try {
// 获取文件
String token = requestVO.getToken();
String shortToken = token.substring(token.length() - 10);
String prefix = "customerBehaviorTrackVideo/" + shortToken + "/";
SimpleDateFormat sdf = new SimpleDateFormat("yyMMddHHmmssSSS");
String filename = sdf.format(new Date());
String ossKey = prefix + filename;
// 将txt上传到oss
String fileOssPath = ossService.putFileToOss(null, ossKey, dataFile.getInputStream());
String fileOssPath = ossService.putFileToOss(null, ossKey, new ByteArrayInputStream(requestVO.getData().getBytes()));
// 保存入库
trackVideo.setDataOssPath(fileOssPath);
trackVideo.setCustomerIp(SpringContextUtil.getCurrentIpAddress());
trackVideo.setIsActive(1);
trackVideo.setCreatedAt(new Date());
trackVideo.setCreatedBy(-1L);
trackVideo.setUpdatedAt(new Date());
trackVideo.setUpdatedBy(-1L);
customerBehaviorTrackVideoMapper.insert(trackVideo);
boolean boole = true;
if (requestVO.getCustomerId() != null){
customerBehaviorTrackVideoMapper.updateBySerialsNo(trackVideo);
boole = false;
}
if(!CommonUtil.isNullOrBlank(trackVideo.getOrderNo()) && boole){
customerBehaviorTrackVideoMapper.updateBySerialsNo(trackVideo);
}
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) {
e.printStackTrace();
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("800001")));
......@@ -66,15 +90,18 @@ public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService
return resp;
}
/**
* 可回溯录屏列表查询接口
* @param QueryTrackListRequestVO
* @return QueryTrackListResponseVO
*/
@Override
public QueryTrackListResponseVO queryTrackList(QueryTrackListRequestVO requestVO) {
QueryTrackListResponseVO resp = new QueryTrackListResponseVO();
try {
List<AgAclCustomerBehaviorTrackVideo> list = customerBehaviorTrackVideoMapper.selectByRecord(requestVO);
resp.setList(list);
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) {
e.printStackTrace();
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("800001")));
......@@ -82,15 +109,50 @@ public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService
return resp;
}
/**
* 根据录屏ID查询可回溯录屏明细数据接口
* @param id
* @return QueryDetailsByIdResponseVO
*/
@Override
public QueryDetailsByIdResponseVO queryDetailsById(Long id) {
QueryDetailsByIdResponseVO resp = new QueryDetailsByIdResponseVO();
try {
if(id == null){
String[] params = {"id"};
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610001", params)));
return resp;
}
AgAclCustomerBehaviorTrackVideo trackVideo = customerBehaviorTrackVideoMapper.selectByPrimaryKey(id);
if(trackVideo != null && !CommonUtil.isNullOrBlank(trackVideo.getDataOssPath())){
Map<String, Object> input = HttpUtil.getInput(trackVideo.getDataOssPath());
if (!(boolean) input.get("success")) {
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("800001")));
return resp;
}
StringBuffer out = new StringBuffer();
InputStream inputStream = null;
try {
inputStream = (InputStream) input.get("is");
byte[] b = new byte[4096];
for (int n; (n = inputStream.read(b)) != -1;) {
out.append(new String(b, 0, n));
}
trackVideo.setData(out.toString());
} catch (IOException e) {
e.printStackTrace();
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("800001")));
} finally {
if(inputStream != null){
inputStream.close();
}
}
}else{
resp.setCommonResult(new CommonResult(false, "find {"+id+"} data is null!"));
return resp;
}
resp.setTrackVideo(trackVideo);
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) {
e.printStackTrace();
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("800001")));
......@@ -98,4 +160,51 @@ public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService
return resp;
}
/**
* rrWeb录屏数据保存与更新 校验
* @param CommonResult
* @param AddCustomerTrackVideoRequestVO
* @return void
*/
private void rrWebInfoCheck(AddCustomerTrackVideoRequestVO requestVO, CommonResult commonResult) {
if (CommonUtil.isNullOrBlank(requestVO.getSerialsNo())){
String[] params = {"serialsNo"};
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
return;
}
if (CommonUtil.isNullOrBlank(requestVO.getToken())){
String[] params = {"token"};
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
return;
}
if (requestVO.getPageType() == null){
String[] params = {"pageType"};
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
return;
}
if (CommonUtil.isNullOrBlank(requestVO.getPageName())){
String[] params = {"pageName"};
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
return;
}
if (CommonUtil.isNullOrBlank(requestVO.getUrl())){
String[] params = {"url"};
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
return;
}
if (CommonUtil.isNullOrBlank(requestVO.getData())){
String[] params = {"data"};
commonResult.setSuccess(false);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("610001", params));
return;
}
commonResult.setSuccess(true);
commonResult.setMessage(ZHBErrorConfig.getErrorInfo("800000"));
}
}
......@@ -4,6 +4,17 @@ import lombok.Data;
@Data
public class AddCustomerTrackVideoRequestVO {
/**
* 序列号
*/
private String serialsNo;
/**
* 用户ID
*/
private Long customerId;
/**
* 规则层级 1-insurer 2-product 3-plan
*/
......@@ -33,6 +44,20 @@ public class AddCustomerTrackVideoRequestVO {
* 1.保费试算 2.健康告知 3.订单确认 4.支付成功
*/
private Integer pageType;
/**
* 录屏页面名称
*/
private String pageName;
/**
* 录屏url
*/
private String url;
/**
* 录屏数据
*/
private String data;
}
......@@ -4,6 +4,17 @@ import lombok.Data;
@Data
public class QueryTrackListRequestVO {
/**
* 序列号
*/
private String serialsNo;
/**
* 用户ID
*/
private Long customerId;
/**
* 规则层级 1-insurer 2-product 3-plan
*/
......@@ -30,7 +41,17 @@ public class QueryTrackListRequestVO {
private String token;
/**
* 1.保费试算 2.健康告知 3.订单确认 4.支付成功
* 录屏页面代码(1.保费试算 2.健康告知 3.订单确认 4.支付成功)
*/
private Integer pageType;
/**
* 录屏页面名称
*/
private String pageName;
/**
* 录屏url
*/
private String url;
}
......@@ -14,6 +14,16 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
private Long id;
/**
* serialsNo#
*/
private String serialsNo;
/**
* customerId
*/
private Long customerId;
/**
* 规则层级 1-insurer 2-product 3-plan
*/
private Integer configLevel;
......@@ -42,11 +52,26 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
* 1.保费试算 2.健康告知 3.订单确认 4.支付成功
*/
private Integer pageType;
/**
* 录屏页面名称
*/
private String pageName;
/**
* 录屏url
*/
private String url;
/**
* 数据文件oss地址
*/
private String dataOssPath;
/**
* Ip地址
*/
private String customerIp;
/**
* 1=active 0=inactive
......@@ -77,6 +102,11 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
* FK ag_acl_user.id
*/
private Long updatedBy;
/**
* 录屏数据
*/
private String data;
private static final long serialVersionUID = 1L;
......@@ -88,7 +118,23 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
this.id = id;
}
public Integer getConfigLevel() {
public String getSerialsNo() {
return serialsNo;
}
public void setSerialsNo(String serialsNo) {
this.serialsNo = serialsNo;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Integer getConfigLevel() {
return configLevel;
}
......@@ -136,7 +182,23 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
this.pageType = pageType;
}
public String getDataOssPath() {
public String getPageName() {
return pageName;
}
public void setPageName(String pageName) {
this.pageName = pageName;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getDataOssPath() {
return dataOssPath;
}
......@@ -144,6 +206,14 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
this.dataOssPath = dataOssPath;
}
public String getCustomerIp() {
return customerIp;
}
public void setCustomerIp(String customerIp) {
this.customerIp = customerIp;
}
public Integer getIsActive() {
return isActive;
}
......@@ -192,7 +262,15 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
this.updatedBy = updatedBy;
}
@Override
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
......@@ -205,13 +283,18 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
}
AgAclCustomerBehaviorTrackVideo other = (AgAclCustomerBehaviorTrackVideo) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getSerialsNo() == null ? other.getSerialsNo() == null : this.getSerialsNo().equals(other.getSerialsNo()))
&& (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
&& (this.getConfigLevel() == null ? other.getConfigLevel() == null : this.getConfigLevel().equals(other.getConfigLevel()))
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getPlanId() == null ? other.getPlanId() == null : this.getPlanId().equals(other.getPlanId()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getToken() == null ? other.getToken() == null : this.getToken().equals(other.getToken()))
&& (this.getPageType() == null ? other.getPageType() == null : this.getPageType().equals(other.getPageType()))
&& (this.getPageName() == null ? other.getPageName() == null : this.getPageName().equals(other.getPageName()))
&& (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
&& (this.getDataOssPath() == null ? other.getDataOssPath() == null : this.getDataOssPath().equals(other.getDataOssPath()))
&& (this.getCustomerIp() == null ? other.getCustomerIp() == null : this.getCustomerIp().equals(other.getCustomerIp()))
&& (this.getIsActive() == null ? other.getIsActive() == null : this.getIsActive().equals(other.getIsActive()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
......@@ -225,13 +308,18 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getSerialsNo() == null) ? 0 : getSerialsNo().hashCode());
result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
result = prime * result + ((getConfigLevel() == null) ? 0 : getConfigLevel().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getPlanId() == null) ? 0 : getPlanId().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getToken() == null) ? 0 : getToken().hashCode());
result = prime * result + ((getPageType() == null) ? 0 : getPageType().hashCode());
result = prime * result + ((getPageName() == null) ? 0 : getPageName().hashCode());
result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
result = prime * result + ((getDataOssPath() == null) ? 0 : getDataOssPath().hashCode());
result = prime * result + ((getCustomerIp() == null) ? 0 : getCustomerIp().hashCode());
result = prime * result + ((getIsActive() == null) ? 0 : getIsActive().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
......@@ -248,13 +336,18 @@ public class AgAclCustomerBehaviorTrackVideo implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", serialsNo=").append(serialsNo);
sb.append(", customerId=").append(customerId);
sb.append(", configLevel=").append(configLevel);
sb.append(", productId=").append(productId);
sb.append(", planId=").append(planId);
sb.append(", orderNo=").append(orderNo);
sb.append(", token=").append(token);
sb.append(", pageType=").append(pageType);
sb.append(", pageName=").append(pageName);
sb.append(", url=").append(url);
sb.append(", dataOssPath=").append(dataOssPath);
sb.append(", customerIp=").append(customerIp);
sb.append(", isActive=").append(isActive);
sb.append(", remark=").append(remark);
sb.append(", createdAt=").append(createdAt);
......
......@@ -17,6 +17,8 @@ public interface AgAclCustomerBehaviorTrackVideoMapper {
int updateByPrimaryKeySelective(AgAclCustomerBehaviorTrackVideo record);
int updateByPrimaryKey(AgAclCustomerBehaviorTrackVideo record);
int updateBySerialsNo(AgAclCustomerBehaviorTrackVideo record);
List<AgAclCustomerBehaviorTrackVideo> selectByRecord(QueryTrackListRequestVO requestVO);
}
\ No newline at end of file
......@@ -3,13 +3,18 @@
<mapper namespace="com.yd.dal.mapper.customer.trackvideo.AgAclCustomerBehaviorTrackVideoMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="serials_no" jdbcType="VARCHAR" property="serialsNo" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<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="token" jdbcType="VARCHAR" property="token" />
<result column="page_type" jdbcType="INTEGER" property="pageType" />
<result column="page_name" jdbcType="VARCHAR" property="pageName" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="data_oss_path" jdbcType="VARCHAR" property="dataOssPath" />
<result column="customer_ip" jdbcType="VARCHAR" property="customerIp" />
<result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
......@@ -18,7 +23,7 @@
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
id, config_level, product_id, plan_id, order_no, token, page_type, data_oss_path,
id, serials_no,customer_id,config_level, product_id, plan_id, order_no, token, page_type, page_name, url, data_oss_path, customer_ip,
is_active, remark, created_at, created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
......@@ -32,20 +37,26 @@
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo" useGeneratedKeys="true">
insert into ag_acl_customer_behavior_track_video (config_level, product_id, plan_id,
order_no, token, page_type,
data_oss_path, is_active, remark,
insert into ag_acl_customer_behavior_track_video (serials_no,customer_id,config_level, product_id, plan_id,
order_no, token, page_type, page_name, url, data_oss_path, customer_ip,
is_active, remark,
created_at, created_by, updated_at,
updated_by)
values (#{configLevel,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT},
#{orderNo,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR}, #{pageType,jdbcType=INTEGER},
#{dataOssPath,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
values (#{serialsNo,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT}, #{configLevel,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT},
#{orderNo,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR}, #{pageType,jdbcType=INTEGER}, #{pageName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
#{dataOssPath,jdbcType=VARCHAR}, #{customerIp,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
#{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.customer.trackvideo.AgAclCustomerBehaviorTrackVideo" useGeneratedKeys="true">
insert into ag_acl_customer_behavior_track_video
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="serialsNo != null">
serials_no,
</if>
<if test="customerId != null">
customer_id,
</if>
<if test="configLevel != null">
config_level,
</if>
......@@ -64,9 +75,18 @@
<if test="pageType != null">
page_type,
</if>
<if test="pageName != null">
page_name,
</if>
<if test="url != null">
url,
</if>
<if test="dataOssPath != null">
data_oss_path,
</if>
<if test="customerIp != null">
customer_ip,
</if>
<if test="isActive != null">
is_active,
</if>
......@@ -87,6 +107,12 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="serialsNo != null">
#{serialsNo,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="configLevel != null">
#{configLevel,jdbcType=INTEGER},
</if>
......@@ -105,9 +131,18 @@
<if test="pageType != null">
#{pageType,jdbcType=INTEGER},
</if>
<if test="pageName != null">
#{pageName,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="dataOssPath != null">
#{dataOssPath,jdbcType=VARCHAR},
</if>
<if test="customerIp != null">
#{customerIp,jdbcType=VARCHAR},
</if>
<if test="isActive != null">
#{isActive,jdbcType=INTEGER},
</if>
......@@ -131,6 +166,12 @@
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo">
update ag_acl_customer_behavior_track_video
<set>
<if test="serialsNo != null">
serials_no = #{serialsNo,jdbcType=VARCHAR},
</if>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="configLevel != null">
config_level = #{configLevel,jdbcType=INTEGER},
</if>
......@@ -149,9 +190,18 @@
<if test="pageType != null">
page_type = #{pageType,jdbcType=INTEGER},
</if>
<if test="pageName != null">
page_name = #{pageName,jdbcType=VARCHAR},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="dataOssPath != null">
data_oss_path = #{dataOssPath,jdbcType=VARCHAR},
</if>
<if test="customerIp != null">
customer_ip = #{customerIp,jdbcType=VARCHAR},
</if>
<if test="isActive != null">
is_active = #{isActive,jdbcType=INTEGER},
</if>
......@@ -175,13 +225,18 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo">
update ag_acl_customer_behavior_track_video
set config_level = #{configLevel,jdbcType=INTEGER},
set serials_no = #{serialsNo,jdbcType=VARCHAR},
serials_id = #{customerId,jdbcType=BIGINT},
config_level = #{configLevel,jdbcType=INTEGER},
product_id = #{productId,jdbcType=BIGINT},
plan_id = #{planId,jdbcType=BIGINT},
order_no = #{orderNo,jdbcType=VARCHAR},
token = #{token,jdbcType=VARCHAR},
page_type = #{pageType,jdbcType=INTEGER},
page_name = #{pageName,jdbcType=INTEGER},
url = #{url,jdbcType=INTEGER},
data_oss_path = #{dataOssPath,jdbcType=VARCHAR},
customer_ip = #{customerIp,jdbcType=VARCHAR},
is_active = #{isActive,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
......@@ -196,6 +251,12 @@
<include refid="Base_Column_List" />
from ag_acl_customer_behavior_track_video t
where 1=1
<if test="serialsNo != null">
and serials_no = #{serialsNo,jdbcType=VARCHAR}
</if>
<if test="customerId != null">
and customer_id = #{customerId,jdbcType=BIGINT}
</if>
<if test="configLevel != null">
and t.config_level = #{configLevel,jdbcType=BIGINT}
</if>
......@@ -211,8 +272,43 @@
<if test="pageType != null">
and t.page_type = #{pageType,jdbcType=BIGINT}
</if>
<if test="pageName != null">
and t.page_name = #{pageName,jdbcType=BIGINT}
</if>
<if test="url != null">
and t.url = #{url,jdbcType=VARCHAR}
</if>
<if test="token != null">
and t.token = #{token,jdbcType=VARCHAR}
</if>
</select>
<update id="updateBySerialsNo" parameterType="com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo">
update ag_acl_customer_behavior_track_video
<set>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<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="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where serials_no = #{serialsNo,jdbcType=VARCHAR} and order_no is null
</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