Compare commits
No commits in common. "89b2c589389b3c694b3288c0761767e2a2e96c9b" and "87f259cd6f9580d0f02dc1806061a0eebb4081f8" have entirely different histories.
89b2c58938
...
87f259cd6f
|
@ -87,8 +87,10 @@ public class PublishController {
|
||||||
@ApiOperation(value = "删除")
|
@ApiOperation(value = "删除")
|
||||||
@PostMapping("remove")
|
@PostMapping("remove")
|
||||||
public R<Object> deletePublish(@RequestBody @Valid PublishRemoveRes publishRemoveRes) {
|
public R<Object> deletePublish(@RequestBody @Valid PublishRemoveRes publishRemoveRes) {
|
||||||
|
Long communityId = publishRemoveRes.getCommunityId();
|
||||||
return publishService.removePublish(publishRemoveRes);
|
Long publishId = publishRemoveRes.getPublishId();
|
||||||
|
publishService.remove(new LambdaQueryWrapper<Publish>().eq(Publish::getId, publishId).eq(Publish::getCommunityId, communityId));
|
||||||
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,17 +98,14 @@ public class PublishController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "精选/取消精选")
|
@ApiOperation(value = "精选/取消精选")
|
||||||
@GetMapping("elite")
|
@GetMapping("elite")
|
||||||
public R<Object> elitePublish(@NotNull(message = "租户id不能为空")
|
public R<Object> elitePublish(@NotNull(message = "社区id不能为空")
|
||||||
@ApiParam(value = "租户id")
|
|
||||||
@Valid Long tenantId,
|
|
||||||
@NotNull(message = "社区id不能为空")
|
|
||||||
@ApiParam(value = "社区id")
|
@ApiParam(value = "社区id")
|
||||||
@Valid Long communityId,
|
@Valid Long communityId,
|
||||||
@NotNull(message = "发布文章id不能为空")
|
@NotNull(message = "发布文章id不能为空")
|
||||||
@ApiParam(value = "发布文章id")
|
@ApiParam(value = "发布文章id")
|
||||||
@Valid Long publishId) {
|
@Valid Long publishId) {
|
||||||
|
publishService.elitePublish(communityId, publishId);
|
||||||
return publishService.elitePublish(tenantId, communityId, publishId);
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -145,9 +145,9 @@ public class PersonalCenterController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取金币收入支出消费记录
|
* 获取金币消费记录
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取金币收入支出消费记录")
|
@ApiOperation(value = "获取金币消费记录")
|
||||||
@PostMapping("/getWalletRecord")
|
@PostMapping("/getWalletRecord")
|
||||||
public TableDataInfo getWalletRecord(@Valid @RequestBody PageDomain pageDomain) {
|
public TableDataInfo getWalletRecord(@Valid @RequestBody PageDomain pageDomain) {
|
||||||
return consumeService.getWalletRecord(pageDomain);
|
return consumeService.getWalletRecord(pageDomain);
|
||||||
|
|
|
@ -136,7 +136,7 @@ mall:
|
||||||
# 沙箱应用id
|
# 沙箱应用id
|
||||||
appId: 9021000135682614
|
appId: 9021000135682614
|
||||||
# 沙箱应用私钥
|
# 沙箱应用私钥
|
||||||
privateKey: MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCZVV6wTtfUJP7UoSLMCYiGad2Jj2hlOyDVNLXZVf+Vffckt7/g3Ye/jIPt1D/arB2f/wO01qKOkraBCXg2LQOL3g72Na9MUZ0JJ6Tk4JAgRngR3GoO1XuEz52yq4yX7nVcD+xDbAt865GZWZhKL+7DgW22z1f7TtEDpfHwFcvMfznwTm5R6VpOw0qYnnHzOZwNxrtKNQLYIJVZhuvi51PuLn4dpC1nH487BjPBLSFiTMcN0aQzaFs2d3OQcMBykQFp8CR00LvKqsUHjVm6hwMm0/sObd3Meu7to6fRCNIYtu3LaDwS9s7tvRGIf3y7wFb+R2nfz83FSXx20D2wGxKhAgMBAAECggEASpXrTGndtLUWPEnxijys6209tTdL+coMS4mrV3/spkQy3up+7Jv192gbmKmhMfZ9JqG+pM2vHxkgq532mqvEyNmIf51XmxEsCRL+s9LEaN6+czm7YWHZBp6TQCEQb6sv7UtViupYoDhah7S8ToIIa5Ne0gkD7BvHsjWbfUSs8NjF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7pzUwIk2whDwKBgAys3+EIfExY82OL5X6uVGjcuKQmTw11oWK8krxRw5iclgjpCXu/ix+BAtOIU634mlgF9/02oYE9k4TLrvSaJDDgsifNyfq1e/fGLmkYT+VuCxWbulVQn4s+AwlPCrYMGWWK6KlL9638fYcOjGjLaZJpXwkXRtyzUYlhKh/r87JpAoGBAIavRp2mi/xrPvgpQQPv0k9L8llfOCHRnjoqC+thrZsNp8eRmJcBmMVnskofEZ2iHQuS71pw/n58EQTLo0ayJbhPjVJL8K3CovXzrfjbmqqoa5xi3bJQTiXdF6rMw1QpD6Uk05E1LVuQ6v/IZFr7kBYlAQWb8z3NhQq+bPU+nyLvAoGAGpBbSM8gPzdWQqkHoos0icu3cj0GhN3MU7+1Eb/rsXyh/lk5wtZTEnHjwhdUOUtwVNjvrv7CzA7unhOoaM6YcE/Zpd4zt8pjqH1Mhds7UHf4Xg+A+J4G6meYnhSwfBpOub02ncsqfBlXE0qhFv6AvcMewWndyLb8EYaUUXTYkG0=
|
||||||
# 沙箱应用公钥证书
|
# 沙箱应用公钥证书
|
||||||
appCertPath: /opt/cert/dev/appPublicCert.crt
|
appCertPath: /opt/cert/dev/appPublicCert.crt
|
||||||
# 沙箱支付宝公钥证书路径
|
# 沙箱支付宝公钥证书路径
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIDmTCCAoGgAwIBAgIQICUEKLy77ndlVg3UfaV5GDANBgkqhkiG9w0BAQsFADCBkTELMAkGA1UE
|
MIIDmTCCAoGgAwIBAgIQICQEAub4U5TMozibHLcg8zANBgkqhkiG9w0BAQsFADCBkTELMAkGA1UE
|
||||||
BhMCQ04xGzAZBgNVBAoMEkFudCBGaW5hbmNpYWwgdGVzdDElMCMGA1UECwwcQ2VydGlmaWNhdGlv
|
BhMCQ04xGzAZBgNVBAoMEkFudCBGaW5hbmNpYWwgdGVzdDElMCMGA1UECwwcQ2VydGlmaWN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STr035sJezP9VYtKQwTXyUTCVVC6WQQdT/040WvMqkPVGtDEWzStZWflXK1IeAXnOLXyCYEBBG6
|
4YOffum8yC0oF7aMtTL9whm5gb+Udj+lBrHYYw8VPNpcvBmRlXEKEJLbWQrGtJi6+URReWqO52UP
|
||||||
aE08iD5MOCZmldDOFg==
|
fGHB0r4r575H4Y1QkA==
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
|
@ -31,12 +31,6 @@
|
||||||
<groupId>com.mcwl</groupId>
|
<groupId>com.mcwl</groupId>
|
||||||
<artifactId>mcwl-system</artifactId>
|
<artifactId>mcwl-system</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.mcwl</groupId>
|
|
||||||
<artifactId>mcwl-myInvitation</artifactId>
|
|
||||||
<version>3.8.8</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/com.alibaba/dashscope-sdk-java -->
|
<!-- https://mvnrepository.com/artifact/com.alibaba/dashscope-sdk-java -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
|
|
@ -7,17 +7,11 @@ import lombok.Data;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除发布请求参数
|
* 点赞/取消点赞请求参数
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "删除发布请求参数")
|
@ApiModel(value = "点赞/取消点赞请求参数")
|
||||||
public class PublishRemoveRes {
|
public class PublishRemoveRes {
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "租户id", required = true)
|
|
||||||
@NotNull(message = "租户id不能为空")
|
|
||||||
private Long tenantId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区id
|
* 社区id
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class QuestionRes {
|
||||||
* 是否匿名 0 否 1 是
|
* 是否匿名 0 否 1 是
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "是否匿名", position = 5)
|
@ApiModelProperty(value = "是否匿名", position = 5)
|
||||||
|
@NotNull(message = "是否匿名不能为空")
|
||||||
private Integer isAnonymous = 0;
|
private Integer isAnonymous = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,12 @@ public class CommunityVo {
|
||||||
@ApiModelProperty(value = "加入人数")
|
@ApiModelProperty(value = "加入人数")
|
||||||
private Integer joinNum;
|
private Integer joinNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布数量")
|
||||||
|
private Integer publishNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否加入
|
* 是否加入
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -124,11 +124,6 @@ public class PersonHomeVo {
|
||||||
@ApiModelProperty(value = "付费金额 当提问类型为付费时必填")
|
@ApiModelProperty(value = "付费金额 当提问类型为付费时必填")
|
||||||
private Double amount;
|
private Double amount;
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态 0未解决 1已解决
|
|
||||||
*/
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -92,12 +92,6 @@ public class QuestionVo {
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态 0未解决 1已解决
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "状态 0未解决 1已解决")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mcwl.communityCenter.domain.Publish;
|
import com.mcwl.communityCenter.domain.Publish;
|
||||||
import com.mcwl.communityCenter.domain.dto.MyPublishPageRes;
|
import com.mcwl.communityCenter.domain.dto.MyPublishPageRes;
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishRemoveRes;
|
|
||||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -44,7 +43,7 @@ public interface PublishMapper extends BaseMapper<Publish> {
|
||||||
@Param("communityId")
|
@Param("communityId")
|
||||||
Long communityId);
|
Long communityId);
|
||||||
|
|
||||||
void elitePublish(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId, @Param("publishId") Long publishId);
|
void elitePublish(@Param("communityId") Long communityId, @Param("publishId") Long publishId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
List<PublishVo> publishList(Page<Publish> page, @Param("publishPageRes") PublishPageRes publishPageRes);
|
List<PublishVo> publishList(Page<Publish> page, @Param("publishPageRes") PublishPageRes publishPageRes);
|
||||||
|
@ -59,10 +58,4 @@ public interface PublishMapper extends BaseMapper<Publish> {
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
Publish getLastPublish(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
Publish getLastPublish(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
|
||||||
void removePublish(@Param("publishRemoveRes") PublishRemoveRes publishRemoveRes);
|
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
|
||||||
void updateLikeNum(@Param("publish") Publish publish);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public interface PublishService extends IService<Publish> {
|
||||||
|
|
||||||
TableDataInfo publishFile(@Valid PublishPageRes publishPageRes);
|
TableDataInfo publishFile(@Valid PublishPageRes publishPageRes);
|
||||||
|
|
||||||
R<Object> elitePublish(Long tenantId, Long communityId, Long publishId);
|
void elitePublish(Long communityId, Long publishId);
|
||||||
|
|
||||||
TableDataInfo publishList(PublishPageRes publishPageRes);
|
TableDataInfo publishList(PublishPageRes publishPageRes);
|
||||||
|
|
||||||
|
@ -44,6 +44,4 @@ public interface PublishService extends IService<Publish> {
|
||||||
void reportPublish(@Valid PublishReportRes publishReportRes);
|
void reportPublish(@Valid PublishReportRes publishReportRes);
|
||||||
|
|
||||||
Publish getLastPublish(Long tenantId, Long communityId);
|
Publish getLastPublish(Long tenantId, Long communityId);
|
||||||
|
|
||||||
R<Object> removePublish(@Valid PublishRemoveRes publishRemoveRes);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,6 @@ import com.mcwl.communityCenter.mapper.CommunityMapper;
|
||||||
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
||||||
import com.mcwl.communityCenter.service.CommunityService;
|
import com.mcwl.communityCenter.service.CommunityService;
|
||||||
import com.mcwl.communityCenter.service.PublishService;
|
import com.mcwl.communityCenter.service.PublishService;
|
||||||
import com.mcwl.myInvitation.domain.Consume;
|
|
||||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
|
||||||
import com.mcwl.system.service.ISysUserService;
|
import com.mcwl.system.service.ISysUserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -56,9 +54,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
|
|
||||||
private final PublishService publishService;
|
private final PublishService publishService;
|
||||||
|
|
||||||
private final ConsumeMapper consumeMapper;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo listByPage(CommunityListPageRes communityListPageRes) {
|
public TableDataInfo listByPage(CommunityListPageRes communityListPageRes) {
|
||||||
|
@ -98,7 +93,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
.userId(SecurityUtils.getUserId())
|
.userId(SecurityUtils.getUserId())
|
||||||
.userType(2)
|
.userType(2)
|
||||||
.build());
|
.build());
|
||||||
redisCache.deleteObject("communityJoinNumMap");
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage(), HttpStatus.SHOW_ERROR_MSG);
|
throw new ServiceException(e.getMessage(), HttpStatus.SHOW_ERROR_MSG);
|
||||||
|
@ -118,7 +112,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
Long communityId = joinCommunityRes.getCommunityId();
|
Long communityId = joinCommunityRes.getCommunityId();
|
||||||
Community community = baseMapper.getByTenantIdAndCommunityId(tenantId, communityId);
|
Community community = baseMapper.getByTenantIdAndCommunityId(tenantId, communityId);
|
||||||
if (Objects.isNull(community)) {
|
if (Objects.isNull(community)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"社区不存在,请重新加入");
|
return R.fail("社区不存在,请重新加入");
|
||||||
}
|
}
|
||||||
|
|
||||||
CommunityUser communityUser = communityUserMapper.selectByTenantIdAndCommunityIdAndUserId(tenantId,
|
CommunityUser communityUser = communityUserMapper.selectByTenantIdAndCommunityIdAndUserId(tenantId,
|
||||||
|
@ -126,14 +120,14 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
SecurityUtils.getUserId());
|
SecurityUtils.getUserId());
|
||||||
|
|
||||||
if (Objects.nonNull(communityUser)) {
|
if (Objects.nonNull(communityUser)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"您已加入该社区,不能重复加入");
|
return R.fail("您已加入该社区,不能重复加入");
|
||||||
}
|
}
|
||||||
|
|
||||||
SysUser user = sysUserService.selectUserById(SecurityUtils.getUserId());
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||||
Double wallet = user.getWallet();
|
Double wallet = user.getWallet();
|
||||||
Double price = community.getPrice();
|
Double price = community.getPrice();
|
||||||
if (wallet < price) {
|
if (wallet < price) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"钱包余额不足,请充值");
|
return R.fail("钱包余额不足,请充值");
|
||||||
}
|
}
|
||||||
// 扣费
|
// 扣费
|
||||||
BigDecimal priceBigDecimal = new BigDecimal(price.toString());
|
BigDecimal priceBigDecimal = new BigDecimal(price.toString());
|
||||||
|
@ -173,25 +167,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
SecurityUtils.getLoginUser().getUser().getNickName(), community.getCommunityName(), price));
|
SecurityUtils.getLoginUser().getUser().getNickName(), community.getCommunityName(), price));
|
||||||
communityAdviceMapper.insert(communityAdvice);
|
communityAdviceMapper.insert(communityAdvice);
|
||||||
|
|
||||||
Consume consume = new Consume();
|
|
||||||
consume.setUserId(SecurityUtils.getUserId());
|
|
||||||
consume.setAmount(-price);
|
|
||||||
consume.setProductId(communityId);
|
|
||||||
consume.setType(3);
|
|
||||||
consume.setWallet(user.getWallet());
|
|
||||||
consumeMapper.insert(consume);
|
|
||||||
|
|
||||||
consume = new Consume();
|
|
||||||
consume.setUserId(community.getTenantId());
|
|
||||||
consume.setAmount(price);
|
|
||||||
consume.setProductId(communityId);
|
|
||||||
consume.setType(3);
|
|
||||||
consume.setWallet(sysUserService.selectUserById(community.getTenantId()).getWallet());
|
|
||||||
consumeMapper.insert(consume);
|
|
||||||
|
|
||||||
redisCache.deleteObject("communityJoinNumMap");
|
|
||||||
|
|
||||||
|
|
||||||
return R.ok("加入成功");
|
return R.ok("加入成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,8 +213,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
|
|
||||||
if (communityJoinNum == 1) {
|
if (communityJoinNum == 1) {
|
||||||
baseMapper.deleteCommunity(tenantId, communityId);
|
baseMapper.deleteCommunity(tenantId, communityId);
|
||||||
} else {
|
|
||||||
redisCache.deleteObject("communityJoinNumMap");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
@ -326,7 +299,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
communityVo.setNickName(sysUser.getNickName());
|
communityVo.setNickName(sysUser.getNickName());
|
||||||
communityVo.setCreateDay(daysBetween);
|
communityVo.setCreateDay(daysBetween);
|
||||||
communityVo.setJoinNum(this.getCommunityJoinNum(community.getId()));
|
communityVo.setJoinNum(this.getCommunityJoinNum(community.getId()));
|
||||||
// communityVo.setPublishNum(this.getCommunityPublishNum(community.getId()));
|
communityVo.setPublishNum(this.getCommunityPublishNum(community.getId()));
|
||||||
if (myJoinCommunityMap.get(community.getId()) != null) {
|
if (myJoinCommunityMap.get(community.getId()) != null) {
|
||||||
communityVo.setIsJoin(1);
|
communityVo.setIsJoin(1);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class PublishCollectServiceImpl extends ServiceImpl<PublishCollectMapper,
|
||||||
private final PublishLikeMapper publishLikeMapper;
|
private final PublishLikeMapper publishLikeMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo myCollectList(MyPublishCollectPageRes myPublishCollectPageRes) {
|
public TableDataInfo myCollectList(MyPublishCollectPageRes myPublishCollectPageRes) {
|
||||||
Page<PublishCollect> page = initPage(myPublishCollectPageRes);
|
Page<PublishCollect> page = initPage(myPublishCollectPageRes);
|
||||||
|
@ -44,23 +45,6 @@ public class PublishCollectServiceImpl extends ServiceImpl<PublishCollectMapper,
|
||||||
for (PublishVo publishVo : publishVoList) {
|
for (PublishVo publishVo : publishVoList) {
|
||||||
PersonHomeVo personHomeVo = BeanUtil.toBean(publishVo, PersonHomeVo.class);
|
PersonHomeVo personHomeVo = BeanUtil.toBean(publishVo, PersonHomeVo.class);
|
||||||
|
|
||||||
PublishLikeRes publishLikeRes = new PublishLikeRes();
|
|
||||||
publishLikeRes.setTenantId(myPublishCollectPageRes.getTenantId());
|
|
||||||
publishLikeRes.setCommunityId(myPublishCollectPageRes.getCommunityId());
|
|
||||||
publishLikeRes.setPublishId(publishVo.getId());
|
|
||||||
PublishLike publishLike = publishLikeMapper.selectPublishLike(publishLikeRes, SecurityUtils.getUserId());
|
|
||||||
if (Objects.nonNull(publishLike)) {
|
|
||||||
String delFlag = publishLike.getDelFlag();
|
|
||||||
if ("0".equals(delFlag)) {
|
|
||||||
publishVo.setIsLike(1);
|
|
||||||
} else {
|
|
||||||
publishVo.setIsLike(0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
publishVo.setIsLike(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CommentDetailRes commentDetailRes = new CommentDetailRes();
|
CommentDetailRes commentDetailRes = new CommentDetailRes();
|
||||||
commentDetailRes.setTenantId(myPublishCollectPageRes.getTenantId());
|
commentDetailRes.setTenantId(myPublishCollectPageRes.getTenantId());
|
||||||
commentDetailRes.setCommunityId(myPublishCollectPageRes.getCommunityId());
|
commentDetailRes.setCommunityId(myPublishCollectPageRes.getCommunityId());
|
||||||
|
|
|
@ -71,12 +71,12 @@ public class PublishLikeServiceImpl extends ServiceImpl<PublishLikeMapper, Publi
|
||||||
baseMapper.insert(publishLike);
|
baseMapper.insert(publishLike);
|
||||||
|
|
||||||
publish.setLikeNum(publish.getLikeNum() + 1);
|
publish.setLikeNum(publish.getLikeNum() + 1);
|
||||||
publishMapper.updateLikeNum(publish);
|
publishMapper.updateById(publish);
|
||||||
this.addLikeAdvice(publish);
|
this.addLikeAdvice(publish);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("0".equals(publishLike.getDelFlag())) {
|
if (Objects.equals(publishLike.getDelFlag(), "0")) {
|
||||||
publishLike.setDelFlag("2");
|
publishLike.setDelFlag("2");
|
||||||
int likeNum = publish.getLikeNum() - 1;
|
int likeNum = publish.getLikeNum() - 1;
|
||||||
likeNum = Math.max(likeNum, 0);
|
likeNum = Math.max(likeNum, 0);
|
||||||
|
@ -88,7 +88,7 @@ public class PublishLikeServiceImpl extends ServiceImpl<PublishLikeMapper, Publi
|
||||||
}
|
}
|
||||||
|
|
||||||
baseMapper.updateDelFlagById(publishLike);
|
baseMapper.updateDelFlagById(publishLike);
|
||||||
publishMapper.updateLikeNum(publish);
|
publishMapper.updateById(publish);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.domain.entity.SysUser;
|
import com.mcwl.common.core.domain.entity.SysUser;
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.common.core.redis.RedisCache;
|
|
||||||
import com.mcwl.common.exception.BusinessException;
|
import com.mcwl.common.exception.BusinessException;
|
||||||
import com.mcwl.common.exception.ServiceException;
|
import com.mcwl.common.exception.ServiceException;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
|
@ -61,8 +60,6 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
||||||
|
|
||||||
private final PublishReportMapper publishReportMapper;
|
private final PublishReportMapper publishReportMapper;
|
||||||
|
|
||||||
private final RedisCache redisCache;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PublishVo getDetail(PublishDetailRes publishDetailRes) {
|
public PublishVo getDetail(PublishDetailRes publishDetailRes) {
|
||||||
|
@ -114,8 +111,6 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
||||||
publish.setPublishTime(new Date());
|
publish.setPublishTime(new Date());
|
||||||
}
|
}
|
||||||
baseMapper.insertPublish(publish);
|
baseMapper.insertPublish(publish);
|
||||||
redisCache.deleteObject("communityPublishNumMap");
|
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,20 +208,8 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Object> elitePublish(Long tenantId, Long communityId, Long publishId) {
|
public void elitePublish(Long communityId, Long publishId) {
|
||||||
|
baseMapper.elitePublish(communityId, publishId);
|
||||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, SecurityUtils.getUserId());
|
|
||||||
if (Objects.isNull(communityUser)) {
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
|
|
||||||
}
|
|
||||||
if ("1".equals(communityUser.getIsBlack())) {
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您已被拉黑");
|
|
||||||
}
|
|
||||||
if (communityUser.getUserType() != 2) {
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是群主");
|
|
||||||
}
|
|
||||||
baseMapper.elitePublish(tenantId, communityId, publishId);
|
|
||||||
return R.ok();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -343,7 +326,7 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("0".equals(publishCollect.getDelFlag())) {
|
if (publishCollect.getDelFlag().equals("0")) {
|
||||||
publishCollect.setDelFlag("2");
|
publishCollect.setDelFlag("2");
|
||||||
} else {
|
} else {
|
||||||
publishCollect.setDelFlag("0");
|
publishCollect.setDelFlag("0");
|
||||||
|
@ -414,31 +397,6 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
||||||
return baseMapper.getLastPublish(tenantId, communityId);
|
return baseMapper.getLastPublish(tenantId, communityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public R<Object> removePublish(PublishRemoveRes publishRemoveRes) {
|
|
||||||
Long tenantId = publishRemoveRes.getTenantId();
|
|
||||||
Long communityId = publishRemoveRes.getCommunityId();
|
|
||||||
Long publishId = publishRemoveRes.getPublishId();
|
|
||||||
|
|
||||||
Long currentUserId = SecurityUtils.getUserId();
|
|
||||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, currentUserId);
|
|
||||||
if (Objects.isNull(communityUser)) {
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
|
|
||||||
}
|
|
||||||
|
|
||||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(publishId, tenantId, communityId);
|
|
||||||
if (Objects.isNull(publish)) {
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该内容不存在");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (publish.getUserId().equals(currentUserId) || publish.getUserId().equals(tenantId)) {
|
|
||||||
publishMapper.removePublish(publishRemoveRes);
|
|
||||||
} else {
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您没有权限删除该内容");
|
|
||||||
}
|
|
||||||
return R.ok(HttpStatus.SHOW_ERROR_MSG, "删除成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
private Page<Publish> initPage(PageDomain pageDomain) {
|
private Page<Publish> initPage(PageDomain pageDomain) {
|
||||||
return new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
return new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,6 @@ import com.mcwl.communityCenter.domain.vo.QuestionVo;
|
||||||
import com.mcwl.communityCenter.mapper.*;
|
import com.mcwl.communityCenter.mapper.*;
|
||||||
import com.mcwl.communityCenter.service.QuestionCommentService;
|
import com.mcwl.communityCenter.service.QuestionCommentService;
|
||||||
import com.mcwl.communityCenter.service.QuestionService;
|
import com.mcwl.communityCenter.service.QuestionService;
|
||||||
import com.mcwl.myInvitation.domain.Consume;
|
|
||||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
|
||||||
import com.mcwl.system.service.ISysUserService;
|
import com.mcwl.system.service.ISysUserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -44,8 +42,6 @@ public class QuestionCommentServiceImpl extends ServiceImpl<QuestionCommentMappe
|
||||||
|
|
||||||
private final CommunityUserMapper communityUserMapper;
|
private final CommunityUserMapper communityUserMapper;
|
||||||
|
|
||||||
private final ConsumeMapper consumeMapper;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public R<Object> comment(QuestionCommentRes questionCommentRes) {
|
public R<Object> comment(QuestionCommentRes questionCommentRes) {
|
||||||
|
@ -166,14 +162,6 @@ public class QuestionCommentServiceImpl extends ServiceImpl<QuestionCommentMappe
|
||||||
sysUserService.updateUser(sysUser);
|
sysUserService.updateUser(sysUser);
|
||||||
|
|
||||||
|
|
||||||
Consume consume = new Consume();
|
|
||||||
consume.setUserId(SecurityUtils.getUserId());
|
|
||||||
consume.setAmount(question.getAmount());
|
|
||||||
consume.setType(4);
|
|
||||||
consume.setWallet(sysUser.getWallet());
|
|
||||||
consumeMapper.insert(consume);
|
|
||||||
|
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@ import com.mcwl.communityCenter.mapper.*;
|
||||||
import com.mcwl.communityCenter.service.CommunityService;
|
import com.mcwl.communityCenter.service.CommunityService;
|
||||||
import com.mcwl.communityCenter.service.QuestionCommentService;
|
import com.mcwl.communityCenter.service.QuestionCommentService;
|
||||||
import com.mcwl.communityCenter.service.QuestionService;
|
import com.mcwl.communityCenter.service.QuestionService;
|
||||||
import com.mcwl.myInvitation.domain.Consume;
|
|
||||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
|
||||||
import com.mcwl.system.service.ISysUserService;
|
import com.mcwl.system.service.ISysUserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
@ -55,9 +53,6 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
||||||
|
|
||||||
private final QuestionCommentService questionCommentService;
|
private final QuestionCommentService questionCommentService;
|
||||||
|
|
||||||
private final ConsumeMapper consumeMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加问题
|
* 添加问题
|
||||||
*
|
*
|
||||||
|
@ -107,14 +102,6 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
||||||
sysUserService.updateUser(sysUser);
|
sysUserService.updateUser(sysUser);
|
||||||
|
|
||||||
|
|
||||||
Consume consume = new Consume();
|
|
||||||
consume.setUserId(SecurityUtils.getUserId());
|
|
||||||
consume.setAmount(-questionRes.getAmount());
|
|
||||||
consume.setType(4);
|
|
||||||
consume.setWallet(sysUser.getWallet());
|
|
||||||
consumeMapper.insert(consume);
|
|
||||||
|
|
||||||
|
|
||||||
// CommunityAdvice communityAdvice = new CommunityAdvice();
|
// CommunityAdvice communityAdvice = new CommunityAdvice();
|
||||||
// communityAdvice.setTenantId(tenantId);
|
// communityAdvice.setTenantId(tenantId);
|
||||||
// communityAdvice.setCommunityId(communityId);
|
// communityAdvice.setCommunityId(communityId);
|
||||||
|
@ -261,14 +248,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
||||||
personHomeVo.setAvatar(questionUserAvatar);
|
personHomeVo.setAvatar(questionUserAvatar);
|
||||||
personHomeVo.setImageUrl(questionUrl);
|
personHomeVo.setImageUrl(questionUrl);
|
||||||
|
|
||||||
QuestionDetailRes questionDetailRes = new QuestionDetailRes();
|
|
||||||
questionDetailRes.setTenantId(questionVo.getTenantId());
|
|
||||||
questionDetailRes.setCommunityId(questionVo.getCommunityId());
|
|
||||||
questionDetailRes.setQuestionId(questionVo.getId());
|
|
||||||
|
|
||||||
List<QuestionCommentVo> questionCommentList = questionCommentService.getComment(questionDetailRes);
|
List<QuestionCommentVo> questionCommentList = questionVo.getCommentList();
|
||||||
|
|
||||||
// List<QuestionCommentVo> questionCommentList = questionVo.getCommentList();
|
|
||||||
|
|
||||||
List<CommentVo> commentList = BeanUtil.copyToList(questionCommentList, CommentVo.class);
|
List<CommentVo> commentList = BeanUtil.copyToList(questionCommentList, CommentVo.class);
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,8 @@
|
||||||
where cu.user_id = #{userId}
|
where cu.user_id = #{userId}
|
||||||
and c.del_flag = '0'
|
and c.del_flag = '0'
|
||||||
and cu.del_flag = '0'
|
and cu.del_flag = '0'
|
||||||
<if test="joinCommunityListPageRes.isMyCreate != 1">
|
<if test="joinCommunityListPageRes.isMyCreate == 1">
|
||||||
and c.tenant_id != #{userId}
|
and c.tenant_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
<if test="joinCommunityListPageRes.searchContent != null and joinCommunityListPageRes.searchContent != ''">
|
<if test="joinCommunityListPageRes.searchContent != null and joinCommunityListPageRes.searchContent != ''">
|
||||||
and (c.community_name like concat('%', #{joinCommunityListPageRes.searchContent}, '%')
|
and (c.community_name like concat('%', #{joinCommunityListPageRes.searchContent}, '%')
|
||||||
|
|
|
@ -104,7 +104,6 @@
|
||||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
||||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
||||||
and (black_end_time is null or NOW() >= black_end_time)
|
and (black_end_time is null or NOW() >= black_end_time)
|
||||||
and del_flag = '0';
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getAllCommunityUser" resultType="com.mcwl.communityCenter.domain.CommunityUser">
|
<select id="getAllCommunityUser" resultType="com.mcwl.communityCenter.domain.CommunityUser">
|
||||||
select id,
|
select id,
|
||||||
|
@ -132,7 +131,6 @@
|
||||||
and user_id = #{userId}
|
and user_id = #{userId}
|
||||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
||||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
||||||
and del_flag = '0';
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getCommunityUserAvatar" resultType="java.lang.String">
|
<select id="getCommunityUserAvatar" resultType="java.lang.String">
|
||||||
select u.avatar
|
select u.avatar
|
||||||
|
@ -143,7 +141,6 @@
|
||||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= cu.start_time
|
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= cu.start_time
|
||||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= cu.end_time) or
|
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= cu.end_time) or
|
||||||
(cu.start_time is null and cu.end_time is null))
|
(cu.start_time is null and cu.end_time is null))
|
||||||
and cu.del_flag = '0'
|
|
||||||
order by cu.create_time desc
|
order by cu.create_time desc
|
||||||
limit 5
|
limit 5
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -17,22 +17,23 @@
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="myCollectList" resultType="com.mcwl.communityCenter.domain.vo.PublishVo">
|
<select id="myCollectList" resultType="com.mcwl.communityCenter.domain.vo.PublishVo">
|
||||||
select p.*,
|
select p.*, 1 as is_collect,u.user_id, u.avatar, u.nick_name as user_name,
|
||||||
1 as is_collect,
|
IF(pl.del_flag = '0', 1, 0) as is_like
|
||||||
u.user_id,
|
from cc_publish p left join cc_publish_collect pc
|
||||||
u.avatar,
|
|
||||||
u.nick_name as user_name
|
|
||||||
from cc_publish p
|
|
||||||
left join cc_publish_collect pc
|
|
||||||
on p.id = pc.publish_id
|
on p.id = pc.publish_id
|
||||||
and p.tenant_id = pc.tenant_id
|
and p.tenant_id = pc.tenant_id
|
||||||
and p.community_id = pc.community_id
|
and p.community_id = pc.community_id
|
||||||
|
left join cc_publish_like pl
|
||||||
|
on p.id = pl.publish_id
|
||||||
|
and p.tenant_id = pl.tenant_id
|
||||||
|
and p.community_id = pl.community_id
|
||||||
left join sys_user u on p.user_id = u.user_id
|
left join sys_user u on p.user_id = u.user_id
|
||||||
where pc.tenant_id = #{myPublishCollectPageRes.tenantId}
|
<where>
|
||||||
|
and pc.tenant_id = #{myPublishCollectPageRes.tenantId}
|
||||||
and pc.community_id = #{myPublishCollectPageRes.communityId}
|
and pc.community_id = #{myPublishCollectPageRes.communityId}
|
||||||
and pc.user_id = #{userId}
|
and pc.user_id = #{userId}
|
||||||
and pc.del_flag = '0'
|
and pc.del_flag = '0'
|
||||||
and p.del_flag = '0'
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="getPublishCollect" resultType="com.mcwl.communityCenter.domain.PublishCollect">
|
<select id="getPublishCollect" resultType="com.mcwl.communityCenter.domain.PublishCollect">
|
||||||
select *
|
select *
|
||||||
|
|
|
@ -14,24 +14,6 @@
|
||||||
set is_elite = !is_elite
|
set is_elite = !is_elite
|
||||||
where community_id = #{communityId}
|
where community_id = #{communityId}
|
||||||
and id = #{publishId}
|
and id = #{publishId}
|
||||||
and tenant_id = #{tenantId}
|
|
||||||
and del_flag = '0'
|
|
||||||
</update>
|
|
||||||
<update id="removePublish">
|
|
||||||
update cc_publish
|
|
||||||
set del_flag = '2'
|
|
||||||
where tenant_id = #{publishRemoveRes.tenantId}
|
|
||||||
and community_id = #{publishRemoveRes.communityId}
|
|
||||||
and id = #{publishRemoveRes.publishId}
|
|
||||||
and del_flag = '0'
|
|
||||||
</update>
|
|
||||||
<update id="updateLikeNum">
|
|
||||||
update cc_publish
|
|
||||||
set like_num = #{publish.likeNum}
|
|
||||||
where tenant_id = #{publish.tenantId}
|
|
||||||
and community_id = #{publish.communityId}
|
|
||||||
and id = #{publish.id}
|
|
||||||
and del_flag = '0'
|
|
||||||
</update>
|
</update>
|
||||||
<select id="selectByTenantIdAndCommunityIdPage" resultType="com.mcwl.communityCenter.domain.Publish">
|
<select id="selectByTenantIdAndCommunityIdPage" resultType="com.mcwl.communityCenter.domain.Publish">
|
||||||
select id,
|
select id,
|
||||||
|
@ -118,6 +100,10 @@
|
||||||
select p.*, u.nick_name as user_name, u.avatar
|
select p.*, u.nick_name as user_name, u.avatar
|
||||||
from cc_publish p
|
from cc_publish p
|
||||||
left join sys_user u on p.user_id = u.user_id
|
left join sys_user u on p.user_id = u.user_id
|
||||||
|
left join cc_publish_like pl on pl.tenant_id = p.tenant_id and pl.community_id = p.community_id and p.id =
|
||||||
|
pl.publish_id
|
||||||
|
left join cc_publish_collect pc on p.id = pc.publish_id and p.tenant_id = pc.tenant_id and
|
||||||
|
p.community_id = pc.community_id
|
||||||
<where>
|
<where>
|
||||||
and p.tenant_id = #{publishPageRes.tenantId}
|
and p.tenant_id = #{publishPageRes.tenantId}
|
||||||
and p.community_id = #{publishPageRes.communityId}
|
and p.community_id = #{publishPageRes.communityId}
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
and qm.community_id = #{questionDetailRes.communityId}
|
and qm.community_id = #{questionDetailRes.communityId}
|
||||||
and qm.question_id = #{questionDetailRes.questionId}
|
and qm.question_id = #{questionDetailRes.questionId}
|
||||||
and qm.del_flag = '0'
|
and qm.del_flag = '0'
|
||||||
order by qm.is_accept desc, qm.create_time desc
|
order by qm.create_time desc
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -29,11 +29,12 @@ public class Consume extends BaseEntity {
|
||||||
// 商品id
|
// 商品id
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
/**
|
// 商品类型 0模型 1工作流 2图片
|
||||||
* 商品类型 0模型 1工作流 2图片 3社区 4社区提问 5金币 6提现
|
|
||||||
*/
|
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
// 剩余金币
|
// 剩余金币
|
||||||
private Double wallet;
|
private Double wallet;
|
||||||
|
|
||||||
|
// 消费时间
|
||||||
|
private Date consumeDate;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,5 +40,5 @@ public class ConsumeVo {
|
||||||
// 消费时间
|
// 消费时间
|
||||||
@ApiModelProperty(value = "消费时间")
|
@ApiModelProperty(value = "消费时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date createTime;
|
private Date consumeDate;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class ConsumeServiceImpl extends ServiceImpl<ConsumeMapper, Consume> impl
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
LambdaQueryWrapper<Consume> lqw = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Consume> lqw = new LambdaQueryWrapper<>();
|
||||||
lqw.eq(Consume::getUserId, userId).orderByDesc(Consume::getCreateTime);
|
lqw.eq(Consume::getUserId, userId);
|
||||||
|
|
||||||
consumeMapper.selectPage(page, lqw);
|
consumeMapper.selectPage(page, lqw);
|
||||||
|
|
||||||
|
@ -81,18 +81,6 @@ public class ConsumeServiceImpl extends ServiceImpl<ConsumeMapper, Consume> impl
|
||||||
case 2:
|
case 2:
|
||||||
consumeVo.setProductName("图片");
|
consumeVo.setProductName("图片");
|
||||||
break;
|
break;
|
||||||
case 3:
|
|
||||||
consumeVo.setProductName("社区");
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
consumeVo.setProductName("社区提问");
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
consumeVo.setProductName("金币");
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
consumeVo.setProductName("提现");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
consumeVoList.add(consumeVo);
|
consumeVoList.add(consumeVo);
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,6 @@ import com.mcwl.common.utils.ShareCodeUtils;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.memberCenter.domain.MemberLevel;
|
import com.mcwl.memberCenter.domain.MemberLevel;
|
||||||
import com.mcwl.memberCenter.service.MemberLevelService;
|
import com.mcwl.memberCenter.service.MemberLevelService;
|
||||||
import com.mcwl.myInvitation.domain.Consume;
|
|
||||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
|
||||||
import com.mcwl.pay.config.AliConfig;
|
import com.mcwl.pay.config.AliConfig;
|
||||||
import com.mcwl.pay.domain.OrderTrade;
|
import com.mcwl.pay.domain.OrderTrade;
|
||||||
import com.mcwl.pay.domain.OrderTradeDto;
|
import com.mcwl.pay.domain.OrderTradeDto;
|
||||||
|
@ -94,9 +92,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrderTradeService orderTradeService;
|
private OrderTradeService orderTradeService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ConsumeMapper consumeMapper;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
||||||
|
|
||||||
|
@ -540,13 +535,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
sysUser.setWallet(wallet.subtract(amountBigDecimal).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
sysUser.setWallet(wallet.subtract(amountBigDecimal).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
||||||
sysUserService.updateUser(sysUser);
|
sysUserService.updateUser(sysUser);
|
||||||
|
|
||||||
Consume consume = new Consume();
|
|
||||||
consume.setUserId(SecurityUtils.getUserId());
|
|
||||||
consume.setAmount(-Double.parseDouble(amount));
|
|
||||||
consume.setType(6);
|
|
||||||
consume.setWallet(sysUser.getWallet());
|
|
||||||
consumeMapper.insert(consume);
|
|
||||||
|
|
||||||
// 添加记录
|
// 添加记录
|
||||||
SysUserPayAccountLog sysUserPayAccountLog = new SysUserPayAccountLog();
|
SysUserPayAccountLog sysUserPayAccountLog = new SysUserPayAccountLog();
|
||||||
sysUserPayAccountLog.setUserId(sysUser.getUserId());
|
sysUserPayAccountLog.setUserId(sysUser.getUserId());
|
||||||
|
|
|
@ -26,7 +26,6 @@ import com.mcwl.memberCenter.service.RechargeRecordService;
|
||||||
import com.mcwl.myInvitation.domain.Commission;
|
import com.mcwl.myInvitation.domain.Commission;
|
||||||
import com.mcwl.myInvitation.domain.CommissionRatio;
|
import com.mcwl.myInvitation.domain.CommissionRatio;
|
||||||
import com.mcwl.myInvitation.domain.Consume;
|
import com.mcwl.myInvitation.domain.Consume;
|
||||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
|
||||||
import com.mcwl.myInvitation.service.CommissionRatioService;
|
import com.mcwl.myInvitation.service.CommissionRatioService;
|
||||||
import com.mcwl.myInvitation.service.CommissionService;
|
import com.mcwl.myInvitation.service.CommissionService;
|
||||||
import com.mcwl.myInvitation.service.ConsumeService;
|
import com.mcwl.myInvitation.service.ConsumeService;
|
||||||
|
@ -112,9 +111,6 @@ public class OrderTradeServiceImpl extends ServiceImpl<OrderTradeMapper, OrderTr
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ConsumeMapper consumeMapper;
|
|
||||||
|
|
||||||
private static final Cache<String, Object> USER_LOCKS = CacheBuilder.newBuilder()
|
private static final Cache<String, Object> USER_LOCKS = CacheBuilder.newBuilder()
|
||||||
.expireAfterAccess(3, TimeUnit.MINUTES)
|
.expireAfterAccess(3, TimeUnit.MINUTES)
|
||||||
.build();
|
.build();
|
||||||
|
@ -174,6 +170,7 @@ public class OrderTradeServiceImpl extends ServiceImpl<OrderTradeMapper, OrderTr
|
||||||
consume.setProductId(productId);
|
consume.setProductId(productId);
|
||||||
consume.setType(productType);
|
consume.setType(productType);
|
||||||
consume.setWallet(sysUser.getWallet());
|
consume.setWallet(sysUser.getWallet());
|
||||||
|
consume.setConsumeDate(new Date());
|
||||||
consumeService.save(consume);
|
consumeService.save(consume);
|
||||||
|
|
||||||
//添加购买记录表
|
//添加购买记录表
|
||||||
|
@ -517,13 +514,6 @@ public class OrderTradeServiceImpl extends ServiceImpl<OrderTradeMapper, OrderTr
|
||||||
user.setWallet(walletDecimal.doubleValue());
|
user.setWallet(walletDecimal.doubleValue());
|
||||||
sysUserService.updateUser(user);
|
sysUserService.updateUser(user);
|
||||||
|
|
||||||
Consume consume = new Consume();
|
|
||||||
consume.setUserId(SecurityUtils.getUserId());
|
|
||||||
consume.setAmount(Double.parseDouble(amount));
|
|
||||||
consume.setType(5);
|
|
||||||
consume.setWallet(user.getWallet());
|
|
||||||
consumeMapper.insert(consume);
|
|
||||||
|
|
||||||
// 添加充值记录
|
// 添加充值记录
|
||||||
// RechargeRecord rechargeRecord = new RechargeRecord();
|
// RechargeRecord rechargeRecord = new RechargeRecord();
|
||||||
// rechargeRecord.setUserId(userId);
|
// rechargeRecord.setUserId(userId);
|
||||||
|
|
Loading…
Reference in New Issue