@@ -1,32 +0,0 @@ | |||||
/* | |||||
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:07 | |||||
*/ | |||||
SET NAMES utf8mb4; | |||||
SET FOREIGN_KEY_CHECKS = 0; | |||||
DROP TABLE IF EXISTS `wx_c_user_basic_info2`; | |||||
CREATE TABLE `wx_c_user_basic_info2` ( | |||||
`id` bigint NOT NULL, | |||||
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, | |||||
`version` int NULL DEFAULT NULL, | |||||
`expire_time` datetime NULL DEFAULT NULL, | |||||
PRIMARY KEY (`id`) USING BTREE | |||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; | |||||
SET FOREIGN_KEY_CHECKS = 1; |
@@ -168,5 +168,7 @@ | |||||
</configuration> | </configuration> | ||||
</plugin> | </plugin> | ||||
</plugins> | </plugins> | ||||
</build> | </build> | ||||
</project> | </project> |
@@ -23,7 +23,7 @@ import java.util.Map; | |||||
* @author gongbiao | * @author gongbiao | ||||
*/ | */ | ||||
@RestController | @RestController | ||||
@RequestMapping("api/video") | |||||
@RequestMapping("/api/video") | |||||
public class VideoController extends BaseController { | public class VideoController extends BaseController { | ||||
private Logger logger = LoggerFactory.getLogger(this.getClass()); | private Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
@@ -32,8 +32,9 @@ public class VideoController extends BaseController { | |||||
@Autowired | @Autowired | ||||
String videoType; | String videoType; | ||||
@Autowired | @Autowired | ||||
WxCVideoService wxCVideoService; | |||||
private WxCVideoService wxCVideoService; | |||||
/** | /** | ||||
* 上传视频 | * 上传视频 | ||||
@@ -133,7 +134,7 @@ public class VideoController extends BaseController { | |||||
public WxCVideoTable avatarList(@RequestBody Map<String, String> params){ | public WxCVideoTable avatarList(@RequestBody Map<String, String> params){ | ||||
String username = params.get("username"); | String username = params.get("username"); | ||||
WxCVideoTable TemplateVideo = wxCVideoService.findByUserName(username); | WxCVideoTable TemplateVideo = wxCVideoService.findByUserName(username); | ||||
return null; | |||||
return TemplateVideo; | |||||
} | } | ||||
} | } |
@@ -85,6 +85,10 @@ public class WxUserGrantController extends BaseController { | |||||
@Autowired | @Autowired | ||||
WxMallService mallService; | WxMallService mallService; | ||||
@Autowired | |||||
WxCLiveUserBasicInfoService wxCLiveUserBasicInfoService; | |||||
@Autowired | @Autowired | ||||
private QrCodeService qrCodeService; | private QrCodeService qrCodeService; | ||||
@@ -139,7 +143,6 @@ public class WxUserGrantController extends BaseController { | |||||
if(StringUtils.isBlank(code)){ | if(StringUtils.isBlank(code)){ | ||||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入验证码"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入验证码"); | ||||
} | } | ||||
String key = Constant.captchaPrev + ":" + ipAddr; | String key = Constant.captchaPrev + ":" + ipAddr; | ||||
String code1 = RedisCacheUtils.getCacheString(redisTemplate, key); | String code1 = RedisCacheUtils.getCacheString(redisTemplate, key); | ||||
if(StringUtils.isBlank(code1)){ | if(StringUtils.isBlank(code1)){ | ||||
@@ -148,13 +151,11 @@ public class WxUserGrantController extends BaseController { | |||||
if(!code1.equals(code)){ | if(!code1.equals(code)){ | ||||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); | ||||
} | } | ||||
String phone = map.get("username"); | String phone = map.get("username"); | ||||
String password = map.get("password"); | String password = map.get("password"); | ||||
if(StringUtils.isBlank(phone) || StringUtils.isBlank(password)){ | if(StringUtils.isBlank(phone) || StringUtils.isBlank(password)){ | ||||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "手机号或密码为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "手机号或密码为空"); | ||||
} | } | ||||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | ||||
if(basicInfo == null){ | if(basicInfo == null){ | ||||
return new ResultData(ErrorCode.USER_IS_EMPTY); | return new ResultData(ErrorCode.USER_IS_EMPTY); | ||||
@@ -165,32 +166,33 @@ public class WxUserGrantController extends BaseController { | |||||
if(!encryptPassword.equals(basicInfo.getPassword())){ | if(!encryptPassword.equals(basicInfo.getPassword())){ | ||||
return new ResultData(ErrorCode.USER_PASSWD_ERR.getCode(), "手机号或密码错误"); | return new ResultData(ErrorCode.USER_PASSWD_ERR.getCode(), "手机号或密码错误"); | ||||
} | } | ||||
int status = Integer.parseInt(map.get("status")); | int status = Integer.parseInt(map.get("status")); | ||||
if (status==0){ | 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){ | if (status==-1){ | ||||
wxCUserBasicInfoService.updateCode(basicInfo.getId(),null); | |||||
wxCLiveUserBasicInfoService.updateCode(basicInfo.getId(),null); | |||||
basicInfo.setStatus(-2); | basicInfo.setStatus(-2); | ||||
return new ResultData(ErrorCode.USER_CANCEL_MCODE.getCode(),"设备已注销"); | return new ResultData(ErrorCode.USER_CANCEL_MCODE.getCode(),"设备已注销"); | ||||
} | } | ||||
basicInfo =wxCUserBasicInfoService.getById1(basicInfo.getId()); | |||||
wxCUserBasicInfoService.handleLoginUser(basicInfo); | wxCUserBasicInfoService.handleLoginUser(basicInfo); | ||||
WxCUserBasicInfo basicLiveInfo =wxCLiveUserBasicInfoService.getById(basicInfo.getId()); | |||||
Map<String,Object> resultMap = new HashMap(); | Map<String,Object> resultMap = new HashMap(); | ||||
// resultMap.put("phone", basicInfo.getPhone()); | // resultMap.put("phone", basicInfo.getPhone()); | ||||
Map<String,Object> data = new HashMap(); | Map<String,Object> data = new HashMap(); | ||||
data.put("status",basicInfo.getStatus()); | 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("current_time",new Date(System.currentTimeMillis()/1000)); | ||||
data.put("expire_time",basicInfo.getExpireTime().getTime()/1000); | |||||
data.put("expire_time",basicLiveInfo.getExpireTime().getTime()/1000); | |||||
Map<String,Object> info = new HashMap(); | Map<String,Object> info = new HashMap(); | ||||
info.put("log_id",basicInfo.getId()); | info.put("log_id",basicInfo.getId()); | ||||
info.put("username",basicInfo.getPhone()); | info.put("username",basicInfo.getPhone()); | ||||
@@ -199,7 +201,7 @@ public class WxUserGrantController extends BaseController { | |||||
resultMap.put("info",info); | resultMap.put("info",info); | ||||
// resultMap.put("expire_time", basicInfo.getExpireTime()); | |||||
// resultMap.put("expire_time", basicInfo.getExpireTime()); | |||||
return new ResultData(resultMap); | return new ResultData(resultMap); | ||||
} | } | ||||
@@ -11,7 +11,7 @@ import lombok.ToString; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Date; | import java.util.Date; | ||||
@TableName(value = "wx_c_avatar") | |||||
@TableName(value ="wx_c_avatar") | |||||
@Data | @Data | ||||
@ToString(callSuper = true) | @ToString(callSuper = true) | ||||
@EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
@@ -26,6 +26,8 @@ public class WxCVideoTable extends TenantEntityWithoutFinalTenantId { | |||||
@TableField(exist = false) | @TableField(exist = false) | ||||
private ArrayList<WxCVideoTable> authorList; | private ArrayList<WxCVideoTable> authorList; | ||||
//public class Author extends TenantEntityWithoutFinalTenantId{ | |||||
@io.swagger.annotations.ApiModelProperty(value="数字人id",name="id") | @io.swagger.annotations.ApiModelProperty(value="数字人id",name="id") | ||||
private int id; | private int id; | ||||
@io.swagger.annotations.ApiModelProperty(value="数字人名称",name="name") | @io.swagger.annotations.ApiModelProperty(value="数字人名称",name="name") | ||||
@@ -40,6 +42,7 @@ public class WxCVideoTable extends TenantEntityWithoutFinalTenantId { | |||||
@io.swagger.annotations.ApiModelProperty(value="数字人样例视频链接",name="demo") | @io.swagger.annotations.ApiModelProperty(value="数字人样例视频链接",name="demo") | ||||
private String demo; | private String demo; | ||||
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="preInfo") | @io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="preInfo") | ||||
private String preinfo; | |||||
private String preInfo; | |||||
// } | |||||
} | } |
@@ -66,8 +66,8 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S | |||||
long getTotalCreditAmount(@Param("tenantId")String tenantId, @Param("finalTenantId")String finalTenantId); | long getTotalCreditAmount(@Param("tenantId")String tenantId, @Param("finalTenantId")String finalTenantId); | ||||
WxCUserBasicInfo selectById1(Long id); | |||||
//WxCUserBasicInfo selectById1(Long id); | |||||
void updateCode(Long id, String mcode); | |||||
//void updateCode(Long id, String mcode); | |||||
} | } | ||||
@@ -3,7 +3,10 @@ package com.iformall.mapper; | |||||
import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
import com.iformall.domain.po.WxCUserTags; | import com.iformall.domain.po.WxCUserTags; | ||||
import com.iformall.domain.po.WxCVideoTable; | import com.iformall.domain.po.WxCVideoTable; | ||||
import org.apache.ibatis.annotations.Param; | |||||
public interface WxCVideoMapper extends CommonMapper<WxCVideoTable, String> { | |||||
WxCVideoTable findByUserName(@Param("username") String username); | |||||
public interface WxCVideoMapper extends CommonMapper<WxCUserTags, String> { | |||||
WxCVideoTable findByUserName(String username); | |||||
} | } |
@@ -201,9 +201,9 @@ public interface WxCUserBasicInfoService { | |||||
void updUserInfo(WxCUserBasicInfo cUser, Long memberId); | 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); | |||||
} | } | ||||
@@ -629,7 +629,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
@Override | @Override | ||||
public PageInfo<WxCUserBasicInfo> listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxCUserBasicInfo> 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 | @Override | ||||
@@ -666,7 +667,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
WxCUserBasicInfo basicQ = new WxCUserBasicInfo(); | WxCUserBasicInfo basicQ = new WxCUserBasicInfo(); | ||||
basicQ.setFinalTenantId(tenantEntity.getFinalTenantId()); | basicQ.setFinalTenantId(tenantEntity.getFinalTenantId()); | ||||
basicQ.setPhone(phone); | basicQ.setPhone(phone); | ||||
List<WxCUserBasicInfo> basicInfos = wxCUserBasicInfoMapper.selectList(new QueryWrapper(basicQ)); | |||||
List<WxCUserBasicInfo> basicInfos = wxCUserBasicInfoMapper.selectList( | |||||
new QueryWrapper(basicQ)); | |||||
if (basicInfos != null && basicInfos.size() > 0) { | if (basicInfos != null && basicInfos.size() > 0) { | ||||
WxCUserBasicInfo wxCUserBasicInfo = basicInfos.get(0); | WxCUserBasicInfo wxCUserBasicInfo = basicInfos.get(0); | ||||
if (wxCUserBasicInfo.getPoins() != null) { | if (wxCUserBasicInfo.getPoins() != null) { | ||||
@@ -953,16 +955,16 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
update(info); | 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 | @Override | ||||
@@ -1,13 +1,33 @@ | |||||
package com.iformall.service.impl; | 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.po.WxCVideoTable; | ||||
import com.iformall.domain.vo.WxCUserBasicInfoVo; | |||||
import com.iformall.mapper.WxCUserBasicInfoMapper; | |||||
import com.iformall.mapper.WxCVideoMapper; | import com.iformall.mapper.WxCVideoMapper; | ||||
import com.iformall.service.WxCUserTagsService; | |||||
import com.iformall.service.WxCVideoService; | import com.iformall.service.WxCVideoService; | ||||
import org.slf4j.Logger; | |||||
import org.slf4j.LoggerFactory; | |||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import java.util.stream.Collectors; | |||||
@Service | @Service | ||||
public class WxCVideoServiceImpl implements WxCVideoService { | |||||
public class WxCVideoServiceImpl implements WxCVideoService,IExcelExportServer { | |||||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
@Autowired | |||||
WxCUserBasicInfoMapper wxCUserBasicInfoMapper; | |||||
@Autowired | |||||
WxCUserTagsService wxCUserTagsService; | |||||
@Autowired | @Autowired | ||||
WxCVideoMapper wxCVideoMapper; | WxCVideoMapper wxCVideoMapper; | ||||
@Override | @Override | ||||
@@ -15,4 +35,58 @@ public class WxCVideoServiceImpl implements WxCVideoService { | |||||
WxCVideoTable TemplateVideo = wxCVideoMapper.findByUserName(username); | WxCVideoTable TemplateVideo = wxCVideoMapper.findByUserName(username); | ||||
return TemplateVideo; | return TemplateVideo; | ||||
} | } | ||||
@Override | |||||
public List<Object> selectListForExcelExport(Object queryParams, int page) { | |||||
WxCUserBasicInfo basicInfo = (WxCUserBasicInfo) queryParams; | |||||
List<WxCUserBasicInfoVo> list = new ArrayList<WxCUserBasicInfoVo>(); | |||||
basicInfo.setBegin((page-1)*20000); | |||||
basicInfo.setLimit(20000); | |||||
list = wxCUserBasicInfoMapper.findVoList(basicInfo); | |||||
if (null == list || list.size() <= 0 ) { | |||||
return null; | |||||
} | |||||
// List<Long> 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<WxCreditHistory> chadds = creditHistoryMapper.findAddList(chaddq); | |||||
// Map<Long, Integer> 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<WxCreditHistory> chless = creditHistoryMapper.findLesList(chlesq); | |||||
// Map<Long, Integer> chlesMap = new HashMap<>(); | |||||
// if(null != chless){ | |||||
// chlesMap = chless.stream().collect(Collectors.toMap(WxCreditHistory::getCUserId, WxCreditHistory::getCreditNum)); | |||||
// } | |||||
//处理会员标签 | |||||
List<Long> tagIds = list.stream().map(cc -> cc.getTagId()).collect(Collectors.toList()); | |||||
Map<Long, String> 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<Object> retList = new ArrayList<Object>(); | |||||
retList.addAll(list); | |||||
return retList; | |||||
} | |||||
return null; | |||||
} | |||||
} | } |
@@ -138,11 +138,7 @@ | |||||
from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
where wcubi.id =#{id} | where wcubi.id =#{id} | ||||
</select> | </select> | ||||
<select id="selectById1" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||||
select <include refid="allColumns1"/> | |||||
from wx_c_user_basic_info2 wcubi1 join wx_c_user_basic_info wcubi | |||||
on wcubi.id =#{id} | |||||
</select> | |||||
<select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | ||||
select | select | ||||
@@ -162,7 +158,7 @@ | |||||
</foreach> | </foreach> | ||||
</if> | </if> | ||||
</select> | </select> | ||||
<select id="findIdList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultType="Long"> | <select id="findIdList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultType="Long"> | ||||
select id | select id | ||||
from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
@@ -587,7 +583,5 @@ | |||||
<update id="cuserOldToNew" statementType="CALLABLE" > | <update id="cuserOldToNew" statementType="CALLABLE" > | ||||
{call cuser_old_to_new(#{oldCuserId},#{newCuserId},#{tableIndex},#{finalTableIndex})} | {call cuser_old_to_new(#{oldCuserId},#{newCuserId},#{tableIndex},#{finalTableIndex})} | ||||
</update> | </update> | ||||
<update id="updateCode"> | |||||
update wx_c_user_basic_info2 set code = #{mcode} where id = #{id} | |||||
</update> | |||||
</mapper> | </mapper> |
@@ -1,27 +0,0 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
<mapper namespace="com.iformall.mapper.WxCVideoMapper"> | |||||
<!--<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCVideoTable"> | |||||
<id column="avatar_id" jdbcType="INTEGER" property="id"/> | |||||
<result column="username" jdbcType="VARCHAR" property="userName"/> | |||||
<result column="avatar_name" jdbcType="VARCHAR" property="name"/> | |||||
<result column="avatar_image" jdbcType="VARCHAR" property="image"/> | |||||
<result column="avatar_demo" jdbcType="INTEGER" property="demo"/> | |||||
<result column="avatar_pre_info" jdbcType="VARCHAR" property="preInfo"/> | |||||
<result column="expire_time" jdbcType="VARCHAR" property="expireTime"/> | |||||
</resultMap>--> | |||||
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCVideoTable"> | |||||
<id column="id" jdbcType="INTEGER" property="id"/> | |||||
<result column="user_name" jdbcType="VARCHAR" property="userName"/> | |||||
<result column="name" jdbcType="VARCHAR" property="name"/> | |||||
<result column="image" jdbcType="VARCHAR" property="image"/> | |||||
<result column="demo" jdbcType="INTEGER" property="demo"/> | |||||
<result column="preinfo" jdbcType="VARCHAR" property="preinfo"/> | |||||
<result column="expire_time" jdbcType="VARCHAR" property="expireTime"/> | |||||
</resultMap> | |||||
<select id="findByUserName" resultType="com.iformall.domain.po.WxCVideoTable"> | |||||
</select> | |||||
</mapper> |
@@ -0,0 +1,27 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
<mapper namespace="com.iformall.mapper.WxCVideoMapper"> | |||||
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCVideoTable"> | |||||
<id column="id" jdbcType="INTEGER" property="id"/> | |||||
<result column="user_name" jdbcType="VARCHAR" property="userName"/> | |||||
<result column="name" jdbcType="VARCHAR" property="name"/> | |||||
<result column="image" jdbcType="VARCHAR" property="image"/> | |||||
<result column="demo" jdbcType="INTEGER" property="demo"/> | |||||
<result column="preinfo" jdbcType="VARCHAR" property="preInfo"/> | |||||
<result column="expire_time" jdbcType="VARCHAR" property="expireTime"/> | |||||
</resultMap> | |||||
<select id="findByUserName" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||||
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 ) | |||||
</select> | |||||
</mapper> |