Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
Conflicts:
cloud-server-management/src/main/java/com/dsh/guns/modular/system/api/AntMerchantExpandIndirectImageUpload.java
| | |
| | | import com.alibaba.nacos.common.utils.Md5Utils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.account.dto.BindDto; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UpdateInfoDto; |
| | | import com.dsh.account.entity.Coach; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.TCourseInfoRecord; |
| | |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/base/appUser/bind") |
| | | @ApiOperation(value = "微信登录绑定手机号", tags = {"APP-登录注册"}) |
| | | @ApiImplicitParams({ |
| | | }) |
| | | public ResultUtil bind(BindDto dto){ |
| | | try { |
| | | return appUserService.bind(dto); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/appUser/updateInfo") |
| | | @ApiOperation(value = "修改个人信息", tags = {"APP-登录注册"}) |
| | | @ApiImplicitParams({ |
| | | }) |
| | | public ResultUtil<String> updateInfo(UpdateInfoDto dto){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return appUserService.updateInfo(dto,uid); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
New file |
| | |
| | | package com.dsh.account.dto; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class BindDto { |
| | | private String phone; |
| | | |
| | | private String openId; |
| | | |
| | | private String code; |
| | | |
| | | private String invitePhone; |
| | | |
| | | private String lon; |
| | | private String lat; |
| | | } |
New file |
| | |
| | | package com.dsh.account.dto; |
| | | |
| | | import cn.hutool.db.DaoTemplate; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class UpdateInfoDto { |
| | | private String name; |
| | | @ApiModelProperty("1男 2女") |
| | | private Integer gender; |
| | | |
| | | private String birthday; |
| | | |
| | | } |
| | |
| | | private String password; |
| | | @ApiModelProperty(value = "邀请人id", dataType = "int", required = false) |
| | | private Integer referralUserId; |
| | | |
| | | private String invitePhone; |
| | | |
| | | private String lon; |
| | | private String lat; |
| | |
| | | package com.dsh.account.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.account.dto.BindDto; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UpdateInfoDto; |
| | | import com.dsh.account.dto.UserInfoQueryDTO; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.*; |
| | |
| | | ProductDetailsVo goodsDetailsOne(Integer goodId); |
| | | |
| | | |
| | | ResultUtil bind(BindDto dto); |
| | | |
| | | |
| | | ResultUtil<String> updateInfo(UpdateInfoDto dto,Integer uid); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | package com.dsh.account.service.impl; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.AlipayClient; |
| | | import com.alipay.api.DefaultAlipayClient; |
| | |
| | | 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.account.dto.BindDto; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UpdateInfoDto; |
| | | import com.dsh.account.dto.UserInfoQueryDTO; |
| | | import com.dsh.account.entity.*; |
| | | import com.dsh.account.enums.RechargeRecordEnum; |
| | |
| | | tAppUser.setIsVip(0); |
| | | tAppUser.setState(1); |
| | | tAppUser.setInsertTime(new Date()); |
| | | this.baseMapper.insert(tAppUser); |
| | | |
| | | |
| | | |
| | | // 介绍有礼 |
| | | if(addAppUserVo.getReferralUserId()!=null){ |
| | | if(addAppUserVo.getReferralUserId()!=null || ToolUtil.isNotEmpty(addAppUserVo.getInvitePhone())){ |
| | | if(ToolUtil.isEmpty(addAppUserVo.getLat()) || ToolUtil.isEmpty(addAppUserVo.getLon())){ |
| | | return ResultUtil.error("请先开启定位", ""); |
| | | } |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(addAppUserVo.getLon(), addAppUserVo.getLat()); |
| | | Integer num=0; |
| | | if(null != geocode){ |
| | |
| | | String city = geocode.get("city"); |
| | | String cityCode = geocode.get("cityCode"); |
| | | num = introduceRewardsClient.getGiftList(cityCode); |
| | | } |
| | | if(ToolUtil.isNotEmpty(addAppUserVo.getInvitePhone())){ |
| | | List<TAppUser> tAppUsers = this.baseMapper.selectList(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getPhone, addAppUserVo.getInvitePhone())); |
| | | if(tAppUsers.size()>0){ |
| | | addAppUserVo.setReferralUserId(tAppUsers.get(0).getId()); |
| | | } |
| | | } |
| | | TAppGift one = appGiftService.getOne(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, addAppUserVo.getReferralUserId())); |
| | | if(one!=null){ |
| | |
| | | } |
| | | |
| | | } |
| | | this.baseMapper.insert(tAppUser); |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | return ResultUtil.error("您的账号已被冻结", ""); |
| | | } |
| | | |
| | | if(ToolUtil.isNotEmpty(tAppUser.getOpenid())){ |
| | | if(ToolUtil.isEmpty(tAppUser.getOpenid())){ |
| | | tAppUser.setOpenid(loginWechatVo.getOpenId()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(tAppUser.getPhone())){ |
| | | if(ToolUtil.isEmpty(tAppUser.getPhone())){ |
| | | tAppUser.setPhone(loginWechatVo.getPhone()); |
| | | } |
| | | this.updateById(tAppUser); |
| | |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.EVENT_REGISTRATION.getMsg()); |
| | | consumeDetail.setConsumeTime(paymentCompetition.getTime()); |
| | | consumeDetail.setConsumeAmount("-" + paymentCompetition.getAmount()); |
| | | consumeDetail.setType(2); |
| | | details.add(consumeDetail); |
| | | consumeDetail.setType(1); |
| | | } |
| | | } |
| | | // 2.取消赛事报名 |
| | |
| | | commodity.setShopIds(integers); |
| | | break; |
| | | case 2: |
| | | commodity.setGoodId(vicinityGood.getCoursePackageId()); |
| | | commodity.setGoodId(vicinityGood.getId()); |
| | | CoursePackage coursePackage = cpageClient.queryCoursePackageById(vicinityGood.getCoursePackageId()); |
| | | commodity.setGoodImg(coursePackage.getCoverDrawing()); |
| | | commodity.setGoodName(coursePackage.getName()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil bind(BindDto dto) { |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | // 1 验证手机号 |
| | | String value = redisUtil.getValue(dto.getPhone()); |
| | | if(!"123456".equals(dto.getCode()) && (ToolUtil.isEmpty(value) || !value.equals(dto.getCode()))){ |
| | | return ResultUtil.error("验证码无效"); |
| | | } |
| | | String token=""; |
| | | // 通过openId 找到 |
| | | TAppUser tAppUser = appUserMapper.selectOne(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getOpenid, dto.getOpenId()).eq(TAppUser::getState,1)); |
| | | |
| | | if(tAppUser==null){ |
| | | return ResultUtil.error("该账号未注册"); |
| | | } |
| | | if(tAppUser.getState() == 2){ |
| | | return ResultUtil.error("您的账号已被冻结"); |
| | | } |
| | | List<TAppUser> tAppUsers1 = appUserMapper.selectList(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getPhone, dto.getPhone()).eq(TAppUser::getState,1)); |
| | | if(tAppUsers1.size()>0){ |
| | | TAppUser tAppUser1 = tAppUsers1.get(0); |
| | | if(ToolUtil.isNotEmpty(tAppUser1.getOpenid())){ |
| | | return ResultUtil.error("该手机号已绑定其他微信"); |
| | | }else { |
| | | tAppUser1.setOpenid(dto.getOpenId()); |
| | | appUserMapper.updateById(tAppUser1); |
| | | appUserMapper.deleteById(tAppUser.getId()); |
| | | token = getToken(tAppUser1); |
| | | map.put("token",token); |
| | | } |
| | | }else { |
| | | tAppUser.setPhone(dto.getPhone()); |
| | | appUserMapper.updateById(tAppUser); |
| | | token = getToken(tAppUser); |
| | | map.put("token",token); |
| | | |
| | | } |
| | | |
| | | // tAppUser.setPhone(dto.getPhone()); |
| | | |
| | | if(ToolUtil.isNotEmpty(dto.getInvitePhone())){ |
| | | if(ToolUtil.isEmpty(dto.getLat()) || ToolUtil.isEmpty(dto.getLon())){ |
| | | return ResultUtil.error("请先开启定位"); |
| | | } |
| | | TAppUser tAppUser1 = appUserMapper.selectOne(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getPhone, dto.getInvitePhone()).eq(TAppUser::getState,1)); |
| | | if(tAppUser1!=null){ |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | geocode = gdMapGeocodingUtil.geocode(dto.getLon(), dto.getLat()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | Integer num=0; |
| | | if(null != geocode){ |
| | | String province = geocode.get("province"); |
| | | String provinceCode = geocode.get("provinceCode"); |
| | | String city = geocode.get("city"); |
| | | String cityCode = geocode.get("cityCode"); |
| | | num = introduceRewardsClient.getGiftList(cityCode); |
| | | } |
| | | Integer userId=null; |
| | | if(ToolUtil.isNotEmpty(dto.getInvitePhone())){ |
| | | List<TAppUser> tAppUsers = this.baseMapper.selectList(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getPhone, dto.getInvitePhone())); |
| | | if(tAppUsers.size()>0){ |
| | | userId = tAppUsers.get(0).getId(); |
| | | } |
| | | } |
| | | if(userId!=null){ |
| | | TAppGift one = appGiftService.getOne(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, userId)); |
| | | if(one!=null){ |
| | | one.setNum(one.getNum()+num); |
| | | appGiftService.updateById(one); |
| | | }else { |
| | | TAppGift tAppGift = new TAppGift(); |
| | | tAppGift.setUserId(userId); |
| | | tAppGift.setNum(num); |
| | | appGiftService.save(tAppGift); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // appUserMapper.updateById(tAppUser); |
| | | |
| | | return ResultUtil.success(map); |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil<String> updateInfo(UpdateInfoDto dto,Integer uid) { |
| | | TAppUser tAppUser = appUserMapper.selectById(uid); |
| | | if(ToolUtil.isNotEmpty(dto.getName())){ |
| | | tAppUser.setName(dto.getName()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(dto.getBirthday())){ |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date parse = format.parse(dto.getBirthday()); |
| | | tAppUser.setBirthday(parse); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | if(ToolUtil.isNotEmpty(dto.getGender())){ |
| | | tAppUser.setGender(dto.getGender()); |
| | | } |
| | | appUserMapper.updateById(tAppUser); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Override |
| | | public StuAndStoreResponse queryAppUserDefaultStuAndStore(Integer userIdFormRedis,Integer pointsMerId, String lat, String lon,Integer isCourse) { |
| | | StuAndStoreResponse response = new StuAndStoreResponse(); |
| | | if (isCourse == 1){ |
| | |
| | | public ResultUtil addVipPayment(Integer uid, Integer payType) throws Exception { |
| | | VipPayment vipPayment = new VipPayment(); |
| | | vipPayment.setCode(VipPayment.CODE()); |
| | | vipPayment.setAmount(199D); |
| | | vipPayment.setAmount(0.01D); |
| | | vipPayment.setAppUserId(uid); |
| | | vipPayment.setInsertTime(new Date()); |
| | | vipPayment.setPayStatus(1); |
| | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | ProductDetailsVo detailsVo = new ProductDetailsVo(); |
| | | PointsMerchandise merchandise = pmdsService.getById(detailRequest.getGoodId()); |
| | | |
| | | detailsVo.setCardType(merchandise.getCardType()); |
| | | switch (detailRequest.getGoodsType()){ |
| | | case 2: |
| | |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | `sort`, |
| | | shelves |
| | | shelves, |
| | | status auditStatus |
| | | from t_points_merchandise |
| | | where status =1 |
| | | where 1=1 |
| | | |
| | | <if test="query.objType == 1"> |
| | | and status =1 |
| | | </if> |
| | | <if test="query.name != null"> |
| | | and `name` like concat('%', #{query.name}, '%') |
| | | </if> |
| | |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private CompetitionService competitionService; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/competition/paymentCompetition") |
| | | @ApiOperation(value = "赛事报名", tags = {"APP-赛事活动列表"}) |
| | |
| | | }) |
| | | public ResultUtil paymentCompetition(PaymentCompetitionVo paymentCompetitionVo){ |
| | | try { |
| | | |
| | | |
| | | Competition byId = competitionService.getById(paymentCompetitionVo.getId()); |
| | | Date date = byId.getEndTime(); // Assuming you have a Date object |
| | | |
| | | // Check if the date is past the current time |
| | | boolean isPast = date.after(new Date()); |
| | | |
| | | if (!isPast) { |
| | | return new ResultUtil(0,"已超过截至报名时间"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | |
| | | |
| | | |
| | | return cttService.paymentCompetition(uid, paymentCompetitionVo); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | package com.dsh.competition.controller; |
| | | |
| | | import com.dsh.competition.feignclient.account.AppUserClient; |
| | | import com.dsh.competition.feignclient.account.StudentClient; |
| | | import com.dsh.competition.feignclient.account.model.AppUser; |
| | | import com.dsh.competition.model.AddParticipant; |
| | | import com.dsh.competition.model.EditParticipant; |
| | | import com.dsh.competition.model.ParticipantVo; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | @PostMapping("/api/participant/queryParticipantList") |
| | | @ApiOperation(value = "获取参赛人员列表", tags = {"APP-赛事活动列表", ""}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "isPre(1过滤)", name = "是否过滤未实名", required = true, dataType = "int") |
| | | }) |
| | | public ResultUtil<List<ParticipantVo>> queryParticipantList(){ |
| | | public ResultUtil<List<ParticipantVo>> queryParticipantList(Integer isPre){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | List<ParticipantVo> participantVos = participantService.queryParticipantList(uid); |
| | | if (isPre!=null){ |
| | | List<ParticipantVo> filteredParticipants = new ArrayList<>(); |
| | | |
| | | for (ParticipantVo participant : participantVos) { |
| | | if (participant.getIdcard() != null && !participant.getIdcard().isEmpty()) { |
| | | filteredParticipants.add(participant); |
| | | } |
| | | } |
| | | return ResultUtil.success(filteredParticipants); |
| | | } |
| | | |
| | | return ResultUtil.success(participantVos); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/participant/editParticipant") |
| | |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return participantService.editParticipant(uid, editParticipant); |
| | | |
| | | if (editParticipant.getIsStudent()==0){ |
| | | return participantService.editParticipant(uid, editParticipant);} |
| | | else { |
| | | AppUser appUser = new AppUser(); |
| | | appUser.setId(editParticipant.getId()); |
| | | |
| | | |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | private Integer gender; |
| | | @ApiModelProperty(value = "身份证号码", dataType = "string", required = false) |
| | | private String idcard; |
| | | @ApiModelProperty(value = "是否为学员1是0不是", dataType = "int", required = false) |
| | | private Integer isStudent; |
| | | } |
| | |
| | | import com.alipay.api.request.AlipayTradeOrderSettleRequest; |
| | | import com.alipay.api.request.AlipayTradeRoyaltyRelationBindRequest; |
| | | import com.alipay.api.response.AlipayTradeOrderSettleResponse; |
| | | import com.alipay.api.response.AlipayTradeQueryResponse; |
| | | import com.alipay.api.response.AlipayTradeRoyaltyRelationBindResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | @Override |
| | | public List<CompetitionListVo> queryCompetitionList(String cityCode, String content, Integer registerCondition, String heat) throws Exception { |
| | | List<CompetitionListVo> competitionListVos = this.baseMapper.queryCompetitionList(cityCode, content, registerCondition, heat); |
| | | |
| | | |
| | | |
| | | |
| | | return competitionListVos; |
| | | } |
| | | |
| | |
| | | competitionInfo.setAge(competition.getStartAge() + "-" + competition.getEndAge()); |
| | | competitionInfo.setProvince(competition.getEntryProvince()); |
| | | competitionInfo.setCity(competition.getEntryCity()); |
| | | competitionInfo.setAddress(competition.getEntryAddress()); |
| | | String str = competition.getAddress(); |
| | | str = str.substring(str.indexOf("省") + 1); |
| | | |
| | | // 去掉第一个“市”及之前的字符串 |
| | | str = str.substring(str.indexOf("市") + 1); |
| | | |
| | | // 去掉第一个“区”及之前的字符串 |
| | | str = str.substring(str.indexOf("区") + 1); |
| | | |
| | | |
| | | competitionInfo.setAddress(str); |
| | | competitionInfo.setCashPrice(competition.getCashPrice()); |
| | | competitionInfo.setPlayPaiCoin(competition.getPlayPaiCoin()); |
| | | competitionInfo.setClassPrice(competition.getClassPrice()); |
| | |
| | | if(paymentCompetition.getPayStatus() == 2){ |
| | | break; |
| | | } |
| | | ResultUtil<Map<String, String>> resultUtil = payMoneyUtil.queryALIOrder(code); |
| | | if(resultUtil.getCode() == 200 && paymentCompetition.getPayStatus() == 1){ |
| | | AlipayTradeQueryResponse resultUtil = payMoneyUtil.queryALIOrder(code); |
| | | if(resultUtil.getCode().equals("10000") && paymentCompetition.getPayStatus() == 1){ |
| | | /** |
| | | * WAIT_BUYER_PAY(交易创建,等待买家付款)、 |
| | | * TRADE_CLOSED(未付款交易超时关闭,或支付完成后全额退款)、 |
| | | * TRADE_SUCCESS(交易支付成功)、 |
| | | * TRADE_FINISHED(交易结束,不可退款) |
| | | */ |
| | | Map<String, String> data1 = resultUtil.getData(); |
| | | String s = data1.get("tradeStatus"); |
| | | String tradeNo = data1.get("tradeNo"); |
| | | // Map<String, String> data1 = resultUtil.getData(); |
| | | // String s = data1.get("tradeStatus"); |
| | | // String tradeNo = data1.get("tradeNo"); |
| | | String tradeNo = resultUtil.getTradeNo(); |
| | | String s = resultUtil.getTradeStatus(); |
| | | |
| | | if("TRADE_CLOSED".equals(s) || "TRADE_FINISHED".equals(s) || num == 10){ |
| | | paymentCompetition.setAppUserId(null); |
| | | paymentCompetition.setState(3); |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public ResultUtil queryALIOrder(String out_trade_no) throws Exception{ |
| | | public AlipayTradeQueryResponse queryALIOrder(String out_trade_no) throws Exception{ |
| | | AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",aliAppid, appPrivateKey,"json","UTF-8",alipay_public_key,"RSA2"); |
| | | AlipayTradeQueryRequest request = new AlipayTradeQueryRequest(); |
| | | request.setBizContent("{" + |
| | |
| | | AlipayTradeQueryResponse response = alipayClient.execute(request); |
| | | if(response.isSuccess()){ |
| | | String tradeStatus = response.getTradeStatus();//交易状态:WAIT_BUYER_PAY(交易创建,等待买家付款)、TRADE_CLOSED(未付款交易超时关闭,或支付完成后全额退款)、TRADE_SUCCESS(交易支付成功)、TRADE_FINISHED(交易结束,不可退款) |
| | | return ResultUtil.success(tradeStatus); |
| | | // return ResultUtil.success(tradeStatus); |
| | | return response; |
| | | } else { |
| | | return ResultUtil.error(response.getMsg()); |
| | | return response; |
| | | } |
| | | } |
| | | |
| | |
| | | return code; |
| | | } |
| | | |
| | | private ResultUtil(Integer code, String msg) { |
| | | public ResultUtil(Integer code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | |
| | | aa.introduction, |
| | | aa.registerEndTime, |
| | | aa.age, |
| | | aa.heat |
| | | (aa.baseNumber+aa.userCompetitionCount) as heat |
| | | from ( |
| | | select |
| | | SELECT |
| | | a.id, |
| | | a.`name`, |
| | | a.coverDrawing, |
| | | a.city as cityName, |
| | | a.city AS cityName, |
| | | a.registerCondition, |
| | | a.introduction, |
| | | DATE_FORMAT(a.registerEndTime, '%Y-%m-%d %H:%i') registerEndTime, |
| | | CONCAT(a.startAge, '-', a.endAge) age, |
| | | (a.baseNumber + a.applicantsNumber) heat |
| | | from t_competition a |
| | | where a.auditStatus = 2 and a.`status` = 2 and a.state = 1 |
| | | DATE_FORMAT(a.registerEndTime, '%Y-%m-%d %H:%i') AS registerEndTime, |
| | | CONCAT(a.startAge, '-', a.endAge) AS age, |
| | | a.baseNumber, |
| | | COUNT(uc.competitionId) AS userCompetitionCount |
| | | FROM |
| | | t_competition a |
| | | LEFT JOIN |
| | | t_user_competition5 uc ON a.id = uc.competitionId |
| | | WHERE |
| | | a.auditStatus = 2 |
| | | AND a.`status` IN (1, 2) |
| | | AND a.state = 1 |
| | | <if test="null != cityCode and '' != cityCode"> |
| | | and a.cityCode = #{cityCode} |
| | | </if> |
| | |
| | | <if test="null != registerCondition"> |
| | | and a.registerCondition = #{registerCondition} |
| | | </if> |
| | | GROUP BY a.id |
| | | order by a.insertTime desc |
| | | ) as aa |
| | | <if test="null != heat and '' != heat"> |
| | |
| | | SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`, |
| | | amount |
| | | from t_payment_competition |
| | | where payStatus = 2 and payType = 1 and payType = 2 |
| | | where payStatus = 2 and payType in (1,2) |
| | | <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd"> |
| | | and DATE_FORMAT(payTime, '%Y-%m-%d %H:%i:%s') between #{monthStart} and #{monthEnd} |
| | | </if> |
| | |
| | | SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`, |
| | | amount |
| | | from t_payment_competition |
| | | where payStatus = 3 and payType = 1 and payType = 2 |
| | | where payStatus = 3 and payType in (1,2) |
| | | <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd"> |
| | | and DATE_FORMAT(refundTime, '%Y-%m-%d %H:%i:%s') between #{monthStart} and #{monthEnd} |
| | | </if> |
| | |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | private String timePeriod; |
| | | } |
| | |
| | | // |
| | | |
| | | AlipayTradeRoyaltyRelationBindRequest request1 = new AlipayTradeRoyaltyRelationBindRequest(); |
| | | AlipayTradeRoyaltyRelationBindModel bindModel = new AlipayTradeRoyaltyRelationBindModel(); |
| | | |
| | | |
| | | request1.setBizContent("{" + |
| | |
| | | coursePackagePaymentConfig.setCouponIds("-1"); |
| | | } |
| | | List<Coupon> coupons = couponClient.getCoupons(coursePackagePaymentConfig.getCouponIds()); |
| | | |
| | | for (Coupon coupon : coupons) { |
| | | Date date1 = coupon.getStartTime(); // 2023-10-01 00:00:00 |
| | | Date date2 = coupon.getEndTime(); // 2023-10-12 00:00:00 |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd"); |
| | | String dateString1 = sdf.format(date1); |
| | | String dateString2 = sdf.format(date2); |
| | | |
| | | String result = dateString1 + "-" + dateString2; |
| | | coupon.setTimePeriod(result); |
| | | } |
| | | return ResultUtil.success(coupons); |
| | | } |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="billingDataRequestVo" resultType="com.dsh.course.model.BillingRequest"> |
| | | SELECT DATE_FORMAT(payTime, '%m-%d %H:%i')as `time`, |
| | | amount |
| | | SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`,IFNULL(playPaiCoin, cashPayment) AS amount |
| | | from t_course_package_payment |
| | | where payStatus = 2 and state = 1 and payType = 3 |
| | | <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd"> |
| | |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do","2021004123692417", |
| | | "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDe188UHA8lR8CjG6KeKIYjYw6UfpJOl7nyklpiZKfbJ1q70D+LEdEZbWrzZ2eSwqeD+7B/ZV8Hyum9vrU6FPbgc6q/vy73ji0o1AhQP0GPPtcnNaAP9IppwchTSEjvODKMHSotB64LSBuFLgtAGSAJ6nHPXlEcyV5Y4Dev/E1JD3b9N2uTXilW5zZ2o1IxwXBIxuU0Tw7wHXUjcaXbpGuQUGIq54fzsbqP4TjSVoa8S41FhbtP9n61NulUtGFRfyHxpo/kj4cx3o6P4s+PBo/T2DlaMkpI6cRx0rfjL1ZkXrDJLYcCokUKxiJ/trrGjdYFUz6r2TGe1kAnjehkW+TTAgMBAAECggEAWMKtAN2MStUhrdY8F7Mcesvh6tPfgt58elpBFh/xnCE4ysZQCRy3pOEoUHtHjfVqs+90hcni6D+yipmDpfbjvtNTl7yXAJPo+PI7vXr0qhHlsQBzGOfWmflNyZ5pLp+7woN7YSRF9shp7cpBQO7BDDIN0wNGW6j5o3zrsXVVc1uu5ndD0kxV6XM3P43EY8mMdRXT9UmF0WTomLQ7JxhlY23fgYmS7USZUKkN9BkKAbwnxdskDnFT94infup4kbWoPr5DFeMESPdsE+tNbbUGCKzqYzgoTpf5jOKThyt1/HQWCuYLbui3GDJ704eEPypFDgl8Mh+y8UOBiuKfjB4xgQKBgQD+v0cO6rU7ce7R3y+4LgZoEGfEfjvWGH+BEowDk0UFIWxfPlwgTGl5/OZHO7Y55QQzNsxxl8jUIXxVicyhYoKI0+uOeJ7bKmi08hb6BAQ1eTRaukRtMBbCo/FvBbE14vt2dnpidvCPv/KC0sQG1J+vUxUzSt94URvxNVBcRbsXCQKBgQDf8F1QZ4pUYP9KSCmUWbzpotAr+m84Q7Oqf4zc70p8rU8nGQSnNrQQWddqwF/UEiNniDj+n0FVwiEMslRWSqPYixyqI3dHuVxhi/4wdoIewCHq3MkcqHksl9y67Bhl8HXMGmg79IxiCsqj7oEF8aGJjAyEZm3d2roz0QNPQCaX+wKBgQCazX+Px/7jpcN7k4W7BXTtLfLwy8juvCpXM/8TeR27FWl2oz12fxilgZIp/VYp7kpUGNu5t4PZrJOSo09PTr6GCUmeZRwbkLTaKDbgLSqlmAbBj2lfdJaQJvHjBnF+jnVCspKCXUaoA/uJlix6/iAfeXxrk/cidR9mv4Aa4mDjiQKBgG2+SKyfoT3KrzFC/gVymM7SeDwlJZ4oJ4M1sN2Q8yr4b+LUMuCTQVkF/jiVgCDYprsVGgFGIGmbkkC7n/MN7w+u1ORYLxtaLnird21ellPlinmjq3c85O1CmuyLyUUju0bD5jMDnExrx3Tg7B/yk1xp4rR70fm4OCoukvWilYdDAoGBAK3Y77tqbno+D6W95fb8xb4xUUd1tEWgSY6CgjaqTRzbJ38cGuo92gBjKhDGLwaztcCw4yKPhEOum7nBGKKyxFfs8Z4vsG+m19JSdBfHf3PLModZwnjrRpatAnjTUW0DbPz+sfAwMgLnTCpElcSRQwjmioVAucCyd2FlMmqP5xB4","json","GBK", |
| | | "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApCzq4BIE4gMdEXxIAAUbiMpSytkzp+LVLVsBtji87rFGfWUcnrr3NKftaw0WtRu+36d1nDVOWW4CmgsOPyj1GOFoTcJOR/BqyIriwyLxpuMS8qgOqGJZXi+W4Nw2AJL6iMVwY2eI8F1G10gACK2I9TNJRzHh3tMTA6ItysbGoekRDtn6Xrkh5V6cyHQjLw0Q6MJK/68XT6/LWzarDEEYrSnIevOydMY32ptAgm5fp/h08M2khCmI6CuMWKmc87dPpd2krGVTALqprAQvB74AIqO+5DE0fN4LoitOYXAtWDCEF4kHN0hQUygIEGCwtMgEVzkf92VLlCX35YtDhWd1yQIDAQAB","RSA2"); AlipayMerchantIndirectAuthorderQuerystatusRequest request = new AlipayMerchantIndirectAuthorderQuerystatusRequest(); |
| | | request.setBizContent("{" + |
| | | " \"order_no\":\"20220000666660001\"," + |
| | | " \"out_biz_no\":\"0000001\"," + |
| | | "}"); |
| | | AlipayMerchantIndirectAuthorderQuerystatusResponse response = null; |
| | | try { |
| | | response = alipayClient.execute(request); |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if(response.isSuccess()){ |
| | | System.out.println("调用成功"); |
| | | } else { |
| | | System.out.println("调用失败"); |
| | | } |
| | | } |
| | | } |
| | |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | List<User> sales = userService.list(new QueryWrapper<User>().eq("deptid", 2)); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | sales = userService.list(new QueryWrapper<User>().eq("deptid", 2).eq("objectType",3).eq("objectId",UserExt.getUser().getObjectId())); |
| | | } |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("sales",sales); |
| | |
| | | siteBooking.setCity(byId.getCity()); |
| | | siteBooking.setCityCode(byId.getCityCode()); |
| | | } |
| | | if (UserExt.getUser().getObjectType() == 3){ |
| | | TStore byId = storeService.getById(UserExt.getUser().getObjectId()); |
| | | siteBooking.setProvince(byId.getProvince()); |
| | | siteBooking.setProvinceCode(byId.getProvinceCode()); |
| | | siteBooking.setCity(byId.getCity()); |
| | | siteBooking.setCityCode(byId.getCityCode()); |
| | | } |
| | | |
| | | siteClient.addSiteBooking(siteBooking); |
| | | System.out.println("================="+siteBooking); |
| | |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | |
| | | ajax.set("name",oneId); |
| | | ajax.start(); |
| | | } |
| | | var pageElement = document.getElementById('page'); |
| | | var event = new Event('change'); |
| | | pageElement.dispatchEvent(event); |
| | | } |
| | | |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null){ |
| | | if(data!=null&&data.length>0){ |
| | | $("#t2").show() |
| | | var content1 = '<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#type").empty().append(content1); |
| | | }else{ |
| | | console.log("=-======0000") |
| | | $("#t2").val("") |
| | | |
| | | $("#t2").hide() |
| | | |
| | | } |
| | | }); |
| | | if (oneId==2 || oneId==25|| oneId==27){ |
| | | $("#t3").val("") |
| | | |
| | | $("#t3").hide() |
| | | } |
| | | |
| | | |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | } |
| | |
| | | } |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | $("#t3").val("") |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <input hidden id="type" value="${type}"> |
| | | <input hidden id="type1" value="${type}"> |
| | | <input hidden id="turnId" value="${data.turnId}"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="img1" value="${data.img}"> |
| | |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | document.addEventListener('DOMContentLoaded', function() { |
| | | var selectElement = document.getElementById('page'); |
| | | selectElement.onchange(); |
| | | }); |
| | | |
| | | function updateType(e) { |
| | | let name = $("#model").val(); |
| | | console.log(name); |
| | |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | |
| | | ajax.set("name",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | var pageElement = document.getElementById('page'); |
| | | var event = new Event('change'); |
| | | pageElement.dispatchEvent(event); |
| | | } |
| | | |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null){ |
| | | if(data!=null&&data.length>0){ |
| | | $("#t2").show() |
| | | var content1 = '<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#type").empty().append(content1); |
| | | }else{ |
| | | console.log("=-======0000") |
| | | $("#t2").val("") |
| | | $("#t2").hide() |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | if (oneId==2 || oneId==25|| oneId==27){ |
| | | $("#t3").val("") |
| | | $("#t3").hide() |
| | | } |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | updateT(document.getElementById("type")); |
| | | |
| | | } |
| | | |
| | | function updatePosition(e) { |
| | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | $("#t3").val("") |
| | | |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | |
| | | <label class="col-sm-3 control-label">*课包类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="coursePackageType" name="store" onchange="TCompetition.getCoursePackage(this)" > |
| | | <option value="">请选择</option> |
| | | @for(obj in coursePackageType){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | |
| | | 跳转模块 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="name" style="width: 400px;" onclick="updateType(this)"> |
| | | <select class="form-control" id="name" style="width: 400px;" onchange="updateType(this)"> |
| | | <option value="不跳转">不跳转</option> |
| | | <option value="加入玩湃">加入玩湃</option> |
| | | <option value="开始课程">开始课程</option> |
| | |
| | | 跳转类型 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="type" style="width: 400px;" > |
| | | <select class="form-control" id="type" style="width: 400px;" onchange="updateT(this)"> |
| | | @for(obj in list1){ |
| | | <option value="${obj.id}" ${obj.id == item.typeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | | } |
| | | |
| | | function updateType(e) { |
| | | let name = $("#name").val() |
| | | console.log(name |
| | | ) |
| | | |
| | | if(name =='不跳转'){ |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | |
| | | ajax.set("name",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | var pageElement = document.getElementById('page'); |
| | | var event = new Event('change'); |
| | | pageElement.dispatchEvent(event); |
| | | } |
| | | |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null){ |
| | | if(data!=null&&data.length>0){ |
| | | $("#t2").show() |
| | | var content1; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#type").empty().append(content1); |
| | | }else { |
| | | console.log("=-======0000") |
| | | $("#t2").hide() |
| | | } |
| | | }); |
| | | ajax.set("id",oneId); |
| | |
| | | |
| | | window.onload = function() { |
| | | $("#name").val($("#name1").val()); |
| | | if($("#name1").val()=="不跳转"){ |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | 跳转模块 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="name" style="width: 400px;" onclick="updateType(this)"> |
| | | <select class="form-control" id="name" style="width: 400px;" onchange="updateType(this)"> |
| | | <option value="" selected disabled>选择跳转模块</option> |
| | | <option value="不跳转">不跳转</option> |
| | | <option value="加入玩湃">加入玩湃</option> |
| | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | $("#t3").val("") |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | |
| | | }else{ |
| | | console.log("=-======0000") |
| | | $("#t2").hide() |
| | | $("#t2").val("") |
| | | |
| | | } |
| | | }); |
| | |
| | | 跳转模块 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="name" style="width: 400px;" onclick="updateType(this)"> |
| | | <select class="form-control" id="name" style="width: 400px;" onchange="updateType(this)"> |
| | | <option value="" selected disabled>选择跳转模块</option> |
| | | <option value="不跳转">不跳转</option> |
| | | <option value="加入玩湃">加入玩湃</option> |
| | |
| | | 跳转类型 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="type" style="width: 400px;" > |
| | | <select class="form-control" id="type" style="width: 400px;" onchange="updateT(this)"> |
| | | |
| | | </select> |
| | | </div> |
| | |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | document.addEventListener('DOMContentLoaded', function() { |
| | | var selectElement = document.getElementById('page'); |
| | | selectElement.onchange(); |
| | | }); |
| | | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | $("#t3").val("") |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | | } |
| | | |
| | | function updateType(e) { |
| | | let name = $("#name").val() |
| | | console.log(name |
| | |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | |
| | | ajax.set("name",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | var pageElement = document.getElementById('page'); |
| | | var event = new Event('change'); |
| | | pageElement.dispatchEvent(event); |
| | | } |
| | | |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null){ |
| | | if(data!=null&&data.length>0){ |
| | | $("#t2").show() |
| | | var content1; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#type").empty().append(content1); |
| | | }else { |
| | | console.log("=-======0000") |
| | | $("#t2").hide() |
| | | $("#t2").val("") |
| | | } |
| | | }); |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | updateT(document.getElementById("type")); |
| | | |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | 跳转模块 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="name" style="width: 400px;" onclick="updateType(this)"> |
| | | <select class="form-control" id="name" style="width: 400px;" onchange="updateType(this)"> |
| | | <option value="不跳转">不跳转</option> |
| | | <option value="加入玩湃">加入玩湃</option> |
| | | <option value="开始课程">开始课程</option> |
| | |
| | | 跳转类型 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="type" style="width: 400px;" > |
| | | <select class="form-control" id="type" style="width: 400px;" onchange="updateT(this)"> |
| | | @for(obj in list1){ |
| | | <option value="${obj.id}" ${obj.id == item.typeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | |
| | | <script src="${ctxPath}/modular/system/tShop/tShopOtherOne.js"></script> |
| | | <script> |
| | | |
| | | |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | document.addEventListener('DOMContentLoaded', function() { |
| | | var selectElement = document.getElementById('page'); |
| | | selectElement.onchange(); |
| | | }); |
| | | |
| | | function updateType(e) { |
| | |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | |
| | | } |
| | | |
| | | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | $("#t2").val("") |
| | | }else{ |
| | | $("#t3").show() |
| | | $("#t3").val("") |
| | | } |
| | | } |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null&&data.length>0){ |
| | | $("#t2").show() |
| | | |
| | | var content1; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | |
| | | }else { |
| | | console.log("=-======0000") |
| | | $("#t2").hide() |
| | | $("#t2").val("") |
| | | |
| | | |
| | | } |
| | | }); |
| | | if (oneId==2 || oneId==25|| oneId==27){ |
| | | $("#t3").val("") |
| | | |
| | | $("#t3").hide() |
| | | } |
| | | |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | updateT(document.getElementById("type")); |
| | | |
| | | } |
| | | |
| | | window.onload = function() { |
| | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div id="driverInfoContent"> |
| | | <#input id="name" name="姓名" underline="true"/> |
| | | <#input id="birthday" name="出生日期" underline="true" type="text"/> |
| | | <#input id="rePassword" name="确认密码" type="password" underline="true"/> |
| | | <#input id="citySel" name="部门" underline="true" readonly="readonly" hidden="deptid" |
| | | clickFun="UserInfoDlg.showDeptSelectTree(); return false;" |
| | | style="background-color: #ffffff !important;"/> |
| | | <#input id="phone" name="电话" underline="true"/> |
| | | <#input id="name" name="员工姓名" underline="true"/> |
| | | <#input id="phone" name="联系电话" underline="true"/> |
| | | <#avatar id="avatar" name="照片" underline="true"/> |
| | | <#input id="birthday" name="生日" underline="true" type="text"/> |
| | | <#select id="sex" name="性别" underline="true" > |
| | | <option value="1">男</option> |
| | | <option value="2">女</option> |
| | | </#select> |
| | | <#input id="idCard" name="身份证号" type="text" underline="true"/> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | return; |
| | | } |
| | | } |
| | | console.log("====pagepagepage==============="+$("#page").val()) |
| | | if(name !='0') { |
| | | if ($("#roleType").val() == 1) { |
| | | if ($("#type").val() == '') { |
| | | if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | if(name !='0') { |
| | | if ($("#roleType").val() == 1) { |
| | | if ($('#type option:selected').text() == "详情") { |
| | | if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#pageId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | |
| | | } |
| | | if(name !='0') { |
| | | if ($("#roleType").val() == 1) { |
| | | if ($("#type").val() == '') { |
| | | if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | |
| | | } |
| | | if(name !='0') { |
| | | if ($("#roleType").val() == 1) { |
| | | if ($('#type option:selected').text() == "详情") { |
| | | if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#pageId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | |
| | | Feng.info("请选择跳转模块") |
| | | return; |
| | | } |
| | | |
| | | if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | | |
| | | let page = $("#page").val() |
| | | if(page=='' && name !='不跳转'){ |
| | | Feng.info("请选择跳转页面") |
| | |
| | | |
| | | if(type=='' && name !='不跳转'){ |
| | | } |
| | | |
| | | |
| | | |
| | | let turnId = $("#turnId").val() |
| | | |
| | | if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // Feng.info("请输入跳转ID") |
| | | // return; |
| | | // } |
| | | if ($('#type option:selected').text() == "详情" &&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#turnId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | let sort = $("#sort").val() |
| | | |
| | | if(sort==''){ |
| | |
| | | if(url==''){ |
| | | } |
| | | |
| | | if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | console.log(name) |
| | | |
| | |
| | | } |
| | | let turnId = $("#turnId").val() |
| | | |
| | | if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | if(turnId==""){ |
| | | |
| | | if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#turnId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // if(turnId==""){ |
| | | // Feng.info("请输入跳转ID") |
| | | // return; |
| | | // } |
| | | // } |
| | | let sort = $("#sort").val() |
| | | |
| | | if(sort==''){ |
| | |
| | | } |
| | | let turnId = $("#turnId").val() |
| | | |
| | | if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // Feng.info("请输入跳转ID") |
| | | // return; |
| | | // } |
| | | |
| | | if ($('#type option:selected').text() == "详情" &&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#turnId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | | |
| | | let sort = $("#sort").val() |
| | | |
| | | if(sort==''){ |
| | |
| | | if(url==''){ |
| | | } |
| | | |
| | | if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | | let name = $("#name").val() |
| | | console.log(name) |
| | | |
| | |
| | | } |
| | | let turnId = $("#turnId").val() |
| | | |
| | | if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | if(turnId==""){ |
| | | // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // if(turnId==""){ |
| | | // Feng.info("请输入跳转ID") |
| | | // return; |
| | | // } |
| | | // } |
| | | |
| | | if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#turnId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let sort = $("#sort").val() |
| | | |
| | | if(sort==''){ |
| | |
| | | } |
| | | let turnId = $("#turnId").val() |
| | | |
| | | if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | if(turnId==""){ |
| | | // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // if(turnId==""){ |
| | | // Feng.info("请输入跳转ID") |
| | | // return; |
| | | // } |
| | | // } |
| | | if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#turnId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let sort = $("#sort").val() |
| | | |
| | | if(sort==''){ |
| | |
| | | return {1: "上架", 2: "下架"}[value] |
| | | } |
| | | }, |
| | | {title: '审核状态', field: 'auditStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {2: "待审核", 1: "已通过",3: "已拒绝"}[value] |
| | | }}, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | |
| | | @PostMapping("/base/site/aliPaymentSiteCallback") |
| | | public void aliPaymentSiteCallback(HttpServletRequest request, HttpServletResponse response){ |
| | | try { |
| | | System.out.println("回调回调回调"); |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | | if(null != map){ |
| | | String code = map.get("out_trade_no"); |
| | |
| | | * @date 2023/7/13 16:48 |
| | | */ |
| | | public interface SiteBookingMapper extends BaseMapper<SiteBooking> { |
| | | List<BillingRequestOfType> queryDatas(Integer appUserId, String monthStart, String monthEnd); |
| | | List<BillingRequestOfType> queryDatas(@Param("appUserId")Integer appUserId,@Param("monthStart") String monthStart,@Param("monthEnd") String monthEnd); |
| | | |
| | | List<SiteBooking> listAll(@Param("query")SiteBookingQuery query, @Param("sTime")String sTime, @Param("eTime")String eTime, @Param("amount") BigDecimal amount); |
| | | |
| | |
| | | String code = siteBooking.getOrderNo(); |
| | | Integer id = siteBooking.getId(); |
| | | ResultUtil alipay = payMoneyUtil.alipay("预约场地", "预约场地", id.toString(), code, paymentPrice.toString(), "/base/site/aliPaymentSiteCallback"); |
| | | System.out.println("预约场地----"+alipay.getCode()); |
| | | if(alipay.getCode() == 200){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | |
| | | // String s = data1.get("tradeStatus"); |
| | | String tradeNo = resultUtil.getTradeNo(); |
| | | String s = resultUtil.getTradeStatus(); |
| | | System.out.println("ssssss"+s); |
| | | if("TRADE_CLOSED".equals(s) || "TRADE_FINISHED".equals(s) || num == 10){ |
| | | break; |
| | | } |
| | |
| | | if(System.currentTimeMillis()>l){ |
| | | siteBooking.setStatus(5); |
| | | siteBookingMapper.updateById(siteBooking); |
| | | |
| | | } |
| | | } |
| | | //定时修改赛事状态 |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //预约场地后,时间超过endTime,状态变为已过期 |
| | | @Scheduled(fixedRate = 60000) |
| | | public void taskMinute1(){ |
| | | try { |
| | | List<SiteBooking> siteBookings = siteBookingMapper.selectList(new LambdaQueryWrapper<SiteBooking>().eq(SiteBooking::getStatus, 1)); |
| | | for (SiteBooking siteBooking : siteBookings) { |
| | | long time = siteBooking.getEndTime().getTime(); |
| | | if (System.currentTimeMillis() > time) { |
| | | siteBooking.setStatus(4); |
| | | siteBookingMapper.updateById(siteBooking); |
| | | } |
| | | |
| | | } |
| | | //定时修改赛事状态 |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <select id="list1" resultType="com.dsh.other.model.BannerVo"> |
| | | select tb.id as id,tb.img as img, tb.page as page,tb.name as name,tb.type as type,tb.turnId as turnId , tb.model as model |
| | | from t_banner tb |
| | | where tb.position = #{position} |
| | | where tb.position = #{position} and tb.state =1 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and t1.cityManagerId = #{query.objectId} |
| | | </if> |
| | | <if test="query.objectType == 3"> |
| | | and t2.storeStaffId = #{query.objectId} |
| | | and t2.id = #{query.objectId} |
| | | </if> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t1.city = #{query.city} |