|
@@ -2,6 +2,7 @@ package com.fs.app.controller;
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fs.app.annotation.Login;
|
|
|
import com.fs.app.config.ImageStorageConfig;
|
|
|
import com.fs.app.param.FsUserTagUpdateParam;
|
|
@@ -9,6 +10,7 @@ import com.fs.app.param.FsUserUpdateParam;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.domain.ResponseResult;
|
|
|
import com.fs.common.exception.ServiceException;
|
|
|
+import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.company.service.ICompanyTagUserService;
|
|
|
import com.fs.company.service.ICompanyUserService;
|
|
@@ -24,6 +26,7 @@ import com.fs.store.param.h5.UserStatisticsCommonParam;
|
|
|
import com.fs.store.service.IFsUserCourseCountService;
|
|
|
import com.fs.store.service.IFsUserService;
|
|
|
import com.fs.store.vo.h5.*;
|
|
|
+import com.fs.system.service.ISysConfigService;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -63,6 +66,9 @@ public class FsUserController extends AppBaseController {
|
|
|
@Autowired
|
|
|
private IFsUserCourseCountService userCourseCountService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysConfigService configService;
|
|
|
+
|
|
|
@Login
|
|
|
@PostMapping("/pageList")
|
|
|
@ApiOperation("用户会员分页列表")
|
|
@@ -308,8 +314,16 @@ public class FsUserController extends AppBaseController {
|
|
|
String path = imageConfig.getServerPath();
|
|
|
InputStream inputStream = fsUserCourseService.handleImage("", path);
|
|
|
|
|
|
- // todo 为了给客户演示,生成会员的封面暂时随便找的课程封面,如果后期要修改的话就调整
|
|
|
- String backgroundImagePath = "https://cos.his.cdwjyyh.com/fs/20240914/250af4b0041b46d1a36a34af1d5ccd54.jpg";
|
|
|
+ // 背景图片使用的后台商城配置的会员海报,如果没有配置则使用默认的logo图片
|
|
|
+ String config = configService.selectConfigByKey("store.config");
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(config);
|
|
|
+ String userPosterImage = jsonObject.getString("userPosterImage");
|
|
|
+ String backgroundImagePath;
|
|
|
+ if(StringUtils.isEmpty(userPosterImage)){
|
|
|
+ backgroundImagePath = "https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/fs/20250430/1745980979886.png";
|
|
|
+ } else {
|
|
|
+ backgroundImagePath = userPosterImage;
|
|
|
+ }
|
|
|
String base64Image = fsUserCourseService.createUserImageQR(param.getRealLink(), backgroundImagePath, inputStream, "png", param.getCompanyUserId());
|
|
|
// 返回Base64编码的图片字符串
|
|
|
Map<String, Object> map = new HashMap<>();
|