| | |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | import com.dsh.guns.modular.system.model.TOperatorCity; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.TOperatorCityService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @RequestMapping("/tCompetition_update/{id}") |
| | | public String tCarUpdate(@PathVariable Integer id, Model model) { |
| | | Competition competition = competitionClient.queryById(id); |
| | | System.out.println("======competition======"+competition); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String startTime = formatter.format(competition.getStartTime()); |
| | | model.addAttribute("startTime",startTime); |
| | | String endTime = formatter.format(competition.getEndTime()); |
| | | model.addAttribute("endTime",endTime); |
| | | String registerEndTime = formatter.format(competition.getRegisterEndTime()); |
| | | model.addAttribute("registerEndTime",registerEndTime); |
| | | |
| | | |
| | | |
| | | model.addAttribute("item",competition); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getProvinceCode())); |
| | |
| | | @RequestMapping("/tCompetition_info/{id}") |
| | | public String tCarInfo(@PathVariable Integer id, Model model) { |
| | | Competition competition = competitionClient.queryById(id); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String startTime = formatter.format(competition.getStartTime()); |
| | | model.addAttribute("startTime",startTime); |
| | | String endTime = formatter.format(competition.getEndTime()); |
| | | model.addAttribute("endTime",endTime); |
| | | String registerEndTime = formatter.format(competition.getRegisterEndTime()); |
| | | model.addAttribute("registerEndTime",registerEndTime); |
| | | model.addAttribute("item",competition); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getProvinceCode())); |
| | |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private TOperatorCityService operatorCityService; |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | System.out.println("======"+oneId); |
| | | List<TOperatorCity> list = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getOperatorId, oneId).eq(TOperatorCity::getType, 2)); |
| | | if (list.size()!=0){ |
| | | return list; |
| | | } |
| | | |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | |
| | | TStoreOtherConfig byId = storeOtherConfigService.getById(id); |
| | | TTurn one = tTurnService.getOne(new LambdaQueryWrapper<TTurn>().eq(TTurn::getName, byId.getName())); |
| | | // page list |
| | | List<TTurn> list = tTurnService.list(new LambdaQueryWrapper<TTurn>().eq(TTurn::getPid, one.getId())); |
| | | if (one!=null) { |
| | | List<TTurn> list = tTurnService.list(new LambdaQueryWrapper<TTurn>().eq(TTurn::getPid, one.getId())); |
| | | model.addAttribute("list", list); |
| | | } |
| | | // type list |
| | | List<TTurn> list1 = tTurnService.list(new LambdaQueryWrapper<TTurn>().eq(TTurn::getPid, byId.getPageId())); |
| | | model.addAttribute("item",byId); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("list1",list1); |
| | | |
| | | return PREFIX + "tShop_edit_two.html"; |
| | |
| | | <option value="${i.id}">${i.name}</option> |
| | | @} |
| | | </select> |
| | | <input type="checkbox" value="0" name="pt" onchange="TCarInfoDlg.oneChangeYys(this)">平台</input> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | |
| | | $(document).ready(function() { |
| | | $('#account').select2({ |
| | | width: '300px', |
| | | placeholder: '选择运营商', |
| | | allowClear: true, |
| | | minimumResultsForSearch: 1 // To disable the search box, set this value to Infinity |
| | | }); |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | $(document).ready(function() { |
| | | $('#shopId').select2({ |
| | | multiple: true, |
| | |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="赛事名称" type="text" value="${item.name}"/> |
| | | <#input id="startTime" name="开始时间" type="text" value="${item.startTime}"/> |
| | | <#input id="endTime" name="结束时间" type="text" value="${item.endTime}"/> |
| | | <#input id="registerEndTime" name="截止报名时间" type="text" value="${item.registerEndTime}"/> |
| | | <#input id="startTime" name="开始时间" type="text" value="${startTime}"/> |
| | | <#input id="endTime" name="结束时间" type="text" value="${endTime}"/> |
| | | <#input id="registerEndTime" name="截止报名时间" type="text" value="${registerEndTime}"/> |
| | | @if(type==2){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">报名条件:</label> |
| | |
| | | laydate.render({ |
| | | elem: '#startTime' |
| | | ,type:"datetime" |
| | | ,format: 'yyyy-MM-dd HH:mm:ss' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | |
| | | 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){ |
| | | console.log(data.length) |
| | | 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); |
| | |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="page" style="width: 400px;" onchange="updateOne(this)"> |
| | | @for(obj in list){ |
| | | @for(obj in list!){ |
| | | <option value="${obj.id}" ${obj.id == item.pageId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShopOtherOne.js"></script> |
| | | <script> |
| | | |
| | | |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | |
| | | 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($("#name").val() =='不跳转') { |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属运营商:</label> |
| | | <div class="col-sm-8"> |
| | | |
| | | |
| | | <select style="width: 300px" class="form-control" id="yys" name="yys" onchange="TSite.oneChangeYys(this)"> |
| | | <option style="width: 300px" value="">选择运营商</option> |
| | | @for(obj in yysList){ |
| | |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",shopIdString); |
| | | ajax.set("name",name); |
| | | ajax.set("sTime",startTime); |
| | | ajax.set("eTime",endTime); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("endTime",endTime); |
| | | ajax.set("rEndTime",registerEndTime); |
| | | ajax.set("startAge",startAge); |
| | | ajax.set("endAge",endAge); |
| | |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | |
| | | if (typeof(oneId) == "undefined" || oneId == "undefined") { |
| | | ajax.set("oneId",0); |
| | | }else{ |
| | | ajax.set("oneId",oneId);} |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | TCarInfoDlg.oneChangeYys = function(e){ |
| | | |
| | | var oneId= $("input[name='pt']:checked").val() |
| | | |
| | | console.log("===========oneId=========="+oneId) |
| | | var SelectValue=""; |
| | | if(SelectValue=='0' ){ |
| | | oneId=0 |
| | | } |
| | | // var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){ |
| | | // if(data!=null){ |
| | | // // var content1 = '<option value="0">平台</option>'; |
| | | |
| | | // |
| | | // |
| | | // var content='<option value="">选择门店</option>'; |
| | | // $.each(data, function(k,v) { |
| | | // content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | // }); |
| | | // $("#shopId").empty().append(content); |
| | | // } |
| | | // }); |
| | | |
| | | |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/onChange1", function(data){ |
| | | if(data!=null){ |
| | | if (typeof(oneId) != "undefined") { |
| | | $("#account").prop('disabled', true); |
| | | } |
| | | if(language==1){ |
| | | var content='<option value="">选择省</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#pCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",0); |
| | | ajax.start(); |
| | | |
| | | |
| | | if (typeof(oneId) == "undefined"){ |
| | | console.log("===============") |
| | | |
| | | var button = document.getElementById("account"); |
| | | button.removeAttribute("disabled"); |
| | | |
| | | } |
| | | |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | |
| | | |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | TCarInfoDlg.oneChange1 = function (e) { |
| | |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | content += "<option value='"+v.operatorId+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#pCode").empty().append(content); |
| | | } |
| | |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("上架成功!"); |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!"; |
| | |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("下架成功!"); |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "下架失败!"; |
| | |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("删除成功!"); |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | |
| | | var addButton = document.getElementById('addButton'); |
| | | addButton.addEventListener('click', function () { |
| | | var phoneRegex = /^1[0-9]{10}$/; |
| | | var landlineRegex = /^\d{4}-\d{7}$/; |
| | | |
| | | var inputField = document.getElementById('addPhone'); |
| | | var dataContainer = document.getElementById('phone'); |
| | | var inputData = inputField.value.trim(); |
| | | if (TQuestion.dataCount>=2){ |
| | | Feng.info("最多添加两个客服电话!"); |
| | | // todo 添加正则表达式验证电话号码合法性 |
| | | }else if(!phoneRegex.test(inputData)){ |
| | | }else if(!phoneRegex.test(inputData)&&!landlineRegex.test(inputData)){ |
| | | Feng.info("客服电话不合法,请重新输入!"); |
| | | }else { |
| | | if (inputData !== '' || document.querySelectorAll('.data-item').length !==0) { |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '图片', field: 'url', visible: role==1?true:false, align: 'center', valign: 'middle', |
| | | }, |
| | | { |
| | | title: '图片', |
| | | field: 'url', |
| | | visible: role == 1 ? true : false, |
| | | align: 'center', |
| | | valign: 'middle', |
| | | formatter: function(value, row, index) { |
| | | return '<img src="' + value + '" alt="图片" style="width: 100px; height: 100px;">'; |
| | | } |
| | | } |
| | | , |
| | | {title: '跳转模块', field: 'name', visible: role==1?true:false, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '跳转页面', field: 'page', visible: role==1?true:false, align: 'center', valign: 'middle', |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "场地id", name = "id", dataType = "int", required = true), |
| | | @ApiImplicitParam(value = "日期(2023-01-01)", name = "day", dataType = "string", required = true), |
| | | @ApiImplicitParam(value = "选择场地的名称", name = "day", dataType = "string", required = true), |
| | | @ApiImplicitParam(value = "半场名称", name = "day", dataType = "string", required = false) |
| | | @ApiImplicitParam(value = "半场名称", name = "halfName", dataType = "string", required = false), |
| | | @ApiImplicitParam(value = "选择场地的名称", name = "siteName", dataType = "string", required = false) |
| | | }) |
| | | public ResultUtil<List<QuerySiteTimes>> querySiteTimes(Integer id, String day,String halfName,String siteName){ |
| | | try { |
| | |
| | | import com.alipay.api.domain.RoyaltyInfo; |
| | | import com.alipay.api.request.*; |
| | | import com.alipay.api.response.*; |
| | | import lombok.Synchronized; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.bouncycastle.jce.provider.BouncyCastleProvider; |
| | | import org.dom4j.Document; |
| | |
| | | /** |
| | | * 支付宝支付 |
| | | */ |
| | | |
| | | public ResultUtil alipay(String body, String subject, String passbackParams, String outTradeNo, String amount, String notifyUrl){ |
| | | // //构造client |
| | | // CertAlipayRequest certAlipayRequest = new CertAlipayRequest (); |
| | |
| | | model.setPassbackParams(passbackParams);//自定义参数 |
| | | request.setBizModel(model); |
| | | request.setNotifyUrl(callbackPath + notifyUrl); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |