Commit 0fd2ec53 by wenyang

可回溯录频2

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