소스 검색

[标签][异常]:兼容

release_toaliyun_real
Stormeye Wu 6 년 전
부모
커밋
73bcaebdab
1개의 변경된 파일14개의 추가작업 그리고 2개의 파일을 삭제
  1. +14
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserTagsServiceImpl.java

+ 14
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCUserTagsServiceImpl.java 파일 보기

@@ -761,7 +761,13 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService {
@Override
public void updateTagByUserId(Long cUserId, List<Long> tags) {
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(cUserId);
WxCUserTags userTags = getById(wxCUserBasicInfo.getTagId());
WxCUserTags userTags = null;
if (wxCUserBasicInfo.getTagId() != null) {
userTags = getById(wxCUserBasicInfo.getTagId());
} else {
userTags = new WxCUserTags();
userTags.setTags("[]");
}
List<Long> tagList = JSONArray.parseArray(userTags.getTags(), Long.class);
//先从现有标签中查看用户是否有 服饰尺码 和 鞋码 类别 有 删除
Long tagId = 0L;
@@ -781,7 +787,13 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService {
String tagStr = JSONArray.toJSONString(tagList);
userTags.setTags(tagStr);
userTags.setUpdateDate(new Date());
wxCUserTagsMapper.updateById(userTags);
if (userTags.getId() != null) {
wxCUserTagsMapper.updateById(userTags);
} else {
userTags.setCreateDate(new Date());
userTags.setUpdateDate(new Date());
wxCUserTagsMapper.insert(userTags);
}
}

public Long getTagId(List<Long> tagList, Long id, WxTags wxTags) {


불러오는 중...
취소
저장