Author | SHA1 | Message | Date |
---|---|---|---|
|
efec41093a | Merge branch 'photo' of https://git.malls.iformall.com/suimang/suimangServer into photo | 1 year ago |
|
81075d0773 | //level | 1 year ago |
|
ec361fd62a | //video | 1 year ago |
@@ -0,0 +1,29 @@ | |||||
package com.iformall.controller; | |||||
import com.github.pagehelper.PageInfo; | |||||
import com.iformall.common.ErrorCode; | |||||
import com.iformall.common.ResultData; | |||||
import com.iformall.domain.po.UserBasicFrom; | |||||
import com.iformall.domain.po.base.BaseEntity; | |||||
import com.iformall.service.UserBasicFromService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiImplicitParam; | |||||
import io.swagger.annotations.ApiImplicitParams; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.slf4j.Logger; | |||||
import org.slf4j.LoggerFactory; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.ModelAttribute; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
@RestController | |||||
@RequestMapping("/api/levelPackage") | |||||
@Api(description = "查套餐") | |||||
public class LevelPackageController extends BaseController { | |||||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
} |
@@ -23,6 +23,9 @@ public class Product extends TenantEntity { | |||||
@io.swagger.annotations.ApiModelProperty(value="EnumProductType",name="type") | @io.swagger.annotations.ApiModelProperty(value="EnumProductType",name="type") | ||||
private Integer type; | private Integer type; | ||||
@io.swagger.annotations.ApiModelProperty(value="",name="extraId") | |||||
private Long extraId; | |||||
@io.swagger.annotations.ApiModelProperty(value="",name="coverImg") | @io.swagger.annotations.ApiModelProperty(value="",name="coverImg") | ||||
private String coverImg; | private String coverImg; | ||||
@io.swagger.annotations.ApiModelProperty(value="标题",name="title") | @io.swagger.annotations.ApiModelProperty(value="标题",name="title") | ||||
@@ -49,6 +49,8 @@ public class WxCVideoTable extends TenantEntityWithoutFinalTenantId { | |||||
private String modelMd5; | private String modelMd5; | ||||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板预处理信息md文件校验码", name = "preinfo_md5") | @io.swagger.annotations.ApiModelProperty(value = "数字人模板预处理信息md文件校验码", name = "preinfo_md5") | ||||
private String preInfoMd5; | private String preInfoMd5; | ||||
@io.swagger.annotations.ApiModelProperty(value = "", name = "mask") | |||||
private String mask; | |||||
} | } |
@@ -7,6 +7,8 @@ package com.iformall.enums; | |||||
public enum EnumProject { | public enum EnumProject { | ||||
PROJECT_0(0,"通用"),//直播 | |||||
PROJECT_1(1,"邃芒慧播"),//直播 | PROJECT_1(1,"邃芒慧播"),//直播 | ||||
PROJECT_2(2,"邃芒慧影"),//数字人视频 | PROJECT_2(2,"邃芒慧影"),//数字人视频 | ||||
PROJECT_3(3,"邃芒慧语"),//照片说话 | PROJECT_3(3,"邃芒慧语"),//照片说话 | ||||
@@ -11,6 +11,6 @@ public interface WxCVideoMapper extends CommonMapper<WxCVideoTable, String> { | |||||
List<WxCVideoTable> getById(Long id); | List<WxCVideoTable> getById(Long id); | ||||
WxCVideoTable selectOne(Long id, long resource_id); | WxCVideoTable selectOne(Long id, long resource_id); | ||||
} | } |
@@ -53,23 +53,28 @@ public class WxCVideoServiceImpl implements WxCVideoService, IExcelExportServer | |||||
avatar.put("avatar_image", wxCVideoTable.getImage()); | avatar.put("avatar_image", wxCVideoTable.getImage()); | ||||
avatar.put("avatar_demo", wxCVideoTable.getDemo()); | avatar.put("avatar_demo", wxCVideoTable.getDemo()); | ||||
avatar.put("avatar_model", wxCVideoTable.getModel()); | avatar.put("avatar_model", wxCVideoTable.getModel()); | ||||
avatar.put("avatar_model_md5", wxCVideoTable.getModelMd5()); | |||||
avatar.put("avatar_preinfo_md5", wxCVideoTable.getPreInfoMd5()); | |||||
//模板文件和预处理信息存放问题 | //模板文件和预处理信息存放问题 | ||||
try { | |||||
File modelFile = new File(wxCVideoTable.getModelPath()); | |||||
avatar.put("avatar_model_md5", getFileMD5(modelFile)); | |||||
} catch (Exception e) { | |||||
e.printStackTrace(); | |||||
avatar.put("avatar_model_md5", wxCVideoTable.getModelMd5()); | |||||
} | |||||
// try { | |||||
// File modelFile = new File(wxCVideoTable.getModelPath()); | |||||
// avatar.put("avatar_model_md5", getFileMD5(modelFile)); | |||||
// } catch (Exception e) { | |||||
// e.printStackTrace(); | |||||
// avatar.put("avatar_model_md5", wxCVideoTable.getModelMd5()); | |||||
// } | |||||
// | |||||
// try { | |||||
// File preinfoFile = new File(wxCVideoTable.getPreInfoPath()); | |||||
// avatar.put("avatar_preinfo_md5", getFileMD5(preinfoFile)); | |||||
// } catch (Exception e) { | |||||
// e.printStackTrace(); | |||||
// avatar.put("avatar_preinfo_md5", wxCVideoTable.getPreInfoMd5()); | |||||
// } | |||||
try { | |||||
File preinfoFile = new File(wxCVideoTable.getPreInfoPath()); | |||||
avatar.put("avatar_preinfo_md5", getFileMD5(preinfoFile)); | |||||
} catch (Exception e) { | |||||
e.printStackTrace(); | |||||
avatar.put("avatar_preinfo_md5", wxCVideoTable.getPreInfoMd5()); | |||||
} | |||||
avatar.put("avatar_preinfo", wxCVideoTable.getPreInfo()); | avatar.put("avatar_preinfo", wxCVideoTable.getPreInfo()); | ||||
avatar.put("mask", wxCVideoTable.getMask()); | |||||
avatar.put("expire_time", wxCVideoTable.getExpireTime().getTime() / 1000); | avatar.put("expire_time", wxCVideoTable.getExpireTime().getTime() / 1000); | ||||
avatar.put("class", wxCVideoTable.getClassType()); | avatar.put("class", wxCVideoTable.getClassType()); | ||||
authorlist.add(avatar); | authorlist.add(avatar); | ||||
@@ -0,0 +1,10 @@ | |||||
package com.iformall.service.sm; | |||||
import java.util.List; | |||||
public interface LevelPackageService { | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.iformall.service.sm.impl; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.iformall.domain.po.sm.UserConsumptionPackage; | |||||
import com.iformall.domain.po.sm.UserPackageDetail; | |||||
import com.iformall.enums.EnumYesOrNo; | |||||
import com.iformall.enums.sm.*; | |||||
import com.iformall.mapper.UserConsumptionPackageMapper; | |||||
import com.iformall.service.sm.LevelPackageService; | |||||
import com.iformall.service.sm.UserConsumptionPackageService; | |||||
import com.iformall.service.sm.UserPackageDetailService; | |||||
import org.apache.commons.collections.CollectionUtils; | |||||
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; | |||||
@Service | |||||
public class LevelPackageServiceImpl implements LevelPackageService { | |||||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
} |
@@ -7,6 +7,7 @@ | |||||
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | ||||
<result column="project_type" jdbcType="INTEGER" property="projectType" /> | <result column="project_type" jdbcType="INTEGER" property="projectType" /> | ||||
<result column="type" jdbcType="INTEGER" property="type" /> | <result column="type" jdbcType="INTEGER" property="type" /> | ||||
<result column="extra_id" jdbcType="BIGINT" property="extraId" /> | |||||
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> | <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> | ||||
<result column="title" jdbcType="VARCHAR" property="title"/> | <result column="title" jdbcType="VARCHAR" property="title"/> | ||||
<result column="en_title" jdbcType="VARCHAR" property="enTitle"/> | <result column="en_title" jdbcType="VARCHAR" property="enTitle"/> | ||||
@@ -21,7 +22,7 @@ | |||||
</resultMap> | </resultMap> | ||||
<sql id="allColumns"> | <sql id="allColumns"> | ||||
`id`,`tenant_id`,`parent_tenant_id`,`project_type`,`type`, | |||||
`id`,`tenant_id`,`parent_tenant_id`,`project_type`,`type`,`extra_id`, | |||||
`cover_img`,`title`,`en_title`,`glod`,`detail`, | `cover_img`,`title`,`en_title`,`glod`,`detail`, | ||||
`price_dollar`,`sell_price_dollar`,`price_rmb`,`sell_price_rmb`, | `price_dollar`,`sell_price_dollar`,`price_rmb`,`sell_price_rmb`, | ||||
`create_date`,`update_date` | `create_date`,`update_date` | ||||
@@ -14,6 +14,7 @@ | |||||
<result column="class" jdbcType="VARCHAR" property="classType"/> | <result column="class" jdbcType="VARCHAR" property="classType"/> | ||||
<result column="preinfo" jdbcType="VARCHAR" property="preInfo"/> | <result column="preinfo" jdbcType="VARCHAR" property="preInfo"/> | ||||
<result column="preinfo_md5" jdbcType="VARCHAR" property="preInfoMd5"/> | <result column="preinfo_md5" jdbcType="VARCHAR" property="preInfoMd5"/> | ||||
<result column="mask" jdbcType="VARCHAR" property="mask"/> | |||||
<result column="preinfo_path" jdbcType="VARCHAR" property="preInfoPath"/> | <result column="preinfo_path" jdbcType="VARCHAR" property="preInfoPath"/> | ||||
<result column="expire_time" jdbcType="VARCHAR" property="expireTime"/> | <result column="expire_time" jdbcType="VARCHAR" property="expireTime"/> | ||||
@@ -27,7 +28,7 @@ | |||||
</resultMap>--> | </resultMap>--> | ||||
<select id="getById" resultMap="BaseResultMap"> | <select id="getById" resultMap="BaseResultMap"> | ||||
SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | ||||
,wcav.class,wcav.model_path,wcav.preinfo_path,wcav.model_md5,wcav.preinfo_md5 | |||||
,wcav.class,wcav.model_path,wcav.preinfo_path,wcav.model_md5,wcav.preinfo_md5,wcav.mask | |||||
from wx_c_author wca | from wx_c_author wca | ||||
left join wx_c_avatar wcav on wcav.id =wca.resource_id | left join wx_c_avatar wcav on wcav.id =wca.resource_id | ||||
where wca.resource_id | where wca.resource_id | ||||
@@ -36,7 +37,7 @@ in (select wca.resource_id from wx_c_author wca WHERE wca.user_id =#{id} AND w | |||||
<select id="selectOne" resultType="com.iformall.domain.po.WxCVideoTable"> | <select id="selectOne" resultType="com.iformall.domain.po.WxCVideoTable"> | ||||
SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | ||||
,wcav.class,wcav.model_path,wcav.preinfo_path | |||||
,wcav.class,wcav.model_path,wcav.preinfo_path,wcav.model_md5,wcav.preinfo_md5,wcav.mask | |||||
from wx_c_author wca | from wx_c_author wca | ||||
left join wx_c_avatar wcav on wcav.id =wca.resource_id | left join wx_c_avatar wcav on wcav.id =wca.resource_id | ||||
where wca.resource_id =#{resource_id} and wca.user_id = #{id} | where wca.resource_id =#{resource_id} and wca.user_id = #{id} | ||||