|
|
|
@@ -5,10 +5,7 @@ import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.domain.po.WxCUser; |
|
|
|
import com.iformall.domain.po.WxCUserBasicInfo; |
|
|
|
import com.iformall.domain.po.WxCUserTags; |
|
|
|
import com.iformall.domain.po.WxTags; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.enums.EnumAssignTagsTrigger; |
|
|
|
import com.iformall.enums.EnumCUserBaseInfoSex; |
|
|
|
import com.iformall.enums.EnumTag; |
|
|
|
@@ -44,9 +41,14 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { |
|
|
|
@Autowired |
|
|
|
WxTagsMapper wxTagsMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxCUserCarMapper wxCUserCarMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxTagsService wxTagsService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxCUserTags> listAsPage(WxCUserTags record, Integer pageIndex, Integer pageSize) { |
|
|
|
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCUserTagsMapper.findList(record)); |
|
|
|
@@ -596,6 +598,46 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
case ASSIGN_TAGS_TRIGGER_SCAN: { |
|
|
|
WxCUserBasicInfo user = (WxCUserBasicInfo) obj; |
|
|
|
WxCUser param = wxCUserMapper.selectByPrimaryKey(user.getId()); |
|
|
|
if (user != null && param != null) { |
|
|
|
if (user.getSex() != null) { |
|
|
|
//性别 |
|
|
|
resList = assignTypeId1(user, user.getSex()); |
|
|
|
} |
|
|
|
if (user.getBirthdate() != null) { |
|
|
|
//X0后 |
|
|
|
resList = assignTypeId2(user, user.getBirthdate()); |
|
|
|
//生肖 |
|
|
|
resList = assignTypeId3(user, user.getBirthdate()); |
|
|
|
//星座 |
|
|
|
resList = assignTypeId4(user, user.getBirthdate()); |
|
|
|
} |
|
|
|
if (user.getPhone() != null) { |
|
|
|
//运营商 |
|
|
|
resList = assignTypeId7(user, user.getPhone()); |
|
|
|
} |
|
|
|
if (user.getEducation() != null) { |
|
|
|
//学历 |
|
|
|
resList = assignTypeId6(user, user.getEducation()); |
|
|
|
} |
|
|
|
|
|
|
|
//消费时段 |
|
|
|
resList = assignTypeId18(user, param); |
|
|
|
//消费频度 |
|
|
|
resList = assignTypeId22(user, param); |
|
|
|
//活跃 |
|
|
|
resList = assignTypeId21(user, param); |
|
|
|
|
|
|
|
//车 |
|
|
|
WxCUserCar wxCUserCar = new WxCUserCar(); |
|
|
|
wxCUserCar.setCUserId(param.getId()); |
|
|
|
if (wxCUserCarMapper.countList(wxCUserCar) > 0) { |
|
|
|
resList = assignTypeId11(user); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
default: |
|
|
|
return null; |
|
|
|
|
|
|
|
|