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