Merge remote-tracking branch 'origin/master'
11个文件已修改
1个文件已删除
33个文件已添加
| | |
| | | import com.dsh.account.feignclient.competition.model.PurchaseRecordVo; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.*; |
| | | import com.dsh.account.model.vo.commentDetail.StuCommentsVo; |
| | | import com.dsh.account.model.vo.medalDetail.GongVo; |
| | | import com.dsh.account.model.vo.medalDetail.StuMedalVo; |
| | | import com.dsh.account.model.vo.sourceDetail.CouponStuAvailableVo; |
| | | import com.dsh.account.model.vo.sourceDetail.CourseDetailsOfContinuationResp; |
| | | import com.dsh.account.model.vo.sourceDetail.RecordTimeRequest; |
| | | import com.dsh.account.service.EvaluateStudentService; |
| | | import com.dsh.account.service.StudentHonorService; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.service.TStudentService; |
| | | import com.dsh.account.util.DateUtil; |
| | |
| | | private EvaluateStudentService evalstuService; |
| | | |
| | | @Autowired |
| | | private StudentHonorService honorService; |
| | | |
| | | @Autowired |
| | | private TokenUtil tokenUtil; |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/queryStudentData") |
| | | @PostMapping("/api/startCource/queryStudentData") |
| | | @ApiOperation(value = "上课首页", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "经度值", name = "longitude", required = true, dataType = "String"), |
| | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/queryPhysical") |
| | | @PostMapping("/api/startCource/queryPhysical") |
| | | @ApiOperation(value = "获取学员测试报告", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "学员id", name = "id", required = true, dataType = "int"), |
| | |
| | | * 添加学员信息 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/addData") |
| | | @PostMapping("/api/startCource/addData") |
| | | @ApiOperation(value = "添加学员信息", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "学员信息", name = "stu", required = true, dataType = "int"), |
| | |
| | | * 该APP用户下的学员列表 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/listOfStu") |
| | | @PostMapping("/api/startCource/listOfStu") |
| | | @ApiOperation(value = "学员列表", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | vo.setStuHeight(sts.getHeight()); |
| | | vo.setStuWeight(sts.getWeight()); |
| | | vo.setIsNot(sts.getIsDefault()); |
| | | stuListVos.add(vo); |
| | | }); |
| | | } |
| | | return ResultUtil.success(stuListVos); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 切换学员 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/startCource/switchStu") |
| | | @ApiOperation(value = "切换学员", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<StuListVo>> dealSwitchStudents(@RequestBody Integer stuId){ |
| | | try { |
| | | Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); |
| | | if(null == userIdFormRedis){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(istuService.switchStudentActions(userIdFormRedis,stuId)); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 课时详情 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/lessonDetails") |
| | | @PostMapping("/api/startCource/lessonDetails") |
| | | @ApiOperation(value = "课时详情", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | |
| | | * 课时详情-记录列表 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/recordDetails") |
| | | @PostMapping("/api/startCource/recordDetails") |
| | | @ApiOperation(value = "课时详情-记录列表", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | |
| | | * 课时详情-续课课包详情 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/renewal") |
| | | @PostMapping("/api/startCource/renewal") |
| | | @ApiOperation(value = "课时详情-续课课包详情", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | * 课时详情-选择优惠券 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/conponList") |
| | | @PostMapping("/api/startCource/conponList") |
| | | @ApiOperation(value = "课时详情-选择优惠券", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | * 课时详情-支付 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/payment") |
| | | @PostMapping("/api/startCource/payment") |
| | | @ApiOperation(value = "课时详情-支付", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | * 学员评语 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/stuComment") |
| | | @PostMapping("/api/startCource/stuComment") |
| | | @ApiOperation(value = "学员评语", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<StuCommentsVo>> queryStuComment(@RequestParam("stuId") Integer stuId){ |
| | | try { |
| | |
| | | |
| | | |
| | | /** |
| | | * 学员勋章 |
| | | * 学员勋章详情 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/startCource/stuMedal") |
| | | @ApiOperation(value = "学员勋章", tags = {"APP-开始上课"}) |
| | | @PostMapping("/api/startCource/stuMedal") |
| | | @ApiOperation(value = "学员勋章详情", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<StuMedalVo> queryStuMedal(@RequestParam("stuId") Integer stuId){ |
| | | public ResultUtil<List<StuMedalVo>> queryStuMedal(@RequestParam("stuId") Integer stuId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(honorService.queryHonorDetails(stuId)); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 学员勋章 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/startCource/stuGoog") |
| | | @ApiOperation(value = "学员勋章", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<List<GongVo>> queryStuGoog(@RequestParam("stuId") Integer stuId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(honorService.queryStuOfMedalData(stuId)); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 课后视频课表 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/startCource/afterSourceDetails") |
| | | @ApiOperation(value = "学员勋章", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil queryAfterSourceDetails(@RequestParam("stuId") Integer stuId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | // TODO: 2023/7/4 |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | private TStudentService tsService; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/exploreWP/noticeList") |
| | | @PostMapping("/api/exploreWP/noticeList") |
| | | @ApiOperation(value = "联系客服-探索首页", tags = {"APP-探索玩湃"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/exploreWP/noticeList") |
| | | @ApiOperation(value = "联系客服-公告列表", tags = {"APP-探索玩湃"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<SysNotice>> queryNoticeListDatas(){ |
| | | try { |
| | | return ResultUtil.success(tsService.querySystemNoticeDetails()); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/exploreWP/noticeList") |
| | | @ApiOperation(value = "联系客服-公告详情", tags = {"APP-探索玩湃"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<SysNotice> queryNotice(@RequestBody Integer noId){ |
| | | try { |
| | | return ResultUtil.success(tsService.queryNoticeData(noId)); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/exploreWP/noticeList") |
| | | @ApiOperation(value = "联系客服-常见问题列表", tags = {"APP-探索玩湃"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<QuestionDetailsVo> queryFrequentlyAskedQuestionDetails(){ |
| | | try { |
| | | return ResultUtil.success(tsService.queryQuestionData()); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/exploreWP/noticeList") |
| | | @ApiOperation(value = "联系客服-常见问题详情", tags = {"APP-探索玩湃"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<QuestionIns> queryQuestionData(@RequestBody Integer quesId){ |
| | | try { |
| | | return ResultUtil.success(tsService.queryQuestionDataInfo(quesId)); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/exploreWP/noticeList") |
| | | @ApiOperation(value = "联系客服-客服电话列表", tags = {"APP-探索玩湃"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<String>> queryCustomerData(){ |
| | | try { |
| | | return ResultUtil.success(tsService.queryCustomerDetails()); |
New file |
| | |
| | | package com.dsh.account.controller; |
| | | |
| | | |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.vo.userBenefitDetail.AppUserDetailsVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.BillingDetailsVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.IndexOfUserBenefirVo; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.dsh.account.util.TokenUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class UseBenefitsController { |
| | | |
| | | |
| | | @Autowired |
| | | private TAppUserService tauService; |
| | | |
| | | @Autowired |
| | | private TokenUtil tokenUtil; |
| | | |
| | | private final SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/useBenefit/indexOfAppUser") |
| | | @ApiOperation(value = "福利主页", tags = {"APP-使用福利"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | public ResultUtil<IndexOfUserBenefirVo> queryAppUserUser(){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(tauService.queryBenefitDetails(appUserId)); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/useBenefit/userDetails") |
| | | @ApiOperation(value = "用户个人信息", tags = {"APP-使用福利"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | public ResultUtil<AppUserDetailsVo> queryAppUserDetails(){ |
| | | try { |
| | | AppUserDetailsVo detailsVo = new AppUserDetailsVo(); |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | TAppUser tAppUser = tauService.getBaseMapper().selectById(appUserId); |
| | | if (null != tAppUser){ |
| | | detailsVo.setUserImage(tAppUser.getHeadImg()); |
| | | detailsVo.setUserName(tAppUser.getName()); |
| | | detailsVo.setUserPhone(tAppUser.getPhone()); |
| | | detailsVo.setSex(tAppUser.getGender() == 1 ? "男" : "女"); |
| | | detailsVo.setBirthday(format1.format(tAppUser.getBirthday())); |
| | | detailsVo.setAddress(tAppUser.getProvince()+tAppUser.getCity()); |
| | | detailsVo.setMemberLifespan(format1.format(tAppUser.getVipEndTime())); |
| | | } |
| | | return ResultUtil.success(detailsVo); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/useBenefit/userBilling") |
| | | @ApiOperation(value = "账单", tags = {"APP-使用福利"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "年月", name = "yearMonth", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "记录id", name = "recordId", required = true, dataType = "int"), |
| | | }) |
| | | public ResultUtil<BillingDetailsVo> getUserBillingDetails(@RequestBody String yearMonth,@RequestBody Integer recordId){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(tauService.queryUserBillingDetails(yearMonth,recordId)); |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员-荣耀中间表 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_student_honor") |
| | | public class StudentHonor extends Model<StudentHonor> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 学员id |
| | | */ |
| | | private Integer stuId; |
| | | /** |
| | | * 荣耀规则id |
| | | */ |
| | | private Integer honorRuleId; |
| | | /** |
| | | * 荣耀类型 |
| | | */ |
| | | private Integer honorType; |
| | | /** |
| | | * 荣耀等级 |
| | | */ |
| | | private Integer honorLevel; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date insertTime; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.feignclient.activity; |
| | | |
| | | |
| | | import com.dsh.account.feignclient.activity.model.IntegralCommodity; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface MerChandiseClient { |
| | | |
| | | @PostMapping("/pointMerchars/convertGoods") |
| | | public List<IntegralCommodity> getConvertibleGoods(); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.feignclient.activity.model; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | |
| | | @Data |
| | | public class IntegralCommodity { |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | private Integer commodityId; |
| | | |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String commodityImg; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String commodityName; |
| | | |
| | | @ApiModelProperty(value = "商品价格") |
| | | private BigDecimal commodityPrice; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.feignclient.other; |
| | | |
| | | import com.dsh.account.model.vo.medalDetail.StuMedalVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(value = "mb-cloud-other") |
| | | public interface HonorDeClient { |
| | | |
| | | @PostMapping("/honor/stuHonors") |
| | | public List<StuMedalVo> getStuHonors(@RequestBody List<Integer> honorIds); |
| | | |
| | | } |
| | |
| | | package com.dsh.account.feignclient.other; |
| | | |
| | | import com.dsh.account.feignclient.other.model.TImgConfig; |
| | | import com.dsh.account.feignclient.other.model.UserBenefitImage; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | |
| | | |
| | | @PostMapping("/imgConfig/getNoneStu") |
| | | List<TImgConfig> getNoneStuImgs(); |
| | | |
| | | |
| | | @PostMapping("/imgConfig/getBenefitImage") |
| | | public UserBenefitImage getImageConfig(); |
| | | } |
New file |
| | |
| | | package com.dsh.account.feignclient.other.model; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class UserBenefitImage { |
| | | |
| | | @ApiModelProperty(value = "我的券包pic") |
| | | private String myConpons; |
| | | |
| | | @ApiModelProperty(value = "线上商城pic") |
| | | private String onlineShop; |
| | | |
| | | @ApiModelProperty(value = "本周福利pic") |
| | | private String weeksBenefit; |
| | | |
| | | @ApiModelProperty(value = "今日免费pic") |
| | | private String todayFree; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.account.entity.StudentHonor; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员-荣耀中间表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | public interface StudentHonorMapper extends BaseMapper<StudentHonor> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.model.vo.medalDetail; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class GongVo { |
| | | |
| | | @ApiModelProperty(value = "勋章类型(1=俱乐部之星,2=运动达人,3=社区之王,4=深度玩家)") |
| | | private Integer medalType; |
| | | |
| | | @ApiModelProperty(value = "勋章名称 例如:俱乐部之星") |
| | | private String medalName; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "升级条件") |
| | | private String upgradeConditions; |
| | | |
| | | @ApiModelProperty(value = "下一等级") |
| | | private Integer nextLevel; |
| | | |
| | | @ApiModelProperty(value = "是否顶级 1是 2不是") |
| | | private Integer isTopLevel; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.model.vo.userBenefitDetail; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AppUserDetailsVo { |
| | | |
| | | @ApiModelProperty(value = "用户头像") |
| | | private String userImage; |
| | | |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "用户手机号") |
| | | private String userPhone; |
| | | |
| | | @ApiModelProperty(value = "用户性别") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty(value = "用户生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "用户地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "会员有效期") |
| | | private String memberLifespan; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.model.vo.userBenefitDetail; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class BillingDetailsVo { |
| | | |
| | | @ApiModelProperty(value = "记录列表") |
| | | List<ConsumeDetail> details; |
| | | |
| | | |
| | | |
| | | @Data |
| | | public static class ConsumeDetail{ |
| | | |
| | | @ApiModelProperty(value = "名称") |
| | | private String consumeName; |
| | | |
| | | @ApiModelProperty(value = "时间") |
| | | private String consumeTime; |
| | | |
| | | @ApiModelProperty(value = "金额 例如 -90 ") |
| | | private String consumeAmount; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.model.vo.userBenefitDetail; |
| | | |
| | | import com.dsh.account.feignclient.activity.model.IntegralCommodity; |
| | | import com.dsh.account.feignclient.other.model.UserBenefitImage; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IndexOfUserBenefirVo { |
| | | |
| | | @ApiModelProperty(value = "用户头像") |
| | | private String userHeadImg; |
| | | |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "是否年度会员") |
| | | private String isMember; |
| | | |
| | | @ApiModelProperty(value = "玩湃币") |
| | | private double wpCoin; |
| | | |
| | | @ApiModelProperty(value = "用户积分") |
| | | private Integer userIntegral; |
| | | |
| | | @ApiModelProperty(value = "商品列表") |
| | | private List<IntegralCommodity> commodities; |
| | | |
| | | @ApiModelProperty(value = "banners") |
| | | private UserBenefitImage image; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.account.entity.StudentHonor; |
| | | import com.dsh.account.model.vo.medalDetail.GongVo; |
| | | import com.dsh.account.model.vo.medalDetail.StuMedalVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员-荣耀中间表 服务类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | public interface StudentHonorService extends IService<StudentHonor> { |
| | | |
| | | List<GongVo> queryStuOfMedalData(Integer stuId); |
| | | |
| | | List<StuMedalVo> queryHonorDetails(Integer stuId); |
| | | |
| | | } |
| | |
| | | package com.dsh.account.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.AddAppUserVo; |
| | | import com.dsh.account.model.JoinPlayPaiVo; |
| | | import com.dsh.account.model.LoginSMSCodeVo; |
| | | import com.dsh.account.model.LoginWeChatVo; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.BillingDetailsVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.IndexOfUserBenefirVo; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @throws Exception |
| | | */ |
| | | JoinPlayPaiVo queryJoinPlayPai(Integer uid, String lon, String lat) throws Exception; |
| | | |
| | | /** |
| | | * 获取使用福利首页数据 |
| | | * @param appUserId |
| | | * @return |
| | | */ |
| | | IndexOfUserBenefirVo queryBenefitDetails(Integer appUserId); |
| | | |
| | | /** |
| | | * 获取用户账单列表 |
| | | * @param yearMonth 年月 |
| | | * @param recordId 记录id |
| | | * @return |
| | | */ |
| | | BillingDetailsVo queryUserBillingDetails(String yearMonth, Integer recordId); |
| | | |
| | | } |
| | |
| | | import com.dsh.account.feignclient.other.model.SysNotice; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassDetailsInsVo; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuDetailsReq; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuListVo; |
| | | import com.dsh.account.model.vo.exploreDetail.ExploreDatasVo; |
| | | import com.dsh.account.model.vo.exploreDetail.LonLatRequest; |
| | | import com.dsh.account.model.vo.exploreDetails.QuestionDetailsVo; |
| | |
| | | */ |
| | | ExploreDatasVo queryIndexOfExplores(LonLatRequest llrequest); |
| | | |
| | | /** |
| | | * 切换学员 |
| | | */ |
| | | List<StuListVo> switchStudentActions(Integer appUserId, Integer stuId); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.account.entity.StudentHonor; |
| | | import com.dsh.account.feignclient.other.HonorDeClient; |
| | | import com.dsh.account.mapper.StudentHonorMapper; |
| | | import com.dsh.account.model.vo.medalDetail.GongVo; |
| | | import com.dsh.account.model.vo.medalDetail.StuMedalVo; |
| | | import com.dsh.account.service.StudentHonorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员-荣耀中间表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @Service |
| | | public class StudentHonorServiceImpl extends ServiceImpl<StudentHonorMapper, StudentHonor> implements StudentHonorService { |
| | | |
| | | |
| | | @Autowired |
| | | private HonorDeClient honorDeClient; |
| | | |
| | | @Override |
| | | public List<GongVo> queryStuOfMedalData(Integer stuId) { |
| | | List<GongVo> voList = new ArrayList<>(); |
| | | List<StudentHonor> studentHonors = this.baseMapper.selectList(new QueryWrapper<StudentHonor>() |
| | | .eq("stuId", stuId)); |
| | | if (studentHonors.size() > 0){ |
| | | studentHonors.forEach( stuoHo -> { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(stuoHo.getHonorType()); |
| | | switch (stuoHo.getHonorType()){ |
| | | case 1: |
| | | vo.setMedalName("俱乐部之星"); |
| | | break; |
| | | case 2: |
| | | vo.setMedalName("运动达人"); |
| | | break; |
| | | case 3: |
| | | vo.setMedalName("社区之王"); |
| | | break; |
| | | case 4: |
| | | vo.setMedalName("深度玩家"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | voList.add(vo); |
| | | }); |
| | | } |
| | | return voList; |
| | | } |
| | | |
| | | @Override |
| | | public List<StuMedalVo> queryHonorDetails(Integer stuId) { |
| | | List<StudentHonor> studentHonors = this.baseMapper.selectList(new QueryWrapper<StudentHonor>() |
| | | .in("stuId",stuId)); |
| | | List<Integer> collect = studentHonors.stream().map(StudentHonor::getStuId).collect(Collectors.toList()); |
| | | return honorDeClient.getStuHonors(collect); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.TStudent; |
| | | import com.dsh.account.feignclient.activity.MerChandiseClient; |
| | | import com.dsh.account.feignclient.course.CoursePaymentClient; |
| | | import com.dsh.account.feignclient.course.model.CourseOfStoreVo; |
| | | import com.dsh.account.feignclient.course.model.QueryStoreList; |
| | |
| | | import com.dsh.account.model.vo.classDetails.RegisteredCourse; |
| | | import com.dsh.account.model.vo.classDetails.WeekedCourse; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.BillingDetailsVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.IndexOfUserBenefirVo; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.util.*; |
| | | import com.dsh.account.util.akeylogin.Md5Util; |
| | |
| | | @Resource |
| | | private StoreClient storeClient; |
| | | |
| | | @Autowired |
| | | private MerChandiseClient mcClient; |
| | | |
| | | |
| | | @Autowired |
| | | private ImgConfigClient icfgClient; |
| | | |
| | | @Override |
| | | public ClassInfoVo queryUserOfStus(Integer id,String latitude,String longitude) { |
| | |
| | | } |
| | | return joinPlayPaiVo; |
| | | } |
| | | |
| | | @Override |
| | | public IndexOfUserBenefirVo queryBenefitDetails(Integer appUserId) { |
| | | IndexOfUserBenefirVo benefirVo = new IndexOfUserBenefirVo(); |
| | | |
| | | TAppUser appUser = this.getById(appUserId); |
| | | benefirVo.setUserHeadImg(appUser.getHeadImg()); |
| | | benefirVo.setUserName(appUser.getName()); |
| | | if (appUser.getIsVip() == 1){ |
| | | benefirVo.setIsMember("年度会员"); |
| | | }else { |
| | | benefirVo.setIsMember("普通用户"); |
| | | } |
| | | benefirVo.setCommodities(mcClient.getConvertibleGoods()); |
| | | benefirVo.setImage(icfgClient.getImageConfig()); |
| | | return benefirVo; |
| | | } |
| | | |
| | | @Override |
| | | public BillingDetailsVo queryUserBillingDetails(String yearMonth, Integer recordId) { |
| | | System.out.println("账单传参:yearMonth"+yearMonth+"|"+"recordId"+recordId); |
| | | // TODO: 2023/7/4 |
| | | return null; |
| | | } |
| | | } |
| | |
| | | import com.dsh.account.mapper.TStudentMapper; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassDetailsInsVo; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuDetailsReq; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuListVo; |
| | | import com.dsh.account.model.vo.exploreDetail.ExploreDatasVo; |
| | | import com.dsh.account.model.vo.exploreDetail.LonLatRequest; |
| | | import com.dsh.account.model.vo.exploreDetails.QuestionDetailsVo; |
| | |
| | | import com.dsh.account.model.vo.sourceDetail.RecordTimeRequest; |
| | | import com.dsh.account.service.TStudentService; |
| | | import com.dsh.account.util.DateTimeHelper; |
| | | import com.dsh.account.util.DateUtil; |
| | | import com.dsh.account.util.ToolUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | purchaseRecordVoList.addAll(purchaseRecordVos); |
| | | List<TAppUser> tAppUsers = tauMapper.selectList(new QueryWrapper<TAppUser>() |
| | | .eq("referralUserId",appUserId ) |
| | | .between("insertTime",timeRequest.getStartTime() ,timeRequest.getEndTime())); |
| | | .between("insertTime",startTime ,endTime)); |
| | | List<Integer> userIds = tAppUsers.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | List<PurchaseRecordVo> purchaseRecordVos1 = idrClient.queryAppUsersofIntroduce(startTime, endTime, userIds); |
| | | purchaseRecordVoList.addAll(purchaseRecordVos1); |
| | |
| | | return datasVo; |
| | | } |
| | | |
| | | @Override |
| | | public List<StuListVo> switchStudentActions(Integer appUserId, Integer stuId) { |
| | | List<StuListVo> stuListVos = new ArrayList<>(); |
| | | List<TStudent> tStudents = this.baseMapper.selectList(new QueryWrapper<TStudent>() |
| | | .eq("appUserId", appUserId) |
| | | .eq("state",1)); |
| | | if (tStudents.size() > 0) { |
| | | tStudents.forEach(sts -> { |
| | | if (Objects.equals(sts.getId(), stuId)) { |
| | | sts.setIsDefault(1); |
| | | } else { |
| | | sts.setIsDefault(2); |
| | | } |
| | | this.baseMapper.updateById(sts); |
| | | |
| | | StuListVo vo = new StuListVo(); |
| | | vo.setStuId(sts.getId()); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | vo.setBirthday(simpleDateFormat.format(sts.getBirthday())); |
| | | vo.setStuName(sts.getName()); |
| | | vo.setStuAge(DateUtil.age(sts.getBirthday())); |
| | | vo.setStuHeight(sts.getHeight()); |
| | | vo.setStuWeight(sts.getWeight()); |
| | | vo.setIsNot(sts.getIsDefault()); |
| | | stuListVos.add(vo); |
| | | }); |
| | | } |
| | | return stuListVos; |
| | | } |
| | | |
| | | |
| | | public static List<PurchaseRecordVo> dealDataOfTime(List<PurchaseRecordVo> purchaseRecords) { |
| | | Collections.sort(purchaseRecords, new Comparator<PurchaseRecordVo>() { |
New file |
| | |
| | | <?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.dsh.account.mapper.StudentHonorMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.dsh.activity.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.dsh.activity.feignclient.model.IntegralCommodity; |
| | | import com.dsh.activity.service.PointsMerchandiseService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class PointMercharsController { |
| | | |
| | | |
| | | @Autowired |
| | | private PointsMerchandiseService pmdsService; |
| | | |
| | | |
| | | |
| | | @PostMapping("/pointMerchars/convertGoods") |
| | | public List<IntegralCommodity> getConvertibleGoods(){ |
| | | List<IntegralCommodity> commodity = new ArrayList<>(); |
| | | List<PointsMerchandise> merchandises = pmdsService.list(new QueryWrapper<PointsMerchandise>() |
| | | .eq("state",1) |
| | | .lt("endTime",new Date())); |
| | | if (merchandises.size() > 0){ |
| | | for (PointsMerchandise merchandise : merchandises) { |
| | | IntegralCommodity integralCommodity = new IntegralCommodity(); |
| | | integralCommodity.setCommodityId(merchandise.getId()); |
| | | integralCommodity.setCommodityImg(merchandise.getProductImages()); |
| | | integralCommodity.setCommodityName(merchandise.getName()); |
| | | integralCommodity.setCommodityPrice(merchandise.getPrice()); |
| | | commodity.add(integralCommodity); |
| | | } |
| | | } |
| | | return commodity; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.dsh.activity.entity.Coupon; |
| | | import com.dsh.activity.entity.UserCoupon; |
| | | import com.dsh.activity.feignclient.model.CouponStuAvailableVo; |
| | | import com.dsh.activity.service.CouponService; |
| | | import com.dsh.activity.service.ICouponService; |
| | | import com.dsh.activity.service.UserCouponService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private UserCouponService uconService; |
| | | |
| | | @Autowired |
| | | private CouponService cService; |
| | | private ICouponService cService; |
| | | |
| | | private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM"); |
| | | |
New file |
| | |
| | | package com.dsh.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_points_merchandise") |
| | | public class PointsMerchandise extends Model<PointsMerchandise> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 类型(1=实体商品,2=课包商品,3=门票商品) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 原价 |
| | | */ |
| | | private BigDecimal price; |
| | | /** |
| | | * 兑换方式(1=积分,2=现金+积分) |
| | | */ |
| | | private Integer redemptionMethod; |
| | | /** |
| | | * 所需现金 |
| | | */ |
| | | private BigDecimal cash; |
| | | /** |
| | | * 所属积分 |
| | | */ |
| | | private BigDecimal integral; |
| | | /** |
| | | * 商品封面 |
| | | */ |
| | | private String cover; |
| | | /** |
| | | * 商品图片 |
| | | */ |
| | | private String productImages; |
| | | /** |
| | | * 用户人群(1=全部用户,2=年度会员,3=已有学员用户) |
| | | */ |
| | | private Integer userPopulation; |
| | | /** |
| | | * 发放数量 |
| | | */ |
| | | private Integer quantityIssued; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | private Integer pickUpQuantity; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private Date endTime; |
| | | /** |
| | | * 使用范围(1=全国,2=指定城市,3=指定门店) |
| | | */ |
| | | private Integer useScope; |
| | | /** |
| | | * 省 |
| | | */ |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 兑换说明 |
| | | */ |
| | | private String redemptionInstructions; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private Integer sort; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date insertTime; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.feignclient; |
| | | |
| | | |
| | | import com.dsh.activity.feignclient.model.IntegralCommodity; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface MerChandiseClient { |
| | | |
| | | @PostMapping("/pointMerchars/convertGoods") |
| | | public List<IntegralCommodity> getConvertibleGoods(); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.feignclient.model; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | |
| | | @Data |
| | | public class IntegralCommodity { |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | private Integer commodityId; |
| | | |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String commodityImg; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String commodityName; |
| | | |
| | | @ApiModelProperty(value = "商品价格") |
| | | private BigDecimal commodityPrice; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | public interface PointsMerchandiseMapper extends BaseMapper<PointsMerchandise> { |
| | | |
| | | } |
New file |
| | |
| | | <?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.dsh.activity.mapper.PointsMerchandiseMapper"> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.dsh.activity.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品 服务类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | public interface PointsMerchandiseService extends IService<PointsMerchandise> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.dsh.activity.mapper.PointsMerchandiseMapper; |
| | | import com.dsh.activity.service.PointsMerchandiseService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @Service |
| | | public class PointsMerchandiseServiceImpl extends ServiceImpl<PointsMerchandiseMapper, PointsMerchandise> implements PointsMerchandiseService { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.web; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/points-merchandise") |
| | | public class PointsMerchandiseController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.dsh.other.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.other.entity.HonorRules; |
| | | import com.dsh.other.feignclient.model.StuMedalVo; |
| | | import com.dsh.other.service.HonorRulesService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class HonorController { |
| | | |
| | | @Autowired |
| | | private HonorRulesService hrService; |
| | | |
| | | |
| | | @PostMapping("/honor/stuHonors") |
| | | public List<StuMedalVo> getStuHonors(@RequestBody List<Integer> honorIds){ |
| | | List<StuMedalVo> stuMedalVos = new ArrayList<>(); |
| | | List<HonorRules> honorRules = hrService.list(new QueryWrapper<HonorRules>() |
| | | .in("id", honorIds)); |
| | | if (honorRules.size() > 0){ |
| | | honorRules.forEach(hrs -> { |
| | | StuMedalVo stuMedalVo = new StuMedalVo(); |
| | | stuMedalVo.setLevelNum(Integer.getInteger(hrs.getLevel())); |
| | | switch (hrs.getType()){ |
| | | case 1: |
| | | stuMedalVo.setMedalName("俱乐部之星"); |
| | | break; |
| | | case 2: |
| | | stuMedalVo.setMedalName("运动达人"); |
| | | break; |
| | | case 3: |
| | | stuMedalVo.setMedalName("社区之王"); |
| | | break; |
| | | case 4: |
| | | stuMedalVo.setMedalName("深度玩家"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (!Objects.equals(hrs.getLevel(), "10")){ |
| | | stuMedalVo.setNextLevel(Integer.parseInt(hrs.getLevel())+1); |
| | | stuMedalVo.setUpgradeConditions(hrs.getCondition()); |
| | | stuMedalVo.setIsTopLevel(2); |
| | | }else { |
| | | stuMedalVo.setIsTopLevel(1); |
| | | } |
| | | stuMedalVos.add(stuMedalVo); |
| | | }); |
| | | } |
| | | |
| | | return stuMedalVos; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.other.entity.TImgConfig; |
| | | import com.dsh.other.feignclient.model.UserBenefitImage; |
| | | import com.dsh.other.service.TImgConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return imgConfig.getContent(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/imgConfig/getBenefitImage") |
| | | public UserBenefitImage getImageConfig(){ |
| | | UserBenefitImage image = new UserBenefitImage(); |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | integers.add(1); |
| | | integers.add(2); |
| | | List<TImgConfig> tImgConfigs = imgConfigService.getBaseMapper().selectList(new QueryWrapper<TImgConfig>() |
| | | .notIn("position", integers)); |
| | | if (tImgConfigs.size() > 0){ |
| | | tImgConfigs.forEach(imgCg -> { |
| | | switch (imgCg.getPosition()){ |
| | | case 3: |
| | | image.setMyConpons(imgCg.getContent()); |
| | | break; |
| | | case 4: |
| | | image.setOnlineShop(imgCg.getContent()); |
| | | break; |
| | | case 5: |
| | | image.setWeeksBenefit(imgCg.getContent()); |
| | | break; |
| | | case 6: |
| | | image.setTodayFree(imgCg.getContent()); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }); |
| | | } |
| | | return image; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 荣誉规则 |
| | | * </p> |
| | | * |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_honor_rules") |
| | | public class HonorRules extends Model<HonorRules> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 数据类型(1=俱乐部之星,2=运动达人,3=社区之王,4=深度玩家) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 等级 |
| | | */ |
| | | private String level; |
| | | /** |
| | | * 满足条件值 |
| | | */ |
| | | private String condition; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.feignclient; |
| | | |
| | | import com.dsh.other.feignclient.model.StuMedalVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(value = "mb-cloud-other") |
| | | public interface HonorDeClient { |
| | | |
| | | @PostMapping("/honor/stuHonors") |
| | | public List<StuMedalVo> getStuHonors(@RequestBody List<Integer> honorIds); |
| | | |
| | | } |
| | |
| | | package com.dsh.other.feignclient; |
| | | |
| | | import com.dsh.other.entity.TImgConfig; |
| | | import com.dsh.other.feignclient.model.UserBenefitImage; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | |
| | | |
| | | @PostMapping("/imgConfig/getNoneStu") |
| | | List<TImgConfig> getNoneStuImgs(); |
| | | |
| | | |
| | | @PostMapping("/imgConfig/getBenefitImage") |
| | | public UserBenefitImage getImageConfig(); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.feignclient.model; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class StuMedalVo { |
| | | |
| | | @ApiModelProperty(value = "勋章类型(1=俱乐部之星,2=运动达人,3=社区之王,4=深度玩家)") |
| | | private Integer medalType; |
| | | |
| | | @ApiModelProperty(value = "勋章名称 例如:俱乐部之星") |
| | | private String medalName; |
| | | |
| | | @ApiModelProperty(value = "当前等级") |
| | | private Integer levelNum; |
| | | |
| | | @ApiModelProperty(value = "升级条件") |
| | | private String upgradeConditions; |
| | | |
| | | @ApiModelProperty(value = "下一等级") |
| | | private Integer nextLevel; |
| | | |
| | | @ApiModelProperty(value = "是否顶级 1是 2不是") |
| | | private Integer isTopLevel; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.feignclient.model; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class UserBenefitImage { |
| | | |
| | | @ApiModelProperty(value = "我的券包pic") |
| | | private String myConpons; |
| | | |
| | | @ApiModelProperty(value = "线上商城pic") |
| | | private String onlineShop; |
| | | |
| | | @ApiModelProperty(value = "本周福利pic") |
| | | private String weeksBenefit; |
| | | |
| | | @ApiModelProperty(value = "今日免费pic") |
| | | private String todayFree; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.other.entity.HonorRules; |
| | | |
| | | /** |
| | | * <p> |
| | | * 荣誉规则 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | public interface HonorRulesMapper extends BaseMapper<HonorRules> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.other.entity.HonorRules; |
| | | |
| | | /** |
| | | * <p> |
| | | * 荣誉规则 服务类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | public interface HonorRulesService extends IService<HonorRules> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.other.entity.HonorRules; |
| | | import com.dsh.other.mapper.HonorRulesMapper; |
| | | import com.dsh.other.service.HonorRulesService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 荣誉规则 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @Service |
| | | public class HonorRulesServiceImpl extends ServiceImpl<HonorRulesMapper, HonorRules> implements HonorRulesService { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.web; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 荣誉规则 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/honor-rules") |
| | | public class HonorRulesController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | <?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.dsh.other.mapper.HonorRulesMapper"> |
| | | |
| | | |
| | | </mapper> |