| | |
| | | return appUser; |
| | | } |
| | | |
| | | // todo 短信验证码 |
| | | @ResponseBody |
| | | @PostMapping("/base/appUser/getSMSCode") |
| | | @ApiOperation(value = "获取短信验证码", tags = {"APP-登录注册"}) |
| | |
| | | order by sort desc |
| | | </select> |
| | | <select id="changeState" > |
| | | update t_benefits_videos set |
| | | state = #{state} |
| | | update t_points_merchandise set |
| | | shelves = #{state} |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_benefits_videos.id IN |
| | | AND t_points_merchandise.id IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.competition.mapper.ParticipantMapper"> |
| | | <select id="getPeopleFromId" resultType="com.dsh.competition.feignclient.model.CompetitionUser"> |
| | | select t2.id, t2.name,t2.gender sex,t2.phone ,t2.idcard idCard ,t3.payStatus state |
| | | from t_user_competition t1 |
| | | left join t_participant t2 on t1.participantId = t2.id |
| | | left join t_payment_competition t3 on t1.paymentCompetitionId = t3.id |
| | | select t2.name,t2.gender sex,t2.phone ,t2.idcard idCard ,t3.payStatus state |
| | | from t_user_competition t1 left join t_participant t2 on t1.participantId = t2.id |
| | | left join t_payment_competition t3 on t1.paymentCompetitionId = t3.id |
| | | where t1.competitionId =#{id} and t2.id is not null and t3.id is not null |
| | | <if test="state !=null and state !='' and state ==1"> |
| | | and t3.payStatus in (1,2) |
| | |
| | | <artifactId>jdom</artifactId> |
| | | <version>1.1.3</version> |
| | | </dependency> |
| | | |
| | | <!--阿里云短信--> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-core</artifactId> |
| | | <version>4.4.3</version> |
| | | </dependency> |
| | | <!--读取excel文件--> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.GiftSearchDto; |
| | | import com.dsh.guns.modular.system.model.dto.SelectDto; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | @FeignClient("mb-cloud-account") |
| | | public interface AppUserClient { |
| | | |
| | | |
| | | /** |
| | | * 根据介绍有礼id查询当前活动参与次数 |
| | | */ |
| | |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.common.collect.Lists; |
| | | import com.google.maps.internal.ApiResponse; |
| | | import groovyjarjarpicocli.CommandLine; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | @Autowired |
| | | private SiteClient siteClient; |
| | | private String PREFIX = "/system/gateData/"; |
| | | |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | /** |
| | | * 跳转到充值记录页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TOperator> list = operatorService.list(new QueryWrapper<TOperator>().ne("state", 3)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "GateData.html"; |
| | | } |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public Object list() { |
| | | public Object list(Integer storeId) { |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id=1001"; |
| | | if (storeId!=null){ |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | } else { |
| | | System.out.println("请求失败: " + responseCode); |
| | | } |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/totalNum") |
| | | @ResponseBody |
| | | public Object totalNum() { |
| | | public Object totalNum(Integer storeId) { |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id=1001"; |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | |
| | | import com.mysql.cj.x.protobuf.MysqlxExpr; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private IOperatorAuthService operatorAuthService; |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据运营商id查询所有门店 |
| | | */ |
| | | @RequestMapping("/getStores") |
| | | @ResponseBody |
| | | public List<TStore> getStores(Integer id) |
| | | { |
| | | return storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId",id) |
| | | .ne("state",3)); |
| | | } |
| | | |
| | | /** |
| | | * 跳转运营商管理首页 |
| | |
| | | |
| | | } |
| | | if (data.getViplevelId()!=null){ |
| | | // todo 创建会员等级表 |
| | | |
| | | model.addAttribute("level","黄金"); |
| | | } |
| | | model.addAttribute("level","黄金"); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/updateCoursePackage") |
| | | public ResultUtil updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig){ |
| | | |
| | | // System.out.println("=======getClassStartTime============"+classStartTime); |
| | | String startTime = coursePackage.getClassStartTime(); |
| | | JSONArray jsonArray = JSON.parseArray(startTime); |
| | | String s = startTime.replaceAll(" ", ""); |
| | | |
| | | JSONArray jsonArray = JSON.parseArray(s); |
| | | System.out.println("=======jsonArray==========="+jsonArray); |
| | | |
| | | List<String> first = new ArrayList<>(); |
| | | List<String> second = new ArrayList<>(); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | // JSONObject jsonObject = JSON.parseObject(jsonArray.getString(i)); |
| | | // JSONObject jsonObject = JSON.parseObject(jsonArray.getString(i)); |
| | | |
| | | String jsonString = jsonArray.getString(i); |
| | | String[] split = jsonString.split("-"); |
| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.auth.UserClient; |
| | | import com.dsh.course.feignClient.auth.model.GetTokenRequest; |
| | | import com.dsh.course.feignClient.auth.model.TokenResponse; |
| | | import com.dsh.course.model.node.MenuNode; |
| | | import com.dsh.course.util.RedisUtil; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.controller.util.CaptchaGenerator; |
| | | import com.dsh.guns.modular.system.controller.util.CaptchaImageGenerator; |
| | | import com.dsh.guns.modular.system.controller.util.MD5; |
| | |
| | | import com.dsh.guns.modular.system.service.IRelationService; |
| | | import com.dsh.guns.modular.system.service.IRoleService; |
| | | import com.dsh.guns.modular.system.util.CacheUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import com.google.code.kaptcha.Constants; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.common.exception.InvalidKaptchaException; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | @Resource |
| | | private UserClient userClient; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改密码页面 |
| | | */ |
| | | @PostMapping("/update") |
| | | public String updatePassword(Model model) { |
| | | return "/password.html" ; |
| | | } |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | /** |
| | | * 点击登录执行的动作 |
| | | */ |
| | | @RequestMapping(value = "/updatePassword", method = RequestMethod.POST) |
| | | public Object loginVali(String username, String password,String code) { |
| | | |
| | | |
| | | User user = userService.getByAccount(username); |
| | | if (user==null)return "用户不存在"; |
| | | password = AESUtils.decrypt(password); |
| | | String s = MD5.md5(password); |
| | | if(user.getPassword().equals(s))return "新密码和旧密码一致"; |
| | | //验证短信验证码 |
| | | if(ToolUtil.isEmpty(code))return "无效的验证码"; |
| | | String value = redisUtil.getValue(user.getPhone()); |
| | | if(ToolUtil.isEmpty(value) || !code.equals(value))return "手机验证码不正确"; |
| | | user.setPassword(s); |
| | | return "修改成功!"; |
| | | } |
| | | /** |
| | | * 跳转到主页 |
| | | */ |
| | |
| | | // || user.getPassWordUpdate().getTime() + 7776000000L <= System.currentTimeMillis() |
| | | // ? a: ""); |
| | | return "/index.html"; |
| | | } |
| | | @RequestMapping("/getSMSCode") |
| | | public ResultUtil getSMSCode(String phone){ |
| | | if(ToolUtil.isEmpty(phone)){ |
| | | return ResultUtil.paranErr("phone"); |
| | | } |
| | | try { |
| | | TAppUser appUserByPhone = appUserClient.getAppUserByPhone(phone); |
| | | if (appUserByPhone==null)return ResultUtil.error("当前手机号未注册!"); |
| | | ResultUtil smsCode = userService.getSMSCode(phone); |
| | | return smsCode; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | f++; |
| | | loginFailures.put(username, f); |
| | | } |
| | | |
| | | if (KaptchaUtil.getKaptchaOnOff()) { |
| | | String kaptcha = super.getPara("kaptcha").trim(); |
| | | String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); |
| | | if (Objects.isNull(kaptcha) || !kaptcha.equalsIgnoreCase(code)) { |
| | | model.addAttribute("tips", "验证码错误"); |
| | | return "/login.html"; |
| | | } |
| | | } |
| | | // if (f > 5 && (System.currentTimeMillis() - t) <= (30 * 60 * 1000)) { |
| | | // model.addAttribute("tips", "登录次数过多,请等30分钟再试!"); |
| | | // return "/login.html"; |
| | | // } |
| | | //验证验证码是否正确 |
| | | //Verify if the verification code is correct. |
| | | if (KaptchaUtil.getKaptchaOnOff()) { |
| | | String kaptcha = super.getPara("kaptcha").trim(); |
| | | String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); |
| | | if (Objects.isNull(kaptcha) || !kaptcha.equalsIgnoreCase(code)) { |
| | | throw new InvalidKaptchaException(); |
| | | } |
| | | } |
| | | User user = userService.getByAccount(username); |
| | | password = AESUtils.decrypt(password); |
| | | String s = MD5.md5(password); |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.util; |
| | | |
| | | |
| | | import com.aliyuncs.CommonRequest; |
| | | import com.aliyuncs.CommonResponse; |
| | | import com.aliyuncs.DefaultAcsClient; |
| | | import com.aliyuncs.IAcsClient; |
| | | import com.aliyuncs.exceptions.ClientException; |
| | | import com.aliyuncs.profile.DefaultProfile; |
| | | import com.google.gson.Gson; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 阿里云短信工具类 |
| | | */ |
| | | @Component |
| | | public class ALiSendSms { |
| | | |
| | | // 设置鉴权参数,初始化客户端 |
| | | private DefaultProfile profile = DefaultProfile.getProfile( |
| | | "cn-hangzhou",// 地域ID |
| | | "LTAI5tSWQMMn9HNU9Zatoe1T",// 您的AccessKey ID |
| | | "kSOsRakIMPbvTlgXU19pYfbwmBXBA4");// 您的AccessKey Secret |
| | | private IAcsClient client = new DefaultAcsClient(profile); |
| | | |
| | | private static void log_print(String functionName, Object result) { |
| | | Gson gson = new Gson(); |
| | | System.out.println("-------------------------------" + functionName + "-------------------------------"); |
| | | System.out.println(gson.toJson(result)); |
| | | } |
| | | |
| | | /** |
| | | * 添加短信模板 |
| | | */ |
| | | public String addSmsTemplate() throws ClientException { |
| | | CommonRequest addSmsTemplateRequest = new CommonRequest(); |
| | | addSmsTemplateRequest.setSysDomain("dysmsapi.aliyuncs.com"); |
| | | addSmsTemplateRequest.setSysAction("AddSmsTemplate"); |
| | | addSmsTemplateRequest.setSysVersion("2017-05-25"); |
| | | // 短信类型。0:验证码;1:短信通知;2:推广短信;3:国际/港澳台消息 |
| | | addSmsTemplateRequest.putQueryParameter("TemplateType", "0"); |
| | | // 模板名称,长度为1~30个字符 |
| | | addSmsTemplateRequest.putQueryParameter("TemplateName", "测试短信模板"); |
| | | // 模板内容,长度为1~500个字符 |
| | | addSmsTemplateRequest.putQueryParameter("TemplateContent", "您正在申请手机注册,验证码为:${code},5分钟内有效!"); |
| | | // 短信模板申请说明 |
| | | addSmsTemplateRequest.putQueryParameter("Remark", "测试"); |
| | | CommonResponse addSmsTemplateResponse = client.getCommonResponse(addSmsTemplateRequest); |
| | | String data = addSmsTemplateResponse.getData(); |
| | | // 消除返回文本中的反转义字符 |
| | | String sData = data.replaceAll("'\'", ""); |
| | | log_print("addSmsTemplate", sData); |
| | | Gson gson = new Gson(); |
| | | // 将字符串转换为Map类型,取TemplateCode字段值 |
| | | Map map = gson.fromJson(sData, Map.class); |
| | | Object templateCode = map.get("TemplateCode"); |
| | | return templateCode.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 发送短信 |
| | | */ |
| | | public String sendSms(String phone, String templateCode, String json) throws ClientException { |
| | | CommonRequest request = new CommonRequest(); |
| | | request.setSysDomain("dysmsapi.aliyuncs.com"); |
| | | request.setSysVersion("2017-05-25"); |
| | | request.setSysAction("SendSms"); |
| | | // 接收短信的手机号码 |
| | | request.putQueryParameter("PhoneNumbers", phone); |
| | | // 短信签名名称。请在控制台签名管理页面签名名称一列查看(必须是已添加、并通过审核的短信签名)。 |
| | | request.putQueryParameter("SignName", "玩湃"); |
| | | // 短信模板ID |
| | | request.putQueryParameter("TemplateCode", templateCode); |
| | | // 短信模板变量对应的实际值,JSON格式。 |
| | | request.putQueryParameter("TemplateParam", json); |
| | | CommonResponse commonResponse = client.getCommonResponse(request); |
| | | String data = commonResponse.getData(); |
| | | String sData = data.replaceAll("'\'", ""); |
| | | log_print("sendSms", sData); |
| | | return sData; |
| | | } |
| | | |
| | | /** |
| | | * 查询发送详情 |
| | | */ |
| | | private void querySendDetails(String bizId) throws ClientException { |
| | | CommonRequest request = new CommonRequest(); |
| | | request.setSysDomain("dysmsapi.aliyuncs.com"); |
| | | request.setSysVersion("2017-05-25"); |
| | | request.setSysAction("QuerySendDetails"); |
| | | // 接收短信的手机号码 |
| | | request.putQueryParameter("PhoneNumber", "156xxxxxxxx"); |
| | | // 短信发送日期,支持查询最近30天的记录。格式为yyyyMMdd,例如20191010。 |
| | | request.putQueryParameter("SendDate", "20191010"); |
| | | // 分页记录数量 |
| | | request.putQueryParameter("PageSize", "10"); |
| | | // 分页当前页码 |
| | | request.putQueryParameter("CurrentPage", "1"); |
| | | // 发送回执ID,即发送流水号。 |
| | | request.putQueryParameter("BizId", bizId); |
| | | CommonResponse response = client.getCommonResponse(request); |
| | | log_print("querySendDetails", response.getData()); |
| | | } |
| | | |
| | | // public static void main(String[] args) { |
| | | // ALiSendSms sendSmsDemo = new ALiSendSms(); |
| | | // try { |
| | | // // 创建短信模板 |
| | | // String templateCode = sendSmsDemo.addSmsTemplate(); |
| | | // // 使用刚创建的短信模板发送短信 |
| | | // String sData = sendSmsDemo.sendSms("156xxxxxxxx", templateCode, "{\"code\":\"8888\"}"); |
| | | // Gson gson = new Gson(); |
| | | // Map map = gson.fromJson(sData, Map.class); |
| | | // String bizId = map.get("BizId").toString(); |
| | | // // 根据短信发送流水号查询短信发送情况 |
| | | // sendSmsDemo.querySendDetails(bizId); |
| | | // } catch (ClientException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | } |
| | |
| | | |
| | | /** |
| | | * @ClassName Mgt |
| | | * @Description TODO |
| | | * @Description |
| | | * @Author jqs |
| | | * @Date 2023/6/19 10:57 |
| | | * @Version 1.0 |
| | |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.UserListVO; |
| | | import com.dsh.guns.modular.system.model.UserQuery; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | List<UserListVO> searchUsers(UserQuery userQuery); |
| | | |
| | | ResultUtil getSMSCode(String phone); |
| | | } |
| | |
| | | coursePackagePaymentConfig1.setPlayPaiCoin(playPaiCoin); |
| | | coursePackagePaymentConfig1.setCouponIds(couponIds); |
| | | int i1 = coursePackagePaymentConfigClient.addCoursePackagePaymentConfig(coursePackagePaymentConfig1); |
| | | |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | tCoursePackageDiscount.setCoursePackagePaymentConfigId(i1); |
| | | coursePackageDiscountClient.update(tCoursePackageDiscount); |
| | | } |
| | | // for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | // tCoursePackageDiscount.setCoursePackagePaymentConfigId(coursePackagePaymentConfig1.getId()); |
| | | // coursePackageDiscountClient.update(tCoursePackageDiscount); |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import java.util.Map; |
| | | |
| | | import com.aliyuncs.exceptions.ClientException; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.course.util.RedisUtil; |
| | | import com.dsh.course.util.UUIDUtil; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.dataScope.DataScope; |
| | | import com.dsh.guns.modular.system.controller.util.ALiSendSms; |
| | | import com.dsh.guns.modular.system.model.UserListVO; |
| | | import com.dsh.guns.modular.system.model.UserQuery; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.dsh.guns.modular.system.model.User; |
| | |
| | | */ |
| | | @Service |
| | | public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService { |
| | | @Autowired |
| | | private ALiSendSms aLiSendSms; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Override |
| | | public int setStatus(Integer userId, int status) { |
| | |
| | | public List<UserListVO> searchUsers(UserQuery userQuery) { |
| | | return this.baseMapper.searchUsers(userQuery); |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil getSMSCode(String phone) { |
| | | |
| | | String numberRandom = UUIDUtil.getNumberRandom(6); |
| | | String templateCode = ""; |
| | | templateCode = "SMS_160960014"; |
| | | |
| | | try { |
| | | aLiSendSms.sendSms(phone, templateCode, "{\"code\":\"" + numberRandom + "\"}"); |
| | | } catch (ClientException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | redisUtil.setStrValue(phone, numberRandom, 300); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
| | |
| | | |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | | |
| | | public class ExcelUtil { |
| | | public static HSSFWorkbook getHSSFWorkbook(String sheetName, String[] title, String[][] values, HSSFWorkbook wb) { |
| | | // 第一步,创建一个webbook,对应一个Excel文件 |
| | |
| | | |
| | | public static void setResponseHeader(HttpServletResponse response, String fileName) { |
| | | try { |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName)); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.addHeader("Pragma", "no-cache"); |
| | | response.addHeader("Cache-Control", "no-cache"); |
| | |
| | | <input class="form-control" type="text" name="kaptcha" placeholder="验证码" required=""> |
| | | </div> |
| | | <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;"> |
| | | <img src="${ctxPath}/kaptcha" id="kaptcha" width="100%" height="100%"/> |
| | | <img src="${ctxPath}/kaptcha" id="kaptcha" width="90px" height="34px"/> |
| | | </div> |
| | | |
| | | </div> |
| | | <h4 style="color: #0e9aef;text-align: right" onclick="updatePassword1()">修改密码</h4> |
| | | <button onclick="login()" class="btn full-width m-b" style="background-color: #0573EA;color: white;">登 录</button> |
| | | <button type="submit" id="submit" style="display: none;"></button> |
| | | </p> |
| | |
| | | <script src="${ctxPath}/js/common/Feng.js"></script> |
| | | <script src="${ctxPath}/crypto-js/crypto-js.js"></script> |
| | | <script> |
| | | function updatePassword1(e) { |
| | | console.log("调用") |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/update', |
| | | type: 'POST', |
| | | success: function (res) { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | $(function () { |
| | | $("#kaptcha").on('click', function () { |
| | | $("#kaptcha").attr('src', '${ctxPath}/kaptcha?' + Math.floor(Math.random() * 100)).fadeIn(); |
| | |
| | | |
| | | |
| | | function updateOne(e) { |
| | | console.log("看看选择页面") |
| | | |
| | | // 查看跳转页面 有没有跳转类型 |
| | | var page = $('#page option:selected').text(); |
| | | if (page=="门店列表" || page=="主页" || page=="充值中心" ){ |
| | | $("#t2").hide(); |
| | | $("#t3").hide(); |
| | | } |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null&&data.length>0){ |
| | |
| | | |
| | | $("#t3").hide() |
| | | } |
| | | |
| | | |
| | | |
| | | ajax.set("id",oneId); |
| | |
| | | $("#t3").show() |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | </script> |
| | |
| | | |
| | | |
| | | function updateOne(e) { |
| | | console.log("看看选择页面") |
| | | console.log($('#page option:selected').text()) |
| | | if ($('#page option:selected').text()=="门店列表"){ |
| | | $("#t3").hide(); |
| | | $("#t2").hide(); |
| | | } |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null&&data.length>0){ |
| | |
| | | var temp = $("#turnId").val(); |
| | | var res= document.getElementById("imgPX"); |
| | | res.innerHTML ="推荐像素:780x472px"; |
| | | console.log("看看temp",temp); |
| | | if (temp==""){ |
| | | $("#t3").hide(); |
| | | } |
| | | // 查看跳转页面 有没有跳转类型 |
| | | var page = $('#page option:selected').text(); |
| | | if (page=="门店列表" || page=="主页" || page=="充值中心" ){ |
| | | $("#t2").hide(); |
| | | $("#t3").hide(); |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="col-sm-10" style="width: 1500px" > |
| | | </br> |
| | | </br> |
| | | <span>会员费收入:<label id="fee1">0.0</label></span> |
| | | <span>玩湃币充值收入:<label id="fee2">0.0</label></span> |
| | | <span>课程收入:<label id="fee3">0.0</label></span> |
| | | <span>活动/赛事收入:<label id="fee4">0.0</label></span> |
| | | <span>订场收入:<label id="fee5">0.0</label></span> |
| | |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/data/selectStore", function (data) { |
| | | |
| | | $("#fee1").text(data.fee1) |
| | | $("#fee2").text(data.fee2) |
| | | $("#fee3").text(data.fee3) |
| | | $("#fee4").text(data.fee4) |
| | | $("#fee5").text(data.fee5) |
| | |
| | | <div class="ibox-title"> |
| | | <h5>闸机数据统计</h5> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 运营商 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="operator" onchange="TSite.getStores(this)"> |
| | | <option value="0">平台</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 门店 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="store"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TSite.search()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | |
| | | ,lang:"en" |
| | | }); |
| | | $(function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/gateData/totalNum", function(data){ |
| | | var totalNumber= document.getElementById("totalNumber"); |
| | | totalNumber.innerText = "场地总人次: " + data +"次"; |
| | | var oneId=$("#operator").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/operator/getStores", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择门店</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | }); |
| | | |
| | | </script> |
| | | @} |
| | |
| | | * 点击添加 |
| | | */ |
| | | TQuestion.openAdd = function () { |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加分类', |
| | |
| | | |
| | | // 去除最后一个逗号 |
| | | values = values.slice(0, -1); |
| | | |
| | | console.log("看看预约时间段") |
| | | console.log(values); |
| | | |
| | | var times = values; |
| | |
| | | |
| | | |
| | | var inputElements = document.querySelectorAll('input[name="classStartTime"]'); |
| | | let classStartTime = JSON.stringify(Array.from(inputElements).map(function(element) { |
| | | var classStartTime = JSON.stringify(Array.from(inputElements).map(function(element) { |
| | | return element.value; |
| | | })) |
| | | |
| | | console.log("看下修改后的时间"); |
| | | console.log(classStartTime) |
| | | // let classStartTime = $('#classStartTime').val(); |
| | | let classWeeks = ''; |
| | | $('input[name="classWeeks"]:checked').each(function (index, e) { |
| | |
| | | {title: '玩湃币数量', field: 'playPaiCoins', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"会员充值",0:"非会员充值"}[data] |
| | | return {1:"会员充值",2:"非会员充值"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | |
| | | ]; |
| | | }; |
| | | |
| | | |
| | | TSite.getStores = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/operator/getStores", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择门店</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | }; |
| | | /** |
| | | * 查询跨城站点管理列表 |
| | | */ |
| | | TSite.search = function () { |
| | | if ($("#operator").val()==""){ |
| | | Feng.error("请选择运营商和门店"); |
| | | return; |
| | | } |
| | | if ($("#store").val()==""){ |
| | | Feng.error("请选择门店"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/gateData/totalNum", function(data){ |
| | | var totalNumber= document.getElementById("totalNumber"); |
| | | totalNumber.innerText = "场地总人次: " + data +"次"; |
| | | }); |
| | | ajax.set("storeId",) |
| | | ajax.start(); |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['insertUser'] = $("#insertUser").val(); |
| | | queryData['city'] = $("#city").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['storeId'] = $("#store").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | |
| | | var table = new BSTable(TSite.id, "/gateData/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TSite.table = table.init(); |
| | | TSite.search(); |
| | | Feng.info("请选择门店") |
| | | }); |
| | |
| | | TCompetition.ouTCompetition = function () { |
| | | var state=$("#state").val() |
| | | var id=$("#id").val() |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/export", function(data){ |
| | | Feng.success("导出成功"); |
| | | }); |
| | | ajax.set("state",state); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | window.location.href=Feng.ctxPath + "/tCompetition/export?id="+id |
| | | +"&state="+state |
| | | ; |
| | | }; |
| | |
| | | console.log(TPayInfo.seItem.id) |
| | | var ajax = new $ax(Feng.ctxPath + "/ticket/writeOff", function (data) { |
| | | TPayInfo.search(); |
| | | Feng.error("核销成功!") |
| | | }, function (data) { |
| | | }); |
| | | ajax.set("id", TPayInfo.seItem.id); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //预约场地后,时间超过endTime,状态变为已过期 |
| | | @Scheduled(fixedRate = 60000) |
| | | public void taskMinute1(){ |