Selaa lähdekoodia

//MouldPatch

private_deployment
xhxu 2 vuotta sitten
vanhempi
commit
b39cff1e88
8 muutettua tiedostoa jossa 263 lisäystä ja 10 poistoa
  1. +4
    -3
      suimangService/src/main/java/com/iformall/domain/po/WxCUserBasicInfo.java
  2. +4
    -4
      suimangService/src/main/java/com/iformall/domain/po/sm/MouldPatch.java
  3. +75
    -0
      suimangService/src/main/java/com/iformall/domain/po/sm/UserMouldVideo.java
  4. +50
    -0
      suimangService/src/main/java/com/iformall/enums/EnumMouldVideoType.java
  5. +22
    -0
      suimangService/src/main/java/com/iformall/mapper/UserMouldVideoMapper.java
  6. +1
    -1
      suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  7. +2
    -2
      suimangService/src/main/resources/mapper/MouldPatchMapper.xml
  8. +105
    -0
      suimangService/src/main/resources/mapper/UserMouldVideoMapper.xml

+ 4
- 3
suimangService/src/main/java/com/iformall/domain/po/WxCUserBasicInfo.java Näytä tiedosto

@@ -159,11 +159,12 @@ public class WxCUserBasicInfo extends TenantEntityWithoutFinalTenantId {
private Integer status;

/*用户登录用token**/
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="用户登录用token",name="token")
protected String token;
/*用户过期时间**/
@io.swagger.annotations.ApiModelProperty(value="用户过期时间",name="expireTime")
protected Date expireTime;
// @io.swagger.annotations.ApiModelProperty(value="用户过期时间",name="expireTime")
// protected Date expireTime;

@TableField(exist = false)
@Excel(name="标签",width = 50,orderNum = "15")
@@ -257,7 +258,7 @@ public class WxCUserBasicInfo extends TenantEntityWithoutFinalTenantId {
//生成一个token
this.setToken(UUID.randomUUID().toString());
//过期时间
this.setExpireTime(new Date(currentDate.getTime() + Constant.EXPIRE));
// this.setExpireTime(new Date(currentDate.getTime() + Constant.EXPIRE));

return this.getToken();
}


+ 4
- 4
suimangService/src/main/java/com/iformall/domain/po/sm/MouldPatch.java Näytä tiedosto

@@ -32,12 +32,12 @@ public class MouldPatch extends TenantEntity {
private String priceStr;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="查询-起始时间",name="startdate")
private Date startdate;
@io.swagger.annotations.ApiModelProperty(value="查询-起始时间",name="startDate")
private Date startDate;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate")
private Date enddate;
@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="endDate")
private Date endDate;

@io.swagger.annotations.ApiModelProperty(value="EnumMouldPatchType",name="type")
private Integer type;


+ 75
- 0
suimangService/src/main/java/com/iformall/domain/po/sm/UserMouldVideo.java Näytä tiedosto

@@ -0,0 +1,75 @@
package com.iformall.domain.po.sm;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.common.SortColumn;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@TableName(value = "user_mould_video")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class UserMouldVideo extends TenantEntity {

protected Long id;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="查询-起始时间",name="startDate")
private Date startDate;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="endDate")
private Date endDate;

@io.swagger.annotations.ApiModelProperty(value="用户Id",name="userId")
private Long userId;

@io.swagger.annotations.ApiModelProperty(value="EnumMouldVideoType",name="type")
private Integer type;
@io.swagger.annotations.ApiModelProperty(value="人物模板ID",name="personMouldId")
private Long personMouldId;
@io.swagger.annotations.ApiModelProperty(value="人物模板文件",name="personMouldPath")
private String personMouldPath;
@io.swagger.annotations.ApiModelProperty(value="声音模板ID",name="voiceMouldId")
private Long voiceMouldId;
@io.swagger.annotations.ApiModelProperty(value="声音模板文件",name="voiceMouldPath")
private String voiceMouldPath;
@io.swagger.annotations.ApiModelProperty(value="文案",name="paperwork")
private String paperwork;
@io.swagger.annotations.ApiModelProperty(value="背景模板ID",name="backgroundMouldId")
private String backgroundMouldId;
@io.swagger.annotations.ApiModelProperty(value="背景模板文件",name="backgroundMouldPath")
private String backgroundMouldPath;

@io.swagger.annotations.ApiModelProperty(value="名称",name="title")
private String title;

@io.swagger.annotations.ApiModelProperty(value="备注",name="remark")
private String remark;

@io.swagger.annotations.ApiModelProperty(value="视频文件",name="videoId")
private String videoId;
@io.swagger.annotations.ApiModelProperty(value="",name="videoPath")
private String videoPath;
@io.swagger.annotations.ApiModelProperty(value="视频时长",name="videoTime")
private Integer videoTime;

@io.swagger.annotations.ApiModelProperty(value="生成视频时间",name="createVideoDate")
private Date createVideoDate;
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
private Date updateDate;

}

+ 50
- 0
suimangService/src/main/java/com/iformall/enums/EnumMouldVideoType.java Näytä tiedosto

@@ -0,0 +1,50 @@
package com.iformall.enums;

import java.util.ArrayList;
import java.util.List;

/**
*
*/
public enum EnumMouldVideoType {

// 1:固定模板,2:自建模板,

sys_mould(1, "固定模板"),
user_mould(2, "自建模板"),
;

public static EnumMouldVideoType getEnum(Integer code) {
for (EnumMouldVideoType value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

public static List<Integer> getAllCodes(){
List<Integer> codes = new ArrayList<>();
for (EnumMouldVideoType value : values()) {
codes.add(value.getCode());
}
return codes;
}

private Integer code;
private String message;

EnumMouldVideoType(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}

}

+ 22
- 0
suimangService/src/main/java/com/iformall/mapper/UserMouldVideoMapper.java Näytä tiedosto

@@ -0,0 +1,22 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.sm.UserMouldVideo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMouldVideoMapper extends CommonMapper<UserMouldVideo, Long> {

List<UserMouldVideo> findList(UserMouldVideo record);
int deleteById(@Param("id")Long id);

/**
* c端列表查询,尽量减少字段
* @param record
* @return
*/
List<UserMouldVideo> findCList(UserMouldVideo record);

}

+ 1
- 1
suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Näytä tiedosto

@@ -785,7 +785,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc
wxCUserBasicInfoMapper.updateById(basicInfoUpd);

basicInfo.setToken(basicInfoUpd.getToken());
basicInfo.setExpireTime(basicInfoUpd.getExpireTime());
// basicInfo.setExpireTime(basicInfoUpd.getExpireTime());
basicInfo.setLoginCount(basicInfoUpd.getLoginCount());
basicInfo.setActiveTime(basicInfoUpd.getActiveTime());
basicInfo.setUpdateDate(basicInfoUpd.getUpdateDate());


+ 2
- 2
suimangService/src/main/resources/mapper/MouldPatchMapper.xml Näytä tiedosto

@@ -91,8 +91,8 @@
and `status` = #{status}
</if>

<if test=" null != startdate and null!=enddate">
and `create_date` between #{startdate} and #{enddate}
<if test=" null != startDate and null!=endDate">
and `create_date` between #{startDate} and #{endDate}
</if>

<if test=" null != ids ">


+ 105
- 0
suimangService/src/main/resources/mapper/UserMouldVideoMapper.xml Näytä tiedosto

@@ -0,0 +1,105 @@
<?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.UserMouldVideoMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.UserMouldVideo">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
<result column="user_id" jdbcType="BIGINT" property="userId"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="person_mould_id" jdbcType="BIGINT" property="personMouldId"/>
<result column="person_mould_path" jdbcType="VARCHAR" property="personMouldPath"/>
<result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/>
<result column="voice_mould_path" jdbcType="VARCHAR" property="voiceMouldPath"/>
<result column="paperwork" jdbcType="VARCHAR" property="paperwork"/>
<result column="background_mould_id" jdbcType="BIGINT" property="backgroundMouldId"/>
<result column="background_mould_path" jdbcType="VARCHAR" property="backgroundMouldPath"/>
<result column="title" jdbcType="VARCHAR" property="title"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="video_id" jdbcType="VARCHAR" property="videoId"/>
<result column="video_path" jdbcType="VARCHAR" property="videoPath"/>
<result column="video_time" jdbcType="INTEGER" property="videoTime"/>
<result column="create_video_date" jdbcType="TIMESTAMP" property="createVideoDate"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
</resultMap>

<sql id="allColumns">
`id`, `tenant_id`, `parent_tenant_id`, `user_id`, `type`,
`person_mould_id`, `person_mould_path`, `voice_mould_id`, `voice_mould_path`, `paperwork`, `background_mould_id`, `background_mould_path`,
`title`, `remark`, `video_id`, `video_path`, `video_time`, `create_video_date`, `create_date`, `update_date`
</sql>

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

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

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != userId ">
and `user_id` = #{userId}
</if>

<if test=" null != type ">
and `type` = #{type}
</if>

<if test=" null != personMouldId ">
and `person_mould_id` = #{personMouldId}
</if>

<if test=" null != voiceMouldId ">
and `voice_mould_id` = #{voiceMouldId}
</if>

<if test=" null != backgroundMouldId ">
and `background_mould_id` = #{backgroundMouldId}
</if>

<if test=" null != title and ''!=title">
and `title` like concat('%', #{title},'%')
</if>

<if test=" null != startDate and null!=endDate">
and `create_date` between #{startDate} and #{endDate}
</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.UserMouldVideo" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from user_mould_video
<include refid="dynamicWhereConditions"/>
</select>

<delete id="deleteById" parameterType="java.util.HashMap">
update user_mould_video set is_del = 1,update_date = now() where id = #{id}
</delete>

<select id="findCList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
select
`id`, `type`,
`paperwork`,
`title`, `remark`, `video_id`, `video_path`, `video_time`, `create_video_date`, `create_date`, `update_date`
from user_mould_video
<include refid="dynamicWhereConditions"/>
</select>

</mapper>

Ladataan…
Peruuta
Tallenna