Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0
| | |
| | | if(null != merchandise.getIntegral()){ |
| | | pointsMerchandise.setIntegral(merchandise.getIntegral() * goodsNums); |
| | | } |
| | | if(exchangeType.getExchangeType() == 2){ |
| | | if(exchangeType.getExchangeType() == 2 || exchangeType.getExchangeType() == 3){ |
| | | pointsMerchandise.setCash(merchandise.getCash()); |
| | | pointsMerchandise.setCashPayType(exchangeType.getPayType()); |
| | | } |
| | |
| | | @PostMapping("/base/coupon/listRecord") |
| | | @ResponseBody |
| | | public List<Map<String, Object>> listRecord(@RequestBody CouponRecordQuery ofSearch) { |
| | | Page<Object> objectPage = new Page<>(ofSearch.getOffset(), ofSearch.getLimit()); |
| | | return couponService.listRecord(objectPage, ofSearch.getId(), ofSearch.getIds(), ofSearch.getType()); |
| | | return couponService.listRecord(ofSearch.getId(), ofSearch.getIds(), ofSearch.getType()); |
| | | } |
| | | |
| | | |
| | |
| | | @Param("page") Page<Map<String, Object>> page); |
| | | |
| | | |
| | | List<Map<String, Object>> listRecord(@Param("objectPage") Page<Object> objectPage, @Param("id") Integer id, @Param("ids") List<Integer> ids, @Param("type") Integer type); |
| | | List<Map<String, Object>> listRecord(@Param("id") Integer id, @Param("ids") List<Integer> ids, @Param("type") Integer type); |
| | | |
| | | |
| | | void updateType(@Param("id") Long id); |
| | |
| | | |
| | | List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch); |
| | | |
| | | List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type); |
| | | List<Map<String, Object>> listRecord(Integer id, List<Integer> ids, Integer type); |
| | | |
| | | void updateType(Long id); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type) { |
| | | return this.baseMapper.listRecord(objectPage, id, ids, type); |
| | | public List<Map<String, Object>> listRecord(Integer id, List<Integer> ids, Integer type) { |
| | | return this.baseMapper.listRecord(id, ids, type); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public List<String> queryPackageById(@RequestBody Integer coursePackageId) { |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | TCoursePackage byId = coursePackageService.getById(coursePackageId); |
| | | if(null == byId){ |
| | | return null; |
| | | } |
| | | Integer coursePackageTypeId = byId.getCoursePackageTypeId(); |
| | | strings.add(coursePackageTypeService.getById(coursePackageTypeId).getName()); |
| | | strings.add(byId.getName()); |
| | | |
| | | return strings; |
| | | |
| | | } |
| | |
| | | // 找出门店的所有课程 排出体验 |
| | | List<TCoursePackage> list = tcpService.list(new LambdaQueryWrapper<TCoursePackage>() |
| | | .eq(TCoursePackage::getStoreId, courseDetailReq.getStoreId()).ne(TCoursePackage::getType, 3) |
| | | .eq(TCoursePackage::getState, 1).like(TCoursePackage::getClassWeeks, week)); |
| | | .eq(TCoursePackage::getState, 1).like(TCoursePackage::getClassWeeks, week) |
| | | .eq(TCoursePackage::getAuditStatus, 2)); |
| | | List<Integer> collect = list.stream().map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | if (collect.size() == 0) { |
| | | collect.add(-1); |
| | |
| | | public ResultUtil paymentCourseCallback(String code, String trade_no, String attach) throws Exception { |
| | | CoursePackageOrder coursePackageOrder1 = coursePackageOrderService.getOne(new QueryWrapper<CoursePackageOrder>() |
| | | .eq("code", code).eq("state", 1)); |
| | | if (coursePackageOrder1.getPayStatus() == 2) { |
| | | if (null == coursePackageOrder1 || coursePackageOrder1.getPayStatus() == 2) { |
| | | return ResultUtil.success(); |
| | | } |
| | | coursePackageOrder1.setPayStatus(2); |
| | |
| | | @RequestMapping(value = "/listRecord") |
| | | @ResponseBody |
| | | public Object listRecord(Integer id,String name, Integer type, String phone) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<TAppUser> tAppUsers = appUserClient.queryByNamePhone(new QueryByNamePhone(name, phone)); |
| | | if(tAppUsers.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | CouponRecordQuery ofSearch = new CouponRecordQuery(); |
| | | ofSearch.setId(id); |
| | | ofSearch.setLimit(page.getSize()); |
| | | ofSearch.setOffset(page.getCurrent()); |
| | | ofSearch.setIds(tAppUsers.stream().map(TAppUser::getId).collect(Collectors.toList())); |
| | | ofSearch.setType(type); |
| | | List<Map<String, Object>> maps = client.listRecord(ofSearch); |
| | |
| | | model.addAttribute("shopName",byId.getName()); |
| | | Integer coursePackageId = pointMercharsVo.getCoursePackageId(); |
| | | List<String> name = courseClient.queryPackageById(coursePackageId); |
| | | if(null != name){ |
| | | model.addAttribute("typeName",name.get(0)); |
| | | model.addAttribute("pageName",name.get(1)); |
| | | }else{ |
| | | model.addAttribute("typeName", ""); |
| | | model.addAttribute("pageName", ""); |
| | | } |
| | | Integer coursePackageId1 = pointMercharsVo.getCoursePackageId(); |
| | | List<CoursePackagePaymentConfig> hoursByPackageId = courseClient.getHoursByPackageId(coursePackageId1); |
| | | model.addAttribute("typeName",name.get(0)); |
| | | model.addAttribute("pageName",name.get(1)); |
| | | |
| | | model.addAttribute("classHours",hoursByPackageId); |
| | | String productImages = pointMercharsVo.getProductImages(); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | |
| | | courseByCourseId.setIntegral(benefitsVideos.getIntegral()); |
| | | courseByCourseId.setBenefitsVideosId(benefitsVideos.getId()); |
| | | courseByCourseId.setState(benefitsVideos.getState()); |
| | | courseByCourseId.setInsertTime(benefitsVideos.getInsertTime()); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | import com.dsh.course.util.RedisUtil; |
| | | import com.dsh.guns.config.properties.GunsProperties; |
| | | import com.dsh.guns.core.util.FileUtil; |
| | | import com.google.code.kaptcha.Constants; |
| | |
| | | @Autowired |
| | | private Producer producer; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | /** |
| | | * 生成验证码 |
| | | */ |
| | |
| | | |
| | | // create the text for the image |
| | | String capText = producer.createText(); |
| | | |
| | | String cookie = request.getHeader("cookie"); |
| | | System.err.println("cookie:" + cookie); |
| | | redisUtil.setStrValue(cookie, capText, 300); |
| | | // store the text in the session |
| | | session.setAttribute(Constants.KAPTCHA_SESSION_KEY, capText); |
| | | |
| | | // create the image with the text |
| | | BufferedImage bi = producer.createImage(capText); |
| | | ServletOutputStream out = null; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.jws.soap.SOAPBinding; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.awt.image.BufferedImage; |
| | | import java.util.*; |
| | | |
| | |
| | | if (password.equals("38B8/EBdihRzcFNtJYSH+g==")){ |
| | | return "/password.html"; |
| | | } |
| | | |
| | | //验证验证码是否正确 |
| | | String kaptcha = super.getPara("kaptcha").trim(); |
| | | String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); |
| | | if (ToolUtil.isEmpty(kaptcha) || !kaptcha.equalsIgnoreCase(code)) { |
| | | throw new InvalidKaptchaException(); |
| | | } |
| | | |
| | | User user = userService.getByAccount(username); |
| | | password = AESUtils.decrypt(password); |
| | | String s = MD5.md5(password); |
| | |
| | | model.addAttribute("tips", "该账号不存在"); |
| | | return "/login.html"; |
| | | } |
| | | |
| | | |
| | | GetTokenRequest tokenRequest = new GetTokenRequest(); |
| | | tokenRequest.setUsername(username); |
| | |
| | | } |
| | | assertAuth(userId); |
| | | User user = this.userService.getById(userId); |
| | | Role role = roleService.getById(user.getId()); |
| | | Dept dept = deptService.getById(user.getDeptid()); |
| | | model.addAttribute(user); |
| | | model.addAttribute("roleName", ConstantFactory.me().getRoleName(user.getRoleid())); |
| | | model.addAttribute("deptName", ConstantFactory.me().getDeptName(user.getDeptid())); |
| | | model.addAttribute("roleName", role.getName()); |
| | | model.addAttribute("deptName", dept.getFullname()); |
| | | LogObjectHolder.me().set(user); |
| | | LambdaQueryWrapper<Role> roleLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(UserExt.getUser().getObjectType()!=1){ |
| | |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | User user = this.userService.getById(userId); |
| | | Role role = roleService.getById(user.getId()); |
| | | Dept dept = deptService.getById(user.getDeptid()); |
| | | model.addAttribute(user); |
| | | model.addAttribute("roleName", ConstantFactory.me().getRoleName(user.getRoleid())); |
| | | model.addAttribute("deptName", user.getDeptid()==0?"顶级":ConstantFactory.me().getDeptName(user.getDeptid())); |
| | | model.addAttribute("roleName", role.getName()); |
| | | model.addAttribute("deptName", user.getDeptid()==0?"顶级":dept.getFullname()); |
| | | LogObjectHolder.me().set(user); |
| | | return PREFIX + "user_view.html"; |
| | | } |
| | |
| | | </div> |
| | | |
| | | <button onclick="update()" class="btn full-width m-b" style="background-color: #0573EA;color: white;">保存</button> |
| | | <button class="btn full-width m-b" style="background-color: #0573EA;color: white;">关闭</button> |
| | | <button class="btn full-width m-b" style="background-color: #0573EA;color: white;" onclick="getBack()">关闭</button> |
| | | <button type="submit" id="submit" style="display: none;"></button> |
| | | </p> |
| | | </form> |
| | |
| | | function sendSMSCode() { |
| | | var phone = $("#username").val() |
| | | var ajax = new $ax(Feng.ctxPath + "/getSMSCode", function(data){ |
| | | if(data!=null){ |
| | | |
| | | if(data!=null && data.code != 200){ |
| | | alert(data.msg); |
| | | } |
| | | }); |
| | | ajax.set("phone",phone); |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | function getBack() { |
| | | history.go(-1); |
| | | } |
| | | |
| | | window.addEventListener( |
| | | "mousewheel", |
| | | function(event) { |
| | |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="redemptionMethod" value="1" onclick="updateMethod(3)" checked> 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(4)"> 现金+积分 |
| | | <input type="radio" name="redemptionMethod" value="3" onclick="updateMethod(5)"> 现金 |
| | | <!--<input type="radio" name="redemptionMethod" value="3" onclick="updateMethod(5)"> 现金--> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <option value="2">女</option> |
| | | </#select> |
| | | |
| | | <#input id="roleid" name="角色" underline="true" value="${roleName}" disabled="disabled"/> |
| | | <input type="hidden" id="roleid" value="${user.roleid}"> |
| | | <#input id="roleName" name="角色" underline="true" value="${roleName}" disabled="disabled"/> |
| | | |
| | | <#input id="email" name="邮箱" type="email" value="${user.email}"/> |
| | | </div> |