diff --git a/suimangAdmin/src/main/resources/db/migration/V2023071300001_wx_c_author.sql b/suimangAdmin/src/main/resources/db/migration/V2023071300001_wx_c_author.sql new file mode 100644 index 0000000..f4edb5a --- /dev/null +++ b/suimangAdmin/src/main/resources/db/migration/V2023071300001_wx_c_author.sql @@ -0,0 +1,33 @@ +/* + Navicat Premium Data Transfer + + Source Server : photo + Source Server Type : MySQL + Source Server Version : 80026 (8.0.26) + Source Host : 182.92.151.30:3306 + Source Schema : mallink_suimang_test + + Target Server Type : MySQL + Target Server Version : 80026 (8.0.26) + File Encoding : 65001 + + Date: 13/07/2023 18:41:44 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for wx_c_author +-- ---------------------------- +DROP TABLE IF EXISTS `wx_c_author`; +CREATE TABLE `wx_c_author` ( + `id` int NOT NULL COMMENT '用户id', + `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名', + `type` int NULL DEFAULT NULL COMMENT '权限类型数字人0声纹1', + `resource_id` int NULL DEFAULT NULL COMMENT '对应资源id(数字人id or 声纹id)', + `expire_time` datetime NULL DEFAULT NULL COMMENT '资源权限到期时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/suimangAdmin/src/main/resources/db/migration/V2023071300002_wx_c_avatar.sql b/suimangAdmin/src/main/resources/db/migration/V2023071300002_wx_c_avatar.sql new file mode 100644 index 0000000..5cda66f --- /dev/null +++ b/suimangAdmin/src/main/resources/db/migration/V2023071300002_wx_c_avatar.sql @@ -0,0 +1,35 @@ +/* + Navicat Premium Data Transfer + + Source Server : photo + Source Server Type : MySQL + Source Server Version : 80026 (8.0.26) + Source Host : 182.92.151.30:3306 + Source Schema : mallink_suimang_test + + Target Server Type : MySQL + Target Server Version : 80026 (8.0.26) + File Encoding : 65001 + + Date: 13/07/2023 18:41:55 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for wx_c_avatar +-- ---------------------------- +DROP TABLE IF EXISTS `wx_c_avatar`; +CREATE TABLE `wx_c_avatar` ( + `id` int NOT NULL COMMENT '数字人id', + `class` int NULL DEFAULT NULL COMMENT '共享0定制1', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数字人名称', + `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数字人图像', + `demo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数字人视频样例', + `model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数字人视频模板文件', + `preinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数字人预处理文件', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/suimangAdmin/src/main/resources/db/migration/V2023071300004_wx_c_voice.sql b/suimangAdmin/src/main/resources/db/migration/V2023071300004_wx_c_voice.sql new file mode 100644 index 0000000..7982da6 --- /dev/null +++ b/suimangAdmin/src/main/resources/db/migration/V2023071300004_wx_c_voice.sql @@ -0,0 +1,34 @@ +/* + Navicat Premium Data Transfer + + Source Server : photo + Source Server Type : MySQL + Source Server Version : 80026 (8.0.26) + Source Host : 182.92.151.30:3306 + Source Schema : mallink_suimang_test + + Target Server Type : MySQL + Target Server Version : 80026 (8.0.26) + File Encoding : 65001 + + Date: 13/07/2023 18:42:24 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for wx_c_voice +-- ---------------------------- +DROP TABLE IF EXISTS `wx_c_voice`; +CREATE TABLE `wx_c_voice` ( + `id` int NOT NULL COMMENT '声纹id', + `localel_id` int NULL DEFAULT NULL COMMENT '地区id', + `voice_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '声纹名称', + `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '声纹显示名称', + `gender` int NULL DEFAULT NULL COMMENT '男1女0', + `class` int NULL DEFAULT NULL COMMENT '共享0定制1', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/suimangAdmin/src/main/resources/db/migration/V2023071300005_wx_c_voice_local.sql b/suimangAdmin/src/main/resources/db/migration/V2023071300005_wx_c_voice_local.sql new file mode 100644 index 0000000..ebb6c90 --- /dev/null +++ b/suimangAdmin/src/main/resources/db/migration/V2023071300005_wx_c_voice_local.sql @@ -0,0 +1,31 @@ +/* + Navicat Premium Data Transfer + + Source Server : photo + Source Server Type : MySQL + Source Server Version : 80026 (8.0.26) + Source Host : 182.92.151.30:3306 + Source Schema : mallink_suimang_test + + Target Server Type : MySQL + Target Server Version : 80026 (8.0.26) + File Encoding : 65001 + + Date: 13/07/2023 18:42:33 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for wx_c_voice_local +-- ---------------------------- +DROP TABLE IF EXISTS `wx_c_voice_local`; +CREATE TABLE `wx_c_voice_local` ( + `id` int NOT NULL COMMENT '地区id', + `local_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '地区名称', + `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '地区名称显示', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/suimangAdmin/src/main/resources/db/migration/V2023071300006_wx_c_voice_style.sql b/suimangAdmin/src/main/resources/db/migration/V2023071300006_wx_c_voice_style.sql new file mode 100644 index 0000000..66636c5 --- /dev/null +++ b/suimangAdmin/src/main/resources/db/migration/V2023071300006_wx_c_voice_style.sql @@ -0,0 +1,33 @@ +/* + Navicat Premium Data Transfer + + Source Server : photo + Source Server Type : MySQL + Source Server Version : 80026 (8.0.26) + Source Host : 182.92.151.30:3306 + Source Schema : mallink_suimang_test + + Target Server Type : MySQL + Target Server Version : 80026 (8.0.26) + File Encoding : 65001 + + Date: 13/07/2023 18:42:38 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for wx_c_voice_style +-- ---------------------------- +DROP TABLE IF EXISTS `wx_c_voice_style`; +CREATE TABLE `wx_c_voice_style` ( + `id` int NOT NULL COMMENT '风格', + `voice_id` int NULL DEFAULT NULL COMMENT '声纹id', + `style_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '风格名称', + `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '风格显示名称', + `style_demo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '样例视频', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/suimangCApi/pom.xml b/suimangCApi/pom.xml index b702bc6..80e424b 100644 --- a/suimangCApi/pom.xml +++ b/suimangCApi/pom.xml @@ -168,5 +168,7 @@ + + \ No newline at end of file diff --git a/suimangCApi/src/main/java/com/iformall/controller/VideoController.java b/suimangCApi/src/main/java/com/iformall/controller/VideoController.java index 8b1d88f..74210f7 100644 --- a/suimangCApi/src/main/java/com/iformall/controller/VideoController.java +++ b/suimangCApi/src/main/java/com/iformall/controller/VideoController.java @@ -23,7 +23,7 @@ import java.util.Map; * @author gongbiao */ @RestController -@RequestMapping("api/video") +@RequestMapping("/api/video") public class VideoController extends BaseController { private Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -32,8 +32,9 @@ public class VideoController extends BaseController { @Autowired String videoType; + @Autowired - WxCVideoService wxCVideoService; + private WxCVideoService wxCVideoService; /** * 上传视频 @@ -133,7 +134,7 @@ public class VideoController extends BaseController { public WxCVideoTable avatarList(@RequestBody Map params){ String username = params.get("username"); WxCVideoTable TemplateVideo = wxCVideoService.findByUserName(username); - return null; + return TemplateVideo; } } diff --git a/suimangCApi/src/main/java/com/iformall/controller/WxUserGrantController.java b/suimangCApi/src/main/java/com/iformall/controller/WxUserGrantController.java index e0ee82f..3e95aef 100644 --- a/suimangCApi/src/main/java/com/iformall/controller/WxUserGrantController.java +++ b/suimangCApi/src/main/java/com/iformall/controller/WxUserGrantController.java @@ -85,6 +85,10 @@ public class WxUserGrantController extends BaseController { @Autowired WxMallService mallService; + @Autowired + WxCLiveUserBasicInfoService wxCLiveUserBasicInfoService; + + @Autowired private QrCodeService qrCodeService; @@ -139,7 +143,6 @@ public class WxUserGrantController extends BaseController { if(StringUtils.isBlank(code)){ return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入验证码"); } - String key = Constant.captchaPrev + ":" + ipAddr; String code1 = RedisCacheUtils.getCacheString(redisTemplate, key); if(StringUtils.isBlank(code1)){ @@ -148,13 +151,11 @@ public class WxUserGrantController extends BaseController { if(!code1.equals(code)){ return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); } - String phone = map.get("username"); String password = map.get("password"); if(StringUtils.isBlank(phone) || StringUtils.isBlank(password)){ return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "手机号或密码为空"); } - WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); if(basicInfo == null){ return new ResultData(ErrorCode.USER_IS_EMPTY); @@ -165,32 +166,33 @@ public class WxUserGrantController extends BaseController { if(!encryptPassword.equals(basicInfo.getPassword())){ return new ResultData(ErrorCode.USER_PASSWD_ERR.getCode(), "手机号或密码错误"); } + int status = Integer.parseInt(map.get("status")); if (status==0){ - basicInfo =wxCUserBasicInfoService.getById1(basicInfo.getId()); - if (basicInfo.getCode()!=null && !map.get("Mcode").equals(basicInfo.getCode())){ - return new ResultData(ErrorCode.USER_ALREADY_LOGIN.getCode(),"用户已在其他设备登录"); - }if (basicInfo.getCode()==null){ - wxCUserBasicInfoService.updateCode(basicInfo.getId(),map.get("Mcode")); + WxCUserBasicInfo basicLiveInfo =wxCLiveUserBasicInfoService.getById(basicInfo.getId()); + if (basicLiveInfo.getCode()!=null && !map.get("Mcode").equals(basicLiveInfo.getCode())){ + return new ResultData(ErrorCode.USER_ALREADY_LOGIN.getCode(),"用户已在其他设备登录"); + }if (basicLiveInfo.getCode()==null){ + wxCLiveUserBasicInfoService.updateCode(basicInfo.getId(),map.get("Mcode")); } } if (status==-1){ - wxCUserBasicInfoService.updateCode(basicInfo.getId(),null); + wxCLiveUserBasicInfoService.updateCode(basicInfo.getId(),null); basicInfo.setStatus(-2); return new ResultData(ErrorCode.USER_CANCEL_MCODE.getCode(),"设备已注销"); } - basicInfo =wxCUserBasicInfoService.getById1(basicInfo.getId()); wxCUserBasicInfoService.handleLoginUser(basicInfo); + WxCUserBasicInfo basicLiveInfo =wxCLiveUserBasicInfoService.getById(basicInfo.getId()); Map resultMap = new HashMap(); // resultMap.put("phone", basicInfo.getPhone()); Map data = new HashMap(); data.put("status",basicInfo.getStatus()); - data.put("version",basicInfo.getVersion()); + data.put("version",basicLiveInfo.getVersion()); data.put("current_time",new Date(System.currentTimeMillis()/1000)); - data.put("expire_time",basicInfo.getExpireTime().getTime()/1000); + data.put("expire_time",basicLiveInfo.getExpireTime().getTime()/1000); Map info = new HashMap(); info.put("log_id",basicInfo.getId()); info.put("username",basicInfo.getPhone()); @@ -199,7 +201,7 @@ public class WxUserGrantController extends BaseController { resultMap.put("info",info); - // resultMap.put("expire_time", basicInfo.getExpireTime()); + // resultMap.put("expire_time", basicInfo.getExpireTime()); return new ResultData(resultMap); } diff --git a/suimangService/src/main/java/com/iformall/domain/po/WxCVideoTable.java b/suimangService/src/main/java/com/iformall/domain/po/WxCVideoTable.java new file mode 100644 index 0000000..000f2ea --- /dev/null +++ b/suimangService/src/main/java/com/iformall/domain/po/WxCVideoTable.java @@ -0,0 +1,48 @@ +package com.iformall.domain.po; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntityWithoutFinalTenantId; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.util.ArrayList; +import java.util.Date; + +@TableName(value ="wx_c_avatar") +@Data +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +public class WxCVideoTable extends TenantEntityWithoutFinalTenantId { + + @TableField(exist = false) + private String userName; + + @TableField(exist = false) + private String currentTime; + + @TableField(exist = false) + private ArrayList authorList; + + //public class Author extends TenantEntityWithoutFinalTenantId{ + + @io.swagger.annotations.ApiModelProperty(value="数字人id",name="id") + private int id; + @io.swagger.annotations.ApiModelProperty(value="数字人名称",name="name") + private String name; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="权限过期时间",name="expire_time") + private Date expireTime; + + @io.swagger.annotations.ApiModelProperty(value="数字人封面图片链接",name="image") + private String image; + @io.swagger.annotations.ApiModelProperty(value="数字人样例视频链接",name="demo") + private String demo; + @io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="preInfo") + private String preInfo; + // } + +} diff --git a/suimangService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java b/suimangService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java index 4d526c3..7c6b85f 100644 --- a/suimangService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java +++ b/suimangService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java @@ -66,8 +66,8 @@ public interface WxCUserBasicInfoMapper extends CommonMapper { + + WxCVideoTable findByUserName(@Param("username") String username); + +} diff --git a/suimangService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java b/suimangService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java index a2db33a..29ed2ee 100644 --- a/suimangService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java +++ b/suimangService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java @@ -201,9 +201,9 @@ public interface WxCUserBasicInfoService { void updUserInfo(WxCUserBasicInfo cUser, Long memberId); - WxCUserBasicInfo getById1(Long id); +// WxCUserBasicInfo getById1(Long id); - void updateCode(Long id, String mcode); + // void updateCode(Long id, String mcode); } diff --git a/suimangService/src/main/java/com/iformall/service/WxCVideoService.java b/suimangService/src/main/java/com/iformall/service/WxCVideoService.java new file mode 100644 index 0000000..bc84755 --- /dev/null +++ b/suimangService/src/main/java/com/iformall/service/WxCVideoService.java @@ -0,0 +1,9 @@ +package com.iformall.service; + +import com.iformall.domain.po.WxCVideoTable; + +public interface WxCVideoService { + + + WxCVideoTable findByUserName(String username); +} diff --git a/suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java b/suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java index 22fdcbb..83df171 100644 --- a/suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java @@ -629,7 +629,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc @Override public PageInfo listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize) { - return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCUserBasicInfoMapper.findList(record)); + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo( + () -> wxCUserBasicInfoMapper.findList(record)); } @Override @@ -666,7 +667,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc WxCUserBasicInfo basicQ = new WxCUserBasicInfo(); basicQ.setFinalTenantId(tenantEntity.getFinalTenantId()); basicQ.setPhone(phone); - List basicInfos = wxCUserBasicInfoMapper.selectList(new QueryWrapper(basicQ)); + List basicInfos = wxCUserBasicInfoMapper.selectList( + new QueryWrapper(basicQ)); if (basicInfos != null && basicInfos.size() > 0) { WxCUserBasicInfo wxCUserBasicInfo = basicInfos.get(0); if (wxCUserBasicInfo.getPoins() != null) { @@ -953,16 +955,16 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc update(info); } - @Override - public WxCUserBasicInfo getById1(Long id) { - return wxCUserBasicInfoMapper.selectById1(id); - } - - @Override - public void updateCode(Long id, String mcode) { +// @Override +// public WxCUserBasicInfo getById1(Long id) { +// return wxCUserBasicInfoMapper.selectById1(id); +// } - wxCUserBasicInfoMapper.updateCode(id,mcode); - } +// @Override +// public void updateCode(Long id, String mcode) { +// +// wxCUserBasicInfoMapper.updateCode(id,mcode); +// } @Override diff --git a/suimangService/src/main/java/com/iformall/service/impl/WxCVideoServiceImpl.java b/suimangService/src/main/java/com/iformall/service/impl/WxCVideoServiceImpl.java new file mode 100644 index 0000000..5dabc33 --- /dev/null +++ b/suimangService/src/main/java/com/iformall/service/impl/WxCVideoServiceImpl.java @@ -0,0 +1,92 @@ +package com.iformall.service.impl; + +import cn.afterturn.easypoi.handler.inter.IExcelExportServer; +import com.iformall.domain.po.WxCUserBasicInfo; +import com.iformall.domain.po.WxCVideoTable; +import com.iformall.domain.vo.WxCUserBasicInfoVo; +import com.iformall.mapper.WxCUserBasicInfoMapper; +import com.iformall.mapper.WxCVideoMapper; +import com.iformall.service.WxCUserTagsService; +import com.iformall.service.WxCVideoService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class WxCVideoServiceImpl implements WxCVideoService,IExcelExportServer { + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxCUserBasicInfoMapper wxCUserBasicInfoMapper; + + @Autowired + WxCUserTagsService wxCUserTagsService; + + @Autowired + WxCVideoMapper wxCVideoMapper; + @Override + public WxCVideoTable findByUserName(String username) { + WxCVideoTable TemplateVideo = wxCVideoMapper.findByUserName(username); + return TemplateVideo; + } + + @Override + public List selectListForExcelExport(Object queryParams, int page) { + WxCUserBasicInfo basicInfo = (WxCUserBasicInfo) queryParams; + List list = new ArrayList(); + basicInfo.setBegin((page-1)*20000); + basicInfo.setLimit(20000); + + list = wxCUserBasicInfoMapper.findVoList(basicInfo); + if (null == list || list.size() <= 0 ) { + return null; + } + +// List userIds = list.stream().map(cc -> cc.getId()).collect(Collectors.toList()); +// if (null != userIds && userIds.size() > 0 ) { +// WxCreditHistory chaddq = new WxCreditHistory(); +// chaddq.setUserIdList(userIds); +// chaddq.setTenantId(tenantInfo.getFinalTenantId()); +// chaddq.setStartTime(basicInfo.getCreditStartTime()); +// chaddq.setEndTime(basicInfo.getCreditEndTime()); +// List chadds = creditHistoryMapper.findAddList(chaddq); +// Map chaddMap = new HashMap<>(); +// if(null != chadds){ +// chaddMap = chadds.stream().collect(Collectors.toMap(WxCreditHistory::getCUserId, WxCreditHistory::getCreditNum)); +// } +// +// WxCreditHistory chlesq = new WxCreditHistory(); +// chlesq.setUserIdList(userIds); +// chlesq.setTenantId(tenantInfo.getFinalTenantId()); +// chlesq.setStartTime(basicInfo.getCreditStartTime()); +// chlesq.setEndTime(basicInfo.getCreditEndTime()); +// List chless = creditHistoryMapper.findLesList(chlesq); +// Map chlesMap = new HashMap<>(); +// if(null != chless){ +// chlesMap = chless.stream().collect(Collectors.toMap(WxCreditHistory::getCUserId, WxCreditHistory::getCreditNum)); +// } + + //处理会员标签 + List tagIds = list.stream().map(cc -> cc.getTagId()).collect(Collectors.toList()); + Map tagIdName = wxCUserTagsService.findIdTagNames(basicInfo.getFinalTenantId(),tagIds); + list.stream().forEach(u->{ +// u.setAddCredit(finalChaddMap.get(u.getId())); +// u.setLesCredit(finalChlesMap.get(u.getId())); + u.setTagNames(tagIdName.get(u.getTagId())); + }); +// +// } + if (null != list && list.size() > 0 ) { + List retList = new ArrayList(); + retList.addAll(list); + return retList; + } + return null; + } +} diff --git a/suimangService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml b/suimangService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml index 22e9275..872783b 100644 --- a/suimangService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml +++ b/suimangService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml @@ -138,11 +138,7 @@ from wx_c_user_basic_info wcubi where wcubi.id =#{id} - + - + +SELECT +wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo +from wx_c_author wca +left join +wx_c_avatar wcav +on wcav.id =wca.resource_id where +wca.resource_id in +(select wca.resource_id from wx_c_author wca +WHERE wca.user_name = #{username} AND wca.type = 0 ) + + + + \ No newline at end of file