cloud-server-account/src/main/java/com/dsh/account/model/vo/userBenefitDetail/RechargeCentVo.java
@@ -4,17 +4,17 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; @Data public class RechargeCentVo { @ApiModelProperty(value = "类型id") private Integer chargeId; @ApiModelProperty(value = "玩湃币") private String wpGold; private Integer wpGold; @ApiModelProperty(value = "对应充值金额") private String amount; private BigDecimal amount; } cloud-server-account/src/main/java/com/dsh/account/model/vo/userBenefitDetail/RechargePayRequest.java
@@ -13,7 +13,7 @@ @ApiModelProperty(value = "支付方式 1微信 2支付宝") private Integer payType; @ApiModelProperty(value = "充值类型id") private Integer chargeId; @ApiModelProperty(value = "充值金额") private BigDecimal amount; } cloud-server-account/src/main/java/com/dsh/account/service/impl/RechargeRecordsServiceImpl.java
@@ -168,9 +168,8 @@ BigDecimal amount = BigDecimal.ZERO; if (rechargeConfig.size() > 0){ for (Map<String, Object> stringObjectMap : rechargeConfig) { Integer chargeId = (Integer) stringObjectMap.get("chargeId"); if (chargeId.equals(request.getChargeId())) { Long o = (Long) stringObjectMap.get("money"); if (BigDecimal.valueOf(o).compareTo(request.getAmount()) == 0) { amount = BigDecimal.valueOf(o); rechargeRecords.setAmount(BigDecimal.valueOf(o)); if (tAppUser.getIsVip() == 1) { cloud-server-account/src/main/java/com/dsh/account/service/impl/StudentHonorServiceImpl.java
@@ -65,7 +65,7 @@ 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()); List<Integer> collect = studentHonors.stream().map(StudentHonor::getHonorRuleId).collect(Collectors.toList()); return honorDeClient.getStuHonors(collect); } } cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -187,6 +187,7 @@ exerciseVideo.setVideoCoverImgUrl("https://img0.baidu.com/it/u=1492570361,4260963468&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500"); exerciseVideo.setVideoName("篮球课"); stuCourseOfVideoList.add(exerciseVideo); // TODO: 2023/8/3 List<ExerciseVideo> stuCourseOfVideoList1 = voclClient.getStuCourseOfVideoList(); classInfoVo.setExerciseVideoList(stuCourseOfVideoList); }else { classInfoVo.setIsThere(2); @@ -658,15 +659,16 @@ List<RechargeCentVo> centVos = new ArrayList<>(); TAppUser tAppUser = this.baseMapper.selectById(appUserId); List<Map<String, Object>> rechargeConfig = reconMapper.getRechargeConfig(); System.out.println(rechargeConfig); if (rechargeConfig.size() > 0 ){ for (Map<String, Object> stringObjectMap : rechargeConfig) { RechargeCentVo vo = new RechargeCentVo(); vo.setChargeId((Integer) stringObjectMap.get("money")); vo.setAmount(""+stringObjectMap.get("money")); Double money = (Double) stringObjectMap.get("money"); vo.setAmount(BigDecimal.valueOf(money) ); if (tAppUser.getIsVip() == 1){ vo.setWpGold(stringObjectMap.get("MemberCoins")+""); vo.setWpGold((Integer) stringObjectMap.get("MemberCoins")); }else { vo.setWpGold(stringObjectMap.get("usersCoins")+""); vo.setWpGold((Integer) stringObjectMap.get("usersCoins")); } centVos.add(vo); } cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
@@ -33,6 +33,7 @@ import com.dsh.account.model.vo.exploreDetail.LonLatRequest; import com.dsh.account.model.vo.exploreDetail.QuestionIns; import com.dsh.account.model.vo.exploreDetail.StoreDetailsVo; import com.dsh.account.model.vo.exploreDetail.StoreOfCourseVo; import com.dsh.account.model.vo.sourceDetail.CouponStuAvailableVo; import com.dsh.account.model.vo.sourceDetail.CourseDetailsOfContinuationResp; import com.dsh.account.model.vo.sourceDetail.RecordTimeRequest; @@ -745,8 +746,10 @@ Store store = storeClient.queryStoreById(storeId); StoreDetailsVo detailsVo = new StoreDetailsVo(); String realPicture = store.getRealPicture(); if (ToolUtil.isNotEmpty(realPicture)){ String[] split = realPicture.split(","); detailsVo.setImages(Arrays.asList(split)); } detailsVo.setStoreId(store.getId()); detailsVo.setStoreName(store.getName()); detailsVo.setStoreAddress(store.getAddress()); @@ -756,7 +759,9 @@ detailsVo.setLat(store.getLat()); detailsVo.setPhone(store.getPhone()); detailsVo.setVenueList(steClient.getAppUserSiteList()); detailsVo.setCourseVoList(culisClient.getStoreOfCourseList(storeId)); List<StoreOfCourseVo> storeOfCourseList = culisClient.getStoreOfCourseList(storeId); System.out.println(storeOfCourseList); detailsVo.setCourseVoList(storeOfCourseList); return detailsVo; } cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java
@@ -389,7 +389,7 @@ baseVo.setName(coursePackage.getName()); list.add(baseVo); }); return ResultUtil.success(); return ResultUtil.success(list); }catch (Exception e){ e.printStackTrace(); return ResultUtil.runErr(); @@ -414,9 +414,12 @@ return ResultUtil.tokenErr(); } List<Integer> courseIds = new ArrayList<>(); List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>() .eq("coursePackageId",search.getCourseTypeId()) .eq("appUserId",appUserId)); QueryWrapper<TCoursePackagePayment> queryWrapper = new QueryWrapper<TCoursePackagePayment>().eq("appUserId", appUserId) .groupBy("coursePackageId"); if (ToolUtil.isNotEmpty(search.getCourseTypeId())){ queryWrapper.eq("coursePackageId",search.getCourseTypeId()); } List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.list(queryWrapper); if (tCoursePackagePayments.size() > 0 ){ courseIds = tCoursePackagePayments.stream().map(TCoursePackagePayment::getCoursePackageId).collect(Collectors.toList()); } cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackagePaymentServiceImpl.java
@@ -2,6 +2,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dsh.course.entity.*; @@ -108,9 +109,13 @@ @Override public List<AppUserVideoResponse> queryAfterVideo(CourseOfAfterRequest search,List<Integer> courseIds) { List<AppUserVideoResponse> responses = new ArrayList<>(); List<PostCourseVideo> videoList = pcvMapper.selectList(new QueryWrapper<PostCourseVideo>() .eq("coursePackageId", courseIds)); List<PostCourseVideo> videoList = new ArrayList<>(); LambdaQueryWrapper<PostCourseVideo> queryWrapper = new LambdaQueryWrapper<PostCourseVideo>(); if (courseIds.size() > 0 ){ queryWrapper.in(PostCourseVideo::getCoursePackageId,courseIds); } videoList = pcvMapper.selectList(queryWrapper); // TODO: 2023/8/3 始终查出来是 空的 if (videoList.size() > 0){ List<Integer> videoIds = videoList.stream().map(PostCourseVideo::getCourseId).collect(Collectors.toList()); List<UserVideoDetails> userVideoDetails = uvdmapper.selectList(new QueryWrapper<UserVideoDetails>() cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html
@@ -105,13 +105,13 @@ <div class="form-group"> <div class="initialLevel col-sm-12 control-label form-group"> <label class="col-sm-3 control-label">*发放方式: </label> <input class="col-sm-1 control-label" name="distributionMethod" type="radio" <input class="col-sm-1 control-label" id="distributionMethod" type="radio" value="1" checked style="margin-top: 10px"/> <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分购买</label> <input class="col-sm-1 control-label" name="distributionMethod" type="radio" <input class="col-sm-1 control-label" id="distributionMethod" type="radio" value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> <label class="col-sm-1" style="width: 16%;margin-top: 7px">注册赠送</label> <input class="col-sm-1 control-label" name="distributionMethod" type="radio" <input class="col-sm-1 control-label" id="distributionMethod" type="radio" value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> <label class="col-sm-1" style="width: 16%;margin-top: 7px">自动发券</label> </div> @@ -125,13 +125,13 @@ <div class="form-group"> <div class="initialLevel col-sm-12 control-label form-group"> <label class="col-sm-3 control-label">*兑换方式: </label> <input class="col-sm-1 control-label" onclick="exchangeMethod1()" name="exchangeMethod" type="radio" <input class="col-sm-1 control-label" onclick="exchangeMethod1()" id="exchangeMethod" type="radio" value="1" checked style="margin-top: 10px"/> <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分</label> <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod2()" type="radio" <input class="col-sm-1 control-label" id="exchangeMethod" onclick="exchangeMethod2()" type="radio" value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> <label class="col-sm-1" style="width: 20%;margin-top: 7px">现金+积分</label> <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod3()" type="radio" <input class="col-sm-1 control-label" id="exchangeMethod" onclick="exchangeMethod3()" type="radio" value="3" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> <label class="col-sm-1" style="width: 9%;margin-top: 7px">现金</label> </div> @@ -268,17 +268,17 @@ <div class="initialLevel col-sm-12 control-label form-group"> <label class="col-sm-3">*适用范围: </label> <div class="col-sm-3" id="belongsNationwide" hidden="hidden"> <input class="col-sm-1" onclick="scopeOfApplication1()" name="company" type="radio" <input class="col-sm-1" onclick="scopeOfApplication1()" id="company" type="radio" value="0" checked style="margin-top: 10px"/> <label class="col-sm-2" style="width: 68%;margin-top: 7px">全国通用</label> </div> <div class="col-sm-3" id="belongsCity" hidden="hidden"> <input class="col-sm-1" name="company" onclick="scopeOfApplication2()" type="radio" <input class="col-sm-1" id="company" onclick="scopeOfApplication2()" type="radio" value="1" style="margin-top: 10px"/> <label class="col-sm-2" style="width: 64%;margin-top: 7px">指定城市</label> </div> <div class="col-sm-3" id="belongsStore" hidden="hidden"> <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" <input class="col-sm-1" id="company" onclick="scopeOfApplication3()" type="radio" value="1" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> <label class="col-sm-2" style="width: 64%;margin-top: 6px;">指定门店</label> </div> cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCouponInfo.js
@@ -242,16 +242,60 @@ */ couponInfoDlg.addSubmit = function () { var userType = $('#userType').val(); // 优惠券名称 var couponName = $('#name').val; // 优惠券类型 var prescription = $('#prescription').val(); // 说明 var illustrate = $('#illustrate').val(); // 发放方式 var distributionMethod = $('#distributionMethod').val(); var prescription = $('#prescription').val(); // 所需积分 var requiredPoints = $('#requiredPoints').val(); // 用户人群 var userGroup = $('#userGroup').val(); // 发放数量 var quantityIssued = $('#quantityIssued').val(); // 限领数量 var pickUpQuantity = $('#pickUpQuantity').val(); // 有效期 var periodOfValidity = $('#periodOfValidity').val(); if (userType === '1'){ // 平台管理员 var exchangeMethod = $('#exchangeMethod').val; if (exchangeMethod === 1){ } var couponName = $('#name').val; var couponName = $('#name').val; var couponName = $('#name').val; if (exchangeMethod === 2){ var requiredCash = $('#requiredCash').val; } if (exchangeMethod === 3){ } var goodImg = this.goodsCover; var goodImgs = this.goodsPicArray; var company = $('#company').val; if (company === 1){ } if (company === 2){ } if (company === 3){ } } if (userType === '2'){ // 城市管理员 } var couponName = $('#name').val; var couponName = $('#name').val; var couponName = $('#name').val; cloud-server-other/src/main/java/com/dsh/other/controller/HonorController.java
@@ -25,12 +25,12 @@ @PostMapping("/base/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)); List<HonorRules> honorRules = hrService.querylistOfIds(honorIds); if (honorRules.size() > 0){ honorRules.forEach(hrs -> { StuMedalVo stuMedalVo = new StuMedalVo(); stuMedalVo.setLevelNum(Integer.getInteger(hrs.getLevel())); stuMedalVo.setMedalType(hrs.getType()); switch (hrs.getType()){ case 1: stuMedalVo.setMedalName("俱乐部之星"); @@ -48,6 +48,7 @@ break; } if (!Objects.equals(hrs.getLevel(), "10")){ stuMedalVo.setLevelNum(Integer.parseInt(hrs.getLevel())); stuMedalVo.setNextLevel(Integer.parseInt(hrs.getLevel())+1); stuMedalVo.setUpgradeConditions(hrs.getCondition()); stuMedalVo.setIsTopLevel(2); cloud-server-other/src/main/java/com/dsh/other/controller/StoredValueConfigController.java
@@ -47,9 +47,9 @@ for (JsonNode ruleNode : rulesNode) { i = i + 1; Map<String,Object> de = new HashMap<>(); String money = ruleNode.get("money").asText(); String usersCoins = ruleNode.get("usersCoins").asText(); String MemberCoins = ruleNode.get("MemberCoins").asText(); double money = ruleNode.get("money").asDouble(); Integer usersCoins = ruleNode.get("usersCoins").asInt(); Integer MemberCoins = ruleNode.get("MemberCoins").asInt(); de.put("chargeId",i); de.put("money",money); de.put("usersCoins",usersCoins); cloud-server-other/src/main/java/com/dsh/other/mapper/HonorRulesMapper.java
@@ -2,6 +2,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dsh.other.entity.HonorRules; import org.apache.ibatis.annotations.Param; import java.util.List; /** * <p> @@ -13,4 +16,6 @@ */ public interface HonorRulesMapper extends BaseMapper<HonorRules> { List<HonorRules> querylistOfIds(@Param("honorIds") List<Integer> honorIds); } cloud-server-other/src/main/java/com/dsh/other/service/HonorRulesService.java
@@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.dsh.other.entity.HonorRules; import java.util.List; /** * <p> * 荣誉规则 服务类 @@ -13,4 +15,6 @@ */ public interface HonorRulesService extends IService<HonorRules> { List<HonorRules> querylistOfIds(List<Integer> honorIds); } cloud-server-other/src/main/java/com/dsh/other/service/impl/HonorRulesServiceImpl.java
@@ -6,6 +6,8 @@ import com.dsh.other.service.HonorRulesService; import org.springframework.stereotype.Service; import java.util.List; /** * <p> * 荣誉规则 服务实现类 @@ -17,4 +19,8 @@ @Service public class HonorRulesServiceImpl extends ServiceImpl<HonorRulesMapper, HonorRules> implements HonorRulesService { @Override public List<HonorRules> querylistOfIds(List<Integer> honorIds) { return this.baseMapper.querylistOfIds(honorIds); } } cloud-server-other/src/main/resources/mapper/HonorRulesMapper.xml
@@ -3,4 +3,20 @@ <mapper namespace="com.dsh.other.mapper.HonorRulesMapper"> <select id="querylistOfIds" resultType="com.dsh.other.entity.HonorRules"> SELECT id, type, `level`, `condition` FROM t_honor_rules where 1=1 <if test="honorIds.size > 0"> and `id` in <foreach collection="honorIds" index="index" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> </select> </mapper>