winter há 1 ano
ascendente
cometimento
2fb8abf0bc
29 ficheiros alterados com 328 adições e 179 eliminações
  1. +7
    -0
      suimangAdmin/src/main/resources/db/migration/V2023110300001_personmould.sql
  2. +3
    -1
      suimangCApi/src/main/java/com/iformall/controller/UserMouldVideoController.java
  3. +7
    -0
      suimangCApi/src/main/java/com/iformall/controller/WxUserGrantController.java
  4. +6
    -1
      suimangService/src/main/java/com/iformall/domain/po/sm/UserMouldVideo.java
  5. +2
    -0
      suimangService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java
  6. +2
    -0
      suimangService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
  7. +3
    -2
      suimangService/src/main/java/com/iformall/service/impl/ProductServiceImpl.java
  8. +5
    -0
      suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  9. +0
    -61
      suimangService/src/main/java/com/iformall/service/payProduct/PayProductFactory.java
  10. +0
    -8
      suimangService/src/main/java/com/iformall/service/payProduct/service/PayProductService.java
  11. +0
    -17
      suimangService/src/main/java/com/iformall/service/payProduct/service/impl/CommonPayProductService.java
  12. +0
    -17
      suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HBPayProductService.java
  13. +0
    -17
      suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HKPayProductService.java
  14. +0
    -18
      suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HYPayProductService.java
  15. +0
    -17
      suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HYuPayProductService.java
  16. +0
    -17
      suimangService/src/main/java/com/iformall/service/payProduct/service/impl/ZXPayProductService.java
  17. +60
    -0
      suimangService/src/main/java/com/iformall/service/project/ProjectFactory.java
  18. +24
    -0
      suimangService/src/main/java/com/iformall/service/project/entity/CreateBilling.java
  19. +20
    -0
      suimangService/src/main/java/com/iformall/service/project/service/ProjectService.java
  20. +11
    -0
      suimangService/src/main/java/com/iformall/service/project/service/impl/BaseProjectService.java
  21. +24
    -0
      suimangService/src/main/java/com/iformall/service/project/service/impl/CommonProjectService.java
  22. +23
    -0
      suimangService/src/main/java/com/iformall/service/project/service/impl/HBProjectService.java
  23. +24
    -0
      suimangService/src/main/java/com/iformall/service/project/service/impl/HKProjectService.java
  24. +30
    -0
      suimangService/src/main/java/com/iformall/service/project/service/impl/HYProjectService.java
  25. +24
    -0
      suimangService/src/main/java/com/iformall/service/project/service/impl/HYuProjectService.java
  26. +24
    -0
      suimangService/src/main/java/com/iformall/service/project/service/impl/ZXProjectService.java
  27. +17
    -0
      suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java
  28. +8
    -3
      suimangService/src/main/resources/mapper/UserMouldVideoMapper.xml
  29. +4
    -0
      suimangService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml

+ 7
- 0
suimangAdmin/src/main/resources/db/migration/V2023110300001_personmould.sql Ver ficheiro

@@ -12,4 +12,11 @@ ALTER TABLE `voice_language`
ADD COLUMN customized_user_id BIGINT(11) COMMENT '私人定制所属用户' AFTER `customized`;


ALTER TABLE `user_mould_video`
ADD COLUMN cost_points int(11) NOT NULL DEFAULT 0 COMMENT '消耗金币' ;
ALTER TABLE `user_mould_video`
ADD COLUMN cost_points_detail varchar(500) COMMENT '消耗金币明细' ;





+ 3
- 1
suimangCApi/src/main/java/com/iformall/controller/UserMouldVideoController.java Ver ficheiro

@@ -13,6 +13,7 @@ import com.iformall.domain.po.sm.UserMouldVideo;
import com.iformall.domain.po.sm.VoiceInfo;
import com.iformall.domain.vo.WxCouponOrderBVo;
import com.iformall.enums.EnumMouldSendType;
import com.iformall.enums.EnumProject;
import com.iformall.enums.EnumVideoStatus;
import com.iformall.enums.EnumaMouldPatchStatus;
import com.iformall.exception.MallinkException;
@@ -153,7 +154,7 @@ public class UserMouldVideoController extends BaseController {
return userMouldVideoService.saveOrUpdate(record);
}

@ApiOperation("生成视频")
@ApiOperation("慧影项目生成视频")
@PostMapping("createVideo")
public ResultData create(@RequestBody UserMouldVideo record) {
logger.debug("[" + getIpAddr() + "] MouldPatchController::saveOrUpdate");
@@ -194,6 +195,7 @@ public class UserMouldVideoController extends BaseController {
mouldVideoUpd.setCreateVideoDate(new Date());
userMouldVideoService.saveOrUpdate(mouldVideoUpd);

userMouldVideoService.createVideo(mouldVideo);

return new ResultData();


+ 7
- 0
suimangCApi/src/main/java/com/iformall/controller/WxUserGrantController.java Ver ficheiro

@@ -793,4 +793,11 @@ public class WxUserGrantController extends BaseController {
return new ResultData(userConsumptionPackageService.getPackageInfo());
}
@ApiOperation("获取用户币值")
@GetMapping("/getUserPoins")
public ResultData getUserPoins() {
WxCUserBasicInfo userBasicInfo = wxCUserBasicInfoService.getById(getMemberId());
return new ResultData(userBasicInfo.getPoins());
}
}

+ 6
- 1
suimangService/src/main/java/com/iformall/domain/po/sm/UserMouldVideo.java Ver ficheiro

@@ -197,7 +197,12 @@ public class UserMouldVideo extends TenantEntity {
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
private Date updateDate;

@io.swagger.annotations.ApiModelProperty(value="消耗金币",name="costPoints")
private Integer costPoints;
@io.swagger.annotations.ApiModelProperty(value="消耗金币明细",name="costPointsDetail")
private String costPointsDetail;
@TableField(exist = false)
private List<Integer> videoStatuss;


+ 2
- 0
suimangService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java Ver ficheiro

@@ -69,5 +69,7 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S
//WxCUserBasicInfo selectById1(Long id);

//void updateCode(Long id, String mcode);
void reductPoints(@Param("id")Long id,@Param("finalTenantId")String finalTenantId,@Param("reductPoints")Integer reductPoints);
}


+ 2
- 0
suimangService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java Ver ficheiro

@@ -205,5 +205,7 @@ public interface WxCUserBasicInfoService {


// void updateCode(Long id, String mcode);
void reducePoints(Long id,String finalTenantId,Integer reducePoints);
}


+ 3
- 2
suimangService/src/main/java/com/iformall/service/impl/ProductServiceImpl.java Ver ficheiro

@@ -6,7 +6,8 @@ import com.iformall.domain.po.Product;
import com.iformall.enums.EnumProductType;
import com.iformall.mapper.ProductMapper;
import com.iformall.service.ProductService;
import com.iformall.service.payProduct.PayProductFactory;
import com.iformall.service.project.ProjectFactory;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -24,7 +25,7 @@ public class ProductServiceImpl implements ProductService {
ProductMapper productMapper;
@Autowired
PayProductFactory payProductFactory;
ProjectFactory payProductFactory;

@Override
public PageInfo<Product> listAsPage(Product record, Integer pageIndex, Integer pageSize) {


+ 5
- 0
suimangService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Ver ficheiro

@@ -1540,5 +1540,10 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc
}
return null;
}

@Override
public void reducePoints(Long id,String finalTenantId, Integer reducePoints) {
wxCUserBasicInfoMapper.reductPoints(id, finalTenantId, reducePoints);
}
}


+ 0
- 61
suimangService/src/main/java/com/iformall/service/payProduct/PayProductFactory.java Ver ficheiro

@@ -1,61 +0,0 @@
package com.iformall.service.payProduct;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iformall.common.ErrorCode;
import com.iformall.enums.EnumProject;
import com.iformall.exception.MallinkException;
import com.iformall.service.payProduct.service.PayProductService;
import com.iformall.service.payProduct.service.impl.CommonPayProductService;
import com.iformall.service.payProduct.service.impl.HBPayProductService;
import com.iformall.service.payProduct.service.impl.HKPayProductService;
import com.iformall.service.payProduct.service.impl.HYPayProductService;
import com.iformall.service.payProduct.service.impl.HYuPayProductService;
import com.iformall.service.payProduct.service.impl.ZXPayProductService;

/**
* 支付套餐
* @author Administrator
*/
@Service
public class PayProductFactory {

private Map<Integer,PayProductService> serviceMap = null;
@Autowired
CommonPayProductService commonPayProductService;
@Autowired
HYPayProductService hYPayProductService;
@Autowired
HBPayProductService hBPayProductService;
@Autowired
HYuPayProductService hYuPayProductService;
@Autowired
HKPayProductService hKPayProductService;
@Autowired
ZXPayProductService zXPayProductService;
private Map<Integer,PayProductService> getServiceMap() {
if (null == serviceMap) {
serviceMap = new ConcurrentHashMap<Integer,PayProductService>();
serviceMap.put(EnumProject.PROJECT_0.getCode(), commonPayProductService);
serviceMap.put(EnumProject.PROJECT_1.getCode(), hBPayProductService);
serviceMap.put(EnumProject.PROJECT_2.getCode(), hYPayProductService);
serviceMap.put(EnumProject.PROJECT_3.getCode(), hYuPayProductService);
serviceMap.put(EnumProject.PROJECT_4.getCode(), hKPayProductService);
serviceMap.put(EnumProject.PROJECT_5.getCode(), zXPayProductService);
}
return serviceMap;
}
public PayProductService getPayAdapterService(Integer productProject) throws MallinkException{
PayProductService service = getServiceMap().get(productProject);
if (null == service) {
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"["+productProject+"] 支付套餐service未找到");
}
return service;
}
}

+ 0
- 8
suimangService/src/main/java/com/iformall/service/payProduct/service/PayProductService.java Ver ficheiro

@@ -1,8 +0,0 @@
package com.iformall.service.payProduct.service;

import com.iformall.domain.po.Product;

public interface PayProductService {

public Object getProductExtroInfo(Product product);
}

+ 0
- 17
suimangService/src/main/java/com/iformall/service/payProduct/service/impl/CommonPayProductService.java Ver ficheiro

@@ -1,17 +0,0 @@
package com.iformall.service.payProduct.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.payProduct.service.PayProductService;

//慧影支付套餐
@Service
public class CommonPayProductService implements PayProductService{

@Override
public Object getProductExtroInfo(Product product) {
return null;
}

}

+ 0
- 17
suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HBPayProductService.java Ver ficheiro

@@ -1,17 +0,0 @@
package com.iformall.service.payProduct.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.payProduct.service.PayProductService;

//慧播支付套餐
@Service
public class HBPayProductService implements PayProductService{

@Override
public Object getProductExtroInfo(Product product) {
return null;
}

}

+ 0
- 17
suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HKPayProductService.java Ver ficheiro

@@ -1,17 +0,0 @@
package com.iformall.service.payProduct.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.payProduct.service.PayProductService;

//慧侃支付套餐
@Service
public class HKPayProductService implements PayProductService{

@Override
public Object getProductExtroInfo(Product product) {
return null;
}

}

+ 0
- 18
suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HYPayProductService.java Ver ficheiro

@@ -1,18 +0,0 @@
package com.iformall.service.payProduct.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.payProduct.service.PayProductService;

//慧影支付套餐
@Service
public class HYPayProductService implements PayProductService{

@Override
public Object getProductExtroInfo(Product product) {
//慧影套餐表project_package_detail, 现在暂时不搞那么复杂
return null;
}

}

+ 0
- 17
suimangService/src/main/java/com/iformall/service/payProduct/service/impl/HYuPayProductService.java Ver ficheiro

@@ -1,17 +0,0 @@
package com.iformall.service.payProduct.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.payProduct.service.PayProductService;

//慧语支付套餐
@Service
public class HYuPayProductService implements PayProductService{

@Override
public Object getProductExtroInfo(Product product) {
return null;
}

}

+ 0
- 17
suimangService/src/main/java/com/iformall/service/payProduct/service/impl/ZXPayProductService.java Ver ficheiro

@@ -1,17 +0,0 @@
package com.iformall.service.payProduct.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.payProduct.service.PayProductService;

//智象支付套餐
@Service
public class ZXPayProductService implements PayProductService{

@Override
public Object getProductExtroInfo(Product product) {
return null;
}

}

+ 60
- 0
suimangService/src/main/java/com/iformall/service/project/ProjectFactory.java Ver ficheiro

@@ -0,0 +1,60 @@
package com.iformall.service.project;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iformall.common.ErrorCode;
import com.iformall.enums.EnumProject;
import com.iformall.exception.MallinkException;
import com.iformall.service.project.service.ProjectService;
import com.iformall.service.project.service.impl.CommonProjectService;
import com.iformall.service.project.service.impl.HBProjectService;
import com.iformall.service.project.service.impl.HKProjectService;
import com.iformall.service.project.service.impl.HYProjectService;
import com.iformall.service.project.service.impl.HYuProjectService;
import com.iformall.service.project.service.impl.ZXProjectService;

/**
* @author Administrator
*/
@Service
public class ProjectFactory {

private Map<Integer,ProjectService> serviceMap = null;
@Autowired
CommonProjectService commonPayProductService;
@Autowired
HYProjectService hYPayProductService;
@Autowired
HBProjectService hBPayProductService;
@Autowired
HYuProjectService hYuPayProductService;
@Autowired
HKProjectService hKPayProductService;
@Autowired
ZXProjectService zXPayProductService;
private Map<Integer,ProjectService> getServiceMap() {
if (null == serviceMap) {
serviceMap = new ConcurrentHashMap<Integer,ProjectService>();
serviceMap.put(EnumProject.PROJECT_0.getCode(), commonPayProductService);
serviceMap.put(EnumProject.PROJECT_1.getCode(), hBPayProductService);
serviceMap.put(EnumProject.PROJECT_2.getCode(), hYPayProductService);
serviceMap.put(EnumProject.PROJECT_3.getCode(), hYuPayProductService);
serviceMap.put(EnumProject.PROJECT_4.getCode(), hKPayProductService);
serviceMap.put(EnumProject.PROJECT_5.getCode(), zXPayProductService);
}
return serviceMap;
}
public ProjectService getProjectService(Integer productProject) throws MallinkException{
ProjectService service = getServiceMap().get(productProject);
if (null == service) {
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"["+productProject+"] 支付套餐service未找到");
}
return service;
}
}

+ 24
- 0
suimangService/src/main/java/com/iformall/service/project/entity/CreateBilling.java Ver ficheiro

@@ -0,0 +1,24 @@
package com.iformall.service.project.entity;

import lombok.Data;

public class CreateBilling {

//总消耗金币数
private Integer totalCostPoins;
//详细清单
private String detail;
public Integer getTotalCostPoins() {
return totalCostPoins;
}
public void setTotalCostPoins(Integer totalCostPoins) {
this.totalCostPoins = totalCostPoins;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
}

+ 20
- 0
suimangService/src/main/java/com/iformall/service/project/service/ProjectService.java Ver ficheiro

@@ -0,0 +1,20 @@
package com.iformall.service.project.service;

import com.iformall.domain.po.Product;
import com.iformall.service.project.entity.CreateBilling;

public interface ProjectService {

/**
* 查询支付产品其余信息(如套餐明细等信息)
* @param product
* @return
*/
public Object getPayProductExtroInfo(Product product);
/**
* 计算生成视频账单
* @return
*/
public CreateBilling calcuteVideoBilling(String videoSeconds,Long videoSize);
}

+ 11
- 0
suimangService/src/main/java/com/iformall/service/project/service/impl/BaseProjectService.java Ver ficheiro

@@ -0,0 +1,11 @@
package com.iformall.service.project.service.impl;

import com.iformall.domain.po.Product;

public class BaseProjectService {

public Object noPayProductExtroInfo(Product product) {
return null;
}
}

+ 24
- 0
suimangService/src/main/java/com/iformall/service/project/service/impl/CommonProjectService.java Ver ficheiro

@@ -0,0 +1,24 @@
package com.iformall.service.project.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.project.entity.CreateBilling;
import com.iformall.service.project.service.ProjectService;

//通用项目
@Service
public class CommonProjectService extends BaseProjectService implements ProjectService{

@Override
public Object getPayProductExtroInfo(Product product) {
return noPayProductExtroInfo(product);
}

@Override
public CreateBilling calcuteVideoBilling(String videoSeconds, Long videoSize) {
// TODO Auto-generated method stub
return null;
}

}

+ 23
- 0
suimangService/src/main/java/com/iformall/service/project/service/impl/HBProjectService.java Ver ficheiro

@@ -0,0 +1,23 @@
package com.iformall.service.project.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.project.entity.CreateBilling;
import com.iformall.service.project.service.ProjectService;

//慧播
@Service
public class HBProjectService extends BaseProjectService implements ProjectService{

@Override
public Object getPayProductExtroInfo(Product product) {
return noPayProductExtroInfo(product);
}

@Override
public CreateBilling calcuteVideoBilling(String videoSeconds, Long videoSize) {
return null;
}

}

+ 24
- 0
suimangService/src/main/java/com/iformall/service/project/service/impl/HKProjectService.java Ver ficheiro

@@ -0,0 +1,24 @@
package com.iformall.service.project.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.project.entity.CreateBilling;
import com.iformall.service.project.service.ProjectService;

//慧侃
@Service
public class HKProjectService extends BaseProjectService implements ProjectService{

@Override
public Object getPayProductExtroInfo(Product product) {
return noPayProductExtroInfo(product);
}

@Override
public CreateBilling calcuteVideoBilling(String videoSeconds, Long videoSize) {
// TODO Auto-generated method stub
return null;
}

}

+ 30
- 0
suimangService/src/main/java/com/iformall/service/project/service/impl/HYProjectService.java Ver ficheiro

@@ -0,0 +1,30 @@
package com.iformall.service.project.service.impl;

import java.math.BigDecimal;
import org.springframework.stereotype.Service;
import com.iformall.domain.po.Product;
import com.iformall.service.project.entity.CreateBilling;
import com.iformall.service.project.service.ProjectService;

//慧影
@Service
public class HYProjectService extends BaseProjectService implements ProjectService{

@Override
public Object getPayProductExtroInfo(Product product) {
//慧影套餐表project_package_detail, 现在暂时不搞那么复杂
return noPayProductExtroInfo(product);
}

@Override
public CreateBilling calcuteVideoBilling(String videoSeconds, Long videoSize) {
//慧影视频按照时长来扣币
CreateBilling cb = new CreateBilling();
//每秒扣币
float poinsPerSeconds = 0.008F;
cb.setTotalCostPoins(new BigDecimal(videoSeconds).multiply(new BigDecimal(poinsPerSeconds)).intValue());
cb.setDetail("每秒扣币"+poinsPerSeconds+"个,总共时长"+videoSeconds+"秒");
return cb;
}

}

+ 24
- 0
suimangService/src/main/java/com/iformall/service/project/service/impl/HYuProjectService.java Ver ficheiro

@@ -0,0 +1,24 @@
package com.iformall.service.project.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.project.entity.CreateBilling;
import com.iformall.service.project.service.ProjectService;

//慧语
@Service
public class HYuProjectService extends BaseProjectService implements ProjectService{

@Override
public Object getPayProductExtroInfo(Product product) {
return noPayProductExtroInfo(product);
}

@Override
public CreateBilling calcuteVideoBilling(String videoSeconds, Long videoSize) {
// TODO Auto-generated method stub
return null;
}

}

+ 24
- 0
suimangService/src/main/java/com/iformall/service/project/service/impl/ZXProjectService.java Ver ficheiro

@@ -0,0 +1,24 @@
package com.iformall.service.project.service.impl;

import org.springframework.stereotype.Service;

import com.iformall.domain.po.Product;
import com.iformall.service.project.entity.CreateBilling;
import com.iformall.service.project.service.ProjectService;

//智象
@Service
public class ZXProjectService extends BaseProjectService implements ProjectService{

@Override
public Object getPayProductExtroInfo(Product product) {
return noPayProductExtroInfo(product);
}

@Override
public CreateBilling calcuteVideoBilling(String videoSeconds, Long videoSize) {
// TODO Auto-generated method stub
return null;
}

}

+ 17
- 0
suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java Ver ficheiro

@@ -11,6 +11,9 @@ import com.iformall.common.ResultData;
import com.iformall.domain.po.sm.*;
import com.iformall.enums.*;
import com.iformall.mapper.UserMouldVideoMapper;
import com.iformall.service.WxCUserBasicInfoService;
import com.iformall.service.project.ProjectFactory;
import com.iformall.service.project.entity.CreateBilling;
import com.iformall.service.sm.*;
import com.iformall.sm.AiVideoHelper;
import com.iformall.sm.AiVideoParam;
@@ -63,6 +66,12 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService {

@Autowired
RedisLock redisLock;
@Autowired
ProjectFactory projectFactory;
@Autowired
WxCUserBasicInfoService wxCUserBasicInfoService;

@Override
public PageInfo<UserMouldVideo> listAsPage(UserMouldVideo record, Integer pageIndex, Integer pageSize) {
@@ -463,6 +472,14 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService {
videoUpd.setVideoStatus(EnumVideoStatus.upload_success.getCode());
videoUpd.setVideoMsg("视频上传成功");
videoUpd.setUpdateDate(new Date());
//设置扣费,当前方法是慧影项目专用的
CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()).calcuteVideoBilling(videoUpd.getVideoTime(), videoUpd.getVideoSize());
if (null != cb) {
videoUpd.setCostPoints(cb.getTotalCostPoins());
videoUpd.setCostPointsDetail(cb.getDetail());
//扣去当前用户的币
wxCUserBasicInfoService.reducePoints(mouldVideo.getUserId(), mouldVideo.getFinalTenantId(),cb.getTotalCostPoins());
}
this.updateById(videoUpd);
break;
}


+ 8
- 3
suimangService/src/main/resources/mapper/UserMouldVideoMapper.xml Ver ficheiro

@@ -35,12 +35,17 @@
<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"/>
<result column="cost_points" jdbcType="INTEGER" property="costPoints"/>
<result column="cost_points_detail" jdbcType="VARCHAR" property="costPointsDetail"/>
</resultMap>

<sql id="allColumns">
`id`, `tenant_id`, `parent_tenant_id`, `user_id`, `video_type`,
`person_mould_id`, `person_mould_sm`,`person_json`, `subtitle_enabled`, `subtitle_params`, `voice_mould_id`, `voice_mould_sm`, `languages`, `paperwork`, `background_id`, `background_sm`,`material_ids`,`material_all_json`,
`title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`
`person_mould_id`, `person_mould_sm`,`person_json`, `subtitle_enabled`, `subtitle_params`, `voice_mould_id`, `voice_mould_sm`, `languages`,
`paperwork`, `background_id`, `background_sm`,`material_ids`,`material_all_json`,`title`, `cover_img`, `remark`, `video_id`, `video_path`,
`video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`,`cost_points`,
`cost_points_detail`
</sql>

<sql id="dynamicWhereConditions">
@@ -132,7 +137,7 @@
`id`, `video_type`,
`paperwork`,
`title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`,
`create_video_date`, `create_date`, `update_date`
`create_video_date`, `create_date`, `update_date`,`cost_points`,`cost_points_detail`
from user_mould_video
<include refid="dynamicWhereConditions"/>
</select>


+ 4
- 0
suimangService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml Ver ficheiro

@@ -580,5 +580,9 @@
<update id="cuserOldToNew" statementType="CALLABLE" >
{call cuser_old_to_new(#{oldCuserId},#{newCuserId},#{tableIndex},#{finalTableIndex})}
</update>
<update id="reducePoints" parameterType="java.util.HashMap">
UPDATE wx_c_user_basic_info set points = points - #{reductPoints} where id = #{id}
</update>

</mapper>

Carregando…
Cancelar
Guardar