|
|
@@ -11,13 +11,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.mokamrp.privates.config.OSSConfiguration;
|
|
|
import com.mokamrp.privates.entity.GetWorkContactEmployeeHandle;
|
|
|
import com.mokamrp.privates.entity.HubWorkContactEmployeeHandle;
|
|
|
+import com.mokamrp.privates.entity.SetUserCorpsHandle;
|
|
|
import com.mokamrp.privates.help.AjaxResult;
|
|
|
+import com.mokamrp.privates.interceptor.AuthUser;
|
|
|
import com.mokamrp.privates.mapper.DownfileMapper;
|
|
|
import com.mokamrp.privates.mapper.WorkContactEmployeeMapper;
|
|
|
-import com.mokamrp.privates.mapper.pojo.Downfile;
|
|
|
-import com.mokamrp.privates.mapper.pojo.WorkContactEmployee;
|
|
|
+import com.mokamrp.privates.mapper.pojo.*;
|
|
|
import com.mokamrp.privates.mapper.vo.WorkContactEmployeeHubVo;
|
|
|
import com.mokamrp.privates.mapper.vo.WorkContactEmployeeVo;
|
|
|
+import com.mokamrp.privates.service.DownfileService;
|
|
|
+import com.mokamrp.privates.service.SetUserTagMainService;
|
|
|
+import com.mokamrp.privates.service.SetUserTagService;
|
|
|
import com.mokamrp.privates.service.WorkContactEmployeeService;
|
|
|
import com.mokamrp.privates.utils.OssFile;
|
|
|
import com.mokamrp.privates.utils.PageUtil;
|
|
|
@@ -51,6 +55,11 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class WorkContactEmployeeServiceImpl extends ServiceImpl<WorkContactEmployeeMapper, WorkContactEmployee> implements WorkContactEmployeeService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SetUserTagService setUserTagService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SetUserTagMainService SetUserTagMainService;
|
|
|
|
|
|
@Autowired
|
|
|
private OSS ossClient;
|
|
|
@@ -61,6 +70,7 @@ public class WorkContactEmployeeServiceImpl extends ServiceImpl<WorkContactEmplo
|
|
|
@Autowired
|
|
|
private OSSConfiguration ossConfiguration;
|
|
|
|
|
|
+
|
|
|
@Autowired
|
|
|
private WorkContactEmployeeMapper mapperObj;
|
|
|
|
|
|
@@ -103,6 +113,46 @@ public class WorkContactEmployeeServiceImpl extends ServiceImpl<WorkContactEmplo
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public Map<String, Object> batchSetNovelFanTags(List<Map<String,String>> row, User authUser) {
|
|
|
+
|
|
|
+ Map<String,Object> res = new HashMap<String,Object>();
|
|
|
+
|
|
|
+ if(row.size() <= 0){
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ Collection<SetUserTag> entityList = new ArrayList<SetUserTag>();
|
|
|
+ SetUserTagMain mainObj = new SetUserTagMain();
|
|
|
+ for (int i = 0;i<row.size();i++) {
|
|
|
+ Map<String, String> cell = row.get(i);
|
|
|
+ SetUserTag obj = new SetUserTag();
|
|
|
+
|
|
|
+ Integer fanId = Integer.valueOf(row.get(i).get("fanId"));
|
|
|
+ String tagNames = row.get(i).get("tagNames");
|
|
|
+
|
|
|
+ String[] tagNameArrs = tagNames.split("、");
|
|
|
+ JSONArray jsonArray=new JSONArray(Arrays.asList(tagNameArrs));
|
|
|
+
|
|
|
+ obj.setTagNameParam(jsonArray.toString());
|
|
|
+ obj.setAuthId(authUser.getId());
|
|
|
+ obj.setAuthName(authUser.getName());
|
|
|
+ obj.setSourceFanId(fanId);
|
|
|
+ obj.setSourceTagNames(tagNames);
|
|
|
+ //查找指定的标签
|
|
|
+ entityList.add(obj);
|
|
|
+ }
|
|
|
+
|
|
|
+ setUserTagService.saveBatch(entityList);
|
|
|
+ mainObj.setAuthId(authUser.getId());
|
|
|
+ mainObj.setAuthName(authUser.getName());
|
|
|
+ mainObj.setTotalNum(entityList.size());
|
|
|
+ SetUserTagMainService.save(mainObj);
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
public Map<String, Object> getHubPageList(HubWorkContactEmployeeHandle handle) {
|
|
|
|
|
|
List<Map<String,Object>> resList = new ArrayList<Map<String,Object>>();
|