Browse Source

[会员列表][修改][导入模板标签多条问题]

release_toaliyun_real
gongbiao 7 years ago
parent
commit
d795d6c07c
2 changed files with 7 additions and 5 deletions
  1. +3
    -3
      mallinkService/src/main/java/com/iformall/mapper/WxTagsMapper.java
  2. +4
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java

+ 3
- 3
mallinkService/src/main/java/com/iformall/mapper/WxTagsMapper.java View File

@@ -1,12 +1,12 @@
package com.iformall.mapper; package com.iformall.mapper;


import java.util.List;

import com.iformall.common.CommonMapper; import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxTags; import com.iformall.domain.po.WxTags;


import java.util.List;

public interface WxTagsMapper extends CommonMapper<WxTags, String> { public interface WxTagsMapper extends CommonMapper<WxTags, String> {


List<WxTags> findList(WxTags wxTags); List<WxTags> findList(WxTags wxTags);
WxTags getByName(String name);
List<WxTags> getByName(String name);
} }

+ 4
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java View File

@@ -39,6 +39,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StopWatch;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;


import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@@ -582,8 +583,9 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
String tagNames = userBase.getTagNames(); String tagNames = userBase.getTagNames();
List<Long> tagIdList = new ArrayList<>(); List<Long> tagIdList = new ArrayList<>();
for (String tagName : tagNames.split("/")) { for (String tagName : tagNames.split("/")) {
WxTags wxTags = wxTagsMapper.getByName(tagName);
if (wxTags != null) {
List<WxTags> wxTagsList = wxTagsMapper.getByName(tagName);
if (wxTagsList.size()==1) {
WxTags wxTags = wxTagsList.get(0);
tagIdList.add(Long.valueOf(wxTags.getId())); tagIdList.add(Long.valueOf(wxTags.getId()));
} }
} }


Loading…
Cancel
Save