|
@@ -1,13 +1,24 @@
|
|
package com.fs.app.controller;
|
|
package com.fs.app.controller;
|
|
|
|
|
|
|
|
+import com.fs.common.BeanCopyUtils;
|
|
import com.fs.common.core.controller.BaseController;
|
|
import com.fs.common.core.controller.BaseController;
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.exception.CustomException;
|
|
import com.fs.common.exception.CustomException;
|
|
import com.fs.qw.domain.QwExternalContactInfo;
|
|
import com.fs.qw.domain.QwExternalContactInfo;
|
|
|
|
+import com.fs.qw.domain.QwTagGroup;
|
|
import com.fs.qw.param.ExternalContactDetailsParam;
|
|
import com.fs.qw.param.ExternalContactDetailsParam;
|
|
|
|
+import com.fs.qw.param.sidebar.ExternalContactInfoParam;
|
|
|
|
+import com.fs.qw.param.sidebar.TagGroupListParam;
|
|
|
|
+import com.fs.qw.param.sidebar.TagGroupUpdateParam;
|
|
import com.fs.qw.service.IQwExternalContactInfoService;
|
|
import com.fs.qw.service.IQwExternalContactInfoService;
|
|
import com.fs.qw.service.IQwExternalContactService;
|
|
import com.fs.qw.service.IQwExternalContactService;
|
|
|
|
+import com.fs.qw.service.IQwTagGroupService;
|
|
import com.fs.qw.vo.ExternalContactDetailsVO;
|
|
import com.fs.qw.vo.ExternalContactDetailsVO;
|
|
|
|
+import com.fs.qw.vo.QwTagGroupListVO;
|
|
|
|
+import com.fs.qw.vo.sidebar.ExternalContactInfoVO;
|
|
|
|
+import com.fs.qw.vo.sidebar.ExternalContactTagVO;
|
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -16,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -30,6 +42,9 @@ public class QwUserController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IQwExternalContactInfoService qwExternalContactInfoService;
|
|
private IQwExternalContactInfoService qwExternalContactInfoService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IQwTagGroupService qwTagGroupService;
|
|
|
|
+
|
|
@GetMapping("/details")
|
|
@GetMapping("/details")
|
|
@ApiOperation("会员看课详情")
|
|
@ApiOperation("会员看课详情")
|
|
public R getUserDetails(@ApiParam(value = "外部联系人id", required = true) @RequestParam Long contactId,
|
|
public R getUserDetails(@ApiParam(value = "外部联系人id", required = true) @RequestParam Long contactId,
|
|
@@ -66,4 +81,56 @@ public class QwUserController extends BaseController {
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @GetMapping("/externalContact")
|
|
|
|
+ @ApiOperation("获取侧边栏外部联系人信息")
|
|
|
|
+ public R getExternalContactInfo(@RequestParam(value = "qwExternalContactId") Long qwExternalContactId) {
|
|
|
|
+ ExternalContactInfoVO externalContactInfo = qwExternalContactService.getExternalContactInfo(qwExternalContactId);
|
|
|
|
+ return R.ok().put("data", externalContactInfo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @GetMapping("/externalContact/tag")
|
|
|
|
+ @ApiOperation("获取侧边栏外部联系人标签")
|
|
|
|
+ public R getExternalContactTag(@RequestParam(value = "qwExternalContactId") Long qwExternalContactId) {
|
|
|
|
+ List<ExternalContactTagVO> tagList = qwExternalContactService.getExternalContactTag(qwExternalContactId);
|
|
|
|
+ return R.ok().put("data", tagList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PutMapping("/externalContact")
|
|
|
|
+ @ApiOperation("编辑外部联系人信息")
|
|
|
|
+ public R updateExternalContactInfo(@RequestBody ExternalContactInfoParam param) {
|
|
|
|
+ return qwExternalContactService.updateExternalContactInfo(param);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @GetMapping("/tagGroupList")
|
|
|
|
+ @ApiOperation("获取所有标签组和其下标签")
|
|
|
|
+ public R getTagGroupList(TagGroupListParam param) {
|
|
|
|
+ QwTagGroup qwTagGroup = new QwTagGroup();
|
|
|
|
+ BeanCopyUtils.copy(param, qwTagGroup);
|
|
|
|
+ qwTagGroup.setName(param.getTagName());
|
|
|
|
+
|
|
|
|
+ PageHelper.startPage(qwTagGroup.getPageNum(), qwTagGroup.getPageSize());
|
|
|
|
+ List<QwTagGroupListVO> list = qwTagGroupService.selectQwGroupTagList(qwTagGroup);
|
|
|
|
+
|
|
|
|
+ PageInfo<QwTagGroupListVO> result = new PageInfo<>(list);
|
|
|
|
+ return R.ok().put("data", result);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+// @GetMapping("/searchTags")
|
|
|
|
+// @ApiOperation("搜索标签-跟管理端保持一致")
|
|
|
|
+// public R searchTagList(QwTagParam param) {
|
|
|
|
+// List<QwTagGroupListVO> list = qwTagService.searchTags(param);
|
|
|
|
+// return R.ok().put("data", list);
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ @PutMapping("/externalContact/tag")
|
|
|
|
+ @ApiOperation("编辑标签")
|
|
|
|
+ public R updateExternalContactTag(@RequestBody TagGroupUpdateParam param) {
|
|
|
|
+ int i = qwExternalContactService.updateExternalContactTag(param);
|
|
|
|
+ if (i > 0) {
|
|
|
|
+ return R.ok();
|
|
|
|
+ }
|
|
|
|
+ return R.error();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|