Commit cbeea18c cbeea18c55367a69c1f7a483a96a5de302db8042 by xianghan

Merge branch '2.2.0-release'

2 parents 8189259a 2d8af089
Showing 156 changed files with 498 additions and 227 deletions
......@@ -15,22 +15,16 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<jjwt.version>0.9.1</jjwt.version>
<cronos.version>1.1.0</cronos.version>
<cronos.version>1.2.0</cronos.version>
</properties>
<dependencies>
<!--<dependency>
<groupId>com.topdraw</groupId>
<artifactId>cronos-system</artifactId>
<version>${cronos.version}</version>
</dependency>-->
<dependency>
<groupId>com.topdraw</groupId>
<artifactId>code-generator</artifactId>
<version>3.1.0</version>
<artifactId>core-service</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
......
package com.topdraw;
import com.topdraw.utils.SpringContextHolder;
import com.topdraw.base.modules.utils.SpringContextHolder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
......
......@@ -49,11 +49,13 @@ public interface RedisKeyConstants {
// 历史完成的任务数量
String cacheTotalFinishTaskCount = "uce::totalCount::memberId";
// app账号信息
String cacheAppById = "uce:appInfo:id";
String CACHE_PLATFROMACCOUNT_PLAYDURATION = "uce::eventPlay::playduration";
String CACHE_TODAY_FINISH_COUNT = "todayFinishCount";
String CACHE_TOTAL_FINISH_COUNT = "totalFinishCount";
}
......
package com.topdraw.business.module.contact.domain;
import com.topdraw.business.module.common.validated.CreateGroup;
import lombok.Data;
import lombok.experimental.Accessors;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @author XiangHan
* @date 2022-09-01
*/
@Entity
@Data
@EntityListeners(AuditingEntityListener.class)
@Accessors(chain = true)
@Table(name="uc_member_contacts")
public class MemberContacts implements Serializable {
// 主键
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
// 会员id
@Column(name = "member_id", nullable = false)
@NotNull(groups = CreateGroup.class, message = "会员id不的为空")
private Long memberId;
// 用户id
@Column(name = "user_id")
private Long userId;
// 实体id
@Column(name = "entity_id")
private Long entityId;
// 实体类型 1:订单;2:商品;3:活动;99:其他
@Column(name = "entity_type")
private Long entityType;
// 实体code
@Column(name = "entity_code")
private String entityCode;
// 设备类型 1:大屏;2:微信;3:app;99:其他
@Column(name = "device_type")
@NotNull(groups = CreateGroup.class, message = "设备类型不的为空")
private Long deviceType;
// 姓名
@Column(name = "realname")
@NotNull(groups = CreateGroup.class, message = "姓名不的为空")
@NotEmpty(groups = CreateGroup.class, message = "姓名不的为空")
private String realname;
// 生日
@Column(name = "birthday")
private String birthday;
// 手机号
@Column(name = "phone")
@NotNull(groups = CreateGroup.class, message = "手机号不的为空")
private String phone;
// 创建时间
@CreatedDate
@Column(name = "create_time")
private Timestamp createTime;
// 更新时间
@LastModifiedDate
@Column(name = "update_time")
private Timestamp updateTime;
public void copy(MemberContacts source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
}
package com.topdraw.business.module.contact.repository;
import com.topdraw.business.module.contact.domain.MemberContacts;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import java.util.Optional;
/**
* @author XiangHan
* @date 2022-09-01
*/
public interface MemberContactsRepository extends JpaRepository<MemberContacts, Long>, JpaSpecificationExecutor<MemberContacts> {
}
package com.topdraw.business.module.contact.rest;
import com.topdraw.common.ResultInfo;
import com.topdraw.business.module.contact.domain.MemberContacts;
import com.topdraw.business.module.contact.service.MemberContactsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
/**
* @author XiangHan
* @date 2022-09-01
*/
@Api(tags = "MemberContacts管理")
@RestController
@RequestMapping("/api/MemberContacts")
public class MemberContactsController {
@Autowired
private MemberContactsService MemberContactsService;
@PostMapping
@ApiOperation("新增MemberContacts")
public ResultInfo create(@Validated @RequestBody MemberContacts resources) {
MemberContactsService.create(resources);
return ResultInfo.success();
}
}
package com.topdraw.business.module.contact.service;
import com.topdraw.business.module.contact.domain.MemberContacts;
import com.topdraw.business.module.contact.service.dto.MemberContactsDTO;
/**
* @author XiangHan
* @date 2022-09-01
*/
public interface MemberContactsService {
/**
* 根据ID查询
* @param id ID
* @return MemberContactsDTO
*/
MemberContactsDTO findById(Long id);
MemberContacts create(MemberContacts resources);
}
package com.topdraw.business.module.contact.service.dto;
import lombok.Data;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @author XiangHan
* @date 2022-09-01
*/
@Data
public class MemberContactsDTO implements Serializable {
// 主键
private Long id;
// 会员id
private Long memberId;
// 用户id
private Long userId;
// 实体id
private Long entityId;
// 实体类型 1:订单;2:商品;3:活动;99:其他
private Long entityType;
// 实体code
private String entityCode;
// 设备类型 1:大屏;2:微信;3:app;99:其他
private Long deviceType;
// 姓名
private String realname;
// 生日
private String birthday;
// 手机号
private String phone;
// 创建时间
private Timestamp createTime;
// 更新时间
private Timestamp updateTime;
}
package com.topdraw.business.module.contact.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.contact.domain.MemberContacts;
import com.topdraw.business.module.contact.repository.MemberContactsRepository;
import com.topdraw.business.module.contact.service.MemberContactsService;
import com.topdraw.business.module.contact.service.dto.MemberContactsDTO;
import com.topdraw.business.module.contact.service.mapper.MemberContactsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
/**
* @author XiangHan
* @date 2022-09-01
*/
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class MemberContactsServiceImpl implements MemberContactsService {
@Autowired
private MemberContactsRepository MemberContactsRepository;
@Autowired
private MemberContactsMapper MemberContactsMapper;
@Override
public MemberContactsDTO findById(Long id) {
MemberContacts MemberContacts = MemberContactsRepository.findById(id).orElseGet(MemberContacts::new);
ValidationUtil.isNull(MemberContacts.getId(),"MemberContacts","id",id);
return MemberContactsMapper.toDto(MemberContacts);
}
@Override
@Transactional(rollbackFor = Exception.class)
public MemberContacts create(MemberContacts resources) {
return MemberContactsRepository.save(resources);
}
}
package com.topdraw.business.module.contact.service.mapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.contact.domain.MemberContacts;
import com.topdraw.business.module.contact.service.dto.MemberContactsDTO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @author XiangHan
* @date 2022-09-01
*/
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface MemberContactsMapper extends BaseMapper<MemberContactsDTO, MemberContacts> {
}
package com.topdraw.business.module.contact.vis.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.base.modules.exception.BadRequestException;
import com.topdraw.business.module.contact.vis.service.dto.ActivityAddressDTO;
import com.topdraw.common.ResultInfo;
import com.topdraw.business.module.contact.vis.domain.ActivityAddress;
import com.topdraw.business.module.contact.vis.service.ActivityAddressService;
import com.topdraw.exception.BadRequestException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
......
package com.topdraw.business.module.contact.vis.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.contact.vis.domain.ActivityAddress;
import com.topdraw.util.TimestampUtil;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.contact.vis.repository.ActivityAddressRepository;
import com.topdraw.business.module.contact.vis.service.ActivityAddressService;
import com.topdraw.business.module.contact.vis.service.dto.ActivityAddressDTO;
import com.topdraw.business.module.contact.vis.service.mapper.ActivityAddressMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
......
package com.topdraw.business.module.contact.vis.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.contact.vis.domain.ActivityAddress;
import com.topdraw.business.module.contact.vis.service.dto.ActivityAddressDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.coupon.history.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.coupon.history.domain.CouponHistory;
import com.topdraw.business.module.coupon.history.domain.CouponHistoryBuilder;
import com.topdraw.util.LocalDateTimeUtil;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.coupon.history.repository.CouponHistoryRepository;
import com.topdraw.business.module.coupon.history.service.CouponHistoryService;
import com.topdraw.business.module.coupon.history.service.dto.CouponHistoryDTO;
......@@ -13,11 +13,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.sql.Date;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
/**
* @author XiangHan
......
package com.topdraw.business.module.coupon.history.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.coupon.history.domain.CouponHistory;
import com.topdraw.business.module.coupon.history.service.dto.CouponHistoryDTO;
import org.mapstruct.Mapper;
......
......@@ -7,13 +7,13 @@ import com.topdraw.business.module.coupon.repository.CouponRepository;
import com.topdraw.business.module.coupon.service.CouponService;
import com.topdraw.business.module.coupon.service.dto.CouponDTO;
import com.topdraw.business.module.coupon.service.mapper.CouponMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import com.topdraw.utils.StringUtils;
/**
......
package com.topdraw.business.module.coupon.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.coupon.domain.Coupon;
import com.topdraw.business.module.coupon.service.dto.CouponDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.exp.detail.service.impl;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.exp.detail.domain.ExpDetail;
import com.topdraw.business.module.exp.detail.domain.ExpDetailBuilder;
import com.topdraw.utils.RedisUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.exp.detail.repository.ExpDetailRepository;
import com.topdraw.business.module.exp.detail.service.ExpDetailService;
import com.topdraw.business.module.exp.detail.service.dto.ExpDetailDTO;
import com.topdraw.business.module.exp.detail.service.mapper.ExpDetailMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.util.Assert;
import com.topdraw.utils.StringUtils;
/**
......
package com.topdraw.business.module.exp.detail.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.exp.detail.domain.ExpDetail;
import com.topdraw.business.module.exp.detail.service.dto.ExpDetailDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.exp.history.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.exp.history.domain.ExpHistory;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.exp.history.repository.ExpHistoryRepository;
import com.topdraw.business.module.exp.history.service.ExpHistoryService;
import com.topdraw.business.module.exp.history.service.dto.ExpHistoryDTO;
import com.topdraw.business.module.exp.history.service.mapper.ExpHistoryMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.topdraw.utils.StringUtils;
/**
......
package com.topdraw.business.module.exp.history.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.exp.history.domain.ExpHistory;
import com.topdraw.business.module.exp.history.service.dto.ExpHistoryDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.address.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.common.validated.CreateGroup;
import com.topdraw.business.module.common.validated.UpdateGroup;
import com.topdraw.business.module.member.address.service.dto.BasicMemberAddressDTO;
import com.topdraw.business.module.member.address.service.dto.MemberAddressDTO;
import com.topdraw.business.process.service.member.MemberAddressOperationService;
import com.topdraw.common.ResultInfo;
import com.topdraw.business.module.member.address.domain.MemberAddress;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.topdraw.business.module.member.address.service.impl;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.address.domain.MemberAddress;
import com.topdraw.business.module.member.address.domain.MemberAddressBuilder;
import com.topdraw.business.module.member.service.MemberService;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.utils.RedisUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.member.address.repository.MemberAddressRepository;
import com.topdraw.business.module.member.address.service.MemberAddressService;
import com.topdraw.business.module.member.address.service.dto.MemberAddressDTO;
......
package com.topdraw.business.module.member.address.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.address.domain.MemberAddress;
import com.topdraw.business.module.member.address.service.dto.MemberAddressDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.group.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.group.domain.Group;
import com.topdraw.business.module.member.group.repository.GroupRepository;
import com.topdraw.business.module.member.group.service.GroupService;
import com.topdraw.business.module.member.group.service.dto.GroupDTO;
import com.topdraw.business.module.member.group.service.mapper.GroupMapper;
import com.topdraw.utils.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
......
package com.topdraw.business.module.member.group.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.group.domain.MemberGroup;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.member.group.repository.MemberGroupRepository;
import com.topdraw.business.module.member.group.service.MemberGroupService;
import com.topdraw.business.module.member.group.service.dto.MemberGroupDTO;
......
package com.topdraw.business.module.member.group.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.group.domain.Group;
import com.topdraw.business.module.member.group.service.dto.GroupDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.group.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.group.domain.MemberGroup;
import com.topdraw.business.module.member.group.service.dto.MemberGroupDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.level.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.level.domain.MemberLevel;
import com.topdraw.business.RedisKeyConstants;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.member.level.repository.MemberLevelRepository;
import com.topdraw.business.module.member.level.service.MemberLevelService;
import com.topdraw.business.module.member.level.service.dto.MemberLevelDTO;
import com.topdraw.business.module.member.level.service.mapper.MemberLevelMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.topdraw.utils.StringUtils;
/**
* @author XiangHan
......
package com.topdraw.business.module.member.level.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.level.domain.MemberLevel;
import com.topdraw.business.module.member.level.service.dto.MemberLevelDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.profile.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.common.validated.CreateGroup;
import com.topdraw.business.module.common.validated.UpdateGroup;
import com.topdraw.business.module.member.profile.service.dto.MemberProfileDTO;
import com.topdraw.business.process.service.member.MemberProfileOperationService;
import com.topdraw.common.ResultInfo;
import com.topdraw.business.module.member.profile.domain.MemberProfile;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.topdraw.business.module.member.profile.service.impl;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.business.module.member.profile.domain.MemberProfile;
import com.topdraw.business.module.member.profile.domain.MemberProfileBuilder;
import com.topdraw.business.module.member.service.MemberService;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.util.Base64Util;
import com.topdraw.util.RegexUtil;
import com.topdraw.utils.RedisUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.member.profile.repository.MemberProfileRepository;
import com.topdraw.business.module.member.profile.service.MemberProfileService;
import com.topdraw.business.module.member.profile.service.dto.MemberProfileDTO;
......
package com.topdraw.business.module.member.profile.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.profile.domain.MemberProfile;
import com.topdraw.business.module.member.profile.service.dto.MemberProfileDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.relatedinfo.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.common.validated.CreateGroup;
import com.topdraw.business.module.common.validated.UpdateGroup;
import com.topdraw.business.module.member.relatedinfo.service.dto.BasicMemberRelatedInfoDTO;
import com.topdraw.business.process.service.member.MemberRelatedInfoOperationService;
import com.topdraw.common.ResultInfo;
import com.topdraw.business.module.member.relatedinfo.domain.MemberRelatedInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.topdraw.business.module.member.relatedinfo.service.impl;
import com.topdraw.base.modules.exception.BadRequestException;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.business.module.member.relatedinfo.domain.MemberRelatedInfo;
import com.topdraw.business.module.member.relatedinfo.domain.MemberRelatedInfoBuilder;
import com.topdraw.business.module.member.service.MemberService;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.exception.BadRequestException;
import com.topdraw.exception.GlobeExceptionMsg;
import com.topdraw.util.Base64Util;
import com.topdraw.utils.RedisUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.member.relatedinfo.repository.MemberRelatedInfoRepository;
import com.topdraw.business.module.member.relatedinfo.service.MemberRelatedInfoService;
import com.topdraw.business.module.member.relatedinfo.service.dto.MemberRelatedInfoDTO;
......
package com.topdraw.business.module.member.relatedinfo.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.relatedinfo.domain.MemberRelatedInfo;
import com.topdraw.business.module.member.relatedinfo.service.dto.MemberRelatedInfoDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.common.validated.CreateGroup;
import com.topdraw.business.module.common.validated.UpdateGroup;
import com.topdraw.business.module.member.domain.Member;
......@@ -8,7 +9,6 @@ import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.business.module.user.iptv.domain.UserTv;
import com.topdraw.business.process.service.member.MemberOperationService;
import com.topdraw.business.process.service.UserOperationService;
import com.topdraw.common.ResultInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -19,7 +19,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
/**
* @author XiangHan
......
......@@ -2,6 +2,8 @@ package com.topdraw.business.module.member.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.topdraw.base.modules.exception.BadRequestException;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.business.module.member.domain.MemberBuilder;
import com.topdraw.business.module.member.domain.MemberSimple;
......@@ -16,9 +18,7 @@ import com.topdraw.business.module.member.service.dto.MemberSimpleDTO;
import com.topdraw.business.module.member.service.mapper.MemberMapper;
import com.topdraw.business.module.member.service.mapper.MemberSimpleMapper;
import com.topdraw.business.RedisKeyConstants;
import com.topdraw.exception.BadRequestException;
import com.topdraw.exception.GlobeExceptionMsg;
import com.topdraw.utils.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
......
package com.topdraw.business.module.member.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.domain.MemberSimple;
import com.topdraw.business.module.member.service.dto.MemberSimpleDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.member.viphistory.service.impl;
import com.topdraw.aspect.AsyncMqSend;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.business.module.member.service.MemberService;
import com.topdraw.business.module.member.service.dto.MemberDTO;
......@@ -12,7 +12,6 @@ import com.topdraw.business.module.member.viphistory.service.MemberVipHistorySer
import com.topdraw.business.module.member.viphistory.service.dto.MemberVipHistoryDTO;
import com.topdraw.business.module.member.viphistory.service.mapper.MemberVipHistoryMapper;
import com.topdraw.util.TimestampUtil;
import com.topdraw.utils.ValidationUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
......@@ -90,8 +89,7 @@ public class MemberVipHistoryServiceImpl implements MemberVipHistoryService {
@Override
public MemberVipHistory findByTime(Long memberId, Timestamp nowTime) {
LocalDateTime localDateTime = TimestampUtil.timestamp2LocalDateTime(nowTime);
MemberVipHistory memberVipHistory = this.memberVipHistoryRepository.findByTime(memberId, localDateTime).orElseGet(MemberVipHistory::new);
return memberVipHistory;
return this.memberVipHistoryRepository.findByTime(memberId, localDateTime).orElseGet(MemberVipHistory::new);
}
private MemberDTO checkMember(MemberVipHistory resources){
......
package com.topdraw.business.module.member.viphistory.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.member.viphistory.domain.MemberVipHistory;
import com.topdraw.business.module.member.viphistory.service.dto.MemberVipHistoryDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.points.available.service.dto;
import com.topdraw.base.modules.annotation.Query;
import lombok.Data;
import com.topdraw.annotation.Query;
import java.sql.Timestamp;
......
package com.topdraw.business.module.points.available.service.impl;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.points.available.domain.PointsAvailable;
import com.topdraw.utils.RedisUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.points.available.repository.PointsAvailableRepository;
import com.topdraw.business.module.points.available.service.PointsAvailableService;
import com.topdraw.business.module.points.available.service.dto.PointsAvailableDTO;
import com.topdraw.business.module.points.available.service.mapper.PointsAvailableMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.util.Assert;
import com.topdraw.utils.StringUtils;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.*;
/**
......
package com.topdraw.business.module.points.available.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.points.available.domain.PointsAvailable;
import com.topdraw.business.module.points.available.service.dto.PointsAvailableDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.points.detail.detailhistory.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.points.detail.detailhistory.domain.PointsDetailHistory;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.points.detail.detailhistory.repository.PointsDetailHistoryRepository;
import com.topdraw.business.module.points.detail.detailhistory.service.PointsDetailHistoryService;
import com.topdraw.business.module.points.detail.detailhistory.service.dto.PointsDetailHistoryDTO;
import com.topdraw.business.module.points.detail.detailhistory.service.mapper.PointsDetailHistoryMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.util.Assert;
import com.topdraw.utils.StringUtils;
/**
* @author XiangHan
......
package com.topdraw.business.module.points.detail.detailhistory.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.points.detail.detailhistory.domain.PointsDetailHistory;
import com.topdraw.business.module.points.detail.detailhistory.service.dto.PointsDetailHistoryDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.points.detail.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.points.detail.domain.PointsDetail;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.points.detail.repository.PointsDetailRepository;
import com.topdraw.business.module.points.detail.service.PointsDetailService;
import com.topdraw.business.module.points.detail.service.dto.PointsDetailDTO;
import com.topdraw.business.module.points.detail.service.mapper.PointsDetailMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.util.Assert;
import com.topdraw.utils.StringUtils;
import java.util.List;
import java.util.Objects;
......
package com.topdraw.business.module.points.detail.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.points.detail.domain.PointsDetail;
import com.topdraw.business.module.points.detail.service.dto.PointsDetailDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.points.service.impl;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.points.domain.Points;
import com.topdraw.utils.RedisUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.points.repository.PointsRepository;
import com.topdraw.business.module.points.service.PointsService;
import com.topdraw.business.module.points.service.dto.PointsDTO;
......
package com.topdraw.business.module.points.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.points.domain.Points;
import com.topdraw.business.module.points.service.dto.PointsDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.rights.history.service.dto;
import com.topdraw.annotation.Query;
import com.topdraw.base.modules.annotation.Query;
import lombok.Data;
import java.sql.Timestamp;
......
package com.topdraw.business.module.rights.history.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.service.MemberService;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.business.module.rights.history.domain.RightsHistory;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.rights.history.repository.RightsHistoryRepository;
import com.topdraw.business.module.rights.history.service.RightsHistoryService;
import com.topdraw.business.module.rights.history.service.dto.RightsHistoryDTO;
import com.topdraw.business.module.rights.history.service.dto.RightsHistoryQueryCriteria;
import com.topdraw.business.module.rights.history.service.mapper.RightsHistoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -37,8 +36,7 @@ public class RightsHistoryServiceImpl implements RightsHistoryService {
@Override
public List<RightsHistoryDTO> findByMemberIdOrMemberCode(Long memberId, String memberCode) {
MemberDTO memberDTO = this.memberService.checkMember(memberId, memberCode);
List<RightsHistoryDTO> rightsHistoryDTOList = this.rightsHistoryRepository.findByMemberId(memberDTO.getId());
return rightsHistoryDTOList;
return this.rightsHistoryRepository.findByMemberId(memberDTO.getId());
}
@Override
......
package com.topdraw.business.module.rights.history.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.rights.history.domain.RightsHistory;
import com.topdraw.business.module.rights.history.service.dto.RightsHistoryDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.rights.permanentrights.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.rights.permanentrights.domain.PermanentRights;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.rights.permanentrights.repository.PermanentRightsRepository;
import com.topdraw.business.module.rights.permanentrights.service.PermanentRightsService;
import com.topdraw.business.module.rights.permanentrights.service.dto.PermanentRightsDTO;
import com.topdraw.business.module.rights.permanentrights.service.mapper.PermanentRightsMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.topdraw.utils.StringUtils;
/**
* @author XiangHan
......
package com.topdraw.business.module.rights.permanentrights.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.rights.permanentrights.domain.PermanentRights;
import com.topdraw.business.module.rights.permanentrights.service.dto.PermanentRightsDTO;
import org.mapstruct.Mapper;
......
......@@ -2,11 +2,11 @@ package com.topdraw.business.module.rights.service.impl;
import com.topdraw.business.module.rights.domain.Rights;
import com.topdraw.business.RedisKeyConstants;
import com.topdraw.utils.*;
import com.topdraw.business.module.rights.repository.RightsRepository;
import com.topdraw.business.module.rights.service.RightsService;
import com.topdraw.business.module.rights.service.dto.RightsDTO;
import com.topdraw.business.module.rights.service.mapper.RightsMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
......
package com.topdraw.business.module.rights.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.rights.domain.Rights;
import com.topdraw.business.module.rights.service.dto.RightsDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.task.attribute.service.impl;
import com.alibaba.fastjson.JSON;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.task.attribute.domain.TaskAttr;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.task.attribute.repository.TaskAttrRepository;
import com.topdraw.business.module.task.attribute.service.TaskAttrService;
import com.topdraw.business.module.task.attribute.service.dto.TaskAttrDTO;
......
package com.topdraw.business.module.task.attribute.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.task.attribute.domain.TaskAttr;
import com.topdraw.business.module.task.attribute.service.dto.TaskAttrDTO;
import org.mapstruct.Mapper;
......
......@@ -38,6 +38,10 @@ public class Task implements Serializable {
@NotNull(message = "taskTemplateId is null", groups = {CreateGroup.class})
private Long taskTemplateId;
/** 关联实体id */
@Column(name = "entity_id", nullable = false)
private String entityId;
@Transient
private String taskTemplateCode;
......
......@@ -27,6 +27,7 @@ public class TaskBuilder {
task_.setTaskTemplateCode(task.getTaskTemplateCode());
task_.setName(task.getName());
task_.setEntityId(task.getEntityId());
task_.setCode(StringUtils.isEmpty(task.getCode()) ? IdWorker.generatorCode("task_") : task.getCode());
task_.setStatus(Objects.isNull(task.getStatus()) ? 1 : task.getStatus());
task_.setSequence(task.getSequence());
......
package com.topdraw.business.module.task.progress.service.impl;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.business.module.task.progress.domain.TrTaskProgress;
import com.topdraw.business.RedisKeyConstants;
import com.topdraw.utils.RedisUtils;
import com.topdraw.business.module.task.progress.repository.TrTaskProgressRepository;
import com.topdraw.business.module.task.progress.service.TrTaskProgressService;
import com.topdraw.business.module.task.progress.service.dto.TrTaskProgressDTO;
......@@ -44,14 +44,12 @@ public class TrTaskProgressServiceImpl implements TrTaskProgressService {
@Override
@Transactional(rollbackFor = Exception.class)
// @CachePut(cacheNames = RedisKeyConstants.cacheTaskProcessByMemberId, key = "#resources.memberId+':'+#resources.taskId+':'+#date", unless = "#result == null ")
public TrTaskProgress create(TrTaskProgress resources, String date) {
return this.trTaskProgressRepository.save(resources);
}
@Override
@Transactional(rollbackFor = Exception.class)
// @CachePut(cacheNames = RedisKeyConstants.cacheTaskProcessByMemberId, key = "#resources.memberId+':'+#resources.taskId+':'+#date", unless = "#result == null ")
public TrTaskProgress update(TrTaskProgress resources, String date) {
return this.trTaskProgressRepository.save(resources);
}
......@@ -94,7 +92,7 @@ public class TrTaskProgressServiceImpl implements TrTaskProgressService {
}
if (finishTasks.size() > 0) {
// 总记录一直存储
this.redisUtils.hmset(RedisKeyConstants.cacheTotalFinishTaskCount + "::" + memberId, finishTasks);
this.redisUtils.hmsetForObject(RedisKeyConstants.cacheTotalFinishTaskCount + "::" + memberId, finishTasks);
}
return finishTasks;
......@@ -124,7 +122,7 @@ public class TrTaskProgressServiceImpl implements TrTaskProgressService {
if (finishTasks.size() > 0) {
// 单天的记录只存储一天
this.redisUtils.hmset(RedisKeyConstants.cacheTodayFinishTaskCount + "::" + memberId + ":" + LocalDate.now(), finishTasks, 24*60*60);
this.redisUtils.hmsetForObject(RedisKeyConstants.cacheTodayFinishTaskCount + "::" + memberId + ":" + LocalDate.now(), finishTasks, 24*60*60);
}
return finishTasks;
......
package com.topdraw.business.module.task.progress.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.task.progress.domain.TrTaskProgress;
import com.topdraw.business.module.task.progress.service.dto.TrTaskProgressDTO;
import org.mapstruct.Mapper;
......
......@@ -29,5 +29,11 @@ public interface TaskRepository extends JpaRepository<Task, Long>, JpaSpecificat
@Query(value = "SELECT ta.* FROM tr_task ta LEFT JOIN tr_task_template tm ON ta.task_template_id = tm.id " +
" WHERE ta.`status` = 1 AND ta.valid_time <= now() and ta.expire_time >= now() AND ta.delete_mark = 0 AND " +
" tm.type = ?1 AND ta.`member_level` <= ?2 and ta.`member_vip` <= ?3", nativeQuery = true)
List<Map<String,Object>> findByEventAndLevelAndVip(Integer event, Integer level, Integer vip);
List<Map<String,Object>> findByTypeAndLevelAndVip(Integer type, Integer level, Integer vip);
@Query(value = "SELECT ta.* FROM tr_task ta LEFT JOIN tr_task_template tm ON ta.task_template_id = tm.id " +
" WHERE ta.`status` = 1 AND ta.valid_time <= now() and ta.expire_time >= now() AND ta.delete_mark = 0 AND " +
" tm.event = ?1 AND ta.`member_level` <= ?2 and ta.`member_vip` <= ?3", nativeQuery = true)
List<Map<String,Object>> findByEventAndLevelAndVip(String event, Integer level, Integer vip);
}
......
......@@ -64,6 +64,6 @@ public interface TaskService {
* @param event
* @return
*/
List<Task> findByEventAndMemberLevelAndVip(Integer event, Integer level, Integer vip);
List<Task> findByEventAndMemberLevelAndVip(String event, Integer level, Integer vip);
}
......
......@@ -20,6 +20,9 @@ public class TaskDTO implements Serializable {
/** 任务模板id */
private Long taskTemplateId;
/** 关联实体id */
private String entityId;
/** 删除标识 0:正常;1:已删除;*/
private Integer deleteMark;
......
......@@ -3,6 +3,7 @@ package com.topdraw.business.module.task.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.business.module.task.attribute.service.TaskAttrService;
import com.topdraw.business.module.task.attribute.service.dto.TaskAttrDTO;
import com.topdraw.business.module.task.domain.Task;
......@@ -11,7 +12,6 @@ import com.topdraw.business.module.task.service.TaskService;
import com.topdraw.business.module.task.service.dto.TaskDTO;
import com.topdraw.business.module.task.service.mapper.TaskMapper;
import com.topdraw.business.RedisKeyConstants;
import com.topdraw.utils.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -19,10 +19,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -69,8 +66,14 @@ public class TaskServiceImpl implements TaskService {
@Override
public TaskDTO update(Task task) {
Task save = this.taskRepository.save(task);
return this.taskMapper.toDto(save);
Optional<Task> taskOptional = this.taskRepository.findById(task.getId());
if (taskOptional.isPresent()) {
Task task1 = taskOptional.get();
task1.copy(task);
Task result = this.taskRepository.save(task1);
return this.taskMapper.toDto(result);
}
return this.taskMapper.toDto(task);
}
@Override
......@@ -86,7 +89,7 @@ public class TaskServiceImpl implements TaskService {
@Override
@Transactional(readOnly = true)
public List<Task> findByEventAndMemberLevelAndVip(Integer event, Integer level, Integer vip) {
public List<Task> findByEventAndMemberLevelAndVip(String event, Integer level, Integer vip) {
try {
boolean b = this.redisUtils.hasKey(RedisKeyConstants.cacheTaskByEventAndMemberLevelAndVip + "::" + event + ":" + level + ":" + vip);
......@@ -102,30 +105,9 @@ public class TaskServiceImpl implements TaskService {
return tasks;
}
List<TaskAttrDTO> taskAttrDTOS = this.taskAttrService.findTasksByTaskIds(maps.stream().map(t -> t.get("id")).collect(Collectors.toSet()));
if (!CollectionUtils.isEmpty(taskAttrDTOS)) {
for (Map<String, Object> map : maps) {
Task task = JSONObject.parseObject(JSON.toJSONString(map), Task.class);
List<String> taskAttrs = taskAttrDTOS.stream().filter(taskAttrDTO -> taskAttrDTO.getTaskId().equals(task.getId())).
map(TaskAttrDTO::getAttrStr).collect(Collectors.toList());
log.info("任务属性值, dealTask# taskAttrs ==>> {}", taskAttrs);
if (!CollectionUtils.isEmpty(taskAttrs)) {
task.setAttr(String.join(",", taskAttrs));
}
tasks.add(task);
}
} else {
for (Map<String, Object> map : maps) {
Task task = JSONObject.parseObject(JSON.toJSONString(map), Task.class);
tasks.add(task);
}
for (Map<String, Object> map : maps) {
Task task = JSONObject.parseObject(JSON.toJSONString(map), Task.class);
tasks.add(task);
}
if (!CollectionUtils.isEmpty(tasks)) {
......
package com.topdraw.business.module.task.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.task.domain.Task;
import com.topdraw.business.module.task.service.dto.TaskDTO;
import org.mapstruct.Mapper;
......
......@@ -12,7 +12,7 @@ package com.topdraw.business.module.task.template.constant;
public interface TaskEventType {
//类型 1:登录;2:观影;3:参加活动;4:订购;5:优享会员;6:签到;7:完成设置;
// 8:播放记录;10:跨屏绑定;11:积分转移;30:积分兑换商品;98:系统操作;99:其他
int LOGIN = 1;
/*int LOGIN = 1;
int VIEW = 2;
int ACTIVITY = 3;
int ORDER = 4;
......@@ -22,8 +22,40 @@ public interface TaskEventType {
int PLAY = 8;
int BINDING = 10;
int POINTS_TRANS = 11;
int POINTS_EXCHANGE_GOODS = 30;
int POINTS_EXCHANGE_GOODS = 14;
int SYSTEM_OPERATE = 98;
int OHHER = 99;
int OHHER = 99;*/
// 登录
String LOGIN = "login";
// 观影
String VIEWING = "viewing";
// 参加活动
String JOINACTIVITIES = "join_activity";
// 购物
String ORDER = "order";
// 签到
String SIGN = "sign";
// 完善用户信息
String COMPLETEMEMBERINFO = "complete_member_info";
// 首次积分转移
String FIRSTPOINTSTRANS = "first_points_transfer";
// 微信分享
String WECHATSHARE = "wechat_share";
// 微信关注
String SUBSCRIBE = "subscribe";
// 成长报告
String GROWTHREPORT = "growth_report";
// 播放时长
String PLAY = "play";
// 大小屏绑定
String BINDING = "binding";
// 首次积分兑换
String FIRSTPOINTSEXCHANGE = "first_point_exchange";
// 添加收藏
String ADDCOLLECTION = "add_collection";
// 删除收藏
String DELETECOLLECTION = "delete_collection";
// 删除全部收藏
String DELETEALLCOLLECTION = "deleteAll_collection";
}
......
package com.topdraw.business.module.task.template.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.task.template.domain.TaskTemplate;
import com.topdraw.business.module.task.template.domain.TaskTemplateBuilder;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.task.template.repository.TaskTemplateRepository;
import com.topdraw.business.module.task.template.service.TaskTemplateService;
import com.topdraw.business.module.task.template.service.dto.TaskTemplateDTO;
import com.topdraw.business.module.task.template.service.mapper.TaskTemplateMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.util.Assert;
import com.topdraw.utils.StringUtils;
import java.util.List;
import java.util.Objects;
......@@ -85,8 +85,7 @@ public class TaskTemplateServiceImpl implements TaskTemplateService {
@Override
public Long countByCodeAndType(TaskTemplate taskTemplate) {
Long count = this.taskTemplateRepository.countByCodeAndType(taskTemplate.getCode(), taskTemplate.getType());
return count;
return this.taskTemplateRepository.countByCodeAndType(taskTemplate.getCode(), taskTemplate.getType());
}
}
......
package com.topdraw.business.module.task.template.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.task.template.domain.TaskTemplate;
import com.topdraw.business.module.task.template.service.dto.TaskTemplateDTO;
import org.mapstruct.Mapper;
......
......@@ -22,7 +22,11 @@ public class UserAppBuilder {
public static UserApp build(Long memberId, UserApp resource){
UserApp userApp = new UserApp();
userApp.setId(null);
if (Objects.nonNull(resource.getId())) {
userApp.setId(resource.getId());
} else {
userApp.setId(null);
}
userApp.setMemberId(memberId);
userApp.setUsername(resource.getUsername());
userApp.setTags(resource.getTags());
......
......@@ -61,4 +61,7 @@ public interface UserAppRepository extends JpaRepository<UserApp, Long>, JpaSpec
" :#{#resources.gender}, NULL, now(), NULL, :#{#resources.tags}, " +
" :#{#resources.description}, :#{#resources.createTime}, now());", nativeQuery = true)
void saveByIdManual(@Param("resources") UserAppIdManual userAppIdManual);
Optional<UserApp> findByMemberId(Long memberId);
}
......
package com.topdraw.business.module.user.app.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.user.app.domain.UserApp;
import com.topdraw.business.module.user.app.domain.UserAppBind;
import com.topdraw.business.module.user.app.service.UserAppBindService;
......@@ -10,8 +11,6 @@ import com.topdraw.business.module.vis.hainan.apple.domain.VisUserApple;
import com.topdraw.business.module.vis.hainan.qq.domain.VisUserQq;
import com.topdraw.business.module.vis.hainan.weibo.domain.VisUserWeibo;
import com.topdraw.business.module.vis.hainan.weixin.domain.VisUserWeixin;
import com.topdraw.common.ResultInfo;
import com.topdraw.annotation.Log;
import com.topdraw.business.module.user.app.service.UserAppService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
......@@ -37,7 +36,6 @@ public class UserAppController {
@Autowired
private UserAppBindService userAppBindService;
@Log
@PostMapping(value = "/saveAppAndBindApple4Vis")
@ApiOperation("兼容海南app苹果数据")
@AnonymousAccess
......@@ -53,7 +51,6 @@ public class UserAppController {
return this.userAppService.saveAppAndBindApple4Vis(resources);
}
@Log
@PostMapping(value = "/saveAppAndBindWeibo4Vis")
@ApiOperation("兼容海南app原微博数据")
@AnonymousAccess
......@@ -69,7 +66,6 @@ public class UserAppController {
return this.userAppService.saveAppAndBindWeibo4Vis(resources);
}
@Log
@PostMapping(value = "/saveAppAndBindQq4Vis")
@ApiOperation("兼容海南app原QQ数据")
@AnonymousAccess
......@@ -85,7 +81,6 @@ public class UserAppController {
}
@Log
@PostMapping(value = "/saveAppAndBindWeixin4Vis")
@ApiOperation("兼容海南app原微信数据")
@AnonymousAccess
......@@ -108,7 +103,6 @@ public class UserAppController {
}
@Log
@PostMapping(value = "/updateAppLastActiveTimeAndNicknameAndHeadImgById")
@ApiOperation("修改app账号最后登录时间、昵称和头像和用户名")
@AnonymousAccess
......@@ -127,11 +121,9 @@ public class UserAppController {
return ResultInfo.failure("修改app账号最后登录时间、昵称和头像和用户名失败,参数错误,app账号不得为空");
}
boolean result = this.userAppService.updateAppLastActiveTimeAndNicknameAndHeadImgById(resources);
return ResultInfo.success(result);
return ResultInfo.success(this.userAppService.updateAppLastActiveTimeAndNicknameAndHeadImgById(resources));
}
@Log
@PostMapping(value = "/updateAppLastActiveTimeAndNicknameAndHeadImg")
@ApiOperation("修改app账号最后登录时间、昵称和头像")
@AnonymousAccess
......@@ -143,11 +135,9 @@ public class UserAppController {
return ResultInfo.failure("修改app账号密码失败,参数错误,app账号不得为空");
}
boolean result = this.userAppService.updateAppLastActiveTimeAndNicknameAndHeadImg(resources);
return ResultInfo.success(result);
return ResultInfo.success(this.userAppService.updateAppLastActiveTimeAndNicknameAndHeadImg(resources));
}
@Log
@PostMapping(value = "/updateAppPasswordByUsername")
@ApiOperation("修改app账号密码")
@AnonymousAccess
......@@ -171,11 +161,9 @@ public class UserAppController {
// return ResultInfo.failure("密码必须包含大小写字母和数字的组合,不能使用特殊字符,长度在 8-25 之间");
// }
boolean result = this.userAppService.updatePasswordByUsername(resources);
return ResultInfo.success(result);
return ResultInfo.success(this.userAppService.updatePasswordByUsername(resources));
}
@Log
@PostMapping(value = "/updateLastActiveTime")
@ApiOperation("修改app账号最新登录时间")
@AnonymousAccess
......@@ -186,11 +174,9 @@ public class UserAppController {
log.error("修改app账号最新登录时间失败,参数错误,app账号不得为空,[updateLastActiveTime#{}]", resources);
return ResultInfo.failure("修改app账号最新登录时间失败,参数错误,app账号不得为空");
}
boolean result = this.userAppService.updateLastActiveTime(resources);
return ResultInfo.success(result);
return ResultInfo.success(this.userAppService.updateLastActiveTime(resources));
}
@Log
@PostMapping(value = "/saveThirdAccount")
@ApiOperation("保存第三方账号")
@AnonymousAccess
......@@ -208,11 +194,9 @@ public class UserAppController {
resources.setUserAppId(id);
}
UserAppBindDTO userAppBindDTO = this.userAppBindService.create(resources);
return ResultInfo.success(userAppBindDTO);
return this.userAppBindService.create(resources);
}
@Log
@PostMapping(value = "/updateValidStatusAndUserAppIdAndNickname")
@ApiOperation("修改第三方账号绑定状态、绑定的app账号以及第三方账号昵称")
@AnonymousAccess
......@@ -240,11 +224,9 @@ public class UserAppController {
return ResultInfo.failure("修改第三方账号, 参数错误, app账号不得为空");
}
boolean result = this.userAppBindService.updateValidStatusAndUserAppIdAndNickname(resources);
return ResultInfo.success(result);
return ResultInfo.success(this.userAppBindService.updateValidStatusAndUserAppIdAndNickname(resources));
}
@Log
@PostMapping(value = "/updateThirdAccountNickname")
@ApiOperation("修改第三方账号昵称")
@AnonymousAccess
......@@ -263,7 +245,6 @@ public class UserAppController {
return ResultInfo.failure("修改第三方账号昵称, 参数错误, 昵称不得为空");
}
boolean result = this.userAppBindService.updateThirdAccountNickname(resources);
return ResultInfo.success(result);
return ResultInfo.success(this.userAppBindService.updateThirdAccountNickname(resources));
}
}
......
package com.topdraw.business.module.user.app.service;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.user.app.domain.UserAppBind;
import com.topdraw.business.module.user.app.service.dto.UserAppBindDTO;
......@@ -22,7 +23,7 @@ public interface UserAppBindService {
*
* @param resources
*/
UserAppBindDTO create(UserAppBind resources);
ResultInfo create(UserAppBind resources);
/**
*
......
package com.topdraw.business.module.user.app.service;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.user.app.domain.UserApp;
import com.topdraw.business.module.user.app.domain.UserAppBind;
import com.topdraw.business.module.user.app.service.dto.UserAppDTO;
......@@ -8,7 +9,6 @@ import com.topdraw.business.module.vis.hainan.apple.domain.VisUserApple;
import com.topdraw.business.module.vis.hainan.qq.domain.VisUserQq;
import com.topdraw.business.module.vis.hainan.weibo.domain.VisUserWeibo;
import com.topdraw.business.module.vis.hainan.weixin.domain.VisUserWeixin;
import com.topdraw.common.ResultInfo;
/**
* @author XiangHan
......@@ -92,4 +92,8 @@ public interface UserAppService {
ResultInfo saveAppAndBindWeixin4Vis(VisUserWeixin resources);
ResultInfo saveAppAndBindQq4Vis(VisUserQq resources);
UserAppDTO findByMemberId(Long memberId);
UserAppDTO createByManual(UserApp userApp);
}
......
package com.topdraw.business.module.user.app.service.impl;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.user.app.domain.UserAppBind;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.user.app.repository.UserAppBindRepository;
import com.topdraw.business.module.user.app.service.UserAppBindService;
import com.topdraw.business.module.user.app.service.dto.UserAppBindDTO;
import com.topdraw.business.module.user.app.service.mapper.UserAppBindMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
......@@ -14,6 +16,7 @@ import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.util.Assert;
import java.util.List;
import java.util.Objects;
/**
* @author XiangHan
......@@ -21,6 +24,7 @@ import java.util.List;
*/
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
@Slf4j
public class UserAppBindServiceImpl implements UserAppBindService {
@Autowired
......@@ -38,9 +42,15 @@ public class UserAppBindServiceImpl implements UserAppBindService {
@Override
@Transactional(rollbackFor = Exception.class)
public UserAppBindDTO create(UserAppBind resources) {
public ResultInfo create(UserAppBind resources) {
UserAppBindDTO userAppBindDTO =
this.findFirstByAccountAndAccountType(resources.getAccount(), resources.getAccountType());
if (Objects.nonNull(userAppBindDTO.getId())) {
log.warn("保存第三方账号失败, saveThirdAccount# messgage ==>> 第三方账号已存在 | appBind ==>> {}", resources);
return ResultInfo.failure("保存第三方账号失败, 第三方账号已存在");
}
UserAppBind userAppBind = this.userAppBindRepository.save(resources);
return this.userAppBindMapper.toDto(userAppBind);
return ResultInfo.success(this.userAppBindMapper.toDto(userAppBind));
}
@Override
......
package com.topdraw.business.module.user.app.service.impl;
import com.topdraw.aspect.AsyncMqSend;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.business.module.member.domain.MemberBuilder;
import com.topdraw.business.module.member.domain.MemberTypeConstant;
......@@ -22,16 +24,14 @@ import com.topdraw.business.module.vis.hainan.apple.service.VisUserAppleService;
import com.topdraw.business.module.vis.hainan.qq.domain.VisUserQq;
import com.topdraw.business.module.vis.hainan.weibo.domain.VisUserWeibo;
import com.topdraw.business.module.vis.hainan.weixin.domain.VisUserWeixin;
import com.topdraw.common.ResultInfo;
import com.topdraw.util.Base64Util;
import com.topdraw.util.TimestampUtil;
import com.topdraw.utils.StringUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.user.app.repository.UserAppRepository;
import com.topdraw.business.module.user.app.service.UserAppService;
import com.topdraw.business.module.user.app.service.dto.UserAppDTO;
import com.topdraw.business.module.user.app.service.mapper.UserAppMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.aop.framework.AopContext;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -549,6 +549,21 @@ public class UserAppServiceImpl implements UserAppService {
return ResultInfo.failure(null);
}
@Override
@Transactional(readOnly = true)
public UserAppDTO findByMemberId(Long memberId) {
UserApp userApp = this.userAppRepository.findByMemberId(memberId).orElseGet(UserApp::new);
return this.userAppMapper.toDto(userApp);
}
@Override
@Transactional(rollbackFor = Exception.class)
public UserAppDTO createByManual(UserApp userApp) {
UserAppIdManual userAppIdManual = new UserAppIdManual();
BeanUtils.copyProperties(userApp, userAppIdManual);
this.userAppRepository.saveByIdManual(userAppIdManual);
return this.userAppMapper.toDto(userApp);
}
@Override
......
package com.topdraw.business.module.user.app.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.app.domain.UserAppBind;
import com.topdraw.business.module.user.app.service.dto.UserAppBindDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.app.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.app.domain.UserApp;
import com.topdraw.business.module.user.app.service.dto.UserAppDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.app.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.business.module.user.app.domain.UserApp;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.app.domain.UserAppSimple;
import com.topdraw.business.module.user.app.service.dto.UserAppDTO;
import com.topdraw.business.module.user.app.service.dto.UserAppSimpleDTO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
package com.topdraw.business.module.user.iptv.domain;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.exception.BadRequestException;
import com.topdraw.exception.GlobeExceptionMsg;
import com.topdraw.util.TimestampUtil;
import org.apache.commons.lang3.StringUtils;
......
package com.topdraw.business.module.user.iptv.growreport.rest;
import com.topdraw.common.ResultInfo;
import com.topdraw.annotation.Log;
import com.topdraw.business.module.user.iptv.growreport.domain.GrowthReport;
import com.topdraw.business.module.user.iptv.growreport.service.GrowthReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
......@@ -22,7 +20,6 @@ public class GrowthReportController {
@Autowired
private GrowthReportService GrowthReportService;
@Log
@PostMapping
@ApiOperation("新增GrowthReport")
public ResultInfo create(@Validated @RequestBody GrowthReport resources) {
......@@ -30,7 +27,6 @@ public class GrowthReportController {
return ResultInfo.success();
}
@Log
@PutMapping
@ApiOperation("修改GrowthReport")
public ResultInfo update(@Validated @RequestBody GrowthReport resources) {
......@@ -39,7 +35,6 @@ public class GrowthReportController {
}
@Log
@DeleteMapping(value = "/{id}")
@ApiOperation("删除GrowthReport")
public ResultInfo delete(@PathVariable Long id) {
......
package com.topdraw.business.module.user.iptv.growreport.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.user.iptv.growreport.domain.GrowthReport;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.user.iptv.growreport.repository.GrowthReportRepository;
import com.topdraw.business.module.user.iptv.growreport.service.GrowthReportService;
import com.topdraw.business.module.user.iptv.growreport.service.dto.GrowthReportDTO;
......@@ -13,14 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.dao.EmptyResultDataAccessException;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.util.Assert;
import com.topdraw.utils.PageUtil;
import com.topdraw.utils.QueryHelp;
import java.util.List;
import java.util.Map;
/**
* @author XiangHan
......
package com.topdraw.business.module.user.iptv.growreport.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.iptv.growreport.domain.GrowthReport;
import com.topdraw.business.module.user.iptv.growreport.service.dto.GrowthReportDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.iptv.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.base.modules.exception.BadRequestException;
import com.topdraw.business.module.user.iptv.domain.UserTv;
import com.topdraw.business.module.user.iptv.service.UserTvService;
import com.topdraw.business.module.user.iptv.service.dto.UserTvDTO;
import com.topdraw.common.ResultInfo;
import com.topdraw.exception.BadRequestException;
import com.topdraw.exception.GlobeExceptionMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......
......@@ -3,6 +3,9 @@ package com.topdraw.business.module.user.iptv.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.topdraw.aspect.AsyncMqSend;
import com.topdraw.base.modules.exception.EntityNotFoundException;
import com.topdraw.base.modules.utils.RedisUtils;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.member.service.MemberService;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.business.module.user.iptv.domain.UserTv;
......@@ -11,10 +14,7 @@ import com.topdraw.business.module.user.iptv.repository.UserTvSimpleRepository;
import com.topdraw.business.module.user.iptv.service.dto.UserTvSimpleDTO;
import com.topdraw.business.module.user.iptv.service.mapper.UserTvSimpleMapper;
import com.topdraw.business.RedisKeyConstants;
import com.topdraw.exception.EntityNotFoundException;
import com.topdraw.exception.GlobeExceptionMsg;
import com.topdraw.utils.RedisUtils;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.user.iptv.repository.UserTvRepository;
import com.topdraw.business.module.user.iptv.service.UserTvService;
import com.topdraw.business.module.user.iptv.service.dto.UserTvDTO;
......
package com.topdraw.business.module.user.iptv.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.iptv.domain.UserTv;
import com.topdraw.business.module.user.iptv.service.dto.UserTvDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.iptv.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.business.module.user.iptv.domain.UserTv;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.iptv.domain.UserTvSimple;
import com.topdraw.business.module.user.iptv.service.dto.UserTvSimpleDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.weixin.collection.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.user.weixin.collection.domain.UserCollectionDetail;
import com.topdraw.business.module.user.weixin.collection.repository.UserCollectionDetailRepository;
import com.topdraw.business.module.user.weixin.collection.service.UserCollectionDetailService;
import com.topdraw.business.module.user.weixin.collection.service.dto.UserCollectionDetailDTO;
import com.topdraw.business.module.user.weixin.collection.service.mapper.UserCollectionDetailMapper;
import com.topdraw.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.stereotype.Service;
......
package com.topdraw.business.module.user.weixin.collection.service.impl;
import com.topdraw.base.modules.utils.FileUtil;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.user.weixin.collection.domain.UserCollection;
import com.topdraw.business.module.user.weixin.collection.repository.UserCollectionRepository;
import com.topdraw.business.module.user.weixin.collection.service.UserCollectionService;
import com.topdraw.business.module.user.weixin.collection.service.dto.UserCollectionDTO;
import com.topdraw.business.module.user.weixin.collection.service.mapper.UserCollectionMapper;
import com.topdraw.utils.FileUtil;
import com.topdraw.utils.ValidationUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.stereotype.Service;
......
package com.topdraw.business.module.user.weixin.collection.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.weixin.collection.domain.UserCollectionDetail;
import com.topdraw.business.module.user.weixin.collection.service.dto.UserCollectionDetailDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.weixin.collection.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.weixin.collection.domain.UserCollection;
import com.topdraw.business.module.user.weixin.collection.service.dto.UserCollectionDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.weixin.domain;
import com.topdraw.base.modules.exception.BadRequestException;
import com.topdraw.business.module.member.domain.Member;
import com.topdraw.exception.BadRequestException;
import com.topdraw.exception.GlobeExceptionMsg;
import com.topdraw.util.TimestampUtil;
import org.apache.commons.lang3.StringUtils;
import java.sql.Timestamp;
......
package com.topdraw.business.module.user.weixin.rest;
import com.topdraw.annotation.AnonymousAccess;
import com.topdraw.common.ResultInfo;
import com.topdraw.base.modules.annotation.AnonymousAccess;
import com.topdraw.base.modules.common.ResultInfo;
import com.topdraw.business.module.user.weixin.domain.UserWeixin;
import com.topdraw.business.module.user.weixin.service.UserWeixinService;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.topdraw.business.module.user.weixin.service.dto;
import com.topdraw.annotation.Query;
import com.topdraw.base.modules.annotation.Query;
import lombok.Data;
/**
......
package com.topdraw.business.module.user.weixin.service.impl;
import com.topdraw.base.modules.utils.ValidationUtil;
import com.topdraw.business.module.user.weixin.domain.UserWeixin;
import com.topdraw.business.module.user.weixin.domain.UserWeixinBuilder;
import com.topdraw.utils.ValidationUtil;
import com.topdraw.business.module.user.weixin.repository.UserWeixinRepository;
import com.topdraw.business.module.user.weixin.service.UserWeixinService;
import com.topdraw.business.module.user.weixin.service.dto.UserWeixinDTO;
......
package com.topdraw.business.module.user.weixin.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.weixin.domain.UserWeixin;
import com.topdraw.business.module.user.weixin.service.dto.UserWeixinDTO;
import org.mapstruct.Mapper;
......
package com.topdraw.business.module.user.weixin.subscribe.service.mapper;
import com.topdraw.base.BaseMapper;
import com.topdraw.base.modules.base.BaseMapper;
import com.topdraw.business.module.user.weixin.subscribe.domain.WechatSubscribeRecord;
import com.topdraw.business.module.user.weixin.subscribe.service.dto.WechatSubscribeRecordDTO;
import org.mapstruct.Mapper;
......