Compare commits
No commits in common. "5083e455aba118686c9efc84e3d245303cd9ba37" and "76e7619eac9a6414d15b2a884dfbe61cbe27eb6f" have entirely different histories.
5083e455ab
...
76e7619eac
|
@ -1,51 +0,0 @@
|
||||||
package com.mcwl.web.controller.communityCenter;
|
|
||||||
|
|
||||||
|
|
||||||
import com.mcwl.common.core.domain.R;
|
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.*;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityFileLogService;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityFileService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件
|
|
||||||
*/
|
|
||||||
@Api(tags = "社区文件")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("communityFile")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class CommunityFileController {
|
|
||||||
|
|
||||||
private final CommunityFileService communityFileService;
|
|
||||||
|
|
||||||
private final CommunityFileLogService communityFileLogService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件上传
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "社区文件上传")
|
|
||||||
@PostMapping("/upload")
|
|
||||||
public R<Object> upload(@RequestBody @Valid CommunityUploadFileRes communityUploadFileRes) {
|
|
||||||
communityFileService.upload(communityUploadFileRes);
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件列表
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "社区文件列表")
|
|
||||||
@PostMapping("/list")
|
|
||||||
public TableDataInfo getCommunityFileList(@RequestBody @Valid CommunityFilePageListRes communityFilePageListRes) {
|
|
||||||
return communityFileService.getCommunityFileList(communityFilePageListRes);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -31,6 +31,16 @@ public class PublishController {
|
||||||
|
|
||||||
private final PublishService publishService;
|
private final PublishService publishService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取发布列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取发布列表")
|
||||||
|
@PostMapping("list")
|
||||||
|
public TableDataInfo list(@RequestBody @Valid PublishPageRes publishPageRes) {
|
||||||
|
return publishService.getPublishList(publishPageRes);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取发布详情
|
* 获取发布详情
|
||||||
*/
|
*/
|
||||||
|
@ -40,7 +50,7 @@ public class PublishController {
|
||||||
|
|
||||||
PublishVo publishVo = publishService.getDetail(publishDetailRes);
|
PublishVo publishVo = publishService.getDetail(publishDetailRes);
|
||||||
if (Objects.isNull(publishVo)) {
|
if (Objects.isNull(publishVo)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "获取详情失败");
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"获取详情失败");
|
||||||
}
|
}
|
||||||
return R.ok(publishVo);
|
return R.ok(publishVo);
|
||||||
}
|
}
|
||||||
|
@ -55,31 +65,22 @@ public class PublishController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取发布列表
|
* 获取发布图片列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取发布列表")
|
@ApiOperation(value = "获取发布图片列表")
|
||||||
@PostMapping("publishList")
|
@PostMapping("publishImage")
|
||||||
public TableDataInfo publishList(@RequestBody @Valid PublishPageRes publishPageRes) {
|
public TableDataInfo publishImage(@RequestBody @Valid PublishPageRes publishPageRes) {
|
||||||
return publishService.publishList(publishPageRes);
|
return publishService.publishImage(publishPageRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 获取发布图片列表
|
* 获取发布文件列表
|
||||||
// */
|
*/
|
||||||
// @ApiOperation(value = "获取发布图片列表")
|
@ApiOperation(value = "获取发布文件列表")
|
||||||
// @PostMapping("publishImage")
|
@PostMapping("publishFile")
|
||||||
// public TableDataInfo publishImage(@RequestBody @Valid PublishPageRes publishPageRes) {
|
public TableDataInfo publishFile(@RequestBody @Valid PublishPageRes publishPageRes) {
|
||||||
// return publishService.publishImage(publishPageRes);
|
return publishService.publishFile(publishPageRes);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 获取发布文件列表
|
|
||||||
// */
|
|
||||||
// @ApiOperation(value = "获取发布文件列表")
|
|
||||||
// @PostMapping("publishFile")
|
|
||||||
// public TableDataInfo publishFile(@RequestBody @Valid PublishPageRes publishPageRes) {
|
|
||||||
// return publishService.publishFile(publishPageRes);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
@ -91,19 +92,4 @@ public class PublishController {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 精选/取消精选
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "精选/取消精选")
|
|
||||||
@GetMapping("elite")
|
|
||||||
public R<Object> elitePublish(@NotNull(message = "社区id不能为空")
|
|
||||||
@ApiParam(value = "社区id")
|
|
||||||
@Valid Long communityId,
|
|
||||||
@NotNull(message = "发布文章id不能为空")
|
|
||||||
@ApiParam(value = "发布文章id")
|
|
||||||
@Valid Long publishId) {
|
|
||||||
publishService.elitePublish(communityId, publishId);
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,20 @@ package com.mcwl.web.controller.memberCenter;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.memberCenter.domain.Benefit;
|
import com.mcwl.memberCenter.domain.Benefit;
|
||||||
import com.mcwl.memberCenter.domain.dto.AddBenefitDto;
|
import com.mcwl.memberCenter.domain.dto.BenefitDto;
|
||||||
import com.mcwl.memberCenter.domain.dto.EditBenefitDto;
|
|
||||||
import com.mcwl.memberCenter.domain.vo.BenefitVo;
|
import com.mcwl.memberCenter.domain.vo.BenefitVo;
|
||||||
|
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
||||||
import com.mcwl.memberCenter.service.BenefitService;
|
import com.mcwl.memberCenter.service.BenefitService;
|
||||||
|
import com.mcwl.memberCenter.service.MemberBenefitService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
@ -27,7 +30,6 @@ public class BenefitController {
|
||||||
|
|
||||||
private final BenefitService benefitService;
|
private final BenefitService benefitService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权益列表
|
* 权益列表
|
||||||
*/
|
*/
|
||||||
|
@ -35,8 +37,15 @@ public class BenefitController {
|
||||||
@ApiOperation(value = "权益列表")
|
@ApiOperation(value = "权益列表")
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
public R<List<BenefitVo>> list() {
|
public R<List<BenefitVo>> list() {
|
||||||
|
List<Benefit> benefitList = benefitService.list();
|
||||||
|
List<BenefitVo> benefitVoList = new ArrayList<>();
|
||||||
|
for (Benefit benefit : benefitList) {
|
||||||
|
BenefitVo benefitVo = BeanUtil.copyProperties(benefit, BenefitVo.class);
|
||||||
|
benefitVo.setBenefitType(benefit.getBenefitType().getValue());
|
||||||
|
benefitVoList.add(benefitVo);
|
||||||
|
}
|
||||||
|
|
||||||
return R.ok(benefitService.benefitList());
|
return R.ok(benefitVoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,11 +54,25 @@ public class BenefitController {
|
||||||
// @PreAuthorize("@ss.hasPermi('system:benefit:add')")
|
// @PreAuthorize("@ss.hasPermi('system:benefit:add')")
|
||||||
@ApiOperation(value = "添加权益")
|
@ApiOperation(value = "添加权益")
|
||||||
@PostMapping("add")
|
@PostMapping("add")
|
||||||
public R<Object> add(@RequestBody @Valid AddBenefitDto addBenefitDto) {
|
public void add(@RequestBody @Valid BenefitDto benefitDto) {
|
||||||
|
|
||||||
benefitService.addBenefit(addBenefitDto);
|
benefitDto.setId(null);
|
||||||
|
Benefit benefit = BeanUtil.copyProperties(benefitDto, Benefit.class);
|
||||||
|
benefitService.save(benefit);
|
||||||
|
|
||||||
return R.ok();
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权益详情
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('system:benefit:query')")
|
||||||
|
@ApiOperation(value = "权益详情")
|
||||||
|
@GetMapping("detail")
|
||||||
|
public R<BenefitVo> detail(Long id) {
|
||||||
|
Benefit benefit = benefitService.getById(id);
|
||||||
|
BenefitVo benefitVo = BeanUtil.copyProperties(benefit, BenefitVo.class);
|
||||||
|
benefitVo.setBenefitType(benefit.getBenefitType().getValue());
|
||||||
|
return R.ok(benefitVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,23 +81,20 @@ public class BenefitController {
|
||||||
// @PreAuthorize("@ss.hasPermi('system:benefit:edit')")
|
// @PreAuthorize("@ss.hasPermi('system:benefit:edit')")
|
||||||
@ApiOperation(value = "修改权益")
|
@ApiOperation(value = "修改权益")
|
||||||
@PostMapping("update")
|
@PostMapping("update")
|
||||||
public R<Object> update(@RequestBody @Valid EditBenefitDto editBenefitDto) {
|
public void update(@RequestBody @Valid BenefitDto benefitDto) {
|
||||||
|
|
||||||
Benefit benefit = BeanUtil.copyProperties(editBenefitDto, Benefit.class);
|
Benefit benefit = BeanUtil.copyProperties(benefitDto, Benefit.class);
|
||||||
benefitService.updateById(benefit);
|
benefitService.updateById(benefit);
|
||||||
|
|
||||||
|
|
||||||
return R.ok();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @PreAuthorize("@ss.hasPermi('system:benefit:remove')")
|
// @PreAuthorize("@ss.hasPermi('system:benefit:remove')")
|
||||||
@ApiOperation(value = "删除权益")
|
@ApiOperation(value = "删除权益")
|
||||||
@GetMapping("delete")
|
@GetMapping("delete")
|
||||||
public R<Object> delete(@NotNull(message = "id不能为空") Long id) {
|
public void delete(@NotNull(message = "id不能为空") Long id) {
|
||||||
benefitService.removeById(id);
|
benefitService.removeById(id);
|
||||||
return R.ok();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,69 +0,0 @@
|
||||||
package com.mcwl.web.controller.memberCenter;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.mcwl.common.core.domain.R;
|
|
||||||
import com.mcwl.memberCenter.domain.Benefit;
|
|
||||||
import com.mcwl.memberCenter.domain.BenefitName;
|
|
||||||
import com.mcwl.memberCenter.domain.dto.AddBenefitDto;
|
|
||||||
import com.mcwl.memberCenter.domain.dto.AddBenefitNameDto;
|
|
||||||
import com.mcwl.memberCenter.domain.dto.EditBenefitDto;
|
|
||||||
import com.mcwl.memberCenter.domain.dto.EditBenefitNameDto;
|
|
||||||
import com.mcwl.memberCenter.domain.vo.BenefitVo;
|
|
||||||
import com.mcwl.memberCenter.service.BenefitNameService;
|
|
||||||
import com.mcwl.memberCenter.service.BenefitService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/***
|
|
||||||
* 权益名称
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("benefitName")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Api(tags = "会员中心")
|
|
||||||
public class BenefitNameController {
|
|
||||||
|
|
||||||
private final BenefitNameService benefitNameService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权益名称列表
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "权益名称列表")
|
|
||||||
@GetMapping("list")
|
|
||||||
public R<List<BenefitName>> list() {
|
|
||||||
List<BenefitName> list = benefitNameService.list();
|
|
||||||
return R.ok(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "添加权益名称")
|
|
||||||
@PostMapping("add")
|
|
||||||
public R<Object> add(@RequestBody @Valid AddBenefitNameDto addBenefitDto) {
|
|
||||||
BenefitName benefitName = BeanUtil.toBean(addBenefitDto, BenefitName.class);
|
|
||||||
benefitNameService.save(benefitName);
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "修改权益名称")
|
|
||||||
@PostMapping("update")
|
|
||||||
public R<Object> update(@RequestBody @Valid EditBenefitNameDto editBenefitNameDto) {
|
|
||||||
BenefitName benefitName = BeanUtil.toBean(editBenefitNameDto, BenefitName.class);
|
|
||||||
benefitNameService.updateById(benefitName);
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "删除权益名称")
|
|
||||||
@GetMapping("delete")
|
|
||||||
public R<Object> delete(@Valid @NotNull(message = "id不能为空") Long id) {
|
|
||||||
benefitNameService.removeById(id);
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -117,6 +117,13 @@ wechat:
|
||||||
# 应用密钥
|
# 应用密钥
|
||||||
secret: 11218568b79e2c5eb10459ef8c0374bd
|
secret: 11218568b79e2c5eb10459ef8c0374bd
|
||||||
|
|
||||||
|
#公众号配置
|
||||||
|
#wechat:
|
||||||
|
# # 应用ID
|
||||||
|
# appid: wx82d4c3c96f0ffa5b
|
||||||
|
# # 应用密钥
|
||||||
|
# secret: abbabcf1da711a3bbd95387ec83edcac
|
||||||
|
|
||||||
# yml版(application.yml)
|
# yml版(application.yml)
|
||||||
aliyun:
|
aliyun:
|
||||||
oss:
|
oss:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
spring:
|
spring:
|
||||||
#mq
|
#mq
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
host: 113.45.9.111
|
host: 113.45.74.175
|
||||||
port: 5672
|
port: 5672
|
||||||
username: guest
|
username: guest
|
||||||
password: guest
|
password: guest
|
||||||
|
@ -23,9 +23,9 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://113.45.9.111:3306/mcwl?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://113.45.74.175:3306/mcwl?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: ybl123456@
|
password: Leng1128
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
@ -79,9 +79,9 @@ spring:
|
||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: 113.45.9.111
|
host: 113.45.74.175
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6379
|
port: 6370
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 0
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
|
@ -137,18 +137,12 @@ mall:
|
||||||
appId: 2021005119630093
|
appId: 2021005119630093
|
||||||
# 线上应用私钥
|
# 线上应用私钥
|
||||||
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCQuhRU5iHoabfzJS40A+moMKzb5rmi5XbL59K98CW65Oq/rnzQnj6sCYggIXOLCLKUykZ1XIVa+4V7bGFkMDF0236ncPumnVY/tfCSebLyKl+up1mGeH4mAR6ily7nXAhRnXL+A0015bpCa5FCg2ReN68MEmquB/mHfeLqJfRupwzDWnIWxYSKkFCJ0i47KTFYhM93LHHQ8GrZNNaeiJ6q59MruQI83z0HCxN/DzK4Z2rBWGilwPuYcSEa0STPXYhz8XMXUX/Mlp7dd5zyWeNaxkNRWlhKHvhLVPGvteaEcchs476DIWLCRVXEC1372wMKNrKblzRp7Wi5+l+W14k5AgMBAAECggEAHahkPjmivTPc5FC8NSCQI01GPxH6/Ky1OXfaMd4ifTgn+vvQzBeBlFOnt53jRZyUq/T/l1FMaqacZfyBwLw3hlDslXeLuksHv6qTEBEsYH/ad7oHmIzcnQEhvAPrMrIjakYvqGoYynC3SKEudUjjqoMSthCYF+2+bsuXUpBQlNQLqcJ03U+YhfLswwVVujKvAujoLRqDAWeaa0k0y/1Ua4fr5GJq5M+P8TTBRgZlSK5A7Ee6yxMUncZ9W3lTqZtyG0OQLbz9gkr0c63KPisigaOx9eKlCPWFWUWo+zGvQMVijHDTeoJ3dqNmsPtiIE3rDt8anx4a1R7YK6MQ520hAQKBgQDPFMNl4fRmLSOLNShJm/0mBMoIjPmS3+tPBtCiG4oH9F8vYMJWDA1Im0FdgRa2HlCv6hpiVvvQt824RaUYa7XR6aefXKVEWddHvl3utnghMohjK8o8fTmIxADtU5Q2OlWmPdp1v7yDg8yE5P1GlY+AZ3oggxXOIRVtQrNeL7E3iQKBgQCy6nEaUQUCDDts4o7Pn+N402g3/T9Vz/5JtKmDI01EndK5l/yE8CdgGwdiwN1k3la/Nv8P5kaaX2qVcCGoOIQmMNGOxuNfkKCi+bJKdxmFOI4E3iVYT2H6x27QJwNB6bik1i6b2OWT7ckxeB6xMjefNp1u8Qif+vab60OQZSqoMQKBgESRF3Hwsz/xykcZvtFAuT2RcGQMacbcJcnw87v5ambf33SMkUx0iSF1ZttTFvYOa6ET3tCZBKBDe/Z7+QJxB68NstbtkjtjlAjJW8ji2jwDw20y3q/QtvA2Fih++CBMiHeXG3LJnd3eEiYevE5Wz0ExAhspzFqIUdPvtfyFxiQhAoGBAKgc+iGMN3RxIfVx/FbDGe6SVr8lSrnLMlj3VMBQD26GDVcupKwVLCp1uz7jkiQRdtk9R/UcnwK23WOFdVqnoCRygrXx0/wb3ZTFou2tc2Fmfqu8QML19E67zjfwMHNitYjNaAYwi6ewKvg8sjo1wWXs34k7GquYGNjw+w9Wv/pBAoGAUlVHfZ4RncAiiH/x3EDgqmmVikFpLoM2xXxM16nplrjdBE6IzkpgWb/x2ZI6JCMDyoV2kvF6owW2+QEQ81MrHQMtBRpAvd8nI03gXA5VF3uwp4UjfGpoIAGDBrqQv9DM8vx6C6VJNTT5esZWZSw/+PZ4D19l0/n7gICGx3ugw0Q=
|
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCQuhRU5iHoabfzJS40A+moMKzb5rmi5XbL59K98CW65Oq/rnzQnj6sCYggIXOLCLKUykZ1XIVa+4V7bGFkMDF0236ncPumnVY/tfCSebLyKl+up1mGeH4mAR6ily7nXAhRnXL+A0015bpCa5FCg2ReN68MEmquB/mHfeLqJfRupwzDWnIWxYSKkFCJ0i47KTFYhM93LHHQ8GrZNNaeiJ6q59MruQI83z0HCxN/DzK4Z2rBWGilwPuYcSEa0STPXYhz8XMXUX/Mlp7dd5zyWeNaxkNRWlhKHvhLVPGvteaEcchs476DIWLCRVXEC1372wMKNrKblzRp7Wi5+l+W14k5AgMBAAECggEAHahkPjmivTPc5FC8NSCQI01GPxH6/Ky1OXfaMd4ifTgn+vvQzBeBlFOnt53jRZyUq/T/l1FMaqacZfyBwLw3hlDslXeLuksHv6qTEBEsYH/ad7oHmIzcnQEhvAPrMrIjakYvqGoYynC3SKEudUjjqoMSthCYF+2+bsuXUpBQlNQLqcJ03U+YhfLswwVVujKvAujoLRqDAWeaa0k0y/1Ua4fr5GJq5M+P8TTBRgZlSK5A7Ee6yxMUncZ9W3lTqZtyG0OQLbz9gkr0c63KPisigaOx9eKlCPWFWUWo+zGvQMVijHDTeoJ3dqNmsPtiIE3rDt8anx4a1R7YK6MQ520hAQKBgQDPFMNl4fRmLSOLNShJm/0mBMoIjPmS3+tPBtCiG4oH9F8vYMJWDA1Im0FdgRa2HlCv6hpiVvvQt824RaUYa7XR6aefXKVEWddHvl3utnghMohjK8o8fTmIxADtU5Q2OlWmPdp1v7yDg8yE5P1GlY+AZ3oggxXOIRVtQrNeL7E3iQKBgQCy6nEaUQUCDDts4o7Pn+N402g3/T9Vz/5JtKmDI01EndK5l/yE8CdgGwdiwN1k3la/Nv8P5kaaX2qVcCGoOIQmMNGOxuNfkKCi+bJKdxmFOI4E3iVYT2H6x27QJwNB6bik1i6b2OWT7ckxeB6xMjefNp1u8Qif+vab60OQZSqoMQKBgESRF3Hwsz/xykcZvtFAuT2RcGQMacbcJcnw87v5ambf33SMkUx0iSF1ZttTFvYOa6ET3tCZBKBDe/Z7+QJxB68NstbtkjtjlAjJW8ji2jwDw20y3q/QtvA2Fih++CBMiHeXG3LJnd3eEiYevE5Wz0ExAhspzFqIUdPvtfyFxiQhAoGBAKgc+iGMN3RxIfVx/FbDGe6SVr8lSrnLMlj3VMBQD26GDVcupKwVLCp1uz7jkiQRdtk9R/UcnwK23WOFdVqnoCRygrXx0/wb3ZTFou2tc2Fmfqu8QML19E67zjfwMHNitYjNaAYwi6ewKvg8sjo1wWXs34k7GquYGNjw+w9Wv/pBAoGAUlVHfZ4RncAiiH/x3EDgqmmVikFpLoM2xXxM16nplrjdBE6IzkpgWb/x2ZI6JCMDyoV2kvF6owW2+QEQ81MrHQMtBRpAvd8nI03gXA5VF3uwp4UjfGpoIAGDBrqQv9DM8vx6C6VJNTT5esZWZSw/+PZ4D19l0/n7gICGx3ugw0Q=
|
||||||
# # 线上应用公钥证书
|
# 线上应用公钥证书
|
||||||
# appCertPath: /opt/cert/pro/appCertPublicKey_2021005119630093.crt
|
appCertPath: /opt/cert/pro/appCertPublicKey_2021005119630093.crt
|
||||||
# # 线上支付宝公钥证书路径
|
# 线上支付宝公钥证书路径
|
||||||
# alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
|
alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
|
||||||
# # 线上支付宝根证书路径
|
# 线上支付宝根证书路径
|
||||||
# alipayRootCertPath: /opt/cert/pro/alipayRootCert.crt
|
alipayRootCertPath: /opt/cert/pro/alipayRootCert.crt
|
||||||
# 沙箱应用公钥证书
|
|
||||||
appCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayPublicCert.crt
|
|
||||||
# 沙箱支付宝公钥证书路径
|
|
||||||
alipayCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayPublicCert.crt
|
|
||||||
# 沙箱支付宝根证书路径
|
|
||||||
alipayRootCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayRootCert.crt
|
|
||||||
notifyUrl: https://36072a51.r27.cpolar.top/ali/pay/notify
|
notifyUrl: https://36072a51.r27.cpolar.top/ali/pay/notify
|
||||||
# 线上支付宝网关
|
# 线上支付宝网关
|
||||||
gatewayUrl: https://openapi.alipay.com/gateway.do
|
gatewayUrl: https://openapi.alipay.com/gateway.do
|
||||||
|
@ -175,9 +169,3 @@ mqtt:
|
||||||
max-reconnect-attempts: 5
|
max-reconnect-attempts: 5
|
||||||
clean-session: true
|
clean-session: true
|
||||||
|
|
||||||
#用户头像与背景
|
|
||||||
mcwl:
|
|
||||||
encryptUrl: http://113.45.9.111:9090/encryptAndUpload
|
|
||||||
user:
|
|
||||||
avatar: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/7/53/3f5cc1d7-b062-4a22-9f7e-d442bc6dcf42.png
|
|
||||||
backgroundImg: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/8/2/c8387681-8138-4a29-a1c9-4a143da34c5a.png
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ spring:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: druid
|
active: dev
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
package com.mcwl.communityCenter.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件表
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("cc_community_file")
|
|
||||||
@Builder
|
|
||||||
public class CommunityFile extends BaseEntity {
|
|
||||||
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
@TableField(fill = FieldFill.INSERT)
|
|
||||||
private Long tenantId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区id
|
|
||||||
*/
|
|
||||||
private Long communityId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件地址
|
|
||||||
*/
|
|
||||||
private String fileUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件名
|
|
||||||
*/
|
|
||||||
private String fileName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件对象key
|
|
||||||
*/
|
|
||||||
private String objectKey;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件大小
|
|
||||||
*/
|
|
||||||
private Long fileSize;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
package com.mcwl.communityCenter.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件表
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("cc_community_file_log")
|
|
||||||
public class CommunityFileLog extends BaseEntity {
|
|
||||||
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
@TableField(fill = FieldFill.INSERT)
|
|
||||||
private Long tenantId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区id
|
|
||||||
*/
|
|
||||||
private Long communityId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件id
|
|
||||||
*/
|
|
||||||
private Long communityFileId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载用户id
|
|
||||||
*/
|
|
||||||
private Long downloadUserId;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
package com.mcwl.communityCenter.domain.dto;
|
|
||||||
|
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区请求参数
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(value = "社区请求参数")
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class CommunityFilePageListRes extends PageDomain {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "租户id", required = true)
|
|
||||||
@NotNull(message = "租户id不能为空")
|
|
||||||
private Long tenantId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "社区id", required = true)
|
|
||||||
@NotNull(message = "社区id不能为空")
|
|
||||||
private Long communityId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询条件
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "查询条件")
|
|
||||||
private String search;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
package com.mcwl.communityCenter.domain.dto;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区请求参数
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(value = "社区请求参数")
|
|
||||||
public class CommunityUploadFileRes {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "租户id", required = true)
|
|
||||||
@NotNull(message = "租户id不能为空")
|
|
||||||
private Long tenantId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "社区id", required = true)
|
|
||||||
@NotNull(message = "社区id不能为空")
|
|
||||||
private Long communityId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "文件", required = true)
|
|
||||||
@NotNull(message = "文件不能为空")
|
|
||||||
private MultipartFile file;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -22,8 +22,4 @@ public class PublishPageRes extends PageDomain {
|
||||||
@ApiParam(value = "租户id", required = true)
|
@ApiParam(value = "租户id", required = true)
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
@NotNull(message = "类型不能为空")
|
|
||||||
@ApiParam(value = "类型 0只看星主 1精选 2问答", required = true)
|
|
||||||
private Integer type;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,77 +0,0 @@
|
||||||
package com.mcwl.communityCenter.domain.vo;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件返回数据
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(value = "社区文件返回数据")
|
|
||||||
public class CommunityFileVo {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "社区文件id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "租户id")
|
|
||||||
private Long tenantId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "社区id")
|
|
||||||
private Long communityId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件路径
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "文件路径")
|
|
||||||
private String fileUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "文件名称")
|
|
||||||
private String fileName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件大小
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "文件大小")
|
|
||||||
private Long fileSize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传人
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "上传人")
|
|
||||||
private String uploadUserName;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载记录
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "用户下载记录")
|
|
||||||
private DownloadFileUserVo downloadFileUser;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "上传时间")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
package com.mcwl.communityCenter.domain.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户下载记录
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(value = "用户下载记录")
|
|
||||||
public class DownloadFileUserVo {
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户头像")
|
|
||||||
private List<String> avatarList;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "下载用户数")
|
|
||||||
private Integer count;
|
|
||||||
|
|
||||||
}
|
|
|
@ -86,11 +86,6 @@ public class PublishVo {
|
||||||
@ApiModelProperty(value = "评论数")
|
@ApiModelProperty(value = "评论数")
|
||||||
private Integer commentNum;
|
private Integer commentNum;
|
||||||
|
|
||||||
/**
|
|
||||||
* 精选
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "精选")
|
|
||||||
private Integer isElite;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
package com.mcwl.communityCenter.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFileLog;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface CommunityFileLogMapper extends BaseMapper<CommunityFileLog> {
|
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
|
||||||
List<String> getUserAvatarList(@Param("tenantId")
|
|
||||||
Long tenantId,
|
|
||||||
@Param("communityId")
|
|
||||||
Long communityId,
|
|
||||||
@Param("communityFileId")
|
|
||||||
Long communityFileId);
|
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
|
||||||
Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId);
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
package com.mcwl.communityCenter.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityFilePageListRes;
|
|
||||||
import com.mcwl.communityCenter.domain.vo.CommunityFileVo;
|
|
||||||
import org.apache.ibatis.annotations.MapKey;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface CommunityFileMapper extends BaseMapper<CommunityFile> {
|
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
|
||||||
List<CommunityFileVo> getCommunityFileList(Page<CommunityFile> page, @Param("communityFilePageListRes") CommunityFilePageListRes communityFilePageListRes);
|
|
||||||
}
|
|
|
@ -5,13 +5,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
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.PublishPageRes;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.security.core.parameters.P;
|
import org.springframework.security.core.parameters.P;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface PublishMapper extends BaseMapper<Publish> {
|
public interface PublishMapper extends BaseMapper<Publish> {
|
||||||
|
@ -29,20 +27,16 @@ public interface PublishMapper extends BaseMapper<Publish> {
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
Page<Publish> selectByTenantIdAndCommunityIdAndNotNullImagePage(Page<Publish> page,
|
Page<Publish> selectByTenantIdAndCommunityIdAndNotNullImagePage(Page<Publish> page,
|
||||||
|
@Param("tenantId")
|
||||||
|
Long tenantId,
|
||||||
|
@Param("communityId")
|
||||||
|
Long communityId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
Page<Publish> selectByTenantIdAndCommunityIdAndNotNullFilePage(Page<Publish> page,
|
||||||
@Param("tenantId")
|
@Param("tenantId")
|
||||||
Long tenantId,
|
Long tenantId,
|
||||||
@Param("communityId")
|
@Param("communityId")
|
||||||
Long communityId);
|
Long communityId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
|
||||||
Page<Publish> selectByTenantIdAndCommunityIdAndNotNullFilePage(Page<Publish> page,
|
|
||||||
@Param("tenantId")
|
|
||||||
Long tenantId,
|
|
||||||
@Param("communityId")
|
|
||||||
Long communityId);
|
|
||||||
|
|
||||||
void elitePublish(@Param("communityId") Long communityId, @Param("publishId") Long publishId);
|
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
|
||||||
List<Publish> publishList(Page<Publish> page,@Param("publishPageRes") PublishPageRes publishPageRes);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.mcwl.communityCenter.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFileLog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface CommunityFileLogService extends IService<CommunityFileLog> {
|
|
||||||
|
|
||||||
List<String> getUserAvatarList(Long tenantId, Long communityId, Long communityFileId);
|
|
||||||
|
|
||||||
Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId);
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.mcwl.communityCenter.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.*;
|
|
||||||
|
|
||||||
public interface CommunityFileService extends IService<CommunityFile> {
|
|
||||||
|
|
||||||
void upload(CommunityUploadFileRes communityUploadFileRes);
|
|
||||||
|
|
||||||
TableDataInfo getCommunityFileList(CommunityFilePageListRes communityFilePageListRes);
|
|
||||||
}
|
|
|
@ -31,8 +31,4 @@ public interface PublishService extends IService<Publish> {
|
||||||
TableDataInfo publishImage(@Valid PublishPageRes publishPageRes);
|
TableDataInfo publishImage(@Valid PublishPageRes publishPageRes);
|
||||||
|
|
||||||
TableDataInfo publishFile(@Valid PublishPageRes publishPageRes);
|
TableDataInfo publishFile(@Valid PublishPageRes publishPageRes);
|
||||||
|
|
||||||
void elitePublish(Long communityId, Long publishId);
|
|
||||||
|
|
||||||
TableDataInfo publishList(PublishPageRes publishPageRes);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
package com.mcwl.communityCenter.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFileLog;
|
|
||||||
import com.mcwl.communityCenter.mapper.CommunityFileLogMapper;
|
|
||||||
import com.mcwl.communityCenter.mapper.CommunityFileMapper;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityFileLogService;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityFileService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class CommunityFileLogServiceImpl extends ServiceImpl<CommunityFileLogMapper, CommunityFileLog> implements CommunityFileLogService {
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getUserAvatarList(Long tenantId, Long communityId, Long communityFileId) {
|
|
||||||
return baseMapper.getUserAvatarList(tenantId, communityId, communityFileId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId) {
|
|
||||||
return baseMapper.getDownloadCount(tenantId, communityId, communityFileId);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,86 +0,0 @@
|
||||||
package com.mcwl.communityCenter.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.mcwl.common.constant.HttpStatus;
|
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
|
||||||
import com.mcwl.common.utils.obs.ObsUtils;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.*;
|
|
||||||
import com.mcwl.communityCenter.domain.vo.CommunityFileVo;
|
|
||||||
import com.mcwl.communityCenter.domain.vo.DownloadFileUserVo;
|
|
||||||
import com.mcwl.communityCenter.mapper.CommunityFileMapper;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityFileLogService;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityFileService;
|
|
||||||
import com.mcwl.system.service.ISysUserService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class CommunityFileServiceImpl extends ServiceImpl<CommunityFileMapper, CommunityFile> implements CommunityFileService {
|
|
||||||
|
|
||||||
private final ObsUtils obsUtils;
|
|
||||||
|
|
||||||
private final ISysUserService userService;
|
|
||||||
|
|
||||||
private final CommunityFileLogService communityFileLogService;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void upload(CommunityUploadFileRes communityUploadFileRes) {
|
|
||||||
Long tenantId = communityUploadFileRes.getTenantId();
|
|
||||||
Long communityId = communityUploadFileRes.getCommunityId();
|
|
||||||
MultipartFile file = communityUploadFileRes.getFile();
|
|
||||||
Map<String, String> map = obsUtils.uploadFile(file);
|
|
||||||
String filename = file.getOriginalFilename();
|
|
||||||
long fileSize = file.getSize();
|
|
||||||
|
|
||||||
CommunityFile communityFile = CommunityFile.builder()
|
|
||||||
.tenantId(tenantId)
|
|
||||||
.communityId(communityId)
|
|
||||||
.userId(SecurityUtils.getUserId())
|
|
||||||
.fileUrl(map.get("path"))
|
|
||||||
.objectKey(map.get("objectKey"))
|
|
||||||
.fileName(filename)
|
|
||||||
.fileSize(fileSize)
|
|
||||||
.build();
|
|
||||||
baseMapper.insert(communityFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TableDataInfo getCommunityFileList(CommunityFilePageListRes communityFilePageListRes) {
|
|
||||||
Page<CommunityFile> page = new Page<>(communityFilePageListRes.getPageNum(), communityFilePageListRes.getPageSize());
|
|
||||||
List<CommunityFileVo> communityFileList = baseMapper.getCommunityFileList(page, communityFilePageListRes);
|
|
||||||
for (CommunityFileVo communityFileVo : communityFileList) {
|
|
||||||
DownloadFileUserVo downloadFileUserVo = new DownloadFileUserVo();
|
|
||||||
|
|
||||||
List<String> avatarList = communityFileLogService.getUserAvatarList(communityFileVo.getTenantId(),
|
|
||||||
communityFileVo.getCommunityId(),
|
|
||||||
communityFileVo.getId());
|
|
||||||
Integer count = communityFileLogService.getDownloadCount(communityFileVo.getTenantId(),
|
|
||||||
communityFileVo.getCommunityId(),
|
|
||||||
communityFileVo.getId());
|
|
||||||
|
|
||||||
downloadFileUserVo.setAvatarList(avatarList);
|
|
||||||
downloadFileUserVo.setCount(count);
|
|
||||||
|
|
||||||
|
|
||||||
communityFileVo.setDownloadFileUser(downloadFileUserVo);
|
|
||||||
}
|
|
||||||
// 封装返回
|
|
||||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
|
||||||
tableDataInfo.setRows(communityFileList);
|
|
||||||
tableDataInfo.setTotal(page.getTotal());
|
|
||||||
tableDataInfo.setCode(HttpStatus.SUCCESS);
|
|
||||||
tableDataInfo.setMsg("查询成功");
|
|
||||||
return tableDataInfo;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -186,28 +186,16 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
||||||
return tableDataInfo;
|
return tableDataInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void elitePublish(Long communityId, Long publishId) {
|
|
||||||
baseMapper.elitePublish(communityId, publishId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TableDataInfo publishList(PublishPageRes publishPageRes) {
|
|
||||||
Page<Publish> page = this.initPage(publishPageRes);
|
|
||||||
List<Publish> publishList = baseMapper.publishList(page, publishPageRes);
|
|
||||||
|
|
||||||
// 封装返回
|
|
||||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
|
||||||
tableDataInfo.setRows(publishList);
|
|
||||||
tableDataInfo.setTotal(page.getTotal());
|
|
||||||
tableDataInfo.setCode(HttpStatus.SUCCESS);
|
|
||||||
tableDataInfo.setMsg("查询成功");
|
|
||||||
return tableDataInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Page<Publish> initPage(PublishPageRes publishPageRes) {
|
private Page<Publish> initPage(PublishPageRes publishPageRes) {
|
||||||
Page<Publish> page = new Page<>(publishPageRes.getPageNum(), publishPageRes.getPageSize());
|
Page<Publish> page = new Page<>(publishPageRes.getPageNum(), publishPageRes.getPageSize());
|
||||||
page.addOrder(new OrderItem("create_time", false));
|
|
||||||
|
if (StringUtils.isBlank(publishPageRes.getOrderByColumn())) {
|
||||||
|
publishPageRes.setOrderByColumn("create_time");
|
||||||
|
}
|
||||||
|
boolean isAsc = Objects.equals(publishPageRes.getIsAsc(), "asc");
|
||||||
|
OrderItem orderItem = new OrderItem(publishPageRes.getOrderByColumn(), isAsc);
|
||||||
|
|
||||||
|
page.addOrder(orderItem);
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,15 +72,15 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"租户或社区不存在");
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"租户或社区不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Objects.equals(tenantId, userId)) {
|
// if (Objects.equals(tenantId, userId)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"您不能提问自己的问题");
|
// return AjaxResult.error("您不能提问自己的问题");
|
||||||
}
|
// }
|
||||||
|
|
||||||
//提问人(userId)是否在社区中
|
//提问人(userId)是否在社区中
|
||||||
Invite invite = inviteMapper.selectByTenantIdAndCommunityIdAndInviteeUserId(tenantId, communityId, userId);
|
// Invite invite = inviteMapper.selectByTenantIdAndCommunityIdAndInviteeUserId(tenantId, communityId, userId);
|
||||||
if (Objects.isNull(invite)) {
|
// if (Objects.isNull(invite)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"您不是该社区成员,不能提问");
|
// return AjaxResult.error("您不是该社区成员,不能提问");
|
||||||
}
|
// }
|
||||||
|
|
||||||
Question question = new Question();
|
Question question = new Question();
|
||||||
BeanUtil.copyProperties(questionRes, question);
|
BeanUtil.copyProperties(questionRes, question);
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.mcwl.communityCenter.mapper.CommunityFileLogMapper">
|
|
||||||
|
|
||||||
<select id="getUserAvatarList" resultType="java.lang.String">
|
|
||||||
select su.avatar
|
|
||||||
from cc_community_file_log cfl
|
|
||||||
left join sys_user su on cfl.download_user_id = su.user_id
|
|
||||||
where tenant_id = #{tenantId}
|
|
||||||
and community_id = #{communityId}
|
|
||||||
and community_file_id = #{communityFileId}
|
|
||||||
order by cfl.create_time desc
|
|
||||||
</select>
|
|
||||||
<select id="getDownloadCount" resultType="java.lang.Integer">
|
|
||||||
select count(*)
|
|
||||||
from cc_community_file_log
|
|
||||||
where tenant_id = #{tenantId}
|
|
||||||
and community_id = #{communityId}
|
|
||||||
and community_file_id = #{communityFileId}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.mcwl.communityCenter.mapper.CommunityFileMapper">
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getCommunityFileList" resultType="com.mcwl.communityCenter.domain.vo.CommunityFileVo">
|
|
||||||
select cf.*, su.nick_name as upload_user_name
|
|
||||||
from cc_community_file cf left join sys_user su on cf.user_id = su.user_id
|
|
||||||
where cf.del_flag = '0'
|
|
||||||
and tenant_id = #{communityFilePageListRes.tenantId}
|
|
||||||
and community_id = #{communityFilePageListRes.communityId}
|
|
||||||
<if test="communityFilePageListRes.search != null and communityFilePageListRes.search != ''">
|
|
||||||
and (cf.file_name like concat('%', #{communityFilePageListRes.search}, '%')
|
|
||||||
or su.nick_name like concat('%', #{communityFilePageListRes.search}, '%'))
|
|
||||||
</if>
|
|
||||||
order by cf.create_time desc
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
|
@ -3,12 +3,6 @@
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.mcwl.communityCenter.mapper.PublishMapper">
|
<mapper namespace="com.mcwl.communityCenter.mapper.PublishMapper">
|
||||||
<update id="elitePublish">
|
|
||||||
update cc_publish
|
|
||||||
set is_elite = !is_elite
|
|
||||||
where community_id = #{communityId}
|
|
||||||
and id = #{publishId}
|
|
||||||
</update>
|
|
||||||
<select id="selectByTenantIdAndCommunityIdPage" resultType="com.mcwl.communityCenter.domain.Publish">
|
<select id="selectByTenantIdAndCommunityIdPage" resultType="com.mcwl.communityCenter.domain.Publish">
|
||||||
select id,
|
select id,
|
||||||
tenant_id,
|
tenant_id,
|
||||||
|
@ -90,19 +84,4 @@
|
||||||
and del_flag = '0'
|
and del_flag = '0'
|
||||||
and file_url is not null
|
and file_url is not null
|
||||||
</select>
|
</select>
|
||||||
<select id="publishList" resultType="com.mcwl.communityCenter.domain.Publish">
|
|
||||||
select *
|
|
||||||
from cc_publish
|
|
||||||
<where>
|
|
||||||
and tenant_id = #{publishPageRes.tenantId}
|
|
||||||
and community_id = #{publishPageRes.communityId}
|
|
||||||
and del_flag = '0'
|
|
||||||
<if test="publishPageRes.type == 0">
|
|
||||||
and user_id = #{publishPageRes.tenantId}
|
|
||||||
</if>
|
|
||||||
<if test="publishPageRes.type == 1">
|
|
||||||
and is_elite = 1
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -157,7 +157,7 @@ public class SecurityConfig {
|
||||||
"/attention/selectToAttention",
|
"/attention/selectToAttention",
|
||||||
"/WorkFlowVersion/selectVersionByWorkId",
|
"/WorkFlowVersion/selectVersionByWorkId",
|
||||||
"/memberLevel/list",
|
"/memberLevel/list",
|
||||||
"/memberBenefit/getMemberBenefitList",
|
"/memberLevel/getMemberBenefitList",
|
||||||
"/attention/selectAttentionList",
|
"/attention/selectAttentionList",
|
||||||
"/downFile/down",
|
"/downFile/down",
|
||||||
"/personalCenter/selectByUserIdModel",
|
"/personalCenter/selectByUserIdModel",
|
||||||
|
|
|
@ -18,9 +18,9 @@ public class Benefit extends BaseEntity {
|
||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 权益名称Id
|
* 权益名称
|
||||||
*/
|
*/
|
||||||
private String benefitNameId;
|
private String benefitName;
|
||||||
/**
|
/**
|
||||||
* 权益描述
|
* 权益描述
|
||||||
*/
|
*/
|
||||||
|
@ -34,9 +34,9 @@ public class Benefit extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private Double benefitDiscount;
|
private Double benefitDiscount;
|
||||||
/**
|
/**
|
||||||
* 单位
|
* 权益排序
|
||||||
*/
|
*/
|
||||||
private String benefitUnit;
|
private Integer benefitOrder;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
package com.mcwl.memberCenter.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权益表
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@TableName("mem_benefit_name")
|
|
||||||
public class BenefitName extends BaseEntity {
|
|
||||||
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
/**
|
|
||||||
* 权益名称
|
|
||||||
*/
|
|
||||||
private String benefitName;
|
|
||||||
/**
|
|
||||||
* 排序
|
|
||||||
*/
|
|
||||||
private Integer benefitOrder;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
package com.mcwl.memberCenter.domain.dto;
|
|
||||||
|
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权益
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(description = "权益")
|
|
||||||
public class AddBenefitDto {
|
|
||||||
/**
|
|
||||||
* 权益名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益名称id", required = true)
|
|
||||||
@NotNull(message = "权益名称id不能为空")
|
|
||||||
private Long benefitNameId;
|
|
||||||
/**
|
|
||||||
* 权益描述
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益描述")
|
|
||||||
private String benefitDesc;
|
|
||||||
/**
|
|
||||||
* 权益类型
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益类型", required = true)
|
|
||||||
@NotNull(message = "权益类型不能为空")
|
|
||||||
private MemberBenefitTypeEnum benefitType;
|
|
||||||
/**
|
|
||||||
* 权益折扣,当权益类型为折扣时,记录折扣具体数值
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益折扣,当权益类型为折扣时,记录折扣具体数值", required = true)
|
|
||||||
@NotNull(message = "权益折扣不能为空")
|
|
||||||
private Double benefitDiscount;
|
|
||||||
/**
|
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "单位不能为空")
|
|
||||||
@ApiModelProperty(value = "单位")
|
|
||||||
private String benefitUnit;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
package com.mcwl.memberCenter.domain.dto;
|
|
||||||
|
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权益
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(description = "权益名称")
|
|
||||||
public class AddBenefitNameDto {
|
|
||||||
/**
|
|
||||||
* 权益名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益名称", required = true)
|
|
||||||
@NotNull(message = "权益名称不能为空")
|
|
||||||
private String benefitName;
|
|
||||||
/**
|
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "排序不能为空")
|
|
||||||
@ApiModelProperty(value = "排序", required = true)
|
|
||||||
private Integer benefitOrder;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,9 +1,13 @@
|
||||||
package com.mcwl.memberCenter.domain.dto;
|
package com.mcwl.memberCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
@ -13,13 +17,15 @@ import javax.validation.constraints.NotNull;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(description = "权益")
|
@ApiModel(description = "权益")
|
||||||
public class EditBenefitDto {
|
public class BenefitDto {
|
||||||
/**
|
|
||||||
* 权益id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益id", required = true)
|
|
||||||
@NotNull(message = "权益id不能为空")
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 权益名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "权益名称", required = true)
|
||||||
|
@NotBlank(message = "权益名称不能为空")
|
||||||
|
private String benefitName;
|
||||||
/**
|
/**
|
||||||
* 权益描述
|
* 权益描述
|
||||||
*/
|
*/
|
||||||
|
@ -38,11 +44,10 @@ public class EditBenefitDto {
|
||||||
@NotNull(message = "权益折扣不能为空")
|
@NotNull(message = "权益折扣不能为空")
|
||||||
private Double benefitDiscount;
|
private Double benefitDiscount;
|
||||||
/**
|
/**
|
||||||
* 单位
|
* 权益排序
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "单位不能为空")
|
@ApiModelProperty(value = "权益排序")
|
||||||
@ApiModelProperty(value = "单位")
|
private Integer benefitOrder;
|
||||||
private String benefitUnit;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,33 +0,0 @@
|
||||||
package com.mcwl.memberCenter.domain.dto;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权益
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(description = "权益名称")
|
|
||||||
public class EditBenefitNameDto {
|
|
||||||
@ApiModelProperty(value = "id", required = true)
|
|
||||||
@NotNull(message = "id不能为空")
|
|
||||||
private Long id;
|
|
||||||
/**
|
|
||||||
* 权益名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益名称", required = true)
|
|
||||||
@NotNull(message = "权益名称不能为空")
|
|
||||||
private String benefitName;
|
|
||||||
/**
|
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "排序不能为空")
|
|
||||||
@ApiModelProperty(value = "排序", required = true)
|
|
||||||
private Integer benefitOrder;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
package com.mcwl.memberCenter.domain.vo;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权益详情vo
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel(value = "权益详情vo")
|
|
||||||
public class BenefitInfoVo {
|
|
||||||
|
|
||||||
private Long id;
|
|
||||||
/**
|
|
||||||
* 权益描述
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益描述")
|
|
||||||
private String benefitDesc;
|
|
||||||
/**
|
|
||||||
* 权益类型
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益类型")
|
|
||||||
private String benefitType;
|
|
||||||
/**
|
|
||||||
* 权益折扣,当权益类型为折扣时,记录折扣具体数值
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "权益折扣,当权益类型为折扣时,记录折扣具体数值")
|
|
||||||
private Double benefitDiscount;
|
|
||||||
/**
|
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "单位")
|
|
||||||
private String benefitUnit;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -4,35 +4,36 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权益vo
|
* 权益vo
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "权益列表")
|
|
||||||
public class BenefitVo {
|
public class BenefitVo {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 权益名称
|
* 权益名称
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "权益名称")
|
|
||||||
private String benefitName;
|
private String benefitName;
|
||||||
|
/**
|
||||||
|
* 权益描述
|
||||||
|
*/
|
||||||
|
private String benefitDesc;
|
||||||
|
/**
|
||||||
|
* 权益类型
|
||||||
|
*/
|
||||||
|
private String benefitType;
|
||||||
|
/**
|
||||||
|
* 权益折扣,当权益类型为折扣时,记录折扣具体数值
|
||||||
|
*/
|
||||||
|
private Double benefitDiscount;
|
||||||
/**
|
/**
|
||||||
* 权益排序
|
* 权益排序
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "权益排序")
|
|
||||||
private Integer benefitOrder;
|
private Integer benefitOrder;
|
||||||
|
|
||||||
@ApiModelProperty(value = "权益详情")
|
|
||||||
private List<BenefitInfoVo> benefitInfoList = new ArrayList<>();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.mcwl.memberCenter.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.mcwl.memberCenter.domain.Benefit;
|
|
||||||
import com.mcwl.memberCenter.domain.BenefitName;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 权益 Mapper
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface BenefitNameMapper extends BaseMapper<BenefitName> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.mcwl.memberCenter.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.mcwl.memberCenter.domain.Benefit;
|
|
||||||
import com.mcwl.memberCenter.domain.BenefitName;
|
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface BenefitNameService extends IService<BenefitName> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -2,8 +2,6 @@ package com.mcwl.memberCenter.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mcwl.memberCenter.domain.Benefit;
|
import com.mcwl.memberCenter.domain.Benefit;
|
||||||
import com.mcwl.memberCenter.domain.dto.AddBenefitDto;
|
|
||||||
import com.mcwl.memberCenter.domain.vo.BenefitVo;
|
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,8 +17,4 @@ public interface BenefitService extends IService<Benefit> {
|
||||||
List<Benefit> getNotBenefitList(Long memberLevelId);
|
List<Benefit> getNotBenefitList(Long memberLevelId);
|
||||||
|
|
||||||
Benefit getBenefitByType(Long memberLevelId, MemberBenefitTypeEnum memberBenefitTypeEnum);
|
Benefit getBenefitByType(Long memberLevelId, MemberBenefitTypeEnum memberBenefitTypeEnum);
|
||||||
|
|
||||||
void addBenefit(AddBenefitDto addBenefitDto);
|
|
||||||
|
|
||||||
List<BenefitVo> benefitList();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.mcwl.memberCenter.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.mcwl.memberCenter.domain.Benefit;
|
|
||||||
import com.mcwl.memberCenter.domain.BenefitName;
|
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
|
||||||
import com.mcwl.memberCenter.mapper.BenefitMapper;
|
|
||||||
import com.mcwl.memberCenter.mapper.BenefitNameMapper;
|
|
||||||
import com.mcwl.memberCenter.service.BenefitNameService;
|
|
||||||
import com.mcwl.memberCenter.service.BenefitService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class BenefitNameServiceImpl extends ServiceImpl<BenefitNameMapper, BenefitName> implements BenefitNameService {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,29 +1,28 @@
|
||||||
package com.mcwl.memberCenter.service.impl;
|
package com.mcwl.memberCenter.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mcwl.memberCenter.domain.Benefit;
|
import com.mcwl.memberCenter.domain.Benefit;
|
||||||
import com.mcwl.memberCenter.domain.BenefitName;
|
import com.mcwl.memberCenter.domain.MemberBenefit;
|
||||||
import com.mcwl.memberCenter.domain.dto.AddBenefitDto;
|
import com.mcwl.memberCenter.domain.MemberLevel;
|
||||||
import com.mcwl.memberCenter.domain.vo.BenefitInfoVo;
|
import com.mcwl.memberCenter.domain.vo.MemberBenefitVO;
|
||||||
import com.mcwl.memberCenter.domain.vo.BenefitVo;
|
|
||||||
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
||||||
import com.mcwl.memberCenter.mapper.BenefitMapper;
|
import com.mcwl.memberCenter.mapper.BenefitMapper;
|
||||||
import com.mcwl.memberCenter.service.BenefitNameService;
|
import com.mcwl.memberCenter.mapper.MemberBenefitMapper;
|
||||||
import com.mcwl.memberCenter.service.BenefitService;
|
import com.mcwl.memberCenter.service.BenefitService;
|
||||||
|
import com.mcwl.memberCenter.service.MemberBenefitService;
|
||||||
|
import com.mcwl.memberCenter.service.MemberLevelService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class BenefitServiceImpl extends ServiceImpl<BenefitMapper, Benefit> implements BenefitService {
|
public class BenefitServiceImpl extends ServiceImpl<BenefitMapper, Benefit> implements BenefitService {
|
||||||
|
|
||||||
private final BenefitNameService benefitNameService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Benefit> getBenefitList() {
|
public List<Benefit> getBenefitList() {
|
||||||
return baseMapper.getBenefitList();
|
return baseMapper.getBenefitList();
|
||||||
|
@ -43,39 +42,4 @@ public class BenefitServiceImpl extends ServiceImpl<BenefitMapper, Benefit> impl
|
||||||
public Benefit getBenefitByType(Long memberLevelId, MemberBenefitTypeEnum memberBenefitTypeEnum) {
|
public Benefit getBenefitByType(Long memberLevelId, MemberBenefitTypeEnum memberBenefitTypeEnum) {
|
||||||
return baseMapper.getBenefitByType(memberLevelId, memberBenefitTypeEnum.getValue());
|
return baseMapper.getBenefitByType(memberLevelId, memberBenefitTypeEnum.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addBenefit(AddBenefitDto addBenefitDto) {
|
|
||||||
|
|
||||||
Benefit benefit = BeanUtil.toBean(addBenefitDto, Benefit.class);
|
|
||||||
|
|
||||||
baseMapper.insert(benefit);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<BenefitVo> benefitList() {
|
|
||||||
|
|
||||||
List<BenefitVo> benefitVoList = new ArrayList<>();
|
|
||||||
|
|
||||||
List<BenefitName> benefitNameList = benefitNameService.list();
|
|
||||||
|
|
||||||
for (BenefitName benefitName : benefitNameList) {
|
|
||||||
|
|
||||||
BenefitVo benefitVo = BeanUtil.toBean(benefitName, BenefitVo.class);
|
|
||||||
|
|
||||||
List<BenefitInfoVo> benefitInfoVoList = new ArrayList<>();
|
|
||||||
List<Benefit> benefitList = baseMapper.selectList(new LambdaQueryWrapper<Benefit>()
|
|
||||||
.eq(Benefit::getBenefitNameId, benefitName.getId()));
|
|
||||||
for (Benefit benefit : benefitList) {
|
|
||||||
BenefitInfoVo benefitInfoVo1 = BeanUtil.copyProperties(benefit, BenefitInfoVo.class);
|
|
||||||
benefitInfoVo1.setBenefitType(benefit.getBenefitType().getValue());
|
|
||||||
benefitInfoVoList.add(benefitInfoVo1);
|
|
||||||
}
|
|
||||||
benefitVo.setBenefitInfoList(benefitInfoVoList);
|
|
||||||
|
|
||||||
benefitVoList.add(benefitVo);
|
|
||||||
}
|
|
||||||
return benefitVoList;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class MemberBenefitServiceImpl extends ServiceImpl<MemberBenefitMapper, M
|
||||||
benefitList.addAll(notBenefitList);
|
benefitList.addAll(notBenefitList);
|
||||||
|
|
||||||
// 排序
|
// 排序
|
||||||
// benefitList.sort(Comparator.comparingInt(Benefit::getCreateTime));
|
benefitList.sort(Comparator.comparingInt(Benefit::getBenefitOrder));
|
||||||
|
|
||||||
memberBenefitVO.setMemberBenefitList(benefitList);
|
memberBenefitVO.setMemberBenefitList(benefitList);
|
||||||
memberBenefitVOList.add(memberBenefitVO);
|
memberBenefitVOList.add(memberBenefitVO);
|
||||||
|
|
|
@ -16,8 +16,10 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
import java.util.stream.Collectors;
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Component("userMemberTask")
|
@Component("userMemberTask")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
@ -188,7 +190,7 @@ public class UserMemberTask {
|
||||||
.in(Benefit::getId, benefitIdList)
|
.in(Benefit::getId, benefitIdList)
|
||||||
.list();
|
.list();
|
||||||
for (Benefit benefit : benefitList) {
|
for (Benefit benefit : benefitList) {
|
||||||
if (benefit.getBenefitType().getValue().equals(MemberBenefitTypeEnum.POINTS.getValue())) {
|
if (benefit.getBenefitType().equals(MemberBenefitTypeEnum.POINTS.getValue())) {
|
||||||
return benefit.getBenefitDiscount();
|
return benefit.getBenefitDiscount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,33 +5,33 @@
|
||||||
<mapper namespace="com.mcwl.memberCenter.mapper.BenefitMapper">
|
<mapper namespace="com.mcwl.memberCenter.mapper.BenefitMapper">
|
||||||
|
|
||||||
<select id="getBenefitList" resultType="com.mcwl.memberCenter.domain.Benefit">
|
<select id="getBenefitList" resultType="com.mcwl.memberCenter.domain.Benefit">
|
||||||
select id, benefit_name_id, benefit_desc, benefit_type, benefit_discount, benefit_unit
|
select id, benefit_name, benefit_desc, benefit_discount, benefit_order
|
||||||
from mem_benefit
|
from mem_benefit
|
||||||
where del_flag = '0'
|
where del_flag = '0'
|
||||||
order by create_time desc
|
order by benefit_order
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getBenefitListByMemberLevelId" resultType="com.mcwl.memberCenter.domain.Benefit">
|
<select id="getBenefitListByMemberLevelId" resultType="com.mcwl.memberCenter.domain.Benefit">
|
||||||
select b.id, benefit_name_id, benefit_desc, benefit_type, benefit_discount, benefit_unit
|
select b.id, benefit_name, benefit_desc, benefit_discount, benefit_order
|
||||||
from mem_benefit b
|
from mem_benefit b
|
||||||
left join mem_member_benefit mb on b.id = mb.benefit_id
|
left join mem_member_benefit mb on b.id = mb.benefit_id
|
||||||
where mb.member_level_id = #{memberLevelId}
|
where mb.member_level_id = #{memberLevelId}
|
||||||
and b.del_flag = '0'
|
and b.del_flag = '0'
|
||||||
and mb.del_flag = '0'
|
and mb.del_flag = '0'
|
||||||
order by b.create_time desc
|
order by b.benefit_order
|
||||||
</select>
|
</select>
|
||||||
<select id="getNotBenefitList" resultType="com.mcwl.memberCenter.domain.Benefit">
|
<select id="getNotBenefitList" resultType="com.mcwl.memberCenter.domain.Benefit">
|
||||||
select b.id, benefit_name_id, benefit_desc, benefit_type, benefit_discount, benefit_unit
|
select benefit_name, benefit_desc, benefit_order
|
||||||
from mem_benefit b
|
from mem_benefit b
|
||||||
where b.id not in (select mb.benefit_id
|
where b.id not in (select mb.benefit_id
|
||||||
from mem_member_benefit mb
|
from mem_member_benefit mb
|
||||||
where mb.member_level_id = #{memberLevelId}
|
where mb.member_level_id = #{memberLevelId}
|
||||||
and mb.del_flag = '0')
|
and mb.del_flag = '0')
|
||||||
and b.del_flag = '0'
|
and b.del_flag = '0'
|
||||||
order by b.create_time desc
|
order by b.benefit_order
|
||||||
</select>
|
</select>
|
||||||
<select id="getBenefitByType" resultType="com.mcwl.memberCenter.domain.Benefit">
|
<select id="getBenefitByType" resultType="com.mcwl.memberCenter.domain.Benefit">
|
||||||
select mb.id, benefit_name_id, benefit_desc, benefit_type, benefit_discount, benefit_unit
|
select mb.id, benefit_name, benefit_desc, benefit_type, benefit_discount, benefit_order
|
||||||
from mem_benefit mb
|
from mem_benefit mb
|
||||||
left join mem_member_benefit mmb on mb.id = mmb.benefit_id
|
left join mem_member_benefit mmb on mb.id = mmb.benefit_id
|
||||||
where mb.del_flag = '0'
|
where mb.del_flag = '0'
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.mcwl.memberCenter.mapper.BenefitNameMapper">
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
|
|
@ -733,8 +733,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Override
|
@Override
|
||||||
public UserDataVo getUserData() {
|
public UserDataVo getUserData() {
|
||||||
return UserDataVo.builder()
|
return UserDataVo.builder()
|
||||||
.userCount(this.getUserCount())
|
.userCount(this.getMonthUserCount())
|
||||||
.monthUserCount(this.getMonthUserCount())
|
.monthUserCount(this.getUserCount())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserCount" resultType="java.lang.Integer">
|
<select id="getUserCount" resultType="java.lang.Integer">
|
||||||
select COALESCE(count(*), 0) from sys_user where del_flag = '0'
|
select COALESCE(count(*), 0) from sys_user
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getMonthUserCount" resultType="java.lang.Integer">
|
<select id="getMonthUserCount" resultType="java.lang.Integer">
|
||||||
|
|
Loading…
Reference in New Issue