peng
4 天以前 882ae5b03957e8b3c72032d2c7da67738554aa55
用户行为分析
5个文件已修改
29 ■■■■■ 已修改文件
framework/src/main/java/cn/lili/modules/lmk/domain/entity/ActionRecord.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/form/ActionRecordForm.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/enums/general/UserActionPageEnums.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/impl/ActionRecordServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/search/entity/dos/EsGoodsIndex.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/entity/ActionRecord.java
@@ -21,7 +21,7 @@
    @TableField("user_id")
    /** 用户id */
    private Long userId;
    private String userId;
    @TableField("session_id")
    /** 页面会话id */
framework/src/main/java/cn/lili/modules/lmk/domain/form/ActionRecordForm.java
@@ -24,10 +24,6 @@
@ApiModel(value = "ActionRecord表单", description = "用户行为记录表单")
public class ActionRecordForm extends AbsForm {
    @NotNull(message = "用户id不能为空", groups = {Update.class})
    @ApiModelProperty("用户id")
    private Long userId;
    @NotBlank(message = "页面会话id不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("页面会话id")
    private String sessionId;
@@ -37,10 +33,6 @@
    @NotBlank(message = "行为类型不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("行为类型")
    private String actionType;
    @NotNull(message = "触发时间不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("触发时间")
    private Date startTime;
    /**
     * @see UserActionJoinPageTypeEnum
     */
@@ -48,7 +40,7 @@
    @ApiModelProperty("进入页面方式")
    private String joinType;
    @NotBlank(message = "上一个页面的会话id不能为空", groups = {Add.class, Update.class})
    @NotBlank(message = "上一个页面的会话id不能为空", groups = { Update.class})
    @ApiModelProperty("上一个页面的会话id")
    private String previousSessionId;
framework/src/main/java/cn/lili/modules/lmk/enums/general/UserActionPageEnums.java
@@ -10,6 +10,11 @@
    RECOMMEND_VIDEO_GOODS("视频推荐商品页面"),
    RECOMMEND_VIDEO_LEFT_GOODS("左滑推荐商品"),
    RECOMMEND_VIDEO_RIGHT_VIDEO("右滑视频页面"),
    FILL_ORDER("填写订单"),
    PAY_ORDER("支付订单"),
    PAY_SUCCESS("支付成功"),
    ORDER_LIST("订单列表"),
    ORDER_DETAIL("订单详情"),
    ACTIVITY("活动"),
    SHOPPING_SQUARE("商品广场"),
    GOODS_DETAILS("商品详情页面");
framework/src/main/java/cn/lili/modules/lmk/service/impl/ActionRecordServiceImpl.java
@@ -19,6 +19,8 @@
import org.springframework.beans.BeanUtils;
import org.springframework.util.Assert;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -42,7 +44,16 @@
    @Override
    public Result add(ActionRecordForm form) {
        ActionRecord entity = ActionRecordForm.getEntityByForm(form, null);
        AuthUser currentUser = UserContext.getCurrentUser();
        if (currentUser == null) {
            return Result.ok();
        }else {
            entity.setUserId(currentUser.getId());
            entity.setStartTime(LocalDateTime.now());
        baseMapper.insert(entity);
        }
        return Result.ok("添加成功");
    }
framework/src/main/java/cn/lili/modules/search/entity/dos/EsGoodsIndex.java
@@ -293,7 +293,6 @@
     * @see PromotionTypeEnum
     * value 为 促销活动实体信息
     */
    @Field(type = FieldType.Text)
    @ApiModelProperty("商品促销活动集合JSON,key 为 促销活动类型,value 为 促销活动实体信息 ")
    private String promotionMapJson;
    @ApiModelProperty(value = "商品排序")