| | |
| | | detailsVo.setUserImage(tAppUser.getHeadImg()); |
| | | detailsVo.setUserName(tAppUser.getName()); |
| | | detailsVo.setUserPhone(tAppUser.getPhone()); |
| | | detailsVo.setIsVip(tAppUser.getIsVip()); |
| | | if(tAppUser.getGender()!=null){ |
| | | |
| | | detailsVo.setSex(tAppUser.getGender() == 1 ? "男" : "女"); |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @FeignClient("mb-cloud-other") |
| | |
| | | Integer queryByCode(@RequestBody String code); |
| | | @PostMapping("/base/site/queryOperator") |
| | | OperatorUser queryOperator(@RequestBody List<Integer> stores); |
| | | |
| | | @PostMapping("/base/site/game") |
| | | List<Map<String, Object>> game(Integer appUserId); |
| | | |
| | | } |
| | |
| | | private String lon; |
| | | @ApiModelProperty("门店纬度") |
| | | private String lat; |
| | | |
| | | private String province; |
| | | private String provinceCode; |
| | | private String city; |
| | | private String cityCode; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "会员有效期") |
| | | private String memberLifespan; |
| | | |
| | | private Integer isVip; |
| | | |
| | | } |
| | |
| | | } |
| | | // 4.智慧球场 |
| | | |
| | | List<Map<String,Object>> list = stClient.game(appUserId); |
| | | if (list.size() > 0 ){ |
| | | for (Map<String,Object> booking : list) { |
| | | RechargesDetail consumeDetail = new RechargesDetail(); |
| | | consumeDetail.setConsumeName("激战游戏"); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(new Date(Long.valueOf(booking.get("time").toString())))); |
| | | consumeDetail.setConsumeAmount("-"+String.valueOf(booking.get("money"))); |
| | | consumeDetail.setRecordId(2); |
| | | details.add(consumeDetail); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 5.充值 |
| | | List<RechargeRecords> rechargeRecords = this.baseMapper.selectList(new QueryWrapper<RechargeRecords>() |
| | | .eq("payStatus", 2) |
| | |
| | | joinPlayPaiVo.setLat(s.getLat()); |
| | | joinPlayPaiVo.setStoreId(s.getId()); |
| | | joinPlayPaiVo.setPhone(s.getPhone()); |
| | | joinPlayPaiVo.setProvince(s.getProvince()); |
| | | joinPlayPaiVo.setProvinceCode(s.getProvinceCode()); |
| | | joinPlayPaiVo.setCity(s.getCity()); |
| | | joinPlayPaiVo.setCityCode(s.getCityCode()); |
| | | } |
| | | return joinPlayPaiVo; |
| | | } |
| | |
| | | if (ToolUtil.isNotEmpty(count) && count >= merchandise.getPickUpQuantity()){ |
| | | return ResultUtil.error("超过限领数量"); |
| | | } |
| | | if (ToolUtil.isNotEmpty(count) && count >= merchandise.getQuantityIssued()){ |
| | | return ResultUtil.error("超过发放数量"); |
| | | } |
| | | |
| | | for (int i = 0; i < goodsNums; i++) { |
| | | // 新增积分商品兑换记录 |
| | |
| | | for (Store store : stores) { |
| | | StoreVos storeVos1 = new StoreVos(); |
| | | storeVos1.setNum1(store.getProvince() +"省"+ store.getCity() +"市"); |
| | | storeVos1.setNum2(store.getName()); |
| | | if(store.getOperatorId()==0){ |
| | | storeVos1.setNum2("平台"); |
| | | }else { |
| | | |
| | | storeVos1.setNum2(store.getOName()); |
| | | } |
| | | storeVos1.setNum3(store.getName()); |
| | | storeVos1.setNum4(store.getIds()); |
| | | storeVos.add(storeVos1); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private Integer state; |
| | | |
| | | @TableField("operatorId") |
| | | private Integer operatorId; |
| | | |
| | | @TableField(exist = false) |
| | | private String oName; |
| | | |
| | | private String ids; |
| | | } |
| | |
| | | String num1; |
| | | |
| | | String num2; |
| | | |
| | | String num3; |
| | | String num4; |
| | | } |
| | |
| | | if (type == 2) {//代金券{"num1":1} |
| | | JSONObject jsonObject = JSON.parseObject(content); |
| | | Double num1 = jsonObject.getDouble("deductionAmount"); |
| | | if(num1==null){ |
| | | num1=0d; |
| | | } |
| | | if(price.compareTo(num1) <= 0){ |
| | | continue; |
| | | } |
| | |
| | | participantVo.setIdcard(participant.getIdcard()); |
| | | Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(participant.getBirthday())); |
| | | participantVo.setAge(age); |
| | | Student student = studentClient.queryStudentByPhone(participant.getPhone()); |
| | | Student student = studentClient.queryStudentByPhone(participant.getPhone()==null?"0":participant.getPhone()); |
| | | if(null != student){ |
| | | Integer integer = coursePackagePaymentClient.queryResidueClassHour(student.getId()); |
| | | participantVo.setResidueClassHour(integer); |
| | |
| | | pointsMerchandise.setCoursePackageConfigId(coursePackageConfigId); |
| | | // 代替storeId |
| | | pointsMerchandise.setShelves(1); |
| | | Integer id = pointMercharsClient.add(pointsMerchandise); |
| | | if(typeAll!=2){ |
| | | if(useScope==2){ |
| | | ArrayList<Map<String,String>> objects = new ArrayList<>(); |
| | |
| | | map.put("pCode",pCity.getCode()); |
| | | map.put("cName",tCity.getName()); |
| | | map.put("cCode",tCity.getCode()); |
| | | map.put("id",id.toString()); |
| | | map.put("id","0"); |
| | | objects.add(map); |
| | | } |
| | | pointMercharsClient.addCitys(objects); |
| | | }else if(useScope==3){ |
| | | |
| | | Integer oid=null; |
| | | String[] split = storeIds.split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | if(i==0){ |
| | | Integer operatorId = storeService.getById(split[0]).getOperatorId(); |
| | | oid=operatorId; |
| | | } |
| | | Integer operatorId = storeService.getById(split[i]).getOperatorId(); |
| | | if(oid!=operatorId){ |
| | | return "5003"; |
| | | } |
| | | } |
| | | Integer id = pointMercharsClient.add(pointsMerchandise); |
| | | String pam = id+"_"+storeIds; |
| | | // 添加多个城市 门店 |
| | | try{ |
| | |
| | | String num2; |
| | | |
| | | String num3; |
| | | String num4; |
| | | } |
| | |
| | | <div class="row" id="content4" style="margin-left: 100px;"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <span id="totalNumber4">全球场次总数:</span> |
| | | <span id="totalNumber4">全球场次总数:<span id="num" style="color:red"></span>场 |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-11" style="display: flex"> |
| | |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TSite1.search4()"/> |
| | | </div> |
| | | |
| | | <#table id="TSiteTable1"/> |
| | | </div> |
| | | </div> |
| | |
| | | // 获取90°准度赛全球场次总数 |
| | | var ajax4 = new $ax(Feng.ctxPath + "/gameData/cityGameOne", function(data){ |
| | | var totalNumber4= document.getElementById("totalNumber4"); |
| | | totalNumber4.innerText = "全球场次总数:"+data.totalNum; |
| | | $("#num").text(data.totalNum) |
| | | }); |
| | | ajax4.start(); |
| | | // 基于准备好的dom,初始化echarts实例 |
| | |
| | | }else { |
| | | $("#b2").hide() |
| | | $("#b1").show() |
| | | $("#ticket").show() |
| | | } |
| | | } |
| | | |
| | |
| | | <td>所在省市</td> |
| | | <td>所属账号</td> |
| | | <td>门店名称</td> |
| | | <td>闸机id</td> |
| | | </tr> |
| | | </thead> |
| | | @for(s in store){ |
| | | <td>${s.num1}</td> |
| | | <td>${s.num2}</td> |
| | | <td>${s.num3}</td> |
| | | <td>${s.num4}</td> |
| | | @} |
| | | </table> |
| | | @} |
| | |
| | | <div class="form-group"> |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <label class="col-sm-3">*兑换地点: </label> |
| | | <div class="col-sm-2" id="belongsNationwide" > |
| | | <div class="col-sm-2" id="belongsNationwide" hidden > |
| | | <input class="col-sm-1" onclick="scopeOfApplication1()" name="company" type="radio" |
| | | value="1" checked style="margin-top: 10px"/> |
| | | value="1" style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">全国通用</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsCity" > |
| | | <div class="col-sm-2" id="belongsCity" hidden > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication2()" type="radio" |
| | | value="2" style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">指定城市</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsStore" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" checked |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 6px;">指定门店</label> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="storeSelect" hidden="hidden"> |
| | | <div class="row" id="storeSelect" > |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-12"> |
| | |
| | | <td>所在省市</td> |
| | | <td>所属账号</td> |
| | | <td>门店名称</td> |
| | | <td>闸机id</td> |
| | | <td>操作</td> |
| | | </tr> |
| | | </thead> |
| | |
| | | return false; |
| | | } |
| | | var arr = []; |
| | | console.log('selected--->',selected) |
| | | var name =''; |
| | | for(var i in selected){ |
| | | if(typeof selected[i].id != "undefined"){ |
| | | console.log( selected[i].ids,55555) |
| | | name = selected[0].accountName |
| | | if(name!=selected[i].accountName){ |
| | | Feng.info("请选择相同运营商门店") |
| | | return ; |
| | | } |
| | | arr.push({ |
| | | id: selected[i].id, |
| | | provinceCity: typeof selected[i].provinceCity != "undefined" ? selected[i].provinceCity : "", |
| | | accountName: typeof selected[i].accountName != "undefined" ? selected[i].accountName : "", |
| | | name: typeof selected[i].name != "undefined" ? selected[i].name : "" |
| | | name: typeof selected[i].name != "undefined" ? selected[i].name : "", |
| | | ids:typeof selected[i].ids != "undefined" ? selected[i].ids : "", |
| | | }) |
| | | } |
| | | } |
| | |
| | | this.layerIndex = index; |
| | | } |
| | | TGoodsInfoDlg.selecUserOpt = function (arrays){ |
| | | console.log(arrays) |
| | | |
| | | //获取所有的值 |
| | | var subArr= this.storeIds; |
| | | console.log(subArr) |
| | | $(".timeClass").each(function () { |
| | | subArr.push($(this).find("input[name*='id']").val()); |
| | | }); |
| | |
| | | str += '<tr class="timeClass">' + |
| | | '<td><input type="hidden" id="id" name="id" value="'+arrays[i].id+'"><input type="hidden" id="provinceCity" name="provinceCity" value="'+arrays[i].provinceCity+'">' + arrays[i].provinceCity + '</td>' + |
| | | '<td><input type="hidden" id="accountName" name="accountName" value="'+arrays[i].accountName+'">' + arrays[i].accountName + '</td>' + |
| | | '<td><input type="hidden" id="name" name="name" value="'+arrays[i].name+'">' + arrays[i].name + '</td><td><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | '<td><input type="hidden" id="name" name="name" value="'+arrays[i].name+'">' + arrays[i].name + |
| | | '<td><input type="hidden" id="ids" name="ids" value="'+arrays[i].ids+'">' + arrays[i].ids + |
| | | '</td><td><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | } |
| | | } |
| | | $("#coun").append(str); |
| | | console.log('storeIds',this.storeIds) |
| | | } |
| | | function deleteSub(e) { |
| | | console.log(e); |
| | |
| | | * 提交添加 |
| | | */ |
| | | TGoodsInfoDlg.addSubmit = function() { |
| | | |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | | if(data.code == 200){ |
| | | Feng.info("改账号已经存在"); |
| | | }else if(data=="5003"){ |
| | | console.log("请选择相同运营商门店") |
| | | Feng.info("请选择相同运营商门店"); |
| | | |
| | | }else if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else if(data=="5003"){ |
| | | console.log("请选择相同运营商门店") |
| | | Feng.info("请选择相同运营商门店"); |
| | | |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else if(data=="5003"){ |
| | | Feng.info("请选择相同运营商门店"); |
| | | |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">请选择:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <div class="col-sm-9" style="margin-top: 5px;">\n' + |
| | | ' <input type="radio" id="areaType1" value="1" name="areaType"> ' + |
| | | ' <label for="areaType1"> 手环 </label>\n' + |
| | | ' </div>\n' + |
| | |
| | | tGameRecord.setPayType(type); |
| | | tGameRecord.setUserId(uid); |
| | | tGameRecord.setNumber(code); |
| | | tGameRecord.setTime(new Date()); |
| | | gameRecordService.save(tGameRecord); |
| | | if(type==1){ |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay("游戏支付", "", code, config.getCash().toString(), "/base/course/weChatPaymentCourseCallback", "APP", ""); |
| | |
| | | if("SUCCESS".equals(s)){ |
| | | for (TGameRecord coursePackagePayment : list) { |
| | | coursePackagePayment.setStatus(1); |
| | | coursePackagePayment.setMoney(config.getCash()); |
| | | coursePackagePayment.setOrderNo(transaction_id); |
| | | } |
| | | gameRecordService.updateBatchById(list); |
| | |
| | | if("TRADE_SUCCESS".equals(s)){ |
| | | for (TGameRecord coursePackagePayment : list) { |
| | | coursePackagePayment.setStatus(1); |
| | | coursePackagePayment.setMoney(config.getCash()); |
| | | coursePackagePayment.setOrderNo(tradeNo); |
| | | } |
| | | gameRecordService.updateBatchById(list); |
| | |
| | | } |
| | | return alipay; |
| | | }else if(type==3){ |
| | | tGameRecord.setMoney(config.getPlayCoin()); |
| | | gameRecordService.updateById(tGameRecord); |
| | | AppUser appUser = appUserClient.queryAppUser(uid); |
| | | Integer playPaiCoins = appUser.getPlayPaiCoins(); |
| | | BigDecimal playCoin = config.getPlayCoin(); |
| | |
| | | @Autowired |
| | | private IOperatorUserService operatorUserService; |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/site/game") |
| | | public List<Map<String, Object>> game(@RequestBody Integer appUserId){ |
| | | return service.game(appUserId); |
| | | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/site/queryOperator") |
| | | public OperatorUser queryOperator(@RequestBody List<Integer> stores){ |
| | |
| | | @Autowired |
| | | private TBackRecordService backRecordService; |
| | | |
| | | |
| | | /** |
| | | * 根据城市管理员id获取门店 |
| | | */ |
| | |
| | | @PostMapping("/store/queryStoreByIds") |
| | | public List<Store> queryStoreByIds(@RequestBody List<Integer> ids){ |
| | | try { |
| | | return storeService.list(new LambdaQueryWrapper<Store>() |
| | | .in(Store::getId,ids)); |
| | | List<Store> list = storeService.list(new LambdaQueryWrapper<Store>() |
| | | .in(Store::getId, ids)); |
| | | for (Store store : list) { |
| | | Integer operatorId = store.getOperatorId(); |
| | | if(operatorId == null){ |
| | | operatorId=-1; |
| | | } |
| | | String name = storeService.getOName(operatorId); |
| | | store.setOName(name); |
| | | } |
| | | return list; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ArrayList<>(); |
| | |
| | | @TableField("operatorId") |
| | | private Integer operatorId; |
| | | |
| | | @TableField(exist = false) |
| | | private String oName; |
| | | |
| | | private String ids; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | |
| | | @TableField("orderNo") |
| | | private String orderNo; |
| | | |
| | | private Date time; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | import org.aspectj.lang.annotation.DeclareParents; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | List<Store> getStoreByStoreStaffId(@Param("id") Integer id); |
| | | |
| | | String getOName(@Param("operatorId") Integer operatorId); |
| | | |
| | | |
| | | List<Map<String, Object>> game(@Param("appUserId") Integer appUserId); |
| | | |
| | | } |
| | |
| | | import com.dsh.other.model.ProvinceAndCityVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | List<Store> getStoreByCityManagerId(Integer id); |
| | | |
| | | List<Store> getStoreByStoreStaffId(Integer id); |
| | | |
| | | String getOName(Integer operatorId); |
| | | |
| | | List<Map<String, Object>> game(Integer appUserId); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | 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.other.entity.*; |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | System.out.println("======strings======="+strings); |
| | | |
| | |
| | | String currentTime = appointmentStartTime; |
| | | while (currentTime.compareTo(appointmentEndTime) < 0) { |
| | | String nextTime=null; |
| | | if("智慧球场".equals(site.getTypeName())){ |
| | | if("智慧场地".equals(site.getTypeName())){ |
| | | nextTime=getNextTimeOne(currentTime); |
| | | }else { |
| | | nextTime= getNextTime(currentTime); |
| | |
| | | // orderDto.setSelectable(0); |
| | | // } |
| | | if (strings.contains(timeRange)){ |
| | | |
| | | orderDto.setSelectable(0); |
| | | }else { |
| | | |
| | | String stime = day+" "+currentTime; |
| | | String etime = day+" "+nextTime; |
| | | orderDto.setSelectable(1); |
| | | // 查出lock |
| | | List<SiteLock> list = siteLockService.list(new LambdaQueryWrapper<SiteLock>().eq(SiteLock::getSiteId, id)); |
| | | for (SiteLock siteLock : list) { |
| | | boolean stringDateBetween = DateComparisonExample.isStringDateBetween(stime + " - " + etime, siteLock.getStartTime(), siteLock.getEndTime()); |
| | | if(stringDateBetween){ |
| | | orderDto.setSelectable(0); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | System.out.println("-------------"+timeRanges); |
| | | |
| | | return timeRanges; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | return storeMapper.getStoreByStoreStaffId(id); |
| | | } |
| | | |
| | | @Override |
| | | public String getOName(Integer operatorId) { |
| | | |
| | | return this.baseMapper.getOName(operatorId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> game(Integer appUserId) { |
| | | return this.baseMapper.game(appUserId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表数据 |
New file |
| | |
| | | package com.dsh.other.util; |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | public class DateComparisonExample { |
| | | public static void main(String[] args) { |
| | | String stringValue = "2023-10-18 00:20:00 - 2023-10-18 00:21:00"; |
| | | Date startDate = parseDate("2023-10-18 00:19:00"); |
| | | Date endDate = parseDate("2023-10-18 00:21:00"); |
| | | |
| | | boolean isBetween = isStringDateBetween(stringValue, startDate, endDate); |
| | | System.out.println("字符串时间是否在两个 Date 类型之间?" + isBetween); |
| | | } |
| | | |
| | | private static Date parseDate(String dateString) { |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | try { |
| | | return formatter.parse(dateString); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static boolean isStringDateBetween(String stringValue, Date startDate, Date endDate) { |
| | | String[] dateRange = stringValue.split(" - "); |
| | | Date valueStartDate = parseDate(dateRange[0]); |
| | | Date valueEndDate = parseDate(dateRange[1]); |
| | | |
| | | return (valueStartDate.after(startDate) || valueStartDate.equals(startDate)) |
| | | && (valueEndDate.before(endDate) || valueEndDate.equals(endDate)); |
| | | } |
| | | } |
| | |
| | | package com.dsh.other.util; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.other.entity.SiteBooking; |
| | | import com.dsh.other.mapper.SiteBookingMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | @Resource |
| | | private SiteBookingMapper siteBookingMapper; |
| | | |
| | | /** |
| | | * 每隔一分钟去处理的定时任务 |
| | |
| | | @Scheduled(fixedRate = 60000) |
| | | public void taskMinute(){ |
| | | try { |
| | | List<SiteBooking> siteBookings = siteBookingMapper.selectList(new LambdaQueryWrapper<SiteBooking>().eq(SiteBooking::getStatus, 0)); |
| | | for (SiteBooking siteBooking : siteBookings) { |
| | | long time = siteBooking.getInsertTime().getTime(); |
| | | long l = time + 1800 * 1000; |
| | | if(System.currentTimeMillis()>l){ |
| | | siteBooking.setStatus(5); |
| | | siteBookingMapper.updateById(siteBooking); |
| | | } |
| | | } |
| | | //定时修改赛事状态 |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | <select id="getStoreByStoreStaffId" resultType="com.dsh.other.entity.Store"> |
| | | select * from t_store where storeStaffId = #{id} |
| | | </select> |
| | | <select id="getOName" resultType="java.lang.String"> |
| | | select name from t_operator where id =#{operatorId} |
| | | </select> |
| | | <select id="game" resultType="java.util.Map"> |
| | | select time,money from t_game_record where userId =#{appUserId} and payType =3 |
| | | </select> |
| | | </mapper> |