| | |
| | | @PostMapping("/student/queryDefaultStudent") |
| | | public TStudent queryDefaultStudent(@RequestBody Integer appUserId){ |
| | | try { |
| | | TStudent one = studentService.getOne(new QueryWrapper<TStudent>().eq("appUserId", appUserId).eq("isDefault", 1).eq("state", 1)); |
| | | TStudent one = studentService.getOne(new QueryWrapper<TStudent>().eq("appUserId", appUserId).eq("isDefault", 1).eq("state", 1).last("limit 1")); |
| | | return one; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | detailsVo.setUserImage(tAppUser.getHeadImg()); |
| | | detailsVo.setUserName(tAppUser.getName()); |
| | | detailsVo.setUserPhone(tAppUser.getPhone()); |
| | | if(tAppUser.getGender()!=null){ |
| | | |
| | | detailsVo.setSex(tAppUser.getGender() == 1 ? "男" : "女"); |
| | | } |
| | | detailsVo.setBirthday(format1.format(tAppUser.getBirthday())); |
| | | detailsVo.setAddress(tAppUser.getProvince()+tAppUser.getCity()); |
| | | if(tAppUser.getVipEndTime()!=null){ |
| | | |
| | | detailsVo.setMemberLifespan(format1.format(tAppUser.getVipEndTime())); |
| | | } |
| | | } |
| | | return ResultUtil.success(detailsVo); |
| | | }catch (Exception e){ |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "记录id", name = "detailsId", required = true, dataType = "string"), |
| | | }) |
| | | public ResultUtil<PointDetailsVo> redemptionDetails(Integer detailsId){ |
| | | public ResultUtil<PointDetailsVo> redemptionDetails(Long detailsId){ |
| | | try { |
| | | return ResultUtil.success(uicService.queryRedemptionDetails(detailsId)); |
| | | }catch (Exception e){ |
| | |
| | | ExchangeDetailsVo getIntegralExchangeDetails(@RequestBody Integer appUserId); |
| | | |
| | | @PostMapping("/base/pointMerchars/getSpecificsOfGoods") |
| | | public PointDetailsVo getSpecificsOfGoods(@RequestBody Integer speMercharsId); |
| | | public PointDetailsVo getSpecificsOfGoods(@RequestBody Long speMercharsId); |
| | | |
| | | @PostMapping("/base/pointMerchars/selectPointsMerchandiseById") |
| | | public PointsMerchandise selectPointsMerchandiseById(@RequestBody Integer speMercharsId); |
| | |
| | | public class PointDetailsVo { |
| | | |
| | | @ApiModelProperty(value = "记录id") |
| | | private Integer detailsId; |
| | | private Long detailsId; |
| | | |
| | | @ApiModelProperty(value = "图片集") |
| | | private List<String> pics; |
| | |
| | | List<ExchangeDetailsResponse> queryExchangeGoodsdetails(Integer userIdFormRedis, Integer useType, Integer goodType); |
| | | |
| | | |
| | | PointDetailsVo queryRedemptionDetails(Integer detailsId); |
| | | PointDetailsVo queryRedemptionDetails(Long detailsId); |
| | | |
| | | Page<UserIntegral> listAll(Page<UserIntegral> userIntegralPage, IntegralListQuery integralListQuery); |
| | | |
| | |
| | | if(tAppUser.getState() == 2){ |
| | | return ResultUtil.error("您的账号已被冻结", ""); |
| | | } |
| | | password = Md5Util.MD5Encode(password, null); |
| | | // password = Md5Util.MD5Encode(password, null); |
| | | if(!tAppUser.getPassword().equals(password)){ |
| | | return ResultUtil.error("账号密码错误", ""); |
| | | } |
| | |
| | | commodity.setShopIds(mcsClient.queryPointMerStoreIds(vicinityGood.getId())); |
| | | break; |
| | | default: |
| | | |
| | | break; |
| | | } |
| | | goods.add(commodity); |
| | |
| | | } |
| | | commodity.setBelongsType(allCoupon.getUserPopulation()); |
| | | commodity.setGoodsType(4); |
| | | commodity.setShopIds(ucponClient.getCouponStoreIds(allCoupon.getId())); |
| | | commodity.setNums(ucponClient.getRedeemedQuantity(allCoupon.getId())); |
| | | goods.add(commodity); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | |
| | | student.setHeight(stu.getHeight()); |
| | | student.setWeight(stu.getWeight()); |
| | | BigDecimal bigDecimal = BigDecimal.valueOf(stu.getWeight()); |
| | | BigDecimal multiply = bigDecimal.subtract(BigDecimal.valueOf(stu.getHeight())).multiply(bigDecimal.subtract(BigDecimal.valueOf(stu.getHeight()))); |
| | | multiply.setScale(2); |
| | | student.setBmi(multiply.doubleValue()); |
| | | double v = stu.getHeight() / 100; |
| | | double v1 = v * v; |
| | | BigDecimal bigDecimal1 = new BigDecimal(v1).setScale(2, RoundingMode.HALF_UP); |
| | | double v2 = bigDecimal.doubleValue() / bigDecimal1.doubleValue(); |
| | | BigDecimal bigDecimal2 = new BigDecimal(v2).setScale(2, RoundingMode.HALF_UP); |
| | | student.setBmi(bigDecimal2.doubleValue()); |
| | | student.setInsertTime(new Date()); |
| | | student.setState(1); |
| | | |
| | | List<TStudent> tStudents = this.baseMapper.selectList(new LambdaQueryWrapper<TStudent>().eq(TStudent::getAppUserId, appUserId)); |
| | | if(tStudents.size()>0){ |
| | | student.setIsDefault(2); |
| | | }else { |
| | | student.setIsDefault(1); |
| | | } |
| | | this.baseMapper.insert(student); |
| | | |
| | | //同步信息到参赛人员信息中 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PointDetailsVo queryRedemptionDetails(Integer detailsId) { |
| | | return mcClient.getSpecificsOfGoods(detailsId); |
| | | public PointDetailsVo queryRedemptionDetails(Long detailsId) { |
| | | PointDetailsVo specificsOfGoods = mcClient.getSpecificsOfGoods(detailsId); |
| | | return specificsOfGoods; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getSpecificsOfGoods") |
| | | public PointDetailsVo getSpecificsOfGoods(@RequestBody Integer speMercharsId){ |
| | | public PointDetailsVo getSpecificsOfGoods(@RequestBody Long speMercharsId){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | PointDetailsVo detailsVo = new PointDetailsVo(); |
| | | UserPointsMerchandise byId = upmseService.getById(speMercharsId); |
| | |
| | | switch (pmdsServiceById.getType()){ |
| | | case 1: |
| | | case 3: |
| | | List<String> list2 = Arrays.asList(StrUtils.splitStr2StrArr(pmdsServiceById.getProductImages(), ",")); |
| | | List<String> list10 = Arrays.asList(StrUtils.splitStr2StrArr(pmdsServiceById.getProductImages(), ",")); |
| | | ArrayList<String> list2 = new ArrayList<>(list10); |
| | | list2.add(pmdsServiceById.getCover()); |
| | | detailsVo.setPics(list2); |
| | | Collections.sort(detailsVo.getPics(), (s1, s2) -> { |
| | |
| | | break; |
| | | case 2: |
| | | CoursePackage coursePackage = cpClient.queryCoursePackageById(pmdsServiceById.getCoursePackageId()); |
| | | List<String> list1 = Arrays.asList(StrUtils.splitStr2StrArr(coursePackage.getDetailDrawing(), ",")); |
| | | List<String> list11 = Arrays.asList(StrUtils.splitStr2StrArr(coursePackage.getDetailDrawing(), ",")); |
| | | ArrayList<String> list1 = new ArrayList<>(list11); |
| | | list1.add(coursePackage.getCoverDrawing()); |
| | | detailsVo.setPics(list1); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig = cpClient.queryConfigCoursePackData(pmdsServiceById.getCoursePackageConfigId()); |
| | |
| | | break; |
| | | case 4: |
| | | Coupon coupon = iCouponService.getById(pmdsServiceById.getId()); |
| | | List<String> list3 = Arrays.asList(StrUtils.splitStr2StrArr(coupon.getProductImages(), ",")); |
| | | List<String> list13 = Arrays.asList(StrUtils.splitStr2StrArr(coupon.getProductImages(), ",")); |
| | | ArrayList<String> list3 = new ArrayList<>(list13); |
| | | list3.add(coupon.getCover()); |
| | | detailsVo.setPics(list3); |
| | | Collections.sort(detailsVo.getPics(), (s1, s2) -> { |
| | |
| | | if (list.size() > 0){ |
| | | storeIds = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); |
| | | } |
| | | if(storeIds.size()==0){ |
| | | storeIds.add(-1); |
| | | } |
| | | return storeIds; |
| | | } |
| | | |
| | |
| | | if (list.size() > 0 ){ |
| | | storeIds = list.stream().map(CouponStore::getStoreId).collect(Collectors.toList()); |
| | | } |
| | | if(storeIds.size()==0){ |
| | | storeIds.add(-1); |
| | | } |
| | | return storeIds; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | package com.dsh.activity.feignclient.account.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | |
| | | package com.dsh.competition.feignclient.account.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | |
| | | // 2.0 |
| | | ArrayList<Map<String,Object>> objects = new ArrayList<>(); |
| | | if(null != competition.getStoreId()){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | |
| | | String storeId = competition.getStoreId(); |
| | | for (String s : storeId.split(",")) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Store store = storeClient.queryStoreById(Integer.valueOf(s)); |
| | | map.put("name",store.getName()); |
| | | map.put("address",store.getAddress()); |
| | |
| | | double wgs84 = new BigDecimal(distance.get("WGS84")).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | map.put("distance",wgs84); |
| | | } |
| | | } |
| | | objects.add(map); |
| | | } |
| | | |
| | | } |
| | | competitionInfo.setStoreInfos(objects); |
| | | |
| | | |
| | |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePayment/editCoursePackagePayment") |
| | | public void editCoursePackagePayment(TCoursePackagePayment coursePackagePayment){ |
| | | coursePackagePayment.setCoursePackageId(null); |
| | | coursePackagePayment.setAppUserId(null); |
| | | packagePaymentService.updateById(coursePackagePayment); |
| | | } |
| | | |
| | |
| | | if (ToolUtil.isEmpty(packagePayment) || packagePayment.size()==0){ |
| | | return ResultUtil.error("该用户未购买该课包"); |
| | | } |
| | | List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingMapper.selectList(new LambdaQueryWrapper<CoursePackageScheduling>() |
| | | .eq(CoursePackageScheduling::getCoursePackageId, Integer.valueOf(courseID)) |
| | | .like(CoursePackageScheduling::getClassDate, time) |
| | | ); |
| | | |
| | | List<CoursePackageStudent> coursePackageStudent = cspsService.list(new LambdaQueryWrapper<CoursePackageStudent>() |
| | | .in(CoursePackageStudent::getCoursePackagePaymentId,packagePayment.stream().map(TCoursePackagePayment::getId).collect(Collectors.toList())) |
| | | .in(CoursePackageStudent::getCoursePackageSchedulingId,coursePackageSchedulings.stream().map(CoursePackageScheduling::getId).collect(Collectors.toList())) |
| | | .eq(CoursePackageStudent::getCoursePackageId,courseID) |
| | | .eq(CoursePackageStudent::getStudentId,stuId) |
| | | .eq(CoursePackageStudent::getAppUserId,appUserId) |
| | |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | |
| | | String classEndTime = tCoursePackage.getClassEndTime(); |
| | | String[] split1 = classEndTime.split(","); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | if(ToolUtil.isNotEmpty(classStartTime)){ |
| | | for (int i1 = 0; i1 < split.length; i1++) { |
| | | String s = split[i1] + "-" + split1[i1]; |
| | | String s = split[i1].substring(0,5) + "-" + split1[i1].substring(0,5); |
| | | strings.add(s); |
| | | } |
| | | } |
| | | |
| | | detailsListVo.setTime(strings); |
| | | List<CoursePackagePaymentConfig> list2 = icppcService.list(new LambdaQueryWrapper<CoursePackagePaymentConfig>().eq(CoursePackagePaymentConfig::getCoursePackageId, tCoursePackage.getId()).orderByAsc(CoursePackagePaymentConfig::getCashPayment)); |
| | | if (list2.size() > 0) { |
| | |
| | | .eq(CoursePackageScheduling::getCoursePackageId, tCoursePackage.getId()) |
| | | .like(CoursePackageScheduling::getClassDate, courseDetailReq.getTime()) |
| | | ); |
| | | if(list3.size()==0){ |
| | | break; |
| | | } |
| | | List<Long> collect2 = list3.stream().map(CoursePackageScheduling::getId).collect(Collectors.toList()); |
| | | if(collect2.size()==0){ |
| | | collect2.add(-1l); |
| | |
| | | if(signInOrNot==2){ |
| | | detailsListVo.setType(3); |
| | | } |
| | | detailsListVo.setIsType(list4.get(0).getType()); |
| | | } |
| | | |
| | | } else { |
| | |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | |
| | | @Override |
| | |
| | | package com.dsh.course.feignclient.account.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | |
| | | private Integer num; |
| | | |
| | | private Double money; |
| | | |
| | | private Integer isType=1; |
| | | } |
| | |
| | | student1.setSignInOrNot(0); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | student1.setType(1); |
| | | cpsMapper.insert(student1); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | ArrayList<String> classTime = new ArrayList<>(); |
| | | String[] split = classStartTime.split(","); |
| | | String[] split3 = classEndTime.split(","); |
| | | if(ToolUtil.isNotEmpty(classStartTime)) { |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i] + "-" + split3[i]; |
| | | String s = split[i].substring(0,5) + "-" + split3[i].substring(0,5); |
| | | classTime.add(s); |
| | | } |
| | | } |
| | | coursePackageListVo.setClassStartTime(classTime); |
| | | coursePackageListVo.setType(coursePackage.getType()); |
| | |
| | | } |
| | | return listVos; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | TCoursePackage coursePackage = this.getById(id); |
| | | CoursePackageInfo coursePackageInfo = new CoursePackageInfo(); |
| | | coursePackageInfo.setId(id); |
| | | coursePackageInfo.setTime(coursePackage.getStartTime()+"-"+coursePackage.getEndTime()); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd"); |
| | | if(coursePackage.getType()==2){ |
| | | |
| | | coursePackageInfo.setTime(format.format(coursePackage.getStartTime())+"-"+format.format(coursePackage.getEndTime())); |
| | | } |
| | | coursePackageInfo.setCoverDrawing(coursePackage.getCoverDrawing()); |
| | | coursePackageInfo.setName(coursePackage.getName()); |
| | | Store store = storeClient.queryStoreById(coursePackage.getStoreId()); |
| | |
| | | ArrayList<String> classTime = new ArrayList<>(); |
| | | String[] split4 = classStartTime.split(","); |
| | | String[] split3 = classEndTime.split(","); |
| | | if(ToolUtil.isNotEmpty(classStartTime)){ |
| | | for (int i = 0; i < split4.length; i++) { |
| | | String s = split4[i] + "-" + split3[i]; |
| | | String s = split4[i].substring(0,5) + "-" + split3[i].substring(0,5); |
| | | classTime.add(s); |
| | | } |
| | | } |
| | | |
| | | coursePackageInfo.setTimes(classTime); |
| | | coursePackageInfo.setType(coursePackage.getType()); |
| | | |
| | |
| | | String[] students = paymentCourseVo.getStudentIds().split(";"); |
| | | for (CoursePackagePaymentConfigVo coursePackagePaymentConfigVo : list) { |
| | | if(paymentCourseVo.getCoursePackagePaymentConfigId().compareTo(coursePackagePaymentConfigVo.getId()) == 0){ |
| | | CoursePackagePaymentConfig byId = coursePackagePaymentConfigService.getById(paymentCourseVo.getCoursePackagePaymentConfigId()); |
| | | Double cashPayment = byId.getCashPayment(); |
| | | Integer payType = coursePackagePaymentConfigVo.getPayType(); |
| | | Integer playPaiCoin1 = byId.getPlayPaiCoin(); |
| | | if(cashPayment!=null || cashPayment>0){ |
| | | payType=1; |
| | | } |
| | | if(playPaiCoin1!=null || playPaiCoin1>0){ |
| | | payType=2; |
| | | } |
| | | |
| | | if(cashPayment!=null && cashPayment>0 && playPaiCoin1 !=null && playPaiCoin1>0){ |
| | | }else { |
| | | if(payType == 1 && paymentCourseVo.getPayType() == 3){//现金支付 |
| | | return ResultUtil.error("支付方式错误,请刷新后重试"); |
| | | } |
| | | if(payType == 2 && paymentCourseVo.getPayType() != 3){//玩湃币支付 |
| | | return ResultUtil.error("支付方式错误,请刷新后重试"); |
| | | } |
| | | } |
| | | |
| | | Double paymentPrice = coursePackagePaymentConfigVo.getPaymentPrice();//支付价 |
| | | paymentPrice = new BigDecimal(students.length).multiply(new BigDecimal(paymentPrice)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | Double playPaiCoin = coursePackagePaymentConfigVo.getPlayPaiCoin().doubleValue();//支付币 |
| | |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | return PREFIX + "TShop_edit_three.html"; |
| | | } |
| | | @RequestMapping("/tShop_add_two1") |
| | | public String tCompetitionAddTwo1(Integer id,Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("id",id); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | return PREFIX + "TShop_add_two.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | // TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | TOperatorCity one = operatorCityService.getOne(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getOperatorId, byId.getOperatorId()).eq(TOperatorCity::getType, 1)); |
| | | List<TOperatorCity> ones = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getOperatorId, byId.getOperatorId()).eq(TOperatorCity::getType, 1)); |
| | | |
| | | if(ones.size()>0){ |
| | | model.addAttribute("list",ones); |
| | | List<TOperatorCity> list3 = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getPid, one.getId()).eq(TOperatorCity::getType, 2)); |
| | | if(list3.size()>0){ |
| | | model.addAttribute("list1",list3); |
| | | System.out.println("===list3======="+list3); |
| | | |
| | | }else { |
| | | List<TCity> list2 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list2); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one1.getId())); |
| | | model.addAttribute("list1",list1); |
| | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(TStore tStore,String time,String userName,String userPhone,String ids,Integer type,Integer yyId,String lat,String lon) { |
| | | public Object list(TStore tStore,String time,String userName,String userPhone,String ids,Integer type,Integer yyId,String lat,String lon,String pCode1,String cCode1) { |
| | | try { |
| | | if(yyId==null){ |
| | | yyId=0; |
| | | } |
| | | if(yyId!=0) { |
| | | List<TOperatorCity> list1 = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getOperatorId, yyId)); |
| | | if(list1.size()>0){ |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TOperatorCity byId = operatorCityService.getById(tStore.getProvinceCode()); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getCode())); |
| | |
| | | tStore.setCity(one1.getName()); |
| | | tStore.setCityCode(one1.getCode()); |
| | | } |
| | | } |
| | | }else { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getId, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | tStore.setProvinceCode(one.getCode()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getId, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | tStore.setCityCode(one1.getCode()); |
| | | } |
| | | |
| | | }else { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, pCode1)); |
| | | tStore.setProvince(one.getName()); |
| | | tStore.setProvinceCode(one.getCode()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, cCode1)); |
| | | tStore.setCity(one1.getName()); |
| | | tStore.setCityCode(one1.getCode()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | |
| | | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TStore tStore,String time,String userName,String userPhone,String ids,Integer type,Integer yyId,String lat,String lon) { |
| | | public Object update(TStore tStore,String time,String userName,String userPhone,String ids,Integer type,Integer yyId,String lat,String lon,String pCode1,String cCode1) { |
| | | try { |
| | | TStore byId = storeService.getById(tStore.getId()); |
| | | TStore byIdc = storeService.getById(tStore.getId()); |
| | | |
| | | if(yyId==null){ |
| | | yyId=0; |
| | | } |
| | | if(tStore.getType()==1){ |
| | | yyId=0; |
| | | } |
| | | if(yyId!=0) { |
| | | List<TOperatorCity> list1 = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getOperatorId, yyId)); |
| | | if(list1.size()>0){ |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TOperatorCity tOperatorCity = operatorCityService.getById(tStore.getProvinceCode()); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tOperatorCity.getCode())); |
| | | TOperatorCity byId = operatorCityService.getById(tStore.getProvinceCode()); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getCode())); |
| | | tStore.setProvince(one.getName()); |
| | | tStore.setProvinceCode(one.getCode()); |
| | | List<TOperatorCity> list = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getPid, tOperatorCity.getId()).eq(TOperatorCity::getType, 2)); |
| | | List<TOperatorCity> list = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getPid, byId.getId()).eq(TOperatorCity::getType, 2)); |
| | | if(list.size()>0){ |
| | | TOperatorCity byId1 = operatorCityService.getById(tStore.getCityCode()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId1.getCode())); |
| | |
| | | tStore.setCityCode(one1.getCode()); |
| | | } |
| | | } |
| | | }else { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getId, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | tStore.setProvinceCode(one.getCode()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getId, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | tStore.setCityCode(one1.getCode()); |
| | | } |
| | | |
| | | }else { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getId, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | tStore.setProvinceCode(one.getCode()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getId, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | tStore.setCityCode(one1.getCode()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | tStore.setIds(ids); |
| | | tStore.setType(type); |
| | | tStore.setOperatorId(yyId); |
| | | if(ToolUtil.isEmpty(tStore.getCoverDrawing())){ |
| | | tStore.setCoverDrawing(byId.getCoverDrawing()); |
| | | tStore.setCoverDrawing(byIdc.getCoverDrawing()); |
| | | } |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | User user = userMapper.selectById(byIdc.getStoreStaffId()); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone).ne(User::getId,tStore.getStoreStaffId())); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | |
| | | public Object onChange1(Integer oneId) { |
| | | try { |
| | | List<TOperatorCity> list = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getOperatorId, oneId).eq(TOperatorCity::getType, 1)); |
| | | if(list.size()==0){ |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | return list1; |
| | | }else { |
| | | |
| | | return list; |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | |
| | | try { |
| | | List<TOperatorCity> list1 = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getOperatorId, oneId).eq(TOperatorCity::getType, 1)); |
| | | List<TOperatorCity> list = operatorCityService.list(new LambdaQueryWrapper<TOperatorCity>().eq(TOperatorCity::getPid, oneId).eq(TOperatorCity::getType, 2)); |
| | | |
| | | // 若是全国 为空 去找这个省下面的市 |
| | | if(list1.size()==0){ |
| | | TCity byId = cityService.getById(oneId); |
| | | List<TCity> list2 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, byId.getId())); |
| | | return list2; |
| | | } |
| | | if(list.size()==0){ |
| | | TOperatorCity tOperatorCity = list1.get(0); |
| | | Integer code = tOperatorCity.getCode(); |
| | |
| | | } |
| | | } |
| | | User user = userService.getByAccount(username); |
| | | // todo 记得该回去!!!!!!!!!! |
| | | // password = AESUtils.decrypt(password); |
| | | // String s = MD5.md5(password); |
| | | // if(!user.getPassword().equals(s)){ |
| | | // model.addAttribute("tips", "账号密码错误"); |
| | | // return "/login.html"; |
| | | // } |
| | | password = AESUtils.decrypt(password); |
| | | String s = MD5.md5(password); |
| | | if(!user.getPassword().equals(s)){ |
| | | model.addAttribute("tips", "账号密码错误"); |
| | | return "/login.html"; |
| | | } |
| | | |
| | | |
| | | GetTokenRequest tokenRequest = new GetTokenRequest(); |
| | |
| | | </delete> |
| | | |
| | | <select id="listAll" resultType="com.dsh.guns.modular.system.model.TStoreListVo"> |
| | | select t1.*,t2.name userName,t2.phone userPhone from t_store t1 left join sys_user t2 on t1.storeStaffId = t2.id |
| | | |
| | | select t1.*,t2.name userName,t2.phone userPhone,t3.name yysName from t_store t1 left join sys_user t2 on t1.storeStaffId = t2.id left join t_operator t3 on t1.operatorId = t3.id |
| | | where 1=1 |
| | | <if test="provinceCode !=null and provinceCode !=''"> |
| | | and t1.provinceCode = #{provinceCode} |
| | |
| | | </div> |
| | | </div> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="yys" hidden > |
| | | <div id="yys" hidden> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">所属运营商:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="account" name="account" onchange="TCarInfoDlg.oneChange1(this)"> |
| | |
| | | <select class="form-control" id="cCode" name="cCode" > |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div id="yys1" > |
| | | <div class="form-group" id="provinceCode1"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode1" name="pCode1" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(i in list){ |
| | | <option value="${i.code}">${i.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode1"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode1" name="cCode1" > |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | function updateType(o) { |
| | | if(o==1){ |
| | | $("#yys").hide() |
| | | $("#yys1").show() |
| | | }else { |
| | | $("#yys").show() |
| | | $("#yys1").hide() |
| | | |
| | | } |
| | | |
| | |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text" value="${time}"/> |
| | | <#input id="time" name="营业时间" type="text" value="${time}"/>v |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | $("#yys").hide() |
| | | }else { |
| | | $("#yys").show() |
| | | queryStudentData |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | }, |
| | | {title: '所属运营商', field: 'province', visible: role==1?true:false, align: 'center', valign: 'middle' |
| | | {title: '所属运营商', field: 'yysName', visible: role==1?true:false, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '省', field: 'province', visible: role==1?true:false, align: 'center', valign: 'middle' |
| | | }, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_add_two?id='+$("#id").val() |
| | | content: Feng.ctxPath + '/tShop/tShop_add_two1?id='+$("#id").val() |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | |
| | | } |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let pCode1 = $("#pCode1").val() |
| | | let cCode1 = $("#cCode1").val() |
| | | |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | if(pCode=='' && $("#role")=="1" && OBJradio==2){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | if(cCode=='' && $("#role")=="1" && OBJradio==2){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(pCode1=='' && $("#role")=="1" && OBJradio==1){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role")=="1" && OBJradio==12){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | |
| | | ajax.set("ids",$("#ids").val()); |
| | | ajax.set("type",OBJradio); |
| | | ajax.set("yyId",$("#account").val()); |
| | | ajax.set("pCode1",pCode1); |
| | | ajax.set("cCode1",cCode1); |
| | | ajax.start(); |
| | | } |
| | | var map = new AMap.Map('container', { |
| | |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let cCode1 = $("#cCode1").val() |
| | | let pCode1 = $("#pCode1").val() |
| | | let account = $("#account").val() |
| | | var OBJradio= $("input[name='type']:checked").val(); |
| | | if(OBJradio==2){ |
| | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | if(pCode=='' && $("#role")=="1" && OBJradio==2){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | if(cCode=='' && $("#role")=="1" && OBJradio==2){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(pCode1=='' && $("#role")=="1" && OBJradio==1){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role")=="1" && OBJradio==12) { |
| | | Feng.info("请选择市") |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | }else if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | |
| | | ajax.set("ids",$("#ids").val()); |
| | | ajax.set("type",OBJradio); |
| | | ajax.set("yyId",$("#account").val()); |
| | | ajax.set("pCode1",pCode1); |
| | | ajax.set("cCode1",cCode1); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | $("#cCode1").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | |
| | | package com.dsh.other.feignclient.account.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |