|
|
@@ -25,6 +25,7 @@ import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.core.config.WxMaConfiguration;
|
|
|
import com.fs.core.config.WxPayProperties;
|
|
|
import com.fs.core.utils.OrderCodeUtils;
|
|
|
+import com.fs.course.param.CollectionBindUserParam;
|
|
|
import com.fs.course.param.CollectionInfoConfirmParam;
|
|
|
import com.fs.course.vo.FsUserInfoCollectionUVO;
|
|
|
import com.fs.doctor.domain.DoctorMsg;
|
|
|
@@ -181,6 +182,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
@Autowired
|
|
|
private IFsStoreOrderLogsService fsStoreOrderLogsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IFsUserService userService;
|
|
|
+
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -620,6 +624,12 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
|
|
|
@Override
|
|
|
public FsUserInfoCollectionUVO info(Long id,Long userId) {
|
|
|
+ FsUserInformationCollection selectByUserId = fsUserInformationCollectionMapper.selectByUserId(userId);
|
|
|
+ if (selectByUserId != null) {
|
|
|
+ if (!selectByUserId.getId().equals(id)) {
|
|
|
+ throw new CustomException("已有信息采集信息!");
|
|
|
+ }
|
|
|
+ }
|
|
|
FsUserInfoCollectionUVO vo = new FsUserInfoCollectionUVO();
|
|
|
FsUserInformationCollection collection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(id);
|
|
|
|
|
|
@@ -681,6 +691,8 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
vo.setSex(collection.getSex());
|
|
|
vo.setUserPhoneFour(collection.getUserPhoneFour());
|
|
|
vo.setUserName(collection.getUserName());
|
|
|
+ vo.setFillTag(collection.getFillFlag());
|
|
|
+ vo.setUserId(collection.getUserId());
|
|
|
}
|
|
|
return vo;
|
|
|
}
|
|
|
@@ -1268,6 +1280,36 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R bindUser(CollectionBindUserParam param) {
|
|
|
+ //TODO 是否判断销售后续再做
|
|
|
+// if (param.getCompanyUserId() != null) {
|
|
|
+// return R.error("");
|
|
|
+// }
|
|
|
+ if (param.getUserId() == null) {
|
|
|
+ return R.error("用户参数错误");
|
|
|
+ }
|
|
|
+ FsUser fsUser = userService.selectFsUserByUserId(param.getUserId());
|
|
|
+ if (fsUser == null) {
|
|
|
+ return R.error("用户信息错误");
|
|
|
+ }
|
|
|
+ FsUserInformationCollection collection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(param.getCollectionId());
|
|
|
+ if (collection == null) {
|
|
|
+ return R.error("未找到信息采集信息");
|
|
|
+ }
|
|
|
+ if (collection.getUserId() != null) {
|
|
|
+ return R.error("信息采集已绑定用户");
|
|
|
+ }
|
|
|
+
|
|
|
+ FsUserInformationCollection map = new FsUserInformationCollection();
|
|
|
+ map.setUserId(param.getUserId());
|
|
|
+ map.setId(param.getCollectionId());
|
|
|
+ if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(map) > 0) {
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+ return R.error("绑定失败");
|
|
|
+ }
|
|
|
+
|
|
|
private List<AnswerVO> getAnswerVOs(List<AnswerVO> target,List<AnswerVO> source) {
|
|
|
target.addAll(source);
|
|
|
return target.stream()
|