| | |
| | | import java.io.PrintWriter; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | @ResponseBody |
| | | @RequestMapping("/base/appUser/listAll") |
| | | public List<QueryAppUserVO> listAll(@RequestBody QueryAppUser query){ |
| | | |
| | | return appUserService.listAll(query); |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserService.listAll(query); |
| | | if (query.getUserIds()!=null && query.getUserIds().size()!=0){ |
| | | List<QueryAppUserVO> queryAppUserVOS1 = appUserService.listAll1(query); |
| | | queryAppUserVOS.addAll(queryAppUserVOS1); |
| | | } |
| | | return queryAppUserVOS.stream().distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | |
| | | List<DayData> getDayUserCount(@Param("dto")UserInfoQueryDTO dto); |
| | | |
| | | List<GroupCityInfoVO> groupCityInfo(@Param("dto")UserInfoQueryDTO dto); |
| | | |
| | | List<QueryAppUserVO> listAll1(@Param("query") QueryAppUser query); |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户信息查询Query |
| | | */ |
| | |
| | | private Integer insertType; |
| | | // 平台/运营商/门店id |
| | | private Integer typeId; |
| | | private List<Integer> userIds; |
| | | } |
| | |
| | | ResultUtil<String> updateInfo(UpdateInfoDto dto,Integer uid); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | List<QueryAppUserVO> listAll1(QueryAppUser query); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<QueryAppUserVO> listAll1(QueryAppUser query) { |
| | | return appUserMapper.listAll1(query); |
| | | } |
| | | |
| | | @Override |
| | | public StuAndStoreResponse queryAppUserDefaultStuAndStore(Integer userIdFormRedis,Integer pointsMerId, String lat, String lon,Integer isCourse) { |
| | | StuAndStoreResponse response = new StuAndStoreResponse(); |
| | | if (isCourse == 1){ |
| | |
| | | </if> |
| | | and t1.state != 3 |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | <select id="getSelects" resultType="com.dsh.account.dto.SelectDto"> |
| | | SELECT ts.id ,ts.`name` as value |
| | |
| | | </where> |
| | | GROUP BY cityCode |
| | | </select> |
| | | <select id="listAll1" resultType="com.dsh.account.model.vo.QueryAppUserVO"> |
| | | select t2.* from t_app_user t2 |
| | | <where> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t2.id IN |
| | | <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t2.city = #{query.city} |
| | | </if> |
| | | <if test="query.province!=null and query.province!= ''"> |
| | | and t2.province = #{query.province} |
| | | </if> |
| | | <if test="query.name!=null and query.name!= ''"> |
| | | AND t2.name LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone!=null and query.phone!= ''"> |
| | | and t2.phone LIKE concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.isVip!=null and query.isVip!= ''"> |
| | | and t2.isVip = #{query.isVip} |
| | | </if> |
| | | <if test="query.salesmanUser!=null and query.salesmanUser!= ''"> |
| | | and t2.salesmanUserId = #{query.salesmanUser} |
| | | </if> |
| | | and t2.state != 3 |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.dsh.activity.feignclient.account.model.TStoreStaff; |
| | | import com.dsh.activity.feignclient.model.CouponExamineListSearch; |
| | | import com.dsh.activity.feignclient.model.CouponListOfSearch; |
| | | import com.dsh.activity.feignclient.other.OperatorClient; |
| | | import com.dsh.activity.feignclient.other.RegionClient; |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.CityDataAndProvinceDataVo; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.feignclient.other.model.TOperatorCity; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.CouponRecordQuery; |
| | | import com.dsh.activity.model.request.CommodityRequest; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private OperatorClient operatorClient; |
| | | @ResponseBody |
| | | @PostMapping("/base/coupon/queryCouponListSearch") |
| | | public List<Map<String,Object>> getCouponListOfSearch(@RequestBody CouponListOfSearch ofSearch){ |
| | | List<Map<String, Object>> mapList1 = couponService.queryCouponListOfSearch(ofSearch); |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | |
| | | if(ofSearch.getStoreId()!=null){ |
| | | if (ofSearch.getStoreIds()==null){ |
| | | ArrayList<Integer> list = new ArrayList<>(); |
| | | ofSearch.setStoreIds(list); |
| | | } |
| | | if(ofSearch.getStoreId()!=null || ofSearch.getStoreIds().size()!=0){ |
| | | for (Map<String, Object> map : mapList1) { |
| | | List<CouponStore> id = couStoreService.list(new LambdaQueryWrapper<CouponStore>().eq(CouponStore::getCouponId, map.get("id").toString())); |
| | | List<Integer> collect = id.stream().map(CouponStore::getStoreId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | if(collect.contains(ofSearch.getStoreId())){ |
| | | if(collect.size()>1){ |
| | | map.put("size",1); |
| | | }else { |
| | | map.put("size",0); |
| | | // 如果当前登陆人是运营商 只能查看平台添加的优惠券应只展示使用范围为全国通用、 |
| | | // 指定城市有运营商管辖的、指定门店有运营商旗下门店 |
| | | if (ofSearch.getObjType()== 2){ |
| | | if (Integer.parseInt(String.valueOf(map.get("useScope"))) == 1){ |
| | | mapList.add(map); |
| | | } |
| | | mapList.add(map); |
| | | if (Integer.parseInt(String.valueOf(map.get("useScope"))) == 2){ |
| | | // 获取到优惠券id 查询这个优惠券指定了哪些城市 |
| | | Integer id = Integer.parseInt(String.valueOf(map.get("id"))); |
| | | // 获取到运营商管理的省和市 |
| | | List<TOperatorCity> cityByOperatorId = operatorClient.getCityByOperatorId(ofSearch.getOperatorId()); |
| | | // 拿到运营商市的code集合 |
| | | List<String> collect = cityByOperatorId.stream().filter(t -> t.getPid() != 0) |
| | | .map(tOperatorCity -> Integer.toString(tOperatorCity.getCode())) |
| | | .collect(Collectors.toList()); |
| | | List<CouponCity> couponId = cityService.list(new QueryWrapper<CouponCity>().eq("couponId", id)); |
| | | // 先判断优惠券管理的市 运营商是否有 |
| | | List<String> collect1 = couponId.stream().map(CouponCity::getCityCode) |
| | | .collect(Collectors.toList()); |
| | | // 优惠券指定的省 |
| | | List<String> collect2 = couponId.stream().map(CouponCity::getCityCode) |
| | | .collect(Collectors.toList()); |
| | | if (!Collections.disjoint(collect, collect1)){ |
| | | mapList.add(map); |
| | | }else{ |
| | | // 如果没有交集 那么还需要判断运营商是否管理了整个省 |
| | | |
| | | |
| | | } |
| | | } |
| | | if (Integer.parseInt(String.valueOf(map.get("useScope"))) == 3){ |
| | | // 获取到优惠券id 查询这个优惠券指定了哪些门店 |
| | | Integer id = Integer.parseInt(String.valueOf(map.get("id"))); |
| | | // 当前运营商管理的门店ids |
| | | List<Integer> storeIds = ofSearch.getStoreIds(); |
| | | // 优惠券指定的门店 |
| | | List<Integer> collect = couStoreService.list(new QueryWrapper<CouponStore>().eq("couponId",id) |
| | | .in("storeId", storeIds)).stream().map(CouponStore::getStoreId) |
| | | .collect(Collectors.toList()); |
| | | // 判断两个集合是否相交 |
| | | // 比较两个集合中是否有相同的元素;当两个集合中没有相同元素时返回true, |
| | | // 当有相同元素时返回false。 |
| | | if (!Collections.disjoint(collect, storeIds)){ |
| | | mapList.add(map); |
| | | } |
| | | } |
| | | }else{ |
| | | List<CouponStore> id = couStoreService.list(new LambdaQueryWrapper<CouponStore>() |
| | | .eq(CouponStore::getCouponId, map.get("id").toString())); |
| | | List<Integer> collect = id.stream().map(CouponStore::getStoreId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | if(collect.contains(ofSearch.getStoreId())){ |
| | | if(collect.size()>1){ |
| | | map.put("size",1); |
| | | }else { |
| | | map.put("size",0); |
| | | } |
| | | mapList.add(map); |
| | | } |
| | | } |
| | | } |
| | | }else { |
| | |
| | | import com.dsh.activity.feignclient.course.model.CoursePackage; |
| | | import com.dsh.activity.feignclient.course.model.CoursePackagePaymentConfig; |
| | | import com.dsh.activity.feignclient.model.*; |
| | | import com.dsh.activity.feignclient.other.OperatorClient; |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.feignclient.other.model.StoreDetailOfCourse; |
| | | import com.dsh.activity.feignclient.other.model.TOperatorCity; |
| | | import com.dsh.activity.model.CoachChangeStateVO; |
| | | import com.dsh.activity.model.PointMerchandiseIncomeVo; |
| | | import com.dsh.activity.model.PointMerchandiseVo; |
| | |
| | | byId.setVerificationUserId(dto.getVerificationUserId()); |
| | | return userPointsMerchandiseService.updateById(byId); |
| | | } |
| | | @Autowired |
| | | private OperatorClient operatorClient; |
| | | @Resource |
| | | private CouponCityService cityService; |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/ticketList") |
| | | public List<Map<String,Object>> ticketList(@RequestBody IntegralGoodsOfSearch ofSearch){ |
| | |
| | | } |
| | | result.add(map); |
| | | } |
| | | if (Integer.parseInt(String.valueOf(map.get("useScope"))) == 1){ |
| | | result.add(map); |
| | | } |
| | | if (Integer.parseInt(String.valueOf(map.get("useScope"))) == 2){ |
| | | // 获取到优惠券id 查询这个优惠券指定了哪些城市 |
| | | Integer id1 = Integer.parseInt(String.valueOf(map.get("id"))); |
| | | // 获取到运营商管理的省和市 |
| | | List<TOperatorCity> cityByOperatorId = operatorClient.getCityByOperatorId(ofSearch.getObjId()); |
| | | // 拿到运营商市的code集合 |
| | | List<String> collect1 = cityByOperatorId.stream().filter(t -> t.getPid() != 0) |
| | | .map(tOperatorCity -> Integer.toString(tOperatorCity.getCode())) |
| | | .collect(Collectors.toList()); |
| | | List<CouponCity> couponId = cityService.list(new QueryWrapper<CouponCity>().eq("couponId", id1)); |
| | | // 先判断优惠券管理的市 运营商是否有 |
| | | List<String> collect3 = couponId.stream().map(CouponCity::getCityCode) |
| | | .collect(Collectors.toList()); |
| | | // 优惠券指定的省 |
| | | List<String> collect4 = couponId.stream().map(CouponCity::getCityCode) |
| | | .collect(Collectors.toList()); |
| | | if (!Collections.disjoint(collect3, collect4)){ |
| | | result.add(map); |
| | | }else{ |
| | | // 如果没有交集 那么还需要判断运营商是否管理了整个省 |
| | | |
| | | |
| | | } |
| | | } |
| | | if (Integer.parseInt(String.valueOf(map.get("useScope"))) == 3){ |
| | | // 获取到优惠券id 查询这个优惠券指定了哪些门店 |
| | | Integer id3 = Integer.parseInt(String.valueOf(map.get("id"))); |
| | | // 当前运营商管理的门店ids |
| | | List<Integer> storeIds = ofSearch.getStoreIds(); |
| | | // 优惠券指定的门店 |
| | | List<Integer> collect5 = cstoreService.list(new QueryWrapper<CouponStore>().eq("couponId",id3) |
| | | .in("storeId", storeIds)).stream().map(CouponStore::getStoreId) |
| | | .collect(Collectors.toList()); |
| | | // 判断两个集合是否相交 |
| | | // 比较两个集合中是否有相同的元素;当两个集合中没有相同元素时返回true, |
| | | // 当有相同元素时返回false。 |
| | | if (!Collections.disjoint(collect5, storeIds)){ |
| | | result.add(map); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | result=result1; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | |
| | | private String cityCode; |
| | | private Integer storeId; |
| | | private Integer operatorId; |
| | | |
| | | |
| | | private Integer objType; |
| | | private List<Integer> storeIds; |
| | | } |
New file |
| | |
| | | package com.dsh.activity.feignclient.other; |
| | | |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.feignclient.other.model.StoreDetailOfCourse; |
| | | import com.dsh.activity.feignclient.other.model.TOperatorCity; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(value = "mb-cloud-other") |
| | | public interface OperatorClient { |
| | | |
| | | /** |
| | | * 根据运营商ID 获取运营商管理的省市 |
| | | */ |
| | | @RequestMapping(value = "/getCityByOperatorId") |
| | | List<TOperatorCity> getCityByOperatorId(@RequestBody Integer operatorId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.feignclient.other.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 运营商 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-09-22 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_operator_city") |
| | | public class TOperatorCity extends Model<TOperatorCity> { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * code |
| | | */ |
| | | private Integer code; |
| | | |
| | | /** |
| | | * 1 省 2市 |
| | | */ |
| | | private Integer type; |
| | | |
| | | private Integer pid; |
| | | |
| | | @TableField("operatorId") |
| | | private Integer operatorId; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | `status`, |
| | | state, |
| | | illustrate, |
| | | auditStatus |
| | | auditStatus, |
| | | publisherType |
| | | from t_coupon |
| | | where 1=1 |
| | | <if test="objType == 1"> |
| | | and auditStatus =2 |
| | | </if> |
| | | <if test="operatorId != null"> |
| | | <if test="objType == 3"> |
| | | and cityManagerId = #{operatorId} |
| | | </if> |
| | | <if test="objType == 1"> |
| | | and auditStatus =2 |
| | | </if> |
| | | |
| | | <if test="cityCode != null"> |
| | | and id in( |
| | | SELECT DISTINCT couponId FROM |
| | |
| | | wrapper.like(Competition::getName,listQuery.getEventName()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(listQuery.getTime())){ |
| | | wrapper.gt(Competition::getStartTime,listQuery.getTime().split(" - ")[0]+" 00:00:00"); |
| | | wrapper.lt(Competition::getEndTime,listQuery.getTime().split(" - ")[1]+" 23:59:59"); |
| | | wrapper.lt(Competition::getStartTime,listQuery.getTime().split(" - ")[0]+" 00:00:00"); |
| | | wrapper.gt(Competition::getEndTime,listQuery.getTime().split(" - ")[1]+" 23:59:59"); |
| | | } |
| | | if(ToolUtil.isNotEmpty(listQuery.getState())){ |
| | | wrapper.eq(Competition::getStatus,listQuery.getState()); |
| | | } |
| | | |
| | | if(ToolUtil.isNotEmpty(listQuery.getRegisterCondition())){ |
| | | wrapper.eq(Competition::getRegisterCondition,listQuery.getRegisterCondition()); |
| | | } |
| | | |
| | | wrapper.in(Competition::getStoreId,listQuery.getIds()); |
| | | wrapper.eq(Competition::getAuditStatus,2); |
| | | wrapper.orderByDesc(Competition::getInsertTime); |
| | |
| | | collect.add(-1); |
| | | } |
| | | } |
| | | |
| | | if(query.getStoreIds()!=null && query.getStoreIds().size()!=0){ |
| | | List<TCoursePackage> list = coursePackageService |
| | | .list(new LambdaQueryWrapper<TCoursePackage>() |
| | | .in(TCoursePackage::getStoreId, query.getStoreIds())); |
| | | collect = list.stream().map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | } |
| | | List<CancelClassesVO> result = cancelledClassesService.listAll(query,collect); |
| | | for (CancelClassesVO cancelClassesVO : result) { |
| | | CoursePackageScheduling byId1 = coursePackageSchedulingService.getById(cancelClassesVO.getCoursePackageSchedulingId()); |
| | | if (byId1==null){ |
| | | continue; |
| | | } |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String string = format.format(byId1.getClassDate()); |
| | | String string1 = format.format(byId1.getEndDate()); |
| | |
| | | re.setBuyTypeName("手动支付"+"-"+re.getBuyTypeName()); |
| | | } |
| | | } |
| | | |
| | | BigDecimal subtract = re.getOriginalPrice().subtract(re.getCashPayment()); |
| | | re.setDiscountAmount(subtract); |
| | | // 如果支付用户类型为管理员 则购买方式则为1线下购买 |
| | | if (re.getPayUserType()!=null){ |
| | | if (re.getPayUserType()== 2){ |
| | |
| | | } |
| | | List<RegisterOrderVO> res = packagePaymentService.listAllRegister(query); |
| | | // 该运营商下没有门店 |
| | | if (query.getStoresIds()!=null){ |
| | | if (query.getStoresIds().size()==0){ |
| | | if (query.getInsertType() == 2){ |
| | | if (query.getStoresIds()!=null){ |
| | | if (query.getStoresIds().size()==0){ |
| | | List<RegisterOrderVO> registerOrderVOS = new ArrayList<>(); |
| | | return registerOrderVOS; |
| | | } |
| | | }else{ |
| | | List<RegisterOrderVO> registerOrderVOS = new ArrayList<>(); |
| | | return registerOrderVOS; |
| | | } |
| | | }else{ |
| | | List<RegisterOrderVO> registerOrderVOS = new ArrayList<>(); |
| | | return registerOrderVOS; |
| | | } |
| | | |
| | | List<RegisterOrderVO> result = new ArrayList<>(); |
| | | Iterator<RegisterOrderVO> iterator = res.iterator(); |
| | | while (iterator.hasNext()) { |
| | | RegisterOrderVO re = iterator.next(); |
| | | |
| | | if (re.getSalesName() == null) { |
| | | re.setSalesName("无"); |
| | | } |
| | |
| | | re.setPayMoneyAndType("¥" + re.getMoney()); |
| | | } |
| | | } |
| | | Store store = storeClient.queryStoreById(re.getStoreId()); |
| | | if (re.getStoreId()!=null){ |
| | | Store store = storeClient.queryStoreById(re.getStoreId()); |
| | | if (store!=null){ |
| | | re.setStoreName(store.getName()); |
| | | } |
| | | } |
| | | TAppUser appUser = appUserClient.queryAppUser1(re.getAppUserId()); |
| | | Student student = studentClient.queryStudentById(re.getStudentId()); |
| | | re.setPayStudent(student.getName()); |
| | | re.setPayUser(appUser.getName()); |
| | | re.setPhone(appUser.getPhone()); |
| | | re.setStoreName(store.getName()); |
| | | // 在这里添加条件来删除不满足要求的元素 |
| | | |
| | | if (query.getInsertType() !=null && appUser.getInsertType() != query.getInsertType()) { |
| | | iterator.remove(); // 使用迭代器的 remove 方法删除元素 |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | |
| | | TCoursePackagePaymentService paymentService; |
| | | @Autowired |
| | | private CourseCounsumService counsumService; |
| | | |
| | | @Autowired |
| | | private TCoursePackageService coursePackageService; |
| | | //获取退费记录 |
| | | @RequestMapping("/getRefund") |
| | | @ResponseBody |
| | |
| | | @RequestMapping("/bypac") |
| | | @ResponseBody |
| | | public List<Map<String, Object>> bypac(@RequestBody PacQueryDto pacQueryDto) { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | System.out.println("-====studentQeryDto========="+pacQueryDto); |
| | | if (pacQueryDto.getStoreIds()!=null && pacQueryDto.getStoreIds().size()!=0){ |
| | | // 根据门店id 查询课包ids |
| | | List<Integer> coursePackageIds = coursePackageService.list(new QueryWrapper<TCoursePackage>() |
| | | .in("storeId", pacQueryDto.getStoreIds())).stream() |
| | | .map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | pacQueryDto.setStoreIds(coursePackageIds); |
| | | } |
| | | List<Map<String, Object>> pays = paymentService.bypac(pacQueryDto); |
| | | |
| | | System.out.println("=========pays======"+pays); |
| | | |
| | | return pays; |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PacQueryDto { |
| | | String cityCode; |
| | |
| | | String start; |
| | | String end; |
| | | String provinceCode; |
| | | |
| | | List<Integer> storeIds; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class StudentQeryDto { |
| | |
| | | String end; |
| | | String studentName; |
| | | String times; |
| | | List<Integer> coursePackageIds; |
| | | } |
| | |
| | | private List<Integer> studentIds; |
| | | |
| | | private Integer storeId; |
| | | private List<Integer> storeIds; |
| | | } |
| | |
| | | List<Map<String, Object>> studentTotal = this.baseMapper.getStudentTotal(studentQeryDto); |
| | | |
| | | for (Map<String, Object> student : studentTotal) { |
| | | BigDecimal cashPayment = (BigDecimal) student.get("cashPayment"); |
| | | BigDecimal totalClassHours = (BigDecimal) student.get("totalClassHours"); |
| | | BigDecimal hasHours = (BigDecimal) student.get("hasHours"); |
| | | |
| | | BigDecimal hasPayment = cashPayment.divide(totalClassHours, 2, RoundingMode.HALF_UP) |
| | | .multiply(hasHours).setScale(2, RoundingMode.HALF_UP); |
| | | student.put("hasPayment", hasPayment); |
| | | |
| | | |
| | | Integer appUserId = (Integer) student.get("appUserId"); |
| | | AppUser appUser = appuClient.queryAppUser(appUserId); |
| | | student.put("province", appUser.getProvince()); |
| | |
| | | |
| | | Student studentId = studentClient.queryStudentById((Integer) student.get("studentId")); |
| | | student.put("studentName", studentId.getName()); |
| | | |
| | | |
| | | BigDecimal cashPayment = (BigDecimal) student.get("cashPayment"); |
| | | BigDecimal totalClassHours = (BigDecimal) student.get("totalClassHours"); |
| | | BigDecimal hasHours = (BigDecimal) student.get("hasHours"); |
| | | if (cashPayment==null){ |
| | | continue; |
| | | } |
| | | if (totalClassHours.compareTo(BigDecimal.ZERO)==0){ |
| | | totalClassHours = totalClassHours.add(new BigDecimal("1")); |
| | | } |
| | | BigDecimal hasPayment = cashPayment.divide(totalClassHours, 2, RoundingMode.HALF_UP) |
| | | .multiply(hasHours).setScale(2, RoundingMode.HALF_UP); |
| | | student.put("hasPayment", hasPayment); |
| | | } |
| | | |
| | | if (studentQeryDto.getCityCode()!=null&&studentQeryDto.getCityCode()!="") { |
| | |
| | | @Override |
| | | public Integer addCoursePackage(TCoursePackage coursePackage) { |
| | | try { |
| | | coursePackage.setAuditStatus(2); |
| | | |
| | | this.baseMapper.insert(coursePackage); |
| | | |
| | | if (coursePackage.getClassStartTime()!=null&&coursePackage.getClassStartTime()!="") { |
| | |
| | | t2.name, |
| | | CONCAT(t2.province, t2.city) AS provinceAndCity, |
| | | t2.storeId,t2.coachId, |
| | | t2.name as courseName,t2.coachId,t3.studentId |
| | | t2.name as courseName,t2.coachId |
| | | FROM |
| | | t_cancelled_classes t1 |
| | | LEFT JOIN t_course_package t2 ON t1.coursePackageId = t2.id |
| | | inner join t_course_package_payment t3 on t1.coursePackagePaymentId = t3.id |
| | | |
| | | <where> |
| | | <if test="query.courseName!=null and query.courseName!= ''"> |
| | | and t2.name = #{query.courseName} |
| | |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | | <if test="query.studentIds != null and query.studentIds.size()>0"> |
| | | AND t3.studentId IN |
| | | <foreach collection="query.studentIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="query.coachIds != null and query.coachIds.size()>0"> |
| | | AND t2.coachId IN |
| | | <foreach collection="query.coachIds" separator="," item="id" open="(" close=")"> |
| | |
| | | |
| | | </select> |
| | | <select id="getStudentTotal" resultType="map"> |
| | | |
| | | SELECT * from( |
| | | SELECT studentId, totalClassHours, name as courseName, laveClassHours,cashPayment as cashPayment,hasHours,appUserId,insertTime |
| | | ,coursePackageId |
| | | FROM ( |
| | | SELECT studentId, totalClassHours, name, laveClassHours,cashPayment, (totalClassHours - laveClassHours) AS hasHours,py.appUserId,py.insertTime |
| | | ,coursePackageId |
| | | FROM t_course_package_payment py |
| | | LEFT JOIN t_course_package cp ON py.coursePackageId = cp.id |
| | | UNION ALL |
| | | SELECT studentId, SUM(totalClassHours) AS totalClassHours,'总计' as name, SUM(laveClassHours) AS laveClassHours, SUM(cashPayment) AS cashPayment, |
| | | (SUM(totalClassHours) - SUM(laveClassHours)) AS hasHours,py.appUserId,py.insertTime |
| | | (SUM(totalClassHours) - SUM(laveClassHours)) AS hasHours,py.appUserId,py.insertTime,py.coursePackageId |
| | | FROM t_course_package_payment py |
| | | LEFT JOIN t_course_package cp ON py.coursePackageId = cp.id |
| | | GROUP BY studentId |
| | |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | a.insertTime between #{start} and #{end} |
| | | </if> |
| | | |
| | | <if test="coursePackageIds != null and coursePackageIds.size()>0"> |
| | | AND a.coursePackageId IN |
| | | <foreach collection="coursePackageIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | |
| | | FROM |
| | | t_course_package_payment py |
| | | LEFT JOIN t_course_package cp ON py.coursePackageId = cp.id |
| | | |
| | | |
| | | <where> |
| | | <if test="storeIds != null and storeIds.size()>0"> |
| | | AND cp.id IN |
| | | <foreach collection="storeIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | py.insertTime between #{start} and #{end} |
| | | </if> |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class StudentQeryDto { |
| | |
| | | String end; |
| | | String studentName; |
| | | String times; |
| | | List<Integer> coursePackageIds; |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户信息查询Query |
| | | */ |
| | |
| | | private Integer insertType; |
| | | // 平台/运营商/门店id |
| | | private Integer typeId; |
| | | private List<Integer> userIds; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | |
| | | private Integer storeId; |
| | | private Integer operatorId; |
| | | private Integer objType; |
| | | |
| | | private List<Integer> storeIds; |
| | | |
| | | } |
| | |
| | | // 获取课包id |
| | | Integer coursePackageId = tCoursePackagePayment.getCoursePackageId(); |
| | | List<TCoursePackageDiscount> list = coursePackageDiscountClient.queryByCoursePackageId(coursePackageId); |
| | | // 获取当前课包价格配置 |
| | | Integer coursePackageId1 = tCoursePackagePayment.getCoursePackageId(); |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(coursePackageId1); |
| | | |
| | | Date currentDate = new Date(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(currentDate); |
| | |
| | | // 判断当前用户是不是会员 |
| | | Integer appUserId = tCoursePackagePayment.getAppUserId(); |
| | | Date vipEndTime = appUserClient.queryAppUser1(appUserId).getVipEndTime(); |
| | | // 会员折扣 |
| | | double c1 = 0.00; |
| | | // 续课优惠 |
| | | double c2 = 0.00; |
| | | // 显示折扣 |
| | | double c3 = 0.00; |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | JSONObject jsonObject = JSONObject.fromObject(tCoursePackageDiscount.getContent()); |
| | | char c = tCoursePackageDiscount.getContent().charAt(0); |
| | | String value1 = String.valueOf(c); |
| | | JSONObject jsonObject ; |
| | | if (value1.equals("[")){ |
| | | jsonObject = JSONObject.fromObject(tCoursePackageDiscount.getContent() |
| | | .substring(1,tCoursePackageDiscount.getContent().length() - 1)); |
| | | }else{ |
| | | jsonObject = JSONObject.fromObject(tCoursePackageDiscount.getContent()); |
| | | } |
| | | // 获取当前课包价格配置 |
| | | Integer coursePackageId1 = tCoursePackagePayment.getCoursePackageId(); |
| | | List<CoursePackagePaymentConfig> coursePackagePaymentConfigs = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(coursePackageId1); |
| | | if (coursePackagePaymentConfigs.size()!=0){ |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig = coursePackagePaymentConfigs.get(0); |
| | | tCoursePackagePayment.setOriginalPrice(coursePackagePaymentConfig.getCashPayment()); |
| | | tCoursePackagePayment.setPlayPaiCoin(coursePackagePaymentConfig.getPlayPaiCoin()); |
| | | |
| | | } |
| | | // 原价 |
| | | Double originalPrice = tCoursePackagePayment.getOriginalPrice(); |
| | | |
| | | BigDecimal d1 = new BigDecimal(Double.toString(originalPrice)); |
| | | |
| | | // 计算课包折扣 |
| | | switch (tCoursePackageDiscount.getType()){ |
| | | case 1: |
| | | // 是会员 |
| | |
| | | Double aDouble = new Double(discountMember); |
| | | if (aDouble!=null){ |
| | | String value = String.valueOf(discountMember); |
| | | BigDecimal bigDecimal = new BigDecimal(value); |
| | | tCoursePackagePayment.setCashPayment(bigDecimal); |
| | | // 折扣比例 |
| | | Double aDouble1 = Double.valueOf(value); |
| | | c1 = aDouble1; |
| | | } |
| | | } |
| | | break; |
| | |
| | | // 是会员享受会员续课折扣 |
| | | if (!vipEndTime.before(new Date())){ |
| | | String value = String.valueOf(continuingMember); |
| | | BigDecimal bigDecimal = new BigDecimal(value); |
| | | tCoursePackagePayment.setCashPayment(bigDecimal); |
| | | c2 = Double.valueOf(value); |
| | | }else{ // 否则享受用户续课折扣 |
| | | String value = String.valueOf(continuingUser); |
| | | BigDecimal bigDecimal = new BigDecimal(value); |
| | | tCoursePackagePayment.setCashPayment(bigDecimal); |
| | | c2 = Double.valueOf(value); |
| | | } |
| | | } |
| | | break; |
| | | case 3: |
| | | // 限时折扣判断是否在有效期 |
| | | String timeFrameStart = jsonObject.getString("timeFrameStart"); |
| | | String timeFrameEnd = jsonObject.getString("timeFrameEnd"); |
| | | String timeFrameStart = jsonObject.getString("startDate"); |
| | | String timeFrameEnd = jsonObject.getString("endDate"); |
| | | SimpleDateFormat format = new SimpleDateFormat(timeFrameStart); |
| | | SimpleDateFormat format1 = new SimpleDateFormat(timeFrameEnd); |
| | | try { |
| | | Date parse = format.parse(timeFrameStart); |
| | | Date parse1 = format1.parse(timeFrameEnd); |
| | | if (new Date().after(parse) && new Date().before(parse1)){ |
| | | double continuingMember = jsonObject.getDouble("discountMember"); |
| | | String value = String.valueOf(continuingMember); |
| | | BigDecimal bigDecimal = new BigDecimal(value); |
| | | tCoursePackagePayment.setCashPayment(bigDecimal); |
| | | |
| | | // 判断当日时间是否能享受到折扣 |
| | | String startTime = jsonObject.getString("startTime"); |
| | | String endTime = jsonObject.getString("endTime"); |
| | | // 获取当前时间 |
| | | Date currentTime = new Date(); |
| | | // 定义时间格式 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); |
| | | // 解析开始时间和结束时间为Date对象 |
| | | Date startTime1 = sdf.parse(startTime); |
| | | Date endTime1 = sdf.parse(endTime); |
| | | Date date1 = new Date(); |
| | | date1.setHours(startTime1.getHours()); |
| | | date1.setMinutes(startTime1.getMinutes()); |
| | | date1.setSeconds(startTime1.getSeconds()); |
| | | Date date2 = new Date(); |
| | | date2.setHours(endTime1.getHours()); |
| | | date2.setMinutes(endTime1.getMinutes()); |
| | | date2.setSeconds(endTime1.getSeconds()); |
| | | // 检查当前时间是否在开始时间和结束时间之间 |
| | | if (currentTime.after(date1) && currentTime.before(date2)) { |
| | | System.out.println("当前时间在开始时间和结束时间之间。"); |
| | | String cashPayment = jsonObject.getString("cashPayment"); |
| | | c3 = Double.valueOf(cashPayment); |
| | | } else { |
| | | System.out.println("当前时间不在开始时间和结束时间之间。"); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | |
| | | |
| | | break; |
| | | } |
| | | |
| | | } |
| | | // 判断三个折扣 谁所需支付金额最少 |
| | | double minValue = 0.00; |
| | | |
| | | if (c1 != 0.00 && (c2 == 0.00 || c1 < c2) && (c3 == 0.00 || c1 < c3)) { |
| | | minValue = c1; |
| | | } else if (c2 != 0.00 && (c3 == 0.00 || c2 < c3)) { |
| | | minValue = c2; |
| | | } else if (c3 != 0.00) { |
| | | minValue = c3; |
| | | } |
| | | if (minValue!=0.00){ |
| | | BigDecimal bigDecimal = new BigDecimal(minValue); |
| | | tCoursePackagePayment.setCashPayment(bigDecimal); |
| | | } |
| | | coursePackagePaymentClient.addCoursePackagePayment(tCoursePackagePayment); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | @RequestMapping(value = "/getCoursePackageConfig") |
| | | @ResponseBody |
| | | public List<CoursePackagePaymentConfig> getCoursePackageConfig(Integer id) { |
| | | if (id == null){ |
| | | return null; |
| | | } |
| | | return coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.SinataUtil; |
| | |
| | | |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private IOperatorAuthService operatorAuthService; |
| | | |
| | | |
| | | /** |
| | | * 根据运营商ID 获取运营商管理的省市 |
| | | */ |
| | | @RequestMapping(value = "/getCityByOperatorId") |
| | | @ResponseBody |
| | | public List<TOperatorCity> getCityByOperatorId(@RequestBody Integer operatorId) { |
| | | return operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("operatorId",operatorId)); |
| | | } |
| | | |
| | | /** |
| | | * 跳转运营商管理首页 |
| | | */ |
| | |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | } |
| | | queryAppUser.setInsertType(objectType); |
| | | queryAppUser.setTypeId(UserExt.getUser().getObjectId()); |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserClient.listAll(queryAppUser); |
| | | // 根据赛事支付记录 |
| | | |
| | | if (objectType == 2){ |
| | | // 获取运营商下的所有门店id集合 |
| | | List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)) |
| | |
| | | users.addAll(gameUsers); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | List<QueryAppUserVO> queryAppUserVOS1 = new ArrayList<>(); |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (collect.contains(queryAppUserVO.getId())){ |
| | | queryAppUserVOS1.add(queryAppUserVO); |
| | | } |
| | | } |
| | | queryAppUserVOS = queryAppUserVOS1; |
| | | queryAppUser.setUserIds(collect); |
| | | // List<QueryAppUserVO> queryAppUserVOS1 = new ArrayList<>(); |
| | | // // 根据用户消费记录 去查询用户ids |
| | | // for (Integer integer : collect) { |
| | | // if (!collect1.contains(integer)){ |
| | | // TAppUser tAppUser = appUserClient.queryAppUser1(integer); |
| | | // QueryAppUserVO queryAppUserVO = new QueryAppUserVO(); |
| | | // BeanUtils.copyProperties(tAppUser,queryAppUserVO); |
| | | // queryAppUserVOS.add(queryAppUserVO); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserClient.listAll(queryAppUser); |
| | | List<Integer> collect1 = queryAppUserVOS.stream().map(QueryAppUserVO::getId).collect(Collectors.toList()); |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (queryAppUserVO.getSalesmanUserId()!=null){ |
| | | User byId = userService.getById(queryAppUserVO.getSalesmanUserId()); |
| | |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.CoachQuery; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | return queryBodySideAppointmentVOS; |
| | | } |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | /** |
| | | * 添加/修改体测预约记录 |
| | | */ |
| | |
| | | // 获取当前登录人id |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | if (roleType == 2){ |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | TStore cityManager = storeService.getById(vo.getStoreId()); |
| | | vo.setProvince(cityManager.getProvince()); |
| | | vo.setProvinceCode(cityManager.getProvinceCode()); |
| | | vo.setCity(cityManager.getCity()); |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | |
| | | 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 com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import sun.rmi.runtime.Log; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | model.addAttribute("yysList",list1); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("type",objectType); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<TStore> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)); |
| | | model.addAttribute("stores",operatorId); |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | // 查询这个运营商管理的省 |
| | | TOperator id = tOperatorService.getOne(new QueryWrapper<TOperator>().eq("id", UserExt.getUser().getObjectId())); |
| | | if (id.getType()==1){ |
| | | // 全国 |
| | | List<TCity> list3 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("province",list3); |
| | | }else{ |
| | | // 找到他管理的省 |
| | | List<TOperatorCity> list4 = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("operatorId", UserExt.getUser().getObjectId()).eq("pid", 0)); |
| | | model.addAttribute("province",list4); |
| | | } |
| | | } |
| | | return PREFIX + "TCompetition_add.html"; |
| | | } |
| | | |
| | |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2); |
| | | model.addAttribute("type",2); |
| | | String[] split = competition.getStoreId().split(","); |
| | | List<Integer> integers = new ArrayList<>(); |
| | | for (String s : split) { |
| | | integers.add(Integer.valueOf(s)); |
| | | } |
| | | |
| | | model.addAttribute("storeIds",integers); |
| | | return PREFIX + "TCompetition_edit.html"; |
| | | } |
| | | @RequestMapping("/tCompetition_user/{id}") |
| | |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | if (UserExt.getUser().getObjectType()== 2){ |
| | | if (shopName == null) |
| | | shopName = ""; |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId()) |
| | | .like("name",shopName)) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | ids = operatorId; |
| | | } |
| | | Page<Competition> page = new PageFactory<Competition>().defaultPage(); |
| | | ListQuery listQuery = new ListQuery(page.getSize(),page.getCurrent(),provinceCode,cityCode,eventName,time,state,registerCondition,ids); |
| | | Page<Competition> competitions = competitionClient.list(listQuery); |
| | | List<Competition> records = new ArrayList<>(); |
| | | for (Competition competition : competitions.getRecords()) { |
| | | // 当前时间小于开始时间 |
| | | if (competition.getStartTime().after(new Date())){ |
| | | competition.setStatus(1); |
| | | } |
| | | if (competition.getStartTime().before(new Date())){ |
| | | if (competition.getEndTime().after(new Date())){ |
| | | competition.setStatus(2); |
| | | }else{ |
| | | competition.setStatus(3); |
| | | } |
| | | } |
| | | if (competition.getStatus()!=state && state != null){ |
| | | }else{ |
| | | records.add(competition); |
| | | } |
| | | for (TStore tStore : list) { |
| | | String[] split = competition.getStoreId().split(","); |
| | | |
| | | for (String s : split) { |
| | | if(s.equals(String.valueOf(tStore.getId()))){ |
| | | if (competition.getStoreName()==null){ |
| | |
| | | } |
| | | } |
| | | } |
| | | competitions.setRecords(records); |
| | | System.err.println(competitions.getRecords()); |
| | | return super.packForBT(competitions); |
| | | } |
| | | |
| | |
| | | competition.setAuditStatus(1); |
| | | } |
| | | |
| | | |
| | | // SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | // competition.setStartTime(format1.parse(competition.getSTime())); |
| | |
| | | if(ToolUtil.isEmpty(competition.getRegistrationNotes())){ |
| | | competition.setRegistrationNotes(competition1.getRegistrationNotes()); |
| | | } |
| | | if (UserExt.getUser().getObjectType() == 1){ |
| | | competition.setAuditStatus(2); |
| | | }else{ |
| | | competition.setAuditStatus(1); |
| | | } |
| | | |
| | | competitionClient.update(competition); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("objectType",UserExt.getUser().getObjectType()); |
| | | return PREFIX + "TCoupon.html"; |
| | | } |
| | | |
| | |
| | | model.addAttribute("type",coupon.getType()); |
| | | return PREFIX + "TCouponRecord.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping("/coupon_detail/{id}") |
| | | public String memberCouponDetail(@PathVariable Integer id,Model model) { |
| | |
| | | list = client.queryCity(coupon.getId()); |
| | | } |
| | | if(coupon.getUseScope()==3){ |
| | | // 门店ids |
| | | list1 = client.queryStore(coupon.getId()); |
| | | // 门店集合 |
| | | list2 = storeService.list(new LambdaQueryWrapper<TStore>().in(TStore::getId, list1)); |
| | | for (TStore tStore : list2) { |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(tStore.getCityManagerId()); |
| | | if (ToolUtil.isNotEmpty(cityManager)){ |
| | | tStore.setProvince(tStore.getProvince()+tStore.getCity()); |
| | | tStore.setPhone(cityManager.getName()+"-"+cityManager.getPhone()); |
| | | if (coupon.getPublisherType() == 1){ |
| | | // 获取运营商id |
| | | Integer operatorId = tStore.getOperatorId(); |
| | | TOperator operator = operatorService.getById(operatorId); |
| | | User user = userService.getById(operator.getUserId()); |
| | | if (ToolUtil.isNotEmpty(user)){ |
| | | tStore.setProvince(tStore.getProvince()+tStore.getCity()); |
| | | tStore.setPhone(user.getName()+"-"+user.getPhone()); |
| | | } |
| | | } |
| | | if (coupon.getPublisherType() == 2) { |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(tStore.getCityManagerId()); |
| | | if (ToolUtil.isNotEmpty(cityManager)) { |
| | | tStore.setProvince(tStore.getProvince() + tStore.getCity()); |
| | | tStore.setPhone(cityManager.getName() + "-" + cityManager.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | model.addAttribute("city",list); |
| | | model.addAttribute("store",list2); |
| | |
| | | ofSearch.setStatus(status); |
| | | ofSearch.setState(state); |
| | | if (UserExt.getUser().getObjectType()==2) { |
| | | // 门店ids |
| | | List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>().eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | ofSearch.setStoreIds(storeIds); |
| | | ofSearch.setObjType(UserExt.getUser().getObjectType()); |
| | | ofSearch.setOperatorId(UserExt.getUser().getObjectId()); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==3) { |
| | | ofSearch.setStoreId(UserExt.getUser().getObjectId()); |
| | | ofSearch.setObjType(UserExt.getUser().getObjectType()); |
| | | } |
| | | |
| | | // 运营商可以查看平台添加的优惠券应只展示使用范围为全国通用、 |
| | | // 指定城市有运营商管辖的、指定门店有运营商旗下门店 |
| | | |
| | | return client.getCouponListOfSearch(ofSearch); |
| | | } |
| | |
| | | TStore store = list2.get(0); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | List<Coach> coaches = coachClient.queryCoachByCity(code1); |
| | | |
| | | |
| | | List<Coach> coaches = coachClient.queryCoachByOperatorId(objectId); |
| | | model.addAttribute("coach", coaches); |
| | | System.out.println("========type========"+type); |
| | | } |
| | |
| | | model.addAttribute("store", list2); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", tCoursePackage.getStoreId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | List<Coach> coaches = coachClient.queryCoachByCity(cityCode); |
| | | List<Coach> coaches = coachClient.queryCoachByOperatorId(UserExt.getUser().getObjectId()); |
| | | model.addAttribute("coach", coaches); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | |
| | |
| | | coursePackage.setProvinceCode(store.getProvinceCode()); |
| | | coursePackage.setCity(store.getCity()); |
| | | coursePackage.setCityCode(store.getCityCode()); |
| | | coursePackage.setAuditStatus(1); |
| | | } |
| | | |
| | | |
| | |
| | | // classEndTime = classEndTime.substring(0, classEndTime.lastIndexOf(":")); |
| | | coursePackage.setClassStartTime(firstString); |
| | | coursePackage.setClassEndTime(secondString); |
| | | coursePackage.setAuditStatus(2); |
| | | if (UserExt.getUser().getObjectType() != 1){ |
| | | coursePackage.setAuditStatus(1); |
| | | } |
| | | coursePackageService.updateCoursePackage(coursePackage, coursePackagePaymentConfig); |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | return PREFIX + "TDiscount.html"; |
| | | } |
| | | @RequestMapping("/audit") |
| | |
| | | query.setProvince(province); |
| | | query.setCity(city); |
| | | query.setStoreId(storeId); |
| | | query.setInsertType(UserExt.getUser().getObjectType()); |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())).stream() |
| | |
| | | RechargeRecordsQuery rechargeRecordsQuery = new RechargeRecordsQuery(); |
| | | // 报名课程查询query |
| | | RegisterOrderQuery query = new RegisterOrderQuery(); |
| | | query.setInsertType(UserExt.getUser().getObjectType()); |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | query.setStoresIds(storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId",UserExt.getUser().getObjectId()) |
| | | ).stream().map(TStore::getId).collect(Collectors.toList())); |
| | | } |
| | | // 赛事活动查询query |
| | | CompetitionQuery competitionQuery = new CompetitionQuery(); |
| | | // 会员支付查询query |
| | |
| | | RechargeRecordsQuery rechargeRecordsQuery = new RechargeRecordsQuery(); |
| | | // 报名课程查询query |
| | | RegisterOrderQuery query = new RegisterOrderQuery(); |
| | | query.setInsertType(UserExt.getUser().getObjectType()); |
| | | query.setStoresIds(storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId",UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList())); |
| | | // 赛事活动查询query |
| | | CompetitionQuery competitionQuery = new CompetitionQuery(); |
| | | // 会员支付查询query |
| | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | coachQuery.setStoreId(UserExt.getUser().getObjectId()); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | // 运营商门店ids |
| | | List<Integer> storeIds = storeService |
| | | .list(new QueryWrapper<TStore>().eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | coachQuery.setStoreIds(storeIds); |
| | | } |
| | | return cancelledClassesClient.listAll(coachQuery); |
| | | } |
| | | /** |
| | |
| | | query.setProvince(province); |
| | | query.setCity(city); |
| | | query.setStoreId(storeId); |
| | | query.setInsertType(UserExt.getUser().getObjectType()); |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | query.setStoresIds(storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId",UserExt.getUser().getObjectId()) |
| | |
| | | } |
| | | } |
| | | } |
| | | // 运营商赛事添加 根据所选市 获取门店 |
| | | @RequestMapping("/getStoresYys") |
| | | @ResponseBody |
| | | public Object getStoresYys(String cityCode) { |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<TStore> stores = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId) |
| | | .eq("cityCode", cityCode)); |
| | | return stores; |
| | | } |
| | | |
| | | @RequestMapping("/tShop_add_one") |
| | | public String tCompetitionAddOne(Integer id,Model model) { |
| | |
| | | SiteBooking siteBooking = new SiteBooking(); |
| | | siteBooking.setId(id); |
| | | siteBooking.setStatus(1); |
| | | siteBooking.setPayType(4); |
| | | siteBooking.setPayUserId(UserExt.getUser().getObjectId()); |
| | | iSiteBookingService.updateById(siteBooking); |
| | | |
| | | return new ResultUtil<>(0,0,"手动支付成功",null,null); |
| | |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | Object code = list.get(0).get("code"); |
| | |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | model.addAttribute("objType", UserExt.getUser().getObjectType()); |
| | | |
| | | // 查询运营商下所有门店 所有场地 |
| | | if (objectType == 2){ |
| | | List<TStore> stores = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)); |
| | | model.addAttribute("store", stores); |
| | | // 门店ids |
| | | List<Integer> storeIds = stores.stream().map(TStore::getId).collect(Collectors.toList()); |
| | | List<TSite> sites = siteService.list(new QueryWrapper<TSite>().in("storeId", storeIds)); |
| | | model.addAttribute("site", sites); |
| | | } |
| | | model.addAttribute("objectType", objectType); |
| | | |
| | | return PREFIX+"yuyue_edit.html"; |
| | | } |
| | |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | |
| | | |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | |
| | | Object code = list.get(0).get("code"); |
| | | List<Map<String, Object>> list1 = storeService.queryCity(code.toString(), cityCode); |
| | | |
| | | model.addAttribute("city", list1); |
| | | String code1 = list1.get(0).get("code").toString(); |
| | | |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); |
| | | model.addAttribute("store", list2); |
| | | TStore store = list2.get(0); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | |
| | | |
| | | // 查询运营商下所有门店 所有场地 |
| | | if (objectType == 2){ |
| | | List<TStore> stores = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)); |
| | | model.addAttribute("store", stores); |
| | | // 门店ids |
| | | List<Integer> storeIds = stores.stream().map(TStore::getId).collect(Collectors.toList()); |
| | | List<TSite> sites = siteService.list(new QueryWrapper<TSite>().in("storeId", storeIds)); |
| | | model.addAttribute("site", sites); |
| | | } |
| | | model.addAttribute("objectType", objectType); |
| | | return PREFIX+"yuyue_info.html"; |
| | | } |
| | | |
| | |
| | | studentQeryDto.setStart(split[0]); |
| | | studentQeryDto.setEnd(split[1]); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 如果当前登陆人是运营商 只查询该运营商下的课包的数据 |
| | | if(UserExt.getUser().getObjectType() == 2){ |
| | | // 先查询这个运营商下的所有门店ids |
| | | List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>().eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | // 根据门店ids 查询所有课包ids |
| | | List<TCoursePackage> tCoursePackages = new ArrayList<>(); |
| | | for (Integer storeId : storeIds) { |
| | | List<TCoursePackage> coursePackageByStoreId = coursePackageClient.getCoursePackageByStoreId(storeId); |
| | | tCoursePackages.addAll(coursePackageByStoreId); |
| | | } |
| | | List<Integer> coursePackageByStoreIds = tCoursePackages.stream().distinct().map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | studentQeryDto.setCoursePackageIds(coursePackageByStoreIds); |
| | | } |
| | | List<Map<String, Object>> pays = coursePackageClient.getStudentTotal(studentQeryDto); |
| | | |
| | | System.out.println("=========getStudentTotal======="+pays); |
| | |
| | | pacQueryDto.setStart(split[0]); |
| | | pacQueryDto.setEnd(split[1]); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | if (UserExt.getUser().getObjectType() == 2){ |
| | | List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>().eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | pacQueryDto.setStoreIds(storeIds); |
| | | } |
| | | List<Map<String, Object>> pays = coursePackageClient.bypac(pacQueryDto); |
| | | |
| | | System.out.println("=========getStudentTotal======="+pays); |
| | | |
| | | return pays; |
| | | } |
| | | |
| | |
| | | } |
| | | List<Map<String,Object>> orders = ballClient.listorder(bookingQuery); |
| | | System.out.println("=======ballQueryDto=========="+bookingQuery); |
| | | for (Map<String, Object> vo : orders) { |
| | | |
| | | |
| | | if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 1){ |
| | | vo.put("payType","微信"); |
| | | } |
| | | if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 2){ |
| | | vo.put("payType","支付宝"); |
| | | } |
| | | if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 3){ |
| | | vo.put("payType","玩湃币"); |
| | | } |
| | | if (vo.get("payType")!=null && Integer.parseInt(vo.get("payType").toString()) == 4){ |
| | | if (vo.get("payUserId")!=null){ |
| | | User payUserId = userService.getById(Integer.parseInt(vo.get("payUserId").toString())); |
| | | if(payUserId!=null){ |
| | | vo.put("payType","手动支付"+"-"+payUserId.getName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return orders; |
| | | } |
| | | |
| | |
| | | String booker = siteBooking.getBooker(); |
| | | TAppUser appUserByPhone = appUserClient.getAppUserByPhone(phone); |
| | | TStore byId1 = storeService.getById(siteBooking.getStoreId()); |
| | | |
| | | if (appUserByPhone== null){ |
| | | // 则当前预约人不是会员 添加到会员表里 |
| | | TAppUser tAppUser = new TAppUser(); |
| | |
| | | tAppUser.setInsertTime(new Date()); |
| | | tAppUser.setPassword(MD5.md5("111111")); |
| | | appUserClient.addAppUser1(tAppUser); |
| | | siteBooking.setAppUserId(tAppUser.getId()); |
| | | }else{ |
| | | siteBooking.setAppUserId(appUserByPhone.getId()); |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.dto.*; |
| | | import com.dsh.course.entity.EvaluateStudent; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.StudentClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.CourseStuddentClient; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | | import com.dsh.course.feignClient.other.BallClient; |
| | | import com.dsh.course.feignClient.other.HistoryClient; |
| | | import com.dsh.course.model.MoneyBack; |
| | | import com.dsh.course.model.dto.InsertBackDto; |
| | |
| | | import com.dsh.course.util.HtmlToPdfUtils; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.CourseCounsum; |
| | | import com.dsh.guns.modular.system.model.TStudent; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.*; |
| | | import com.dsh.guns.modular.system.service.EvaluateStudentService; |
| | | import com.dsh.guns.modular.system.service.ISiteBookingService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITStudentService; |
| | | import com.dsh.guns.modular.system.util.BigDecimalToChineseAmountUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @Resource |
| | | private HistoryClient historyClient; |
| | | |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @RequestMapping("download") |
| | | public void down(HttpServletRequest request, HttpServletResponse response) throws IOException { |
| | |
| | | return new ResultUtil<>(0,0,null,map,null); |
| | | } |
| | | |
| | | @Autowired |
| | | private ISiteBookingService siteBookingService; |
| | | @Autowired |
| | | private BallClient ballClient; |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | search.setIds(ids); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | // 获取运营商下的所有门店id集合 |
| | | List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())) |
| | | .stream().map(TStore::getId).collect(Collectors.toList()); |
| | | // 根据门店id集合查询 属于该运营商下的门店举办的赛事 |
| | | ListQuery listQuery = new ListQuery(); |
| | | listQuery.setIds(storeIds); |
| | | // 通过门店ids 获取赛事的支付记录 获取到用户的ids |
| | | List<Integer> list = competitionClient.getUserIds(listQuery); |
| | | |
| | | // 获取场地预约记录 拿到用户ids |
| | | List<Integer> siteUsers = siteBookingService.list(new QueryWrapper<SiteBooking>().in("storeId", storeIds)) |
| | | .stream().map(SiteBooking::getAppUserId).collect(Collectors.toList()); |
| | | // 获取课程购买记录 拿到用户ids |
| | | List<Integer> cpUsers = coursePackageClient.getCoursePackageByStoreIds(storeIds); |
| | | // 获取游戏记录 拿到用户ids |
| | | List<Integer> gameUsers = ballClient.getGameByStoreIds(storeIds); |
| | | // 用户ids |
| | | List<Integer> users = new ArrayList<>(); |
| | | users.addAll(list); |
| | | users.addAll(siteUsers); |
| | | users.addAll(cpUsers); |
| | | users.addAll(gameUsers); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | ids = appUserClient.getUserYYs(UserExt.getUser().getObjectId()); |
| | | ids.addAll(collect); |
| | | List<Integer> collect1 = ids.stream().distinct().collect(Collectors.toList()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | search.setIds(collect1); |
| | | } |
| | | System.out.println("============学员查询接口========="); |
| | | return itStudentService.listAll(search); |
| | |
| | | private List<Integer> studentIds; |
| | | |
| | | private Integer storeId; |
| | | private List<Integer> storeIds; |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PacQueryDto { |
| | | String cityCode; |
| | |
| | | String start; |
| | | String end; |
| | | String provinceCode; |
| | | |
| | | |
| | | List<Integer> storeIds; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TStudentTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TStudent.openAddTStudent()"/> |
| | | |
| | | <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/> |
| | | |
| | | <#button name="添加" icon="fa-plus" clickFun="TStudent.openAddTStudent()"/> |
| | | @if(role == 1){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/> |
| | | @} |
| | | <#button name="确认到店" icon="fa-edit" clickFun="TStudent.openTStudentDetail1()" space="true"/> |
| | | <#button name="取消预约" icon="fa-edit" clickFun="TStudent.openTStudentDetail4()" space="true"/> |
| | | <#button name="手动支付" icon="fa-edit" clickFun="TStudent.openTStudentDetail6()" space="true"/> |
| | | |
| | | @if(role == 1){ |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail5()" space="true"/> |
| | | |
| | | @} |
| | | @if(shiro.hasPermission("/tStudent/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TStudent.delete()" space="true"/> |
| | | @} |
| | |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">预约人:</label> |
| | | <label class="col-sm-3 control-label">联系电话:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="phone" name="phone" type="text" > |
| | | |
| | |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | @if(objType !=3){ |
| | | @if(objType ==1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | @if(objectType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="type" name="type" value="${type}"> |
| | | <input type="hidden" id="objectType" value="${objectType}"> |
| | | @if(objectType==1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TCompetition.oneChange(this)"> |
| | | <select class="form-control" id="pCode" onchange="TQuestion.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="TQuestion.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TQuestion.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TCompetition.openAddTCompetition()"/> |
| | | <#button name="手动支付" icon="fa-remove" clickFun="TCompetition.unfreeze()" space="true"/> |
| | | <div class="hidden-xs" id="TQuestionTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TQuestion.openAddTQuestion()"/> |
| | | <#button name="手动支付" icon="fa-remove" clickFun="TQuestion.unfreeze()" space="true"/> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | <#table id="TQuestionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="col-sm-3 control-label">会员手机号:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="vipPhone" name="vipPhone" placeholder="请输入家长会员手机号" type="number"> |
| | | <#button btnCss="info" name="查询" id="ensure" icon="fa-check" clickFun="TCompetition.getStudent()"/> |
| | | <#button btnCss="info" name="查询" id="ensure" icon="fa-check" clickFun="TQuestion.getStudent()"/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TCompetition.oneChange(this)"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TCompetition.threeChange(this)"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.threeChange(this)"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="coursePackageType" name="store" onchange="TCompetition.getCoursePackage(this)" > |
| | | <select style="width: 300px" class="form-control" id="coursePackageType" name="store" onchange="TQuestion.getCoursePackage(this)" > |
| | | <option value="">请选择</option> |
| | | @for(obj in coursePackageType){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包名称:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="coursePackageName" name="store" onchange="TCompetition.getCoursePackageConfig(this)" > |
| | | <select style="width: 300px" class="form-control" id="coursePackageName" name="store" onchange="TQuestion.getCoursePackageConfig(this)" > |
| | | <option value="">选择课包</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(roleType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时规格:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="courseTime" name="store"> |
| | | <select style="width: 300px" class="form-control" id="courseTime" name="store" onchange="TQuestion.getCoursePackagePrice(this)"> |
| | | <option value="">选择规格</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | |
| | | <div class="form-group" id = "c1" hidden > |
| | | <label class="col-sm-3 control-label">*支付金额:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="cashPayment" name="cashPayment" placeholder="请输入金额" type="number"> |
| | | <span style="margin-left: 5px;margin-top: 5px">¥</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <div class="form-group" id = "c2" hidden > |
| | | <label class="col-sm-3 control-label">*玩湃币支付:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="playPaiCoin" name="playPaiCoin" placeholder="请输入金额" type="number"> |
| | |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCompetition.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCompetition.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TQuestion.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(type==2){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange9(this)"> |
| | | <option value="">选择省</option> |
| | | @for(i in province){ |
| | | <option value="${i.code}">${i.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">举办市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext9(this)"> |
| | | <option value="">选择市</option> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(type==1){ |
| | | <div class="form-group" id="shop"> |
| | | <label class="col-sm-3 control-label">举办门店:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(type==2){ |
| | | <div class="form-group" id="shop"> |
| | | <label class="col-sm-3 control-label">举办门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="shopId" name="shopId" multiple> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="赛事名称" type="text"/> |
| | | <#input id="startTime" name="开始时间" type="text"/> |
| | | <#input id="endTime" name="结束时间" type="text"/> |
| | |
| | | <h5>优惠券管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | |
| | | <input id="objectType" value="${objectType}" hidden="hidden"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="上架" icon="fa-plus" clickFun="TCompetition.updateState(1)"/> |
| | | <#button name="下架" icon="fa-edit" clickFun="TCompetition.updateState(2)" space="true"/> |
| | | @if(role == 1){ |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | |
| | | @} |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | |
| | | }} |
| | | ]; |
| | | }; |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | TQuestion.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 重置搜索 |
| | | */ |
| | |
| | | align: 'center', |
| | | valign: 'middle', |
| | | formatter: function(value, row) { |
| | | if (row.status === 0) { |
| | | if (row.status === 0 ) { |
| | | if (value) { |
| | | var moneyValues = value.split(','); |
| | | var moneyText = moneyValues[0] + '元/' + moneyValues[1] + '玩湃币'; |
| | |
| | | } |
| | | |
| | | else { |
| | | if (row.payType === 3){ |
| | | return row.payMoney+'玩湃币' }else { |
| | | if (row.payType === 4){ |
| | | var moneyValues = value.split(','); |
| | | var moneyText = moneyValues[0] + '元/' + moneyValues[1] + '玩湃币'; |
| | | return moneyText; |
| | | }else if (row.payType === 3){ |
| | | return row.payMoney+'玩湃币' }else { |
| | | return row.payMoney+'元' |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | }}, |
| | | {title: '发放方式', field: 'distributionMethod', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "积分购买", 2: "注册赠送", 3: "自动发券"}[value] |
| | | return {1: "积分购买", 2: "注册赠送", 3: "自动发券",4:"课包赠送"}[value] |
| | | }}, |
| | | {title: '有效期', field: 'timeValue', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户人群', field: 'userPopulation', visible: true, align: 'center', valign: 'middle', |
| | |
| | | |
| | | $(function () { |
| | | // console.log("父级"+window.parent.document.getElementById("cityCode").val()) |
| | | console.log("父级" + window.parent.document.getElementById("cityCode").value); |
| | | var defaultColunms = TCoupon.initColumn(); |
| | | var table = new BSTable(TCoupon.id, "/tCouponManage/list1", defaultColunms); |
| | | table.setPaginationType("client"); |
| | |
| | | // params.customParam2 = window.parent.document.getElementById("cityCode").value; |
| | | // return params; |
| | | // }; |
| | | |
| | | table.queryParams = {'cityCode': window.parent.document.getElementById("cityCode").value,'storeId': window.parent.document.getElementById("storeId").value} |
| | | table.height=400 |
| | | var cityCode = "" |
| | | console.log("看看市") |
| | | console.log(window.parent.document.getElementById("cityCode")) |
| | | if (!window.parent.document.getElementById("cityCode")== null){ |
| | | cityCode = window.parent.document.getElementById("cityCode").value; |
| | | } |
| | | table.queryParams = {'cityCode': cityCode, |
| | | 'storeId': window.parent.document.getElementById("storeId").value} |
| | | table.height=600 |
| | | TCoupon.table = table.init(); |
| | | }); |
| | |
| | | |
| | | }) |
| | | }); |
| | | if(null == provinceCode || '' == provinceCode){ |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | |
| | | if ($('#objectType').val() == 1) { |
| | | if (null == provinceCode || '' == provinceCode) { |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | } |
| | | if (null == cityCode || '' == cityCode) { |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | } |
| | | if(null == cityCode || '' == cityCode){ |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | |
| | | if(null == storeId || '' == storeId){ |
| | | Feng.error("所属门店不能为空"); |
| | | return |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | var TQuestion = { |
| | | id: "TQuestionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | TQuestion.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | TQuestion.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | | TCompetition.openAddTCompetition = function () { |
| | | TQuestion.openAddTQuestion = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | |
| | | /** |
| | | * 打开查看车辆管理详情 |
| | | */ |
| | | TCompetition.openTCompetitionDetail = function () { |
| | | TQuestion.openTCompetitionDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_update/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_update/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.info = function () { |
| | | TQuestion.info = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_info/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_info/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.gift = function () { |
| | | TQuestion.gift = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_gift/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_gift/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.indexSet = function () { |
| | | TQuestion.indexSet = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_indexSet/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_indexSet/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | /** |
| | | * 删除车辆管理 |
| | | */ |
| | | TCompetition.delete = function () { |
| | | TQuestion.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TCompetition.seItem.carLicensePlate; |
| | | var nickname = TQuestion.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | }else{ |
| | |
| | | }else { |
| | | swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success"); |
| | | } |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | |
| | | }); |
| | | } |
| | | }; |
| | | TCompetition.oneChange = function (e) { |
| | | TQuestion.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TCompetition.nextStore = function (e) { |
| | | TQuestion.nextStore = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | |
| | | ajax.set("storeId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.addSubmit = function(){ |
| | | TQuestion.addSubmit = function(){ |
| | | var data = { |
| | | appUserId:null, |
| | | studentId:null, |
| | |
| | | Feng.error("当前课包预约人数已满!") |
| | | }else{ |
| | | Feng.success("上架成功!"); |
| | | TCompetition.close(); |
| | | TCompetition.search(); |
| | | TQuestion.close(); |
| | | TQuestion.search(); |
| | | } |
| | | }, |
| | | error: function(xhr, status, error) { |
| | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCompetition.close = function() { |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | TCompetition.getCoursePackage = function (e) { |
| | | TQuestion.getCoursePackage = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | |
| | | ajax.set("storeId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.getCoursePackageConfig = function (e) { |
| | | TQuestion.getCoursePackageConfig = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.twoChange = function (e) { |
| | | TQuestion.twoChange = function (e) { |
| | | var oneId=e; |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TCompetition.threeChange = function (e) { |
| | | TQuestion.threeChange = function (e) { |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | | $.each(data, function(k,v) { |
| | |
| | | }; |
| | | |
| | | |
| | | TCompetition.getStudent = function () { |
| | | TQuestion.getStudent = function () { |
| | | var phone = $("#vipPhone").val(); |
| | | var phoneRegex = /^1[3456789]\d{9}$/; |
| | | // 使用正则表达式进行验证 |
| | |
| | | if (option.text === province) { |
| | | option.selected = true; |
| | | console.log(option.value) |
| | | TCompetition.twoChange(option.value); |
| | | TQuestion.twoChange(option.value); |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |
| | | } |
| | |
| | | option.selected = true; |
| | | c = option.text; |
| | | |
| | | TCompetition.threeChange(c) |
| | | TQuestion.threeChange(c) |
| | | |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |
| | |
| | | |
| | | }; |
| | | |
| | | TCompetition.freeze = function () { |
| | | TQuestion.freeze = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/freeze", function (data) { |
| | | Feng.success("冻结成功!"); |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("冻结失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | TCompetition.unfreeze = function () { |
| | | TQuestion.unfreeze = function () { |
| | | if (this.check()) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | |
| | |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("支付成功!"); |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!"; |
| | |
| | | }); |
| | | } |
| | | }; |
| | | TCompetition.reload = function () { |
| | | TQuestion.reload = function () { |
| | | if (this.check()) { |
| | | let id = this.seItem.id |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/pwd", function (data) { |
| | | Feng.success("重置成功!"); |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("重置失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | |
| | | |
| | | }; |
| | | |
| | | TCompetition.carInsurance = function () { |
| | | TQuestion.carInsurance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | TQuestion.search = function () { |
| | | var queryData = {}; |
| | | if ($('#pCode option:selected').text()!="全部"){ |
| | | queryData['province'] = $('#pCode option:selected').text(); |
| | |
| | | queryData['payStatus'] = $("#state").val(); |
| | | queryData['payUser'] = $("#payUser").val(); |
| | | queryData['payStudent'] = $("#payStudent").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | TQuestion.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TCompetition.resetSearch = function () { |
| | | TQuestion.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#coursePackage").val(""); |
| | |
| | | $("#state").val(""); |
| | | $("#payUser").val(""); |
| | | $("#payStudent").val(""); |
| | | TCompetition.search(); |
| | | TQuestion.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/cpPayment/listAll", defaultColunms); |
| | | var defaultColunms = TQuestion.initColumn(); |
| | | var table = new BSTable(TQuestion.id, "/cpPayment/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCompetition.table = table.init(); |
| | | TQuestion.table = table.init(); |
| | | }); |
| | | |
| | | |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | var TQuestion = { |
| | | id: "TQuestionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | TQuestion.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | TQuestion.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | | TCompetition.openAddTCompetition = function () { |
| | | TQuestion.openAddTQuestion = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | |
| | | /** |
| | | * 打开查看车辆管理详情 |
| | | */ |
| | | TCompetition.openTCompetitionDetail = function () { |
| | | TQuestion.openTQuestionDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_update/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_update/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.info = function () { |
| | | TQuestion.info = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_info/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_info/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.gift = function () { |
| | | TQuestion.gift = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_gift/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_gift/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.indexSet = function () { |
| | | TQuestion.indexSet = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_indexSet/' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/tShop/tShop_indexSet/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | /** |
| | | * 删除车辆管理 |
| | | */ |
| | | TCompetition.delete = function () { |
| | | TQuestion.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TCompetition.seItem.carLicensePlate; |
| | | var nickname = TQuestion.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | }else{ |
| | |
| | | }else { |
| | | swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success"); |
| | | } |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | |
| | | }); |
| | | } |
| | | }; |
| | | TCompetition.oneChange = function (e) { |
| | | TQuestion.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TCompetition.nextStore = function (e) { |
| | | TQuestion.nextStore = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | |
| | | ajax.set("storeId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.addSubmit = function(){ |
| | | TQuestion.addSubmit = function(){ |
| | | var data = { |
| | | appUserId:null, |
| | | studentId:null, |
| | |
| | | }else if(response == "5002"){ |
| | | Feng.error("剩余课时不足,无法购买!") |
| | | }else{ |
| | | Feng.success("上架成功!"); |
| | | TCompetition.close(); |
| | | window.parent.TCompetition.table.refresh(); |
| | | Feng.success("购买成功!"); |
| | | TQuestion.close(); |
| | | window.parent.TQuestion.table.refresh(); |
| | | } |
| | | }, |
| | | error: function(xhr, status, error) { |
| | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCompetition.close = function() { |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | TCompetition.getCoursePackage = function (e) { |
| | | TQuestion.getCoursePackage = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log("门店id") |
| | | console.log(oneId) |
| | |
| | | ajax.set("typeId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.getCoursePackageConfig = function (e) { |
| | | TQuestion.getCoursePackageConfig = function (e) { |
| | | var c1 = document.getElementById("c1"); |
| | | var c2 = document.getElementById("c2"); |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | |
| | | if(data!=null){ |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.classHours+"</option>"; |
| | | content += "<option value='"+v.id+"' data-cashPayment='"+v.cashPayment+"' data-playPaiCoin='"+v.playPaiCoin+"'>"+v.classHours+"</option>"; |
| | | }); |
| | | $("#courseTime").empty().append(content); |
| | | }else{ |
| | | c1.style.display = "none"; |
| | | c2.style.display = "none"; |
| | | } |
| | | }); |
| | | if (oneId == ""){ |
| | | console.log("关闭"); |
| | | c1.style.display = "none"; |
| | | c2.style.display = "none"; |
| | | }else{ |
| | | console.log("展示") |
| | | c1.style.display = 'block' |
| | | c2.style.display = 'block' |
| | | } |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.twoChange = function (e) { |
| | | TQuestion.getCoursePackagePrice = function (e) { |
| | | var c1 = document.getElementById("c1"); |
| | | var c2 = document.getElementById("c2"); |
| | | var oneId=$(e).val(); |
| | | var selectElement = document.getElementById('courseTime'); |
| | | var selectedOption = selectElement.options[selectElement.selectedIndex]; |
| | | console.log("插入") |
| | | var cashPayment = selectedOption.getAttribute('data-cashpayment'); |
| | | var playPaiCoin = selectedOption.getAttribute('data-playpaicoin'); |
| | | console.log(cashPayment) |
| | | console.log(playPaiCoin) |
| | | $("#cashPayment").val(cashPayment); |
| | | $("#playPaiCoin").val(playPaiCoin); |
| | | }; |
| | | TQuestion.twoChange = function (e) { |
| | | var oneId=e; |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TCompetition.threeChange = function (e) { |
| | | TQuestion.threeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | |
| | | ajax2.set("city",oneId); |
| | | ajax2.start(); |
| | | }; |
| | | TCompetition.fourChange = function (e) { |
| | | TQuestion.fourChange = function (e) { |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | | $.each(data, function(k,v) { |
| | |
| | | ajax2.start(); |
| | | }; |
| | | |
| | | TCompetition.getStudent = function () { |
| | | TQuestion.getStudent = function () { |
| | | var phone = $("#vipPhone").val(); |
| | | var phoneRegex = /^1[3456789]\d{9}$/; |
| | | // 使用正则表达式进行验证 |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | // todo 写用户管理路径 |
| | | content: Feng.ctxPath + '/appUser/add' |
| | | }); |
| | | this.layerIndex = index; |
| | | layer.closeAll('page'); |
| | | }, |
| | | }); |
| | | }else{ |
| | |
| | | // todo 写用户管理路径 |
| | | content: Feng.ctxPath + '/appUser/addStudent/'+appUserId |
| | | }); |
| | | this.layerIndex = index; |
| | | layer.closeAll('page'); |
| | | }, |
| | | }); |
| | | } |
| | |
| | | if (option.text === province) { |
| | | option.selected = true; |
| | | console.log(option.value) |
| | | TCompetition.twoChange(option.value); |
| | | TQuestion.twoChange(option.value); |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |
| | | } |
| | |
| | | if (option.text === city) { |
| | | option.selected = true; |
| | | c = option.text; |
| | | TCompetition.fourChange(c) |
| | | TQuestion.fourChange(c) |
| | | |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |
| | |
| | | |
| | | }; |
| | | |
| | | TCompetition.freeze = function () { |
| | | TQuestion.freeze = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/freeze", function (data) { |
| | | Feng.success("冻结成功!"); |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("冻结失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | TCompetition.unfreeze = function () { |
| | | TQuestion.unfreeze = function () { |
| | | if (this.check()) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | console.log("看看选择") |
| | |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("支付成功!"); |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!"; |
| | |
| | | }); |
| | | } |
| | | }; |
| | | TCompetition.reload = function () { |
| | | TQuestion.reload = function () { |
| | | if (this.check()) { |
| | | let id = this.seItem.id |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/pwd", function (data) { |
| | | Feng.success("重置成功!"); |
| | | TCompetition.table.refresh(); |
| | | TQuestion.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("重置失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | |
| | | |
| | | }; |
| | | |
| | | TCompetition.carInsurance = function () { |
| | | TQuestion.carInsurance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/TCompetition/carInsurance?carId=' + TCompetition.seItem.id |
| | | content: Feng.ctxPath + '/TQuestion/carInsurance?carId=' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | TQuestion.search = function () { |
| | | var queryData = {}; |
| | | if ($('#pCode option:selected').text()!="全部"){ |
| | | queryData['province'] = $('#pCode option:selected').text(); |
| | |
| | | queryData['payStatus'] = $("#state").val(); |
| | | queryData['payUser'] = $("#payUser").val(); |
| | | queryData['payStudent'] = $("#payStudent").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | TQuestion.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TCompetition.resetSearch = function () { |
| | | TQuestion.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#coursePackage").val(""); |
| | |
| | | $("#state").val(""); |
| | | $("#payUser").val(""); |
| | | $("#payStudent").val(""); |
| | | TCompetition.search(); |
| | | TQuestion.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/cpPayment/listAll", defaultColunms); |
| | | var defaultColunms = TQuestion.initColumn(); |
| | | var table = new BSTable(TQuestion.id, "/cpPayment/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCompetition.table = table.init(); |
| | | TQuestion.table = table.init(); |
| | | }); |
| | | |
| | | |
| | |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | } |
| | | |
| | | TCarInfoDlg.oneChange9 = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/getCityYys", function(data){ |
| | | if(data!=null){ |
| | | 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>"; |
| | | }); |
| | | $("#cCode1").empty().append(content); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("province",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCarInfoDlg.oneChangeNext9 = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/getStoresYys", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | }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.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#shopId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("cityCode",oneId); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | |
| | | formatter: function (value, row, index) { |
| | | return {1: "待审核", 2: "已通过",3: "已拒绝"}[value] |
| | | }}, |
| | | {title: '发布类型', field: 'publisherType', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "运营商", 2: "平台",3: "门店"}[value] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | |
| | | TCoupon.openChange = function () { |
| | | if (this.check()){ |
| | | let size = TCoupon.seItem.size |
| | | |
| | | if(size>0){ |
| | | Feng.info("没有该权限"); |
| | | return; |
| | | } |
| | | let publisherType = TCoupon.seItem.publisherType; |
| | | if ($("#objectType").val()==2){ |
| | | if(publisherType != 1){ |
| | | Feng.info("不能操作平台添加的优惠券"); |
| | | return; |
| | | } |
| | | } |
| | | let id = TCoupon.seItem.id |
| | | let name = TCoupon.seItem.name |
| | | let quantityIssued = TCoupon.seItem.quantityIssued |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> orderlist(BookingQuery bookingQuery) { |
| | | return this.baseMapper.orderlist(bookingQuery); |
| | | List<Map<String, Object>> orderlist = this.baseMapper.orderlist(bookingQuery); |
| | | |
| | | return orderlist; |
| | | } |
| | | } |