|
|
@@ -19,10 +19,14 @@ import com.fs.common.param.BaseQueryParam;
|
|
|
import com.fs.core.config.WxMaConfiguration;
|
|
|
import com.fs.course.param.newfs.FsUserCourseBeMemberParam;
|
|
|
import com.fs.course.service.IFsUserCourseVideoService;
|
|
|
+import com.fs.his.domain.FsUserWx;
|
|
|
+import com.fs.his.mapper.FsUserWxMapper;
|
|
|
+import com.fs.his.utils.ConfigUtil;
|
|
|
import com.fs.hisStore.domain.FsStoreOrderScrm;
|
|
|
import com.fs.hisStore.domain.FsUserBillScrm;
|
|
|
import com.fs.hisStore.domain.FsUserPromoterApplyScrm;
|
|
|
import com.fs.hisStore.domain.FsUserScrm;
|
|
|
+import com.fs.hisStore.enums.SysConfigEnum;
|
|
|
import com.fs.hisStore.param.*;
|
|
|
import com.fs.hisStore.service.*;
|
|
|
import com.fs.hisStore.vo.*;
|
|
|
@@ -95,6 +99,11 @@ public class UserScrmController extends AppBaseController {
|
|
|
@Autowired
|
|
|
private ILiveOrderService liveOrderService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ConfigUtil configUtil;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ FsUserWxMapper fsUserWxMapper;
|
|
|
/**
|
|
|
* 获取用户信息
|
|
|
* @param request
|
|
|
@@ -103,6 +112,15 @@ public class UserScrmController extends AppBaseController {
|
|
|
@ApiOperation("获取用户信息")
|
|
|
@GetMapping("/getUserInfo")
|
|
|
public R getUserInfo(HttpServletRequest request){
|
|
|
+
|
|
|
+ String queryAppId = null;
|
|
|
+ // 获取请求头中的 appid
|
|
|
+ String appid = request.getHeader("appid");
|
|
|
+ if(StringUtils.isNotEmpty(appid)){
|
|
|
+ queryAppId = appid;
|
|
|
+ }else{
|
|
|
+ queryAppId = configUtil.generateConfigByKey(SysConfigEnum.COURSE_MA_CONFIG.getKey()).getString("appid");
|
|
|
+ }
|
|
|
try {
|
|
|
FsUserScrm user=userService.selectFsUserById(Long.parseLong(getUserId()));
|
|
|
if (user.getIsShow() !=null && user.getIsShow() == 0){
|
|
|
@@ -115,8 +133,16 @@ public class UserScrmController extends AppBaseController {
|
|
|
user.setIsShow(1);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+ if( null != user && StringUtils.isBlank(user.getMaOpenId()) && null != user.getUserId() && null != queryAppId){
|
|
|
+ log.info("用户没有maOpenId:{}",user);
|
|
|
+ //从fsUserWx里面去进行查询数据
|
|
|
+ FsUserWx fsUserWx = fsUserWxMapper.getFsUserWcByUserIdAndAppId(user.getUserId(), queryAppId);
|
|
|
+ if(null != fsUserWx){
|
|
|
+ user.setMaOpenId(fsUserWx.getOpenId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return R.ok().put("user",user);
|
|
|
} catch (Exception e){
|
|
|
log.error("【获取用户信息】:{}",e);
|