@@ -10,3 +10,6 @@ ALTER TABLE `voice_language` | |||||
ADD COLUMN customized int(1) NOT NULL DEFAULT 0 COMMENT '是否私人定制EnumYesOrNo' AFTER `is_del`; | ADD COLUMN customized int(1) NOT NULL DEFAULT 0 COMMENT '是否私人定制EnumYesOrNo' AFTER `is_del`; | ||||
ALTER TABLE `voice_language` | ALTER TABLE `voice_language` | ||||
ADD COLUMN customized_user_id BIGINT(11) COMMENT '私人定制所属用户' AFTER `customized`; | ADD COLUMN customized_user_id BIGINT(11) COMMENT '私人定制所属用户' AFTER `customized`; | ||||
@@ -130,4 +130,12 @@ public class BaseController { | |||||
return ipaddress; | return ipaddress; | ||||
} | } | ||||
public Integer getPoins() { | |||||
WxCUserBasicInfo cuser = getCUser(); | |||||
WxCUserBasicInfo newcuser = wxCUserBasicInfoService.getById(cuser.getId(), cuser.getFinalTenantId()); | |||||
if (newcuser == null) { | |||||
throw new MallinkException(ErrorCode.USER_IS_EMPTY); | |||||
} | |||||
return newcuser.getPoins(); | |||||
} | |||||
} | } |
@@ -1,29 +0,0 @@ | |||||
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()); | |||||
} |
@@ -40,7 +40,7 @@ public class ProductController extends BaseController { | |||||
private ProductService productService; | private ProductService productService; | ||||
@AuthIgnore | @AuthIgnore | ||||
@ApiOperation("分页列表接口") | |||||
@ApiOperation("分页列表接口(仅智象小程序用)") | |||||
@GetMapping("list") | @GetMapping("list") | ||||
@ApiImplicitParams({ | @ApiImplicitParams({ | ||||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
@@ -55,7 +55,7 @@ public class ProductController extends BaseController { | |||||
@AuthIgnore | @AuthIgnore | ||||
@ApiOperation("获取商品列表") | |||||
@ApiOperation("获取商品列表(通用,将来替换list)") | |||||
@GetMapping("list_v1") | @GetMapping("list_v1") | ||||
@ApiImplicitParams({}) | @ApiImplicitParams({}) | ||||
public ResultData list_v1(@ModelAttribute Product record) { | public ResultData list_v1(@ModelAttribute Product record) { | ||||
@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo; | |||||
import com.iformall.annotation.AuthIgnore; | import com.iformall.annotation.AuthIgnore; | ||||
import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
import com.iformall.domain.po.WxCUserBasicInfo; | |||||
import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
import com.iformall.domain.po.sm.MouldPatch; | import com.iformall.domain.po.sm.MouldPatch; | ||||
import com.iformall.domain.po.sm.MouldPatchSign; | import com.iformall.domain.po.sm.MouldPatchSign; | ||||
@@ -159,6 +160,12 @@ public class UserMouldVideoController extends BaseController { | |||||
if(record.getId() == null){ | if(record.getId() == null){ | ||||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | ||||
} | } | ||||
//判断当前用户是有金币 | |||||
if (this.getPoins() <= 0 ) { | |||||
return new ResultData(ErrorCode.MEMBER_NO_POINTS); | |||||
} | |||||
UserMouldVideo mouldVideo = userMouldVideoService.getById(record.getId()); | UserMouldVideo mouldVideo = userMouldVideoService.getById(record.getId()); | ||||
logger.info("TEST--"+ JSONObject.toJSONString(mouldVideo)); | logger.info("TEST--"+ JSONObject.toJSONString(mouldVideo)); | ||||
@@ -112,8 +112,7 @@ public class WxUserGrantController extends BaseController { | |||||
@Autowired | @Autowired | ||||
private WxCUserAuthorityService wxCUserAuthorityService; | private WxCUserAuthorityService wxCUserAuthorityService; | ||||
@AuthIgnore | @AuthIgnore | ||||
@ApiOperation("验证码") | @ApiOperation("验证码") | ||||
@GetMapping("/captcha.jpg") | @GetMapping("/captcha.jpg") | ||||
@@ -788,9 +787,10 @@ public class WxUserGrantController extends BaseController { | |||||
@AuthIgnore | @AuthIgnore | ||||
@ApiOperation("套餐档次查询") | @ApiOperation("套餐档次查询") | ||||
@GetMapping("/getPackageInfo") | @GetMapping("/getPackageInfo") | ||||
@Deprecated | |||||
public ResultData getPackageInfo() { | public ResultData getPackageInfo() { | ||||
logger.debug("[" + getIpAddr() + "] WxUserGrantController::getPackageInfo"); | logger.debug("[" + getIpAddr() + "] WxUserGrantController::getPackageInfo"); | ||||
return new ResultData(userConsumptionPackageService.getPackageInfo()); | return new ResultData(userConsumptionPackageService.getPackageInfo()); | ||||
} | } | ||||
} | } |
@@ -676,6 +676,7 @@ public enum ErrorCode{ | |||||
* mould | * mould | ||||
*/ | */ | ||||
ORDER_CREAT_OVERRUN(64000, "重复生成次数超限"), | ORDER_CREAT_OVERRUN(64000, "重复生成次数超限"), | ||||
MEMBER_NO_POINTS(64001,"当前账户无足额金币"), | |||||
CODE_ALREADY_EXISTS(71000, "该code已存在"), | CODE_ALREADY_EXISTS(71000, "该code已存在"), | ||||
@@ -684,6 +685,7 @@ public enum ErrorCode{ | |||||
NAME_REPEAT(81000, "名称重复"), | NAME_REPEAT(81000, "名称重复"), | ||||
EXIST_AVAILABLE_GUIDE(81001, "存在可用指南"), | EXIST_AVAILABLE_GUIDE(81001, "存在可用指南"), | ||||
; | ; | ||||
private int code; | private int code; | ||||
@@ -1,55 +0,0 @@ | |||||
package com.iformall.domain.po; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | |||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import lombok.Data; | |||||
import lombok.EqualsAndHashCode; | |||||
import lombok.ToString; | |||||
import java.util.Date; | |||||
@TableName(value = "level_package") | |||||
@Data | |||||
@ToString(callSuper = true) | |||||
@EqualsAndHashCode(callSuper = true) | |||||
public class LevelPackage extends TenantEntity { | |||||
protected Long id; | |||||
@io.swagger.annotations.ApiModelProperty(value="等级",name="level") | |||||
private Integer level; | |||||
@io.swagger.annotations.ApiModelProperty(value="名称",name="name") | |||||
private String name; | |||||
@io.swagger.annotations.ApiModelProperty(value="",name="en_name") | |||||
private String en_name; | |||||
@io.swagger.annotations.ApiModelProperty(value="套餐色",name="color") | |||||
private String color; | |||||
@io.swagger.annotations.ApiModelProperty(value="",name="priceDollar") | |||||
private Integer priceDollar; | |||||
@io.swagger.annotations.ApiModelProperty(value="",name="priceRmb") | |||||
private Integer priceRmb; | |||||
@io.swagger.annotations.ApiModelProperty(value="套餐积分",name="credit") | |||||
private Integer credit; | |||||
@io.swagger.annotations.ApiModelProperty(value="套餐时长",name="validityDuration") | |||||
private Integer validityDuration; | |||||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||||
private Date createDate; | |||||
@io.swagger.annotations.ApiModelProperty(value="",name="updateDate") | |||||
private Date updateDate; | |||||
@TableField(exist = false) | |||||
private Date startDate; | |||||
@TableField(exist = false) | |||||
private Date endDate; | |||||
@TableField(exist = false) | |||||
private ProjectPackageDetail projectPackageDetail; | |||||
} |
@@ -23,7 +23,7 @@ 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") | |||||
@io.swagger.annotations.ApiModelProperty(value="套餐表(level_package,project_package_detail)ID,",name="extraId") | |||||
private Long extraId; | private Long extraId; | ||||
@io.swagger.annotations.ApiModelProperty(value="",name="coverImg") | @io.swagger.annotations.ApiModelProperty(value="",name="coverImg") | ||||
@@ -107,8 +107,8 @@ public class WxCUserBasicInfo extends TenantEntityWithoutFinalTenantId { | |||||
@io.swagger.annotations.ApiModelProperty(value="登录次数",name="loginCount") | @io.swagger.annotations.ApiModelProperty(value="登录次数",name="loginCount") | ||||
private Integer loginCount; | private Integer loginCount; | ||||
@Excel(name="成长值",width = 20, orderNum = "11") | |||||
@io.swagger.annotations.ApiModelProperty(value="成长值",name="poins") | |||||
@Excel(name="金币",width = 20, orderNum = "11") | |||||
@io.swagger.annotations.ApiModelProperty(value="金币",name="poins") | |||||
private Integer poins; | private Integer poins; | ||||
@io.swagger.annotations.ApiModelProperty(value="地址",name="address") | @io.swagger.annotations.ApiModelProperty(value="地址",name="address") | ||||
@@ -1,10 +1,9 @@ | |||||
package com.iformall.domain.po.sm; | package com.iformall.domain.po.sm; | ||||
import com.baomidou.mybatisplus.annotation.IdType; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import java.io.Serializable; | |||||
import com.iformall.domain.po.base.BaseEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -14,7 +13,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@TableName(value ="api_detail") | @TableName(value ="api_detail") | ||||
@Data | @Data | ||||
public class ApiDetail implements Serializable { | |||||
public class ApiDetail extends BaseEntity { | |||||
/** | /** | ||||
* 详情id | * 详情id | ||||
*/ | */ | ||||
@@ -1,10 +1,9 @@ | |||||
package com.iformall.domain.po.sm; | package com.iformall.domain.po.sm; | ||||
import com.baomidou.mybatisplus.annotation.IdType; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import java.io.Serializable; | |||||
import com.iformall.domain.po.base.BaseEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -14,7 +13,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@TableName(value ="api_guide") | @TableName(value ="api_guide") | ||||
@Data | @Data | ||||
public class ApiGuide implements Serializable { | |||||
public class ApiGuide extends BaseEntity { | |||||
/** | /** | ||||
* 主键id | * 主键id | ||||
*/ | */ | ||||
@@ -1,10 +1,9 @@ | |||||
package com.iformall.domain.po.sm; | package com.iformall.domain.po.sm; | ||||
import com.baomidou.mybatisplus.annotation.IdType; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import java.io.Serializable; | |||||
import com.iformall.domain.po.base.BaseEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -14,7 +13,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@TableName(value ="api_menu") | @TableName(value ="api_menu") | ||||
@Data | @Data | ||||
public class ApiMenu implements Serializable { | |||||
public class ApiMenu extends BaseEntity { | |||||
/** | /** | ||||
* 菜单id | * 菜单id | ||||
*/ | */ | ||||
@@ -2,6 +2,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import io.swagger.models.auth.In; | import io.swagger.models.auth.In; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -15,7 +17,7 @@ import java.util.Date; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("invite_code") | @TableName("invite_code") | ||||
public class InviteCode implements Serializable { | |||||
public class InviteCode extends TenantEntity { | |||||
private static final long serialVersionUID = 6951051673755053615L; | private static final long serialVersionUID = 6951051673755053615L; | ||||
/** | /** | ||||
@@ -23,14 +25,6 @@ public class InviteCode implements Serializable { | |||||
*/ | */ | ||||
@TableId | @TableId | ||||
private Long id; | private Long id; | ||||
/** | |||||
* 租户ID | |||||
*/ | |||||
private String tenantId; | |||||
/** | |||||
* 父租户ID | |||||
*/ | |||||
private String parentTenantId; | |||||
/** | /** | ||||
* 用户id(wx_c_user_basic_info.id) | * 用户id(wx_c_user_basic_info.id) | ||||
*/ | */ | ||||
@@ -3,6 +3,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import io.swagger.models.auth.In; | import io.swagger.models.auth.In; | ||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.ToString; | import lombok.ToString; | ||||
@@ -17,7 +19,7 @@ import java.util.Date; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("invite_code_info") | @TableName("invite_code_info") | ||||
public class InviteCodeInfo implements Serializable { | |||||
public class InviteCodeInfo extends TenantEntity { | |||||
private static final long serialVersionUID = 5349786757453017803L; | private static final long serialVersionUID = 5349786757453017803L; | ||||
/** | /** | ||||
@@ -25,14 +27,6 @@ public class InviteCodeInfo implements Serializable { | |||||
*/ | */ | ||||
@TableId | @TableId | ||||
private Long id; | private Long id; | ||||
/** | |||||
* 租户ID | |||||
*/ | |||||
private String tenantId; | |||||
/** | |||||
* 父租户ID | |||||
*/ | |||||
private String parentTenantId; | |||||
/** | /** | ||||
* 邀请的用户id(wx_c_user_basic_info.id) | * 邀请的用户id(wx_c_user_basic_info.id) | ||||
*/ | */ | ||||
@@ -2,6 +2,9 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.BaseEntity; | |||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
import lombok.ToString; | import lombok.ToString; | ||||
@@ -16,7 +19,7 @@ import java.util.Date; | |||||
*/ | */ | ||||
@TableName(value = "service_info") | @TableName(value = "service_info") | ||||
@Data | @Data | ||||
public class ServiceInfo { | |||||
public class ServiceInfo extends BaseEntity{ | |||||
/** | /** | ||||
* 接入商id,唯一标识 | * 接入商id,唯一标识 | ||||
@@ -2,6 +2,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.BaseEntity; | |||||
import lombok.Data; | import lombok.Data; | ||||
import java.util.Date; | import java.util.Date; | ||||
@@ -12,7 +14,7 @@ import java.util.Date; | |||||
*/ | */ | ||||
@TableName(value = "service_video_record") | @TableName(value = "service_video_record") | ||||
@Data | @Data | ||||
public class ServiceVideoRecord { | |||||
public class ServiceVideoRecord extends BaseEntity{ | |||||
/** | /** | ||||
* 主键id | * 主键id | ||||
*/ | */ | ||||
@@ -3,6 +3,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -17,7 +19,7 @@ import java.util.List; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("user_consumption_package" ) | @TableName("user_consumption_package" ) | ||||
public class UserConsumptionPackage implements Serializable { | |||||
public class UserConsumptionPackage extends TenantEntity { | |||||
private static final long serialVersionUID = 7987400196899039170L; | private static final long serialVersionUID = 7987400196899039170L; | ||||
@@ -27,16 +29,6 @@ public class UserConsumptionPackage implements Serializable { | |||||
@TableId | @TableId | ||||
private Integer id; | private Integer id; | ||||
/** | |||||
* 租户ID | |||||
*/ | |||||
private String tenantId; | |||||
/** | |||||
* 父租户ID | |||||
*/ | |||||
private String parentTenantId; | |||||
/** | /** | ||||
* 套餐类型(1、基础版,2、专业版,3、加强版) | * 套餐类型(1、基础版,2、专业版,3、加强版) | ||||
*/ | */ | ||||
@@ -2,6 +2,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -14,7 +16,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("user_create_video_num" ) | @TableName("user_create_video_num" ) | ||||
public class UserCreateVideoNum implements Serializable { | |||||
public class UserCreateVideoNum extends TenantEntity { | |||||
private static final long serialVersionUID = 4995993777308528646L; | private static final long serialVersionUID = 4995993777308528646L; | ||||
@@ -24,16 +26,6 @@ public class UserCreateVideoNum implements Serializable { | |||||
@TableId | @TableId | ||||
private Long id; | private Long id; | ||||
/** | |||||
* 租户ID | |||||
*/ | |||||
private String tenantId; | |||||
/** | |||||
* 父租户ID | |||||
*/ | |||||
private String parentTenantId; | |||||
/** | /** | ||||
* 用户id(wx_c_user_basic_info.id) | * 用户id(wx_c_user_basic_info.id) | ||||
*/ | */ | ||||
@@ -2,6 +2,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
@@ -16,7 +18,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("user_credit_log" ) | @TableName("user_credit_log" ) | ||||
public class UserCreditLog implements Serializable { | |||||
public class UserCreditLog extends TenantEntity { | |||||
private static final long serialVersionUID = 8595480777599856051L; | private static final long serialVersionUID = 8595480777599856051L; | ||||
@@ -26,16 +28,6 @@ public class UserCreditLog implements Serializable { | |||||
@TableId | @TableId | ||||
private Long id; | private Long id; | ||||
/** | |||||
* 租户ID | |||||
*/ | |||||
private String tenantId; | |||||
/** | |||||
* 父租户ID | |||||
*/ | |||||
private String parentTenantId; | |||||
/** | /** | ||||
* 用户id(wx_c_user_basic_info.id) | * 用户id(wx_c_user_basic_info.id) | ||||
*/ | */ | ||||
@@ -3,6 +3,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -15,7 +17,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("user_package_detail" ) | @TableName("user_package_detail" ) | ||||
public class UserPackageDetail implements Serializable { | |||||
public class UserPackageDetail extends TenantEntity { | |||||
private static final long serialVersionUID = 8868339443558940187L; | private static final long serialVersionUID = 8868339443558940187L; | ||||
@@ -25,16 +27,6 @@ public class UserPackageDetail implements Serializable { | |||||
@TableId | @TableId | ||||
private Integer id; | private Integer id; | ||||
/** | |||||
* 租户ID | |||||
*/ | |||||
private String tenantId; | |||||
/** | |||||
* 父租户ID | |||||
*/ | |||||
private String parentTenantId; | |||||
/** | /** | ||||
* 套餐类型(1、图片说话,2、口播) | * 套餐类型(1、图片说话,2、口播) | ||||
*/ | */ | ||||
@@ -2,6 +2,8 @@ package com.iformall.domain.po.sm; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import com.iformall.domain.po.base.TenantEntity; | |||||
import java.util.Date; | import java.util.Date; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
@@ -16,7 +18,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@TableName("user_time_config" ) | @TableName("user_time_config" ) | ||||
public class UserTimeConfig implements Serializable { | |||||
public class UserTimeConfig extends TenantEntity { | |||||
private static final long serialVersionUID = 2953038588956565523L; | private static final long serialVersionUID = 2953038588956565523L; | ||||
@@ -33,10 +35,6 @@ public class UserTimeConfig implements Serializable { | |||||
*/ | */ | ||||
private Long time; | private Long time; | ||||
private String tenantId; | |||||
private String parentTenantId; | |||||
private Date createDate; | private Date createDate; | ||||
private Date updateDate; | private Date updateDate; | ||||
@@ -1,12 +0,0 @@ | |||||
package com.iformall.mapper; | |||||
import com.iformall.common.CommonMapper; | |||||
import com.iformall.domain.po.LevelPackage; | |||||
import java.util.List; | |||||
public interface LevelPackageMapper extends CommonMapper<LevelPackage, Long>{ | |||||
List<LevelPackage> findList(LevelPackage record); | |||||
} |
@@ -1,12 +0,0 @@ | |||||
package com.iformall.service.sm; | |||||
import com.iformall.domain.po.LevelPackage; | |||||
import java.util.List; | |||||
public interface LevelPackageService { | |||||
LevelPackage getDetailById(Long id, Integer projectType); | |||||
} |
@@ -1,47 +0,0 @@ | |||||
package com.iformall.service.sm.impl; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.iformall.domain.po.LevelPackage; | |||||
import com.iformall.domain.po.ProjectPackageDetail; | |||||
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.LevelPackageMapper; | |||||
import com.iformall.mapper.ProjectPackageDetailMapper; | |||||
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()); | |||||
@Autowired | |||||
LevelPackageMapper levelPackageMapper; | |||||
@Autowired | |||||
ProjectPackageDetailMapper projectPackageDetailMapper; | |||||
@Override | |||||
public LevelPackage getDetailById(Long id, Integer projectType) { | |||||
if(id == null){ | |||||
return null; | |||||
} | |||||
LevelPackage levelPackage = levelPackageMapper.selectById(id); | |||||
if(levelPackage != null){ | |||||
ProjectPackageDetail projectPackageDetail = projectPackageDetailMapper.selectByProject(levelPackage.getId(),projectType); | |||||
levelPackage.setProjectPackageDetail(projectPackageDetail); | |||||
} | |||||
return levelPackage; | |||||
} | |||||
} |
@@ -1,69 +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.LevelPackageMapper"> | |||||
<resultMap id="BaseResultMap" type="com.iformall.domain.po.LevelPackage"> | |||||
<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="level" jdbcType="INTEGER" property="level" /> | |||||
<result column="name" jdbcType="VARCHAR" property="name" /> | |||||
<result column="en_name" jdbcType="VARCHAR" property="enName"/> | |||||
<result column="color" jdbcType="VARCHAR" property="color"/> | |||||
<result column="price_dollar" jdbcType="INTEGER" property="priceDollar" /> | |||||
<result column="price_rmb" jdbcType="INTEGER" property="priceRmb" /> | |||||
<result column="credit" jdbcType="INTEGER" property="credit" /> | |||||
<result column="validity_duration" jdbcType="INTEGER" property="validityDuration" /> | |||||
<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`, | |||||
`level`,`name`,`en_name`,`color`, | |||||
`price_dollar`,`price_rmb`,`credit`,`validity_duration`, | |||||
`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 != level "> and `level` = #{level} </if> | |||||
<if test=" null != name and '' != name"> | |||||
and `name` like concat('%', #{name},'%') | |||||
</if> | |||||
<if test=" null != enName and '' != enName"> | |||||
and `en_name` like concat('%', #{enName},'%') | |||||
</if> | |||||
<if test=" null != startDate "> | |||||
and `create_date` >= #{startDate} | |||||
</if> | |||||
<if test=" null != endDate"> | |||||
and `create_date` <= #{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.LevelPackage" resultMap="BaseResultMap"> | |||||
select <include refid="allColumns" /> | |||||
from level_package | |||||
<include refid="dynamicWhereConditions" /> | |||||
</select> | |||||
</mapper> |