소스 검색

慧播用户注册初始化

master
winter 1 년 전
부모
커밋
458bdb4b7a
4개의 변경된 파일64개의 추가작업 그리고 4개의 파일을 삭제
  1. +4
    -0
      suimangService/src/main/java/com/iformall/domain/po/sm/VoiceInfo.java
  2. +1
    -0
      suimangService/src/main/java/com/iformall/mapper/VoiceMapper.java
  3. +5
    -4
      suimangService/src/main/java/com/iformall/service/impl/WxCUserLiveBasicInfoServiceImpl.java
  4. +54
    -0
      suimangService/src/main/resources/mapper/VoiceMapper.xml

+ 4
- 0
suimangService/src/main/java/com/iformall/domain/po/sm/VoiceInfo.java 파일 보기

@@ -21,6 +21,10 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
public class VoiceInfo extends TenantEntity {
/**
*
*/
private static final long serialVersionUID = 1944052493883601983L;
/**
* 主键ID
*/
private Long id;


+ 1
- 0
suimangService/src/main/java/com/iformall/mapper/VoiceMapper.java 파일 보기

@@ -9,5 +9,6 @@ import java.util.List;

public interface VoiceMapper extends CommonMapper<VoiceInfo, String> {
void saveBatch(@Param("list") List<VoiceInfo> list);
List<VoiceInfo> findList(VoiceInfo voiceInfo);
}


+ 5
- 4
suimangService/src/main/java/com/iformall/service/impl/WxCUserLiveBasicInfoServiceImpl.java 파일 보기

@@ -7,6 +7,7 @@ import com.iformall.domain.po.WxCAvatar;
import com.iformall.domain.po.WxCUserBasicInfo;
import com.iformall.domain.po.WxCUserLiveBasicInfo;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.sm.VoiceInfo;
import com.iformall.domain.po.sm.VoiceLanguage;
import com.iformall.enums.sm.EnumWxCAuthorType;
import com.iformall.mapper.*;
@@ -42,7 +43,7 @@ public class WxCUserLiveBasicInfoServiceImpl implements WxCUserLiveBasicInfoServ
SysConfigService sysConfigService;
@Autowired
VoiceLanguageMapper voiceLanguageMapper;
VoiceMapper voiceMapper;

@Override
public void regeister(WxCUserBasicInfo wxCUserBasicInfo) {
@@ -84,10 +85,10 @@ public class WxCUserLiveBasicInfoServiceImpl implements WxCUserLiveBasicInfoServ
for (String _v : _vs) {
vss.add(Long.parseLong(_v));
}
VoiceLanguage vq = new VoiceLanguage();
VoiceInfo vq = new VoiceInfo();
vq.setIds(vss);
List<VoiceLanguage> vlist = voiceLanguageMapper.findList(vq);
for (VoiceLanguage v : vlist) {
List<VoiceInfo> vlist = voiceMapper.findList(vq);;
for (VoiceInfo v : vlist) {
WxCAuthor author = new WxCAuthor();
author.setUserId(wxCUserBasicInfo.getId());
author.setUserName(wxCUserBasicInfo.getPhone());


+ 54
- 0
suimangService/src/main/resources/mapper/VoiceMapper.xml 파일 보기

@@ -1,6 +1,60 @@
<?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.VoiceMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.VoiceInfo">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="language_id" jdbcType="BIGINT" property="languageId"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="sex" jdbcType="INTEGER" property="sex"/>
<result column="age_type" jdbcType="INTEGER" property="ageType"/>
<result column="display_name" jdbcType="VARCHAR" property="displayName"/>
<result column="local_name" jdbcType="VARCHAR" property="localName"/>
<result column="mould_sm_id" jdbcType="VARCHAR" property="mouldSmId"/>
<result column="sample_rate_hertz" jdbcType="VARCHAR" property="sampleRateHertz"/>
<result column="words_per_minute" jdbcType="VARCHAR" property="wordsPerMinute"/>
<result column="voice_type" jdbcType="VARCHAR" property="voiceType"/>
<result column="style_list" jdbcType="VARCHAR" property="styleList"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="is_del" jdbcType="INTEGER" property="isDel"/>
</resultMap>

<sql id="allColumns">
id,language_id,tenant_id,parent_tenant_id,sex,age_type,display_name,local_name,mould_sm_id,sample_rate_hertz,
words_per_minute,voice_type,style_list,create_date,update_date,is_del
</sql>

<sql id="dynamicWhereConditions">
where is_del = 0

<if test=" null != id ">
and `id` = #{id}
</if>
<if test=" null != languageId ">
and `language_id` = #{languageId}
</if>

<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>

<if test=" null != sortColumns">order by ${sortColumns}</if>

</sql>


<select id="findList" parameterType="com.iformall.domain.po.sm.VoiceInfo" resultMap="BaseResultMap">
select <include refid="allColumns"/>
from voice_info
<include refid="dynamicWhereConditions"/>
</select>


<insert id="saveBatch" parameterType="java.util.List">
INSERT INTO voice_info (`id`, `language_id`, `sex`,
`display_name`, `local_name`, `mould_sm_id`,


불러오는 중...
취소
저장