| | |
| | | @Autowired |
| | | private TCourseInfoRecordService courseInfoRecordService; |
| | | |
| | | |
| | | /** |
| | | * 获取所有用户 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/appUser/queryAppUserList") |
| | | public List<TAppUser> queryAppUserList(@RequestBody AppUserByNameAndPhoneDTO dto){ |
| | | return appUserService.queryAPPUserByNameAndPhone(dto); |
| | | } |
| | | /** |
| | | * 根据用户姓名和电话模糊查询 |
| | | */ |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | /** |
| | | * 添加类型 type = 1 平台 type=2 运营商 type=3门店 |
| | | */ |
| | | @TableField("insertType") |
| | | private Integer insertType; |
| | | /** |
| | | * 添加人id平台管理员id 运营商id |
| | | */ |
| | | @TableField("type") |
| | | private Integer addUserId; |
| | | } |
| | |
| | | private Integer state; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | private Integer payStatus; |
| | | |
| | | } |
| | |
| | | import com.dsh.activity.feignclient.model.*; |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.StoreDetailOfCourse; |
| | | import com.dsh.activity.model.CoachChangeStateVO; |
| | | import com.dsh.activity.model.PointMerchandiseIncomeVo; |
| | | import com.dsh.activity.model.PointMerchandiseVo; |
| | | import com.dsh.activity.model.request.*; |
| | | import com.dsh.activity.service.*; |
| | |
| | | |
| | | @Resource |
| | | private CouponCityService ccityService; |
| | | @Autowired |
| | | private UserPointsMerchandiseService userPointsMerchandiseService; |
| | | |
| | | /** |
| | | * 门票上下架 state=1 上架 state=2 下架 |
| | | */ |
| | | @RequestMapping("/base/pointMerchars/changeState") |
| | | public Object changeState(@RequestBody CoachChangeStateVO dto){ |
| | | return pmdsService.changeState(dto); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/ticketList") |
| | | public List<Map<String,Object>> ticketList(@RequestBody IntegralGoodsOfSearch ofSearch){ |
| | | List<Map<String, Object>> result = pmdsService.ticketList(ofSearch); |
| | | if (result.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : result) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | | String startTime = (String) stringObjectMap.get("startTime"); |
| | | String endTime = (String) stringObjectMap.get("endTime"); |
| | | stringObjectMap.put("timeValue",startTime + "至"+endTime); |
| | | int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o)); |
| | | int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o) |
| | | .eq(UserPointsMerchandise::getStatus,2)); |
| | | stringObjectMap.put("hasExchangeQty",count1); |
| | | stringObjectMap.put("hasPickQty",count2); |
| | | |
| | | stringObjectMap.put("activeStatus",dealTimeStatus(startTime,endTime)); |
| | | } |
| | | if (ToolUtil.isNotEmpty(ofSearch.getActiveStatus())){ |
| | | result = dealTimeData(result,ofSearch.getActiveStatus()); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/queryGoodsListSearch") |
| | | public List<Map<String,Object>> getIntegralGoodsListOfSearch(@RequestBody IntegralGoodsOfSearch ofSearch){ |
| | | System.out.println(ofSearch); |
| | | List<Map<String, Object>> mapList = pmdsService.queryGoodsListOfSearch(ofSearch); |
| | | if (mapList.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | | String startTime = (String) stringObjectMap.get("startTime"); |
| | | String endTime = (String) stringObjectMap.get("endTime"); |
| | | stringObjectMap.put("timeValue",startTime + "至"+endTime); |
| | | int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o)); |
| | | int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o) |
| | | .eq(UserPointsMerchandise::getStatus,2)); |
| | | stringObjectMap.put("hasExchangeQty",count1); |
| | | stringObjectMap.put("hasPickQty",count2); |
| | | |
| | | stringObjectMap.put("activeStatus",dealTimeStatus(startTime,endTime)); |
| | | } |
| | | if (ToolUtil.isNotEmpty(ofSearch.getActiveStatus())){ |
| | | mapList = dealTimeData(mapList,ofSearch.getActiveStatus()); |
| | | } |
| | | } |
| | | System.out.println("mapList->"+mapList); |
| | | return mapList; |
| | | } |
| | | /** |
| | | * 获取积分商票消费金额 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/base/pointMerchars/getAmount") |
| | | public List<PointMerchandiseIncomeVo> getAmount(){ |
| | | return userPointsMerchandiseService.getAmount(); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/convertGoods") |
| | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/queryGoodsListSearch") |
| | | public List<Map<String,Object>> getIntegralGoodsListOfSearch(@RequestBody IntegralGoodsOfSearch ofSearch){ |
| | | System.out.println(ofSearch); |
| | | List<Map<String, Object>> mapList = pmdsService.queryGoodsListOfSearch(ofSearch); |
| | | if (mapList.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | | String startTime = (String) stringObjectMap.get("startTime"); |
| | | String endTime = (String) stringObjectMap.get("endTime"); |
| | | stringObjectMap.put("timeValue",startTime + "至"+endTime); |
| | | int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o)); |
| | | int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o) |
| | | .eq(UserPointsMerchandise::getStatus,2)); |
| | | stringObjectMap.put("hasExchangeQty",count1); |
| | | stringObjectMap.put("hasPickQty",count2); |
| | | |
| | | stringObjectMap.put("activeStatus",dealTimeStatus(startTime,endTime)); |
| | | } |
| | | if (ToolUtil.isNotEmpty(ofSearch.getActiveStatus())){ |
| | | mapList = dealTimeData(mapList,ofSearch.getActiveStatus()); |
| | | } |
| | | } |
| | | System.out.println("mapList->"+mapList); |
| | | return mapList; |
| | | } |
| | | |
| | | public int dealTimeStatus(String startTime, String endTime){ |
| | | LocalDate now = LocalDate.now(); |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.dsh.activity.model.CoachChangeStateVO; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | @Param("state") Integer state, |
| | | @Param("page") Page<Map<String, Object>> page); |
| | | |
| | | List<Map<String, Object>> ticketList(@Param("query") IntegralGoodsOfSearch ofSearch); |
| | | |
| | | int changeState(@Param("query") CoachChangeStateVO dto); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.activity.entity.UserPointsMerchandise; |
| | | import com.dsh.activity.model.PointMerchandiseIncomeVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | public interface UserPointsMerchandiseMapper extends BaseMapper<UserPointsMerchandise> { |
| | | |
| | | |
| | | List<PointMerchandiseIncomeVo> getAmount(); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class CoachChangeStateVO { |
| | | private List<Integer> ids; |
| | | private Integer state; |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model; |
| | | |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 营收数据-平台 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PointMerchandiseIncomeVo { |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | private BigDecimal cash; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.dsh.activity.model.CoachChangeStateVO; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | List<Map<String, Object>> queryGoodsListOfSearch(IntegralGoodsOfSearch ofSearch); |
| | | |
| | | List<Map<String, Object>> ticketList(IntegralGoodsOfSearch ofSearch); |
| | | |
| | | Object changeState(CoachChangeStateVO dto); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.activity.entity.UserPointsMerchandise; |
| | | import com.dsh.activity.model.PointMerchandiseIncomeVo; |
| | | import com.dsh.activity.model.request.PointMercharsPayedVo; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | public interface UserPointsMerchandiseService extends IService<UserPointsMerchandise> { |
| | | |
| | | List<PointMerchandiseIncomeVo> getAmount(); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.dsh.activity.mapper.PointsMerchandiseMapper; |
| | | import com.dsh.activity.model.CoachChangeStateVO; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | import com.dsh.activity.service.PointsMerchandiseService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | return this.baseMapper.queryGoodsListOfSearch(ofSearch.getName(),ofSearch.getType(),ofSearch.getRedemptionMethod(), |
| | | ofSearch.getUserPopulation(),ofSearch.getActiveStatus(),ofSearch.getState(),ofSearch.getPage()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> ticketList(IntegralGoodsOfSearch ofSearch) { |
| | | return this.baseMapper.ticketList(ofSearch); |
| | | } |
| | | |
| | | @Override |
| | | public Object changeState(CoachChangeStateVO dto) { |
| | | return this.baseMapper.changeState(dto); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.UserPointsMerchandise; |
| | | import com.dsh.activity.mapper.UserPointsMerchandiseMapper; |
| | | import com.dsh.activity.model.PointMerchandiseIncomeVo; |
| | | import com.dsh.activity.model.request.PointMercharsPayedVo; |
| | | import com.dsh.activity.service.UserPointsMerchandiseService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | @Service |
| | | public class UserPointsMerchandiseServiceImpl extends ServiceImpl<UserPointsMerchandiseMapper, UserPointsMerchandise> implements UserPointsMerchandiseService { |
| | | |
| | | @Autowired |
| | | private UserPointsMerchandiseMapper userPointsMerchandiseMapper; |
| | | @Override |
| | | public List<PointMerchandiseIncomeVo> getAmount() { |
| | | return userPointsMerchandiseMapper.getAmount(); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | <select id="ticketList" resultType="java.util.Map"> |
| | | SELECT id, |
| | | `name`, |
| | | cardType, |
| | | `cover`, |
| | | date_format(startTime ,'%Y-%m-%d') as startTime, |
| | | date_format(endTime ,'%Y-%m-%d') as endTime, |
| | | `type`, |
| | | useScope, |
| | | userPopulation, |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | `sort`, |
| | | shelves |
| | | from t_points_merchandise |
| | | where 1 = 1 |
| | | <if test="query.name != null"> |
| | | and `name` like concat('%', #{query.name}, '%') |
| | | </if> |
| | | <if test="query.type != null"> |
| | | and cardType = #{query.type} |
| | | </if> |
| | | <if test="query.redemptionMethod != null"> |
| | | and redemptionMethod = #{query.redemptionMethod} |
| | | </if> |
| | | <if test="query.userPopulation != null"> |
| | | and userPopulation = #{query.userPopulation} |
| | | </if> |
| | | <if test="query.state != null"> |
| | | and `state` = #{query.state} |
| | | </if> |
| | | and `type` = 3 |
| | | order by sort desc |
| | | </select> |
| | | <select id="changeState" resultType="java.lang.Integer"> |
| | | update t_points_merchandise set |
| | | shelves = #{query.state} |
| | | <where> |
| | | <if test="query.ids != null and query.ids.size()>0"> |
| | | AND t_points_merchandise.id IN |
| | | <foreach collection="query.ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | <mapper namespace="com.dsh.activity.mapper.UserPointsMerchandiseMapper"> |
| | | |
| | | |
| | | <select id="getAmount" resultType="com.dsh.activity.model.PointMerchandiseIncomeVo"> |
| | | select t1.*,t2.cash from t_user_points_merchandise t1 |
| | | left join t_points_merchandise t2 on t1.pointsMerchandiseId = t2.id |
| | | where t1.payStatus =2 |
| | | </select> |
| | | </mapper> |
| | |
| | | Integer absencesNumber = one.getAbsencesNumber(); |
| | | // 没有过期 |
| | | if (one.getUseTime().after(new Date())){ |
| | | packagePayment.setTotalClassHours(packagePayment.getClassHours()+one.getTotalClassHours()); |
| | | if (one.getLaveClassHours()-packagePayment.getClassHours()<0){ |
| | | return 5002; |
| | | } |
| | | packagePayment.setTotalClassHours(one.getTotalClassHours()); |
| | | packagePayment.setLaveClassHours(one.getLaveClassHours()-packagePayment.getClassHours()); |
| | | packagePayment.setAbsencesNumber(one.getAbsencesNumber()); |
| | | } |
| | |
| | | CoursePackageStudentService studentService ; |
| | | @Autowired |
| | | TCoursePackagePaymentService paymentService; |
| | | @Autowired |
| | | private CourseCounsumService counsumService; |
| | | |
| | | //获取退费记录 |
| | | @RequestMapping("/getRefund") |
| | | @ResponseBody |
| | | public List<MoneyBack> getRefund() { |
| | | // 查询已通过申请的退费记录 |
| | | return counsumService.getRefund(); |
| | | } |
| | | |
| | | //获取学员课时数信息 |
| | | @RequestMapping("/getInfo") |
| | | @ResponseBody |
| | |
| | | return selectDtos; |
| | | } |
| | | |
| | | @Autowired |
| | | private CourseCounsumService counsumService; |
| | | |
| | | @RequestMapping("/queryCounsum") |
| | | @ResponseBody |
| | | public List<CourseCounsum> queryCounsum(@RequestBody ConsumeQuery consumeQuery){ |
| | |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.TCourseInfoRecord; |
| | | import com.dsh.course.model.AppUserByNameAndPhoneDTO; |
| | | import com.dsh.course.model.TAppUser; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.entity.CancelledClasses; |
| | | import com.dsh.course.entity.MoneyBack; |
| | | import com.dsh.course.model.CancelClassesQuery; |
| | | import com.dsh.course.model.CancelClassesVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | public interface CancelledClassesMapper extends BaseMapper<CancelledClasses> { |
| | | |
| | | List<CancelClassesVO> listAll(@Param("query") CancelClassesQuery query,@Param("sTime")String sTime,@Param("eTime")String eTime); |
| | | |
| | | List<MoneyBack> getRefund(); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 退费记录列表VO |
| | | */ |
| | | @Data |
| | | public class CoursePackageRefundVO { |
| | | |
| | | private BigDecimal cashPayment; |
| | | private Date insertTime; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.CancelledClasses; |
| | | import com.dsh.course.entity.CourseCounsum; |
| | | import com.dsh.course.entity.MoneyBack; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface CourseCounsumService extends IService<CourseCounsum> { |
| | | |
| | | List<MoneyBack> getRefund(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.entity.CancelledClasses; |
| | | import com.dsh.course.entity.CourseCounsum; |
| | | import com.dsh.course.entity.MoneyBack; |
| | | import com.dsh.course.mapper.CancelledClassesMapper; |
| | | import com.dsh.course.mapper.CourseCounsumMapper; |
| | | import com.dsh.course.mapper.MoneyBackMapper; |
| | | import com.dsh.course.service.CancelledClassesService; |
| | | import com.dsh.course.service.CourseCounsumService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class CourseCounsumServiceImpl extends ServiceImpl<CourseCounsumMapper, CourseCounsum> implements CourseCounsumService { |
| | | @Autowired |
| | | private CancelledClassesMapper mapper; |
| | | @Override |
| | | public List<MoneyBack> getRefund() { |
| | | return mapper.getRefund(); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getRefund" resultType="com.dsh.course.entity.MoneyBack"> |
| | | select * from t_back_money where status = 1 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | update t_course_package_payment set totalClassHours =totalClassHours +#{i},classHours =classHours+#{i},laveClassHours =laveClassHours+#{i} where id =#{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="queryCountNumber" resultType="int"> |
| | | SELECT |
| | | count( 1 ) AS num |
| | |
| | | SELECT appUserId FROM t_course_package_payment WHERE payStatus = 2 AND state = 1 and coursePackageId = #{coursePackageId} GROUP BY appUserId |
| | | ) AS aa |
| | | </select> |
| | | |
| | | |
| | | <select id="getCoursePackagePaymentByCode" resultType="com.dsh.course.entity.TCoursePackagePayment"> |
| | | select * from t_course_package_payment where 1=1 |
| | |
| | | import com.dsh.course.feignClient.activity.model.IntegralGoodsOfSearch; |
| | | import com.dsh.course.feignClient.activity.model.PointMercharsPayedVo; |
| | | import com.dsh.course.feignClient.activity.model.PointMercharsVo; |
| | | import com.dsh.guns.modular.system.model.CoachChangeStateVO; |
| | | import com.dsh.guns.modular.system.model.PointMerchandiseIncomeVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface PointMercharsClient { |
| | | /** |
| | | * 门票上下架 state=1 上架 state=2 下架 |
| | | */ |
| | | @RequestMapping("/base/pointMerchars/changeState") |
| | | Object changeState(@RequestBody CoachChangeStateVO dto); |
| | | /** |
| | | * 门票管理查询 |
| | | * @param ofSearch |
| | | * @return |
| | | */ |
| | | @PostMapping("/base/pointMerchars/ticketList") |
| | | List<Map<String,Object>> ticketList(@RequestBody IntegralGoodsOfSearch ofSearch); |
| | | /** |
| | | * 获取积分商票消费金额 |
| | | */ |
| | | @RequestMapping("/base/pointMerchars/getAmount") |
| | | List<PointMerchandiseIncomeVo> getAmount(); |
| | | |
| | | @PostMapping("/base/pointMerchars/queryGoodsListSearch") |
| | | List<Map<String,Object>> getIntegralGoodsListOfSearch(@RequestBody IntegralGoodsOfSearch ofSearch); |
New file |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.dsh.course.feignClient.course.model.CancelledClasses; |
| | | import com.dsh.course.model.MoneyBack; |
| | | import com.dsh.guns.modular.system.model.CancelClassesQuery; |
| | | import com.dsh.guns.modular.system.model.CancelClassesVO; |
| | | import com.dsh.guns.modular.system.model.CourseCounsum; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/12 3:45 |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface RefundCoursePackageClient { |
| | | |
| | | //获取退费记录 |
| | | @RequestMapping("/getRefund") |
| | | List<MoneyBack> getRefund(); |
| | | } |
| | |
| | | public interface SiteClient { |
| | | |
| | | /** |
| | | * 获取所有场地 |
| | | */ |
| | | @RequestMapping("/base/site/getList") |
| | | List<Site> getList(); |
| | | /** |
| | | * 获取场地预约记录 |
| | | */ |
| | | @RequestMapping("/base/site/listAll") |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.SiteBooking; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/13 16:48 |
| | | */ |
| | | public interface SiteBookingMapper extends BaseMapper<SiteBooking> { |
| | | |
| | | } |
| | |
| | | |
| | | List<Map<String, Object>> queryListOfpage(@Param("provinceCode") String provinceCode, |
| | | @Param("cityCode") String cityCode, |
| | | @Param("cityManagerId") Integer cityManagerId, |
| | | @Param("operatorId") Integer operatorId, |
| | | @Param("storeName") String storeName, |
| | | @Param("page") Page<Map<String, Object>> page); |
| | | |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.guns.modular.system.model.Bank; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOperatorMapper extends BaseMapper<TOperator> { |
| | | |
| | | List<Map<String, Object>> listAll(@Param("page")Page<Map<String, Object>> page,@Param("userName")String name,@Param("phone")String phone,@Param("type")Integer type); |
| | | |
| | | int changeState(@Param("ids") List<Integer> ids, @Param("state") Integer state); |
| | | |
| | | List<Bank> getBankList(); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.guns.modular.system.model.OperatorUser; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 运营商商户 Mapper 接口 |
| | | * </p> |
| | | */ |
| | | public interface TOperatorUserMapper extends BaseMapper<OperatorUser> { |
| | | |
| | | List<Map<String, Object>> listAll(@Param("page")Page<Map<String, Object>> page, |
| | | @Param("province") String province, |
| | | @Param("city")String city, |
| | | @Param("userName")String userName, |
| | | @Param("phone") String phone, |
| | | @Param("platform")Integer platform, |
| | | @Param("type")Integer type, |
| | | @Param("state")Integer state); |
| | | |
| | | } |
| | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String birthday = format.format(data.get(0).getBirthday()); |
| | | model.addAttribute("birthday",birthday); |
| | | return PREFIX + "TCoach_edit.html"; |
| | | return PREFIX + "Operator_edit.html"; |
| | | } |
| | | /** |
| | | * 获取教练列表 |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.FinanceClient; |
| | | import com.dsh.course.feignClient.account.*; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.course.CancelledClassesClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.account.model.VipPayment; |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.Competition; |
| | | import com.dsh.course.feignClient.competition.model.CompetitionQuery; |
| | | import com.dsh.course.feignClient.competition.model.PaymentCompetition; |
| | | import com.dsh.course.feignClient.course.*; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | | import com.dsh.course.feignClient.other.SiteClient; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.course.model.MoneyBack; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import groovyjarjarpicocli.CommandLine; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.*; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 数据统计控制器 |
| | |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private CityManagerClient cityManagerClient; |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private VipPaymentClient vipPaymentClient; |
| | | @Autowired |
| | | private FinanceClient financeClient; |
| | | @Autowired |
| | | private CoursePackagePaymentClient coursePackagePaymentClient; |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | @Autowired |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private SiteClient siteClient; |
| | | @Autowired |
| | | private PointMercharsClient pointMercharsClient; |
| | | @Autowired |
| | | private RefundCoursePackageClient refundCoursePackageClient; |
| | | @Resource |
| | | private CourseStuddentClient courseStuddentClient; |
| | | @Autowired |
| | | private CoursePackageClient coursePackageClient; |
| | | /** |
| | | * 跳转到平台统计数据页面 |
| | | */ |
| | |
| | | public String index(Model model) { |
| | | return PREFIX + "platformIncome.html"; |
| | | } |
| | | |
| | | /** |
| | | * 营收数据-平台 |
| | | * |
| | | */ |
| | | @RequestMapping(value = "/getIncomeData") |
| | | @ResponseBody |
| | | public Object getIncomeData(Integer type) { |
| | | // 充值记录查询query |
| | | RechargeRecordsQuery rechargeRecordsQuery = new RechargeRecordsQuery(); |
| | | // 报名课程查询query |
| | | RegisterOrderQuery query = new RegisterOrderQuery(); |
| | | // 赛事活动查询query |
| | | CompetitionQuery competitionQuery = new CompetitionQuery(); |
| | | // 会员支付查询query |
| | | IncomeQuery incomeQuery = new IncomeQuery(); |
| | | // 场地预约记录查询query |
| | | SiteBookingQuery siteBookingQuery = new SiteBookingQuery(); |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | IncomeVO incomeVO = new IncomeVO(); |
| | | List<IncomeVO> incomeVOS = new ArrayList<>(); |
| | | // 会员支付记录 |
| | | List<VipPayment> vipPayments = vipPaymentClient.registrationList(incomeQuery); |
| | | for (VipPayment vipPayment : vipPayments) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | if (vipPayment.getPayStatus()==1){ |
| | | temp.setInsertTime(vipPayment.getInsertTime()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | if (vipPayment.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(vipPayment.getAmount().toString())); |
| | | } |
| | | } |
| | | // 充值记录 |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(rechargeRecordsQuery); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(rechargeRecordsVO.getInsertTime()); |
| | | if (rechargeRecordsVO.getAmount() != null) { |
| | | temp.setAmount(rechargeRecordsVO.getAmount()); |
| | | } |
| | | if (rechargeRecordsVO.getPayStatus() ==1){ |
| | | incomeVOS.add(temp); |
| | | } |
| | | |
| | | } |
| | | // 报名课程记录 |
| | | List<RegisterOrderVO> registerOrderVOS = coursePackagePaymentClient.listAllRegister(query); |
| | | for (RegisterOrderVO registerOrderVO : registerOrderVOS) { |
| | | if (registerOrderVO.getMoney() == null) { |
| | | continue; |
| | | } |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(registerOrderVO.getInsertTime()); |
| | | if (registerOrderVO.getMoney() != null) { |
| | | temp.setAmount(registerOrderVO.getMoney()); |
| | | } |
| | | if (registerOrderVO.getPayStatus()==2){ |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | // 报名活动 |
| | | List<PaymentCompetition> competitions = competitionClient.listAllPayment(competitionQuery); |
| | | for (PaymentCompetition competition : competitions) { |
| | | if (competition.getPayStatus() != 2) { |
| | | continue; |
| | | } |
| | | if (competition.getPayType()==3 || competition.getPayType()==4){ |
| | | continue; |
| | | } |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(competition.getInsertTime()); |
| | | if (competition.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(competition.getAmount().toString())); |
| | | } |
| | | incomeVOS.add(temp); |
| | | } |
| | | // 预约场地 |
| | | List<SiteBooking> siteBookings = siteClient.listAll(siteBookingQuery); |
| | | for (SiteBooking siteBooking : siteBookings) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | if(siteBooking.getStatus()!=3){ |
| | | continue; |
| | | } |
| | | temp.setInsertTime(siteBooking.getPayTime()); |
| | | if (siteBooking.getPayMoney() != null) { |
| | | temp.setAmount(new BigDecimal(siteBooking.getPayMoney().toString())); |
| | | } |
| | | incomeVOS.add(temp); |
| | | } |
| | | // 积分商品 |
| | | List<PointMerchandiseIncomeVo> amount = pointMercharsClient.getAmount(); |
| | | for (PointMerchandiseIncomeVo pointMerchandiseIncomeVo : amount) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(pointMerchandiseIncomeVo.getInsertTime()); |
| | | if (pointMerchandiseIncomeVo.getCash()!=null){ |
| | | temp.setAmount(pointMerchandiseIncomeVo.getCash()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | |
| | | // 最终返回的数据 |
| | | Map<String, List<Object>> monthlyData = new HashMap<>(); |
| | | // 创建一个 Map 用于存储每年的累计 amount |
| | | Map<Integer, BigDecimal> yearToTotalAmountMap = new HashMap<>(); |
| | | // 初始化一个 BigDecimal 用于累加 |
| | | BigDecimal totalAmount1 = BigDecimal.ZERO; |
| | | // 用于返回图表上的总营收 年度营收 月度 周度 日度 |
| | | List<Object> objects = new ArrayList<>(); |
| | | // 遍历 incomeVOS |
| | | for (IncomeVO incomeVO1 : incomeVOS) { |
| | | // 总营收 |
| | | BigDecimal total = incomeVO1.getAmount(); |
| | | // 累加到总金额 |
| | | totalAmount1 = totalAmount1.add(total); |
| | | |
| | | Date insertTime = incomeVO1.getInsertTime(); // 假设有一个方法用于获取 insertTime |
| | | BigDecimal amount1 = incomeVO1.getAmount(); // 假设有一个方法用于获取 amount |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(insertTime); |
| | | int year = calendar.get(Calendar.YEAR); // 获取年份 |
| | | // 更新年份对应的累计 amount |
| | | if (yearToTotalAmountMap.containsKey(year)) { |
| | | BigDecimal totalAmount = yearToTotalAmountMap.get(year); |
| | | yearToTotalAmountMap.put(year, totalAmount.add(amount1)); |
| | | } else { |
| | | yearToTotalAmountMap.put(year, amount1); |
| | | } |
| | | } |
| | | objects.add(totalAmount1); |
| | | // 创建一个新的列表,按年份升序排列 |
| | | List<Integer> sortedYears = new ArrayList<>(yearToTotalAmountMap.keySet()); |
| | | Collections.sort(sortedYears); |
| | | // 创建一个新的 IncomeVO 列表,包含按年份累计的 amount |
| | | List<Object> resultIncomeVOS = new ArrayList<>(); |
| | | // 循环遍历2023年到2028年的年份 |
| | | for (int year = 2023; year <= 2028; year++) { |
| | | BigDecimal totalAmount = yearToTotalAmountMap.getOrDefault(year, BigDecimal.ZERO); |
| | | // 创建一个新的 IncomeVO 对象,并设置年份和累计金额 |
| | | IncomeVO resultIncomeVO = new IncomeVO(); |
| | | resultIncomeVO.setAmount(totalAmount); |
| | | resultIncomeVOS.add(resultIncomeVO); |
| | | } |
| | | monthlyData.put("yearIncome",resultIncomeVOS); |
| | | |
| | | // 创建一个 Map 用于存储今年每个月的累计 amount |
| | | Map<Integer, BigDecimal> monthToTotalAmountMap = new HashMap<>(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | int currentYear = calendar.get(Calendar.YEAR); |
| | | List<BigDecimal> monthlyAmountList = new ArrayList<>(Collections.nCopies(12, BigDecimal.ZERO)); |
| | | |
| | | for (IncomeVO incomeVO1 : incomeVOS) { |
| | | Calendar calendar1 = Calendar.getInstance(); |
| | | calendar1.setTime(incomeVO1.getInsertTime()); |
| | | int year = calendar1.get(Calendar.YEAR); |
| | | int month = calendar1.get(Calendar.MONTH) + 1; // 月份从0开始,所以需要加1 |
| | | if (year == currentYear) { |
| | | BigDecimal totalAmount = monthlyAmountList.get(month - 1); |
| | | totalAmount = totalAmount.add(incomeVO1.getAmount()); |
| | | monthlyAmountList.set(month - 1, totalAmount); |
| | | } |
| | | } |
| | | monthlyData.put("monthIncome", Collections.singletonList(monthlyAmountList)); |
| | | |
| | | // 获取当前月份 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | int currentMonth = currentDate.getMonthValue(); |
| | | // 初始化一个长度为当前月份的天数的列表,并将每一天的金额初始化为零 |
| | | int daysInCurrentMonth = currentDate.lengthOfMonth(); |
| | | List<BigDecimal> weekAmount = new ArrayList<>(daysInCurrentMonth); |
| | | for (int i = 0; i < daysInCurrentMonth; i++) { |
| | | weekAmount.add(BigDecimal.ZERO); |
| | | } |
| | | for (IncomeVO incomeVO1 : incomeVOS) { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String string = dateFormat.format(incomeVO1.getInsertTime()); |
| | | LocalDate insertDate = LocalDate.parse(string, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | if (insertDate.getMonthValue() == currentMonth) { |
| | | int dayOfMonth = insertDate.getDayOfMonth(); |
| | | BigDecimal currentAmount = weekAmount.get(dayOfMonth - 1); // 列表索引从0开始 |
| | | weekAmount.set(dayOfMonth - 1, currentAmount.add(incomeVO1.getAmount())); |
| | | } |
| | | } |
| | | monthlyData.put("weekIncome", Collections.singletonList(weekAmount)); |
| | | |
| | | LocalDateTime currentDateTime = LocalDateTime.now(); |
| | | List<BigDecimal> amountByDay = new ArrayList<>(Collections.nCopies(7, BigDecimal.ZERO)); |
| | | for (IncomeVO incomeVO3 : incomeVOS) { |
| | | Date insertTime = incomeVO3.getInsertTime(); |
| | | // 将 Date 转换为 LocalDateTime |
| | | LocalDateTime insertDateTime = LocalDateTime.ofInstant(insertTime.toInstant(), ZoneId.systemDefault()); |
| | | // 计算日期与当前日期的差距 |
| | | long daysDifference = ChronoUnit.DAYS.between(insertDateTime.toLocalDate(), currentDateTime.toLocalDate()); |
| | | // 如果日期在七天内,累加金额 |
| | | if (daysDifference >= 0 && daysDifference < 7) { |
| | | int index = (int) (6 - daysDifference); // 计算对应的索引位置 |
| | | BigDecimal amount3 = incomeVO3.getAmount(); |
| | | BigDecimal updatedAmount = amountByDay.get(index).add(amount3); |
| | | amountByDay.set(index, updatedAmount); |
| | | |
| | | } |
| | | } |
| | | |
| | | monthlyData.put("dayIncome", Collections.singletonList(amountByDay)); |
| | | // 创建一个 Map 用于存储今年本周的累计 amount |
| | | Map<Integer, BigDecimal> dayToTotalAmountMap = new HashMap<>(); |
| | | BigDecimal yearAmount = BigDecimal.ZERO; // 初始化累加变量为0 |
| | | BigDecimal monthAmount = BigDecimal.ZERO; // 初始化累加变量为0 |
| | | BigDecimal todayAmount = BigDecimal.ZERO; // 初始化累加变量为0 |
| | | // 获取当前日期和时间 |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | // 今年的起始日期和结束日期 |
| | | LocalDateTime startOfYear = now.with(TemporalAdjusters.firstDayOfYear()).with(LocalTime.MIN); |
| | | LocalDateTime endOfYear = now.with(TemporalAdjusters.lastDayOfYear()).with(LocalTime.MAX); |
| | | // 本月的起始日期和结束日期 |
| | | LocalDateTime startOfMonth = now.with(TemporalAdjusters.firstDayOfMonth()).with(LocalTime.MIN); |
| | | LocalDateTime endOfMonth = now.with(TemporalAdjusters.lastDayOfMonth()).with(LocalTime.MAX); |
| | | // 本周的起始日期和结束日期 |
| | | LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).with(LocalTime.MIN); |
| | | LocalDateTime endOfWeek = now.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)).with(LocalTime.MAX); |
| | | // 今天的起始日期和结束日期 |
| | | LocalDateTime startOfDay = now.with(LocalTime.MIN); |
| | | LocalDateTime endOfDay = now.with(LocalTime.MAX); |
| | | // 创建日期格式化器 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 筛选符合条件的IncomeVO对象 |
| | | List<IncomeVO> thisYearIncome = incomeVOS.stream() |
| | | .filter(income -> { |
| | | Date insertTime = income.getInsertTime(); |
| | | try { |
| | | LocalDateTime insertDateTime = LocalDateTime.ofInstant(insertTime.toInstant(), ZoneId.systemDefault()); |
| | | return insertDateTime.isAfter(startOfYear) && insertDateTime.isBefore(endOfYear); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | // 使用 map 方法将 IncomeVO 转换为 BigDecimal,提取出 amount 字段 |
| | | List<BigDecimal> amounts = thisYearIncome.stream() |
| | | .map(IncomeVO::getAmount) |
| | | .collect(Collectors.toList()); |
| | | //本年总收入 |
| | | BigDecimal totalAmount = amounts.stream() |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | // 用于展示总营收 本年度营收 本月营收 本周营收 本日营收 |
| | | objects.add(totalAmount); |
| | | List<IncomeVO> thisMonthIncome = incomeVOS.stream() |
| | | .filter(income -> { |
| | | Date insertTime = income.getInsertTime(); |
| | | try { |
| | | LocalDateTime insertDateTime = LocalDateTime.ofInstant(insertTime.toInstant(), ZoneId.systemDefault()); |
| | | return insertDateTime.isAfter(startOfMonth) && insertDateTime.isBefore(endOfMonth); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | List<BigDecimal> amountMonth = thisMonthIncome.stream() |
| | | .map(IncomeVO::getAmount) |
| | | .collect(Collectors.toList()); |
| | | // 使用 本月总收入 |
| | | BigDecimal totalMonth = amountMonth.stream() |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | objects.add(totalMonth); |
| | | List<IncomeVO> thisWeekIncome = incomeVOS.stream() |
| | | .filter(income -> { |
| | | Date insertTime = income.getInsertTime(); |
| | | try { |
| | | LocalDateTime insertDateTime = LocalDateTime.ofInstant(insertTime.toInstant(), ZoneId.systemDefault()); |
| | | return insertDateTime.isAfter(startOfWeek) && insertDateTime.isBefore(endOfWeek); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | List<BigDecimal> amountWeek = thisWeekIncome.stream() |
| | | .map(IncomeVO::getAmount) |
| | | .collect(Collectors.toList()); |
| | | // 使用 本月总收入 |
| | | BigDecimal totalWeek = amountWeek.stream() |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | objects.add(totalWeek); |
| | | List<IncomeVO> todayIncome = incomeVOS.stream() |
| | | .filter(income -> { |
| | | Date insertTime = income.getInsertTime(); |
| | | try { |
| | | LocalDateTime insertDateTime = LocalDateTime.ofInstant(insertTime.toInstant(), ZoneId.systemDefault()); |
| | | return insertDateTime.isAfter(startOfDay) && insertDateTime.isBefore(endOfDay); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | List<BigDecimal> amountToday = todayIncome.stream() |
| | | .map(IncomeVO::getAmount) |
| | | .collect(Collectors.toList()); |
| | | // 使用 本月总收入 |
| | | BigDecimal totalToday = amountToday.stream() |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | objects.add(totalToday); |
| | | // 最后put |
| | | monthlyData.put("yearMount",objects); |
| | | |
| | | return monthlyData; |
| | | } |
| | | |
| | | /** |
| | | * 运营统计-平台-用户数据 |
| | | * |
| | | */ |
| | | @RequestMapping(value = "/getUserData") |
| | | @ResponseBody |
| | | public Object getUserData() { |
| | | |
| | | |
| | | return null; |
| | | } |
| | | /** |
| | | * 退费-平台 |
| | | * |
| | | */ |
| | | @RequestMapping(value = "/getRefundData") |
| | | @ResponseBody |
| | | public Object getRefundData(Integer type) { |
| | | // 赛事活动查询query |
| | | CompetitionQuery competitionQuery = new CompetitionQuery(); |
| | | List<IncomeVO> incomeVOS = new ArrayList<>(); |
| | | // 获取学员课包退费 |
| | | List<MoneyBack> refund = refundCoursePackageClient.getRefund(); |
| | | |
| | | for (MoneyBack moneyBack : refund) { |
| | | List<TCoursePackagePayment> coursePackagePayments = courseStuddentClient.queryByIds(moneyBack.getIds()); |
| | | BigDecimal totalAmount = BigDecimal.ZERO; |
| | | for (TCoursePackagePayment payment : coursePackagePayments){ |
| | | //课包名称 |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(payment.getCoursePackageId()); |
| | | payment.setName(tCoursePackage.getName()); |
| | | payment.setId(Long.valueOf(tCoursePackage.getId())); |
| | | BigDecimal cashPayment = payment.getCashPayment(); |
| | | if (cashPayment==null){ |
| | | cashPayment = BigDecimal.ZERO; |
| | | } |
| | | Integer totalClassHours = payment.getTotalClassHours(); |
| | | BigDecimal result = new BigDecimal(0); |
| | | if (totalClassHours!=0) { |
| | | result = cashPayment.divide(BigDecimal.valueOf(totalClassHours), 2, RoundingMode.HALF_UP); |
| | | } |
| | | //单价 |
| | | payment.setOnePrice(result); |
| | | int has = payment.getTotalClassHours() - payment.getLaveClassHours(); |
| | | //剩余课时 |
| | | payment.setHasHours(has); |
| | | BigDecimal onePrice = payment.getOnePrice(); |
| | | Integer laveClassHours = payment.getLaveClassHours(); |
| | | BigDecimal result1 = onePrice.multiply(BigDecimal.valueOf(laveClassHours)); |
| | | //总价 |
| | | payment.setRestPrice(result1); |
| | | System.out.println("======="+result1); |
| | | totalAmount = totalAmount.add(result1); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(payment.getInsertTime()); |
| | | temp.setAmount(result1); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | // 获取赛事退费记录 |
| | | List<PaymentCompetition> competitions = competitionClient.listAllPayment(competitionQuery); |
| | | for (PaymentCompetition competition : competitions) { |
| | | if (competition.getPayStatus() != 3) { |
| | | continue; |
| | | } |
| | | if (competition.getPayType()==3 || competition.getPayType()==4){ |
| | | continue; |
| | | } |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(competition.getInsertTime()); |
| | | if (competition.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(competition.getAmount().toString())); |
| | | } |
| | | incomeVOS.add(temp); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | /** |
| | | * 跳转到运营商统计数据页面 |
| | | */ |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ISiteBookingService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.apache.http.HttpEntity; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.client.HttpClient; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.entity.ContentType; |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.HttpClients; |
| | | import org.apache.http.util.EntityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 智慧球场统计控制器 |
| | | * |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/gameData") |
| | | public class GameDataController extends BaseController { |
| | | private String PREFIX = "/system/gameData/"; |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ISiteBookingService siteBookingService; |
| | | /** |
| | | * 跳转到充值记录页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<String> strings = new ArrayList<>(); |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>()); |
| | | List<TSite> result = new ArrayList<>(); |
| | | for (TSite tSite : list) { |
| | | if (!strings.contains(tSite.getCity())){ |
| | | strings.add(tSite.getCity()); |
| | | result.add(tSite); |
| | | } |
| | | } |
| | | List<TStore> stores = storeService.list(new QueryWrapper<TStore>()); |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("stores",stores); |
| | | model.addAttribute("sites",list); |
| | | return PREFIX + "GameData.html"; |
| | | } |
| | | /** |
| | | * 获取激战球场统计 |
| | | */ |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public Object list(Integer storeId) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | // 年度数据 |
| | | // 创建 HttpClient 实例 |
| | | HttpClient httpClient = HttpClients.createDefault(); |
| | | // 创建 POST 请求 |
| | | HttpPost httpPost = new HttpPost("https://try.daowepark.com/v7/user_api/general/getBatterData"); |
| | | // 设置请求体数据 |
| | | String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id=1001&date_type=y"; |
| | | |
| | | StringEntity entity = new StringEntity(postData, ContentType.APPLICATION_FORM_URLENCODED); |
| | | httpPost.setEntity(entity); |
| | | // 执行请求 |
| | | HttpResponse response = httpClient.execute(httpPost); |
| | | // 处理响应 |
| | | HttpEntity responseEntity = response.getEntity(); |
| | | if (responseEntity != null) { |
| | | String responseData = EntityUtils.toString(responseEntity); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Batter batter = objectMapper.readValue(responseData, Batter.class); |
| | | result.put("totalNumber",batter.getData().getAll_batter_num()); |
| | | result.put("totalTime",batter.getData().getAll_batter_time()); |
| | | List<BatterData> dataList = batter.getData().getList(); |
| | | // 年份 |
| | | List<String> yearList = new ArrayList<>(); |
| | | for (BatterData data : dataList) { |
| | | yearList.add(data.getDate()); |
| | | } |
| | | result.put("yearList",yearList); |
| | | // 年度数据 |
| | | result.put("yDataList",dataList); |
| | | } |
| | | // 获取月度数据 (今年的十二个月数据) |
| | | Calendar calendar = Calendar.getInstance(); |
| | | // 当前年份 |
| | | int year = calendar.get(Calendar.YEAR); |
| | | // 月度数据 |
| | | // 创建 HttpClient 实例 |
| | | HttpClient httpClient1 = HttpClients.createDefault(); |
| | | // 创建 POST 请求 |
| | | HttpPost httpPost1 = new HttpPost("https://try.daowepark.com/v7/user_api/general/getBatterData"); |
| | | // 设置请求体数据 |
| | | String postData1 = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id=1001&date_type=m&year=2022"; |
| | | StringEntity entity1 = new StringEntity(postData1, ContentType.APPLICATION_FORM_URLENCODED); |
| | | httpPost1.setEntity(entity1); |
| | | // 执行请求 |
| | | HttpResponse response1 = httpClient1.execute(httpPost1); |
| | | // 处理响应 |
| | | HttpEntity responseEntity1 = response1.getEntity(); |
| | | if (responseEntity1 != null) { |
| | | String responseData = EntityUtils.toString(responseEntity1); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Batter batter = objectMapper.readValue(responseData, Batter.class); |
| | | result.put("totalNumber",batter.getData().getAll_batter_num()); |
| | | result.put("totalTime",batter.getData().getAll_batter_time()); |
| | | List<BatterData> dataList = batter.getData().getList(); |
| | | |
| | | // 月度数据 |
| | | result.put("mDataList",dataList); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | /** |
| | | * 获取SUTU智慧球门统计 |
| | | */ |
| | | @RequestMapping("/listSUTU") |
| | | @ResponseBody |
| | | public Object listSUTU() { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/gameDataRate"; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | | // 发送请求并获取响应 |
| | | int responseCode = connection.getResponseCode(); |
| | | if (responseCode == HttpURLConnection.HTTP_OK) { |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); |
| | | String line; |
| | | StringBuilder response = new StringBuilder(); |
| | | while ((line = reader.readLine()) != null) { |
| | | response.append(line); |
| | | } |
| | | reader.close(); |
| | | // 处理响应数据 |
| | | String data = response.toString(); |
| | | // 使用Jackson库将JSON字符串转换为Java对象 |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | SUTU res = objectMapper.readValue(data, SUTU.class); |
| | | // 场地总入场人数 |
| | | String totalNum = res.getData().getTotal_num(); |
| | | List<SUTUData> list = res.getData().getList(); |
| | | List<String> games = new ArrayList<>(); |
| | | for (SUTUData sutuData : list) { |
| | | games.add(sutuData.getGame_name()); |
| | | } |
| | | result.put("data1",list); |
| | | result.put("games",games); |
| | | return result; |
| | | } else { |
| | | System.out.println("请求失败: " + responseCode); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | /** |
| | | * 获取SUTU智慧球门统计 |
| | | */ |
| | | @RequestMapping("/listSUTU1") |
| | | @ResponseBody |
| | | public Object listSUTU1() { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/getSingleGameData?game_id=1&date_type=d&date=2021-02"; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | | // 发送请求并获取响应 |
| | | int responseCode = connection.getResponseCode(); |
| | | if (responseCode == HttpURLConnection.HTTP_OK) { |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); |
| | | String line; |
| | | StringBuilder response = new StringBuilder(); |
| | | while ((line = reader.readLine()) != null) { |
| | | response.append(line); |
| | | } |
| | | reader.close(); |
| | | // 处理响应数据 |
| | | String data = response.toString(); |
| | | // 使用Jackson库将JSON字符串转换为Java对象 |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | SUTU res = objectMapper.readValue(data, SUTU.class); |
| | | // 场地总入场人数 |
| | | String totalNum = res.getData().getTotal_num(); |
| | | List<SUTUData> list = res.getData().getList(); |
| | | List<String> games = new ArrayList<>(); |
| | | for (SUTUData sutuData : list) { |
| | | games.add(sutuData.getGame_name()); |
| | | } |
| | | result.put("data1",list); |
| | | result.put("games",games); |
| | | return result; |
| | | } else { |
| | | System.out.println("请求失败: " + responseCode); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | 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.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.FinanceClient; |
| | | import com.dsh.course.feignClient.account.VipPaymentClient; |
| | | import com.dsh.course.feignClient.account.model.CoachType; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.account.model.VipPayment; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.Competition; |
| | | import com.dsh.course.feignClient.competition.model.CompetitionQuery; |
| | | import com.dsh.course.feignClient.competition.model.PaymentCompetition; |
| | | import com.dsh.course.feignClient.course.CancelledClassesClient; |
| | | import com.dsh.course.feignClient.course.CoursePackagePaymentClient; |
| | | import com.dsh.course.feignClient.other.SiteClient; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.common.collect.Lists; |
| | | import com.google.maps.internal.ApiResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.math.BigDecimal; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 闸机数据统计控制器 |
| | | * |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/gateData") |
| | | public class GateDataController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SiteClient siteClient; |
| | | private String PREFIX = "/system/gateData/"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到充值记录页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | return PREFIX + "GateData.html"; |
| | | } |
| | | /** |
| | | * 获取教练类型列表 |
| | | */ |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public Object list() { |
| | | List<Site> list = siteClient.getList(); |
| | | try { |
| | | for (Site site : list) { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id=" + site.getId(); |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | | // 发送请求并获取响应 |
| | | int responseCode = connection.getResponseCode(); |
| | | if (responseCode == HttpURLConnection.HTTP_OK) { |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); |
| | | String line; |
| | | StringBuilder response = new StringBuilder(); |
| | | while ((line = reader.readLine()) != null) { |
| | | response.append(line); |
| | | } |
| | | reader.close(); |
| | | // 处理响应数据 |
| | | String data = response.toString(); |
| | | // 使用Jackson库将JSON字符串转换为Java对象 |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | GateDataResponse res = objectMapper.readValue(data, GateDataResponse.class); |
| | | // 访问Java对象中的数据 |
| | | int code = res.getCode(); |
| | | String message = res.getMessage(); |
| | | // 场地总入场人数 |
| | | int totalNum = res.getData().getTotal_num(); |
| | | List<GateDataResponse.Data.Region> regionNumList = res.getData().getRegion_num(); |
| | | for (GateDataResponse.Data.Region regionNum : regionNumList) { |
| | | String name = regionNum.getName(); |
| | | int enterNum = regionNum.getEnter_num(); |
| | | System.out.println("Region: " + name + ", EnterNum: " + enterNum); |
| | | } |
| | | return regionNumList; |
| | | |
| | | } else { |
| | | System.out.println("请求失败: " + responseCode); |
| | | } |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new ArrayList<>(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.CoachClient; |
| | | import com.dsh.course.feignClient.account.CoachTypeClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.account.model.CoachSerchVO; |
| | | import com.dsh.course.feignClient.account.model.CoachType; |
| | | import com.dsh.guns.config.UserExt; |
| | | 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.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IUserService; |
| | | import com.dsh.guns.modular.system.service.TOperatorCityService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * 运营商管理 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/operator") |
| | | public class OperatorController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/operator/"; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private TOperatorCityService operatorCityService; |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | /** |
| | | * 跳转运营商管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | return PREFIX + "Operator.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转运营商重置密码页面 |
| | | */ |
| | | @RequestMapping("/resetPassword") |
| | | public String resetPassword(Model model) { |
| | | return PREFIX + "Operator_resetPassword.html"; |
| | | } |
| | | /** |
| | | * 跳转运营商添加页面 |
| | | */ |
| | | @RequestMapping("/add") |
| | | public String add(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("provinceList",list); |
| | | return PREFIX + "Operator_add.html"; |
| | | } |
| | | /** |
| | | * 跳转运营商编辑页面 |
| | | */ |
| | | @RequestMapping("/update/{id}") |
| | | public String update(Model model,@PathVariable("id") Integer id) { |
| | | List<TCity> provinceList = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | model.addAttribute("id",id); |
| | | TOperator byId = operatorService.getById(id); |
| | | // 运营商名称 |
| | | model.addAttribute(byId.getName()); |
| | | User byId1 = userService.getById(byId.getUserId()); |
| | | model.addAttribute("userName",byId1.getName()); |
| | | model.addAttribute("phone",byId1.getPhone()); |
| | | model.addAttribute("data",byId); |
| | | // 获取全部的省 |
| | | List<TOperatorCity> list = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("operatorId", id).eq("pid",0)); |
| | | List<OperatorCityVO> result = new ArrayList<>(); |
| | | |
| | | for (TOperatorCity tOperatorCity : list) { |
| | | // 拿到省下面的所有市 |
| | | List<TOperatorCity> cities= operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("pid", tOperatorCity.getId())); |
| | | if (cities.size()==0){ |
| | | OperatorCityVO operatorCityVO = new OperatorCityVO(); |
| | | operatorCityVO.setProvince(tOperatorCity.getName()); |
| | | operatorCityVO.setProvinceCode(tOperatorCity.getCode()); |
| | | result.add(operatorCityVO); |
| | | } |
| | | for (TOperatorCity city : cities) { |
| | | OperatorCityVO operatorCityVO = new OperatorCityVO(); |
| | | operatorCityVO.setProvince(tOperatorCity.getName()); |
| | | operatorCityVO.setProvinceCode(tOperatorCity.getCode()); |
| | | operatorCityVO.setCity(city.getName()); |
| | | operatorCityVO.setCityCode(city.getCode()); |
| | | result.add(operatorCityVO); |
| | | } |
| | | } |
| | | model.addAttribute("list",result); |
| | | return PREFIX + "Operator_edit.html"; |
| | | } |
| | | /** |
| | | * 获取运营商列表 |
| | | */ |
| | | @RequestMapping(value = "/listAll") |
| | | @ResponseBody |
| | | public Object listAll(String userName, String phone,Integer type) { |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | List<Map<String,Object>> list = operatorService.listAll(page,userName,phone,type); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 批量重置密码 |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/pwd") |
| | | @ResponseBody |
| | | public Object pwd(@RequestBody OperatorRestPwd pwd ) { |
| | | try { |
| | | List<TOperator> list = operatorService.list(new QueryWrapper<TOperator>().in("id",pwd.getIds())); |
| | | List<Integer> userIds = list.stream() |
| | | .map(TOperator::getUserId) |
| | | .collect(Collectors.toList()); |
| | | String a123456 = SecureUtil.md5("123456"); |
| | | List<User> users = userService.list(new QueryWrapper<User>().in("id", userIds)); |
| | | for (User user : users) { |
| | | user.setPassword(a123456); |
| | | } |
| | | userService.updateBatchById(users); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | /** |
| | | * 1为解冻 2为冻结 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/changeState") |
| | | @ResponseBody |
| | | public Object changeState(@RequestBody CoachChangeStateVO vo){ |
| | | operatorService.changeState(vo); |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 添加运营商 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addOperator") |
| | | public ResultUtil addOperator(String name,String userName,String phone,Integer type ,@RequestParam String comArr) { |
| | | User one = userService.getOne(new QueryWrapper<User>().eq("name", name).eq("phone", phone)); |
| | | if (one!=null){ |
| | | return ResultUtil.error("当前管理员名称和电话已存在!"); |
| | | } |
| | | User user = new User(); |
| | | user.setName(userName); |
| | | user.setPhone(phone); |
| | | user.setObjectType(2); |
| | | userService.save(user); |
| | | TOperator data = new TOperator(); |
| | | data.setUserId(user.getId()); |
| | | data.setName(name); |
| | | data.setType(type); |
| | | data.setStatus(1); |
| | | data.setState(1); |
| | | operatorService.save(data); |
| | | if (SinataUtil.isNotEmpty(comArr)){ |
| | | JSONArray jsonArray = JSON.parseArray(comArr); |
| | | int size = jsonArray.size(); |
| | | for (int i = 0; i < size; i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | TOperatorCity province = new TOperatorCity(); |
| | | TOperatorCity city = new TOperatorCity(); |
| | | TOperatorCity one1 = operatorCityService.getOne(new QueryWrapper<TOperatorCity>() |
| | | .eq("name", jsonObject.getString("province")) |
| | | .eq("operatorId", data.getId())); |
| | | // 省 |
| | | if (one1==null){ |
| | | province.setName(jsonObject.getString("province")); |
| | | province.setCode(jsonObject.getInteger("provinceCode")); |
| | | province.setPid(0); |
| | | province.setType(jsonObject.getInteger("areaType")); |
| | | province.setOperatorId(data.getId()); |
| | | city.setPid(province.getId()); |
| | | operatorCityService.save(province); |
| | | // 市 |
| | | if (!jsonObject.getString("city").equals("")){ |
| | | city.setName(jsonObject.getString("city")); |
| | | city.setCode(jsonObject.getInteger("cityCode")); |
| | | city.setPid(province.getId()); |
| | | city.setType(jsonObject.getInteger("areaType")); |
| | | city.setOperatorId(data.getId()); |
| | | operatorCityService.save(city); |
| | | } |
| | | }else{ |
| | | // 市 |
| | | if (!jsonObject.getString("city").equals("")){ |
| | | city.setName(jsonObject.getString("city")); |
| | | city.setCode(jsonObject.getInteger("cityCode")); |
| | | city.setPid(one1.getId()); |
| | | city.setType(jsonObject.getInteger("areaType")); |
| | | city.setOperatorId(data.getId()); |
| | | operatorCityService.save(city); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | /** |
| | | * 添加运营商 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateOperator") |
| | | public ResultUtil updateOperator(Integer id,String name,String userName,String phone,Integer type ,@RequestParam String comArr) { |
| | | User one = userService.getOne(new QueryWrapper<User>().eq("name", name).eq("phone", phone)); |
| | | if (one!=null){ |
| | | return ResultUtil.error("当前管理员名称和电话已存在!"); |
| | | } |
| | | operatorCityService.remove(new QueryWrapper<TOperatorCity>().eq("operatorId",id)); |
| | | User user = new User(); |
| | | user.setName(userName); |
| | | user.setPhone(phone); |
| | | user.setObjectType(2); |
| | | String a123456 = SecureUtil.md5("a123456"); |
| | | user.setPassword(a123456); |
| | | userService.save(user); |
| | | TOperator data = new TOperator(); |
| | | data.setId(id); |
| | | data.setUserId(user.getId()); |
| | | data.setName(name); |
| | | data.setType(type); |
| | | data.setStatus(1); |
| | | data.setState(1); |
| | | operatorService.updateById(data); |
| | | if (type != 1){ |
| | | if (SinataUtil.isNotEmpty(comArr)){ |
| | | JSONArray jsonArray = JSON.parseArray(comArr); |
| | | int size = jsonArray.size(); |
| | | for (int i = 0; i < size; i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | TOperatorCity province = new TOperatorCity(); |
| | | TOperatorCity city = new TOperatorCity(); |
| | | TOperatorCity one1 = operatorCityService.getOne(new QueryWrapper<TOperatorCity>() |
| | | .eq("name", jsonObject.getString("province")) |
| | | .eq("operatorId", data.getId())); |
| | | // 省 |
| | | if (one1==null){ |
| | | province.setName(jsonObject.getString("province")); |
| | | province.setCode(jsonObject.getInteger("provinceCode")); |
| | | province.setPid(0); |
| | | province.setType(jsonObject.getInteger("areaType")); |
| | | province.setOperatorId(data.getId()); |
| | | city.setPid(province.getId()); |
| | | operatorCityService.save(province); |
| | | // 市 |
| | | if (!jsonObject.getString("city").equals("")){ |
| | | city.setName(jsonObject.getString("city")); |
| | | city.setCode(jsonObject.getInteger("cityCode")); |
| | | city.setPid(province.getId()); |
| | | city.setType(jsonObject.getInteger("areaType")); |
| | | city.setOperatorId(data.getId()); |
| | | operatorCityService.save(city); |
| | | } |
| | | }else{ |
| | | // 市 |
| | | if (!jsonObject.getString("city").equals("")){ |
| | | city.setName(jsonObject.getString("city")); |
| | | city.setCode(jsonObject.getInteger("cityCode")); |
| | | city.setPid(one1.getId()); |
| | | city.setType(jsonObject.getInteger("areaType")); |
| | | city.setOperatorId(data.getId()); |
| | | operatorCityService.save(city); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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.account.StoreStaffClient; |
| | | import com.dsh.course.feignClient.account.model.TStoreStaff; |
| | | 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.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.service.impl.TOperatorUserServiceImpl; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * 运营商管理 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/operatorUser") |
| | | public class OperatorUserController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/operatorUser/"; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private TOperatorCityService operatorCityService; |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private IOperatorUserService operatorUserService; |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private StoreStaffClient storeStaffClient; |
| | | /** |
| | | * 跳转运营商管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("provinceList",list); |
| | | return PREFIX + "OperatorUser.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转运营商商户去认证页面 |
| | | */ |
| | | @RequestMapping("/proportion/{id}") |
| | | public String update(Model model,@PathVariable("id") Integer id) { |
| | | List<TCity> provinceList = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | List<Bank> bankList = operatorService.getBankList(); |
| | | TStore store = storeService.getOne(new QueryWrapper<TStore>().eq("operatorId", id)); |
| | | model.addAttribute("storeName",store.getName()); |
| | | // TStoreStaff storeByStoreStaffId = storeStaffClient.getStoreByStoreStaffId(store.getStoreStaffId()); |
| | | // model.addAttribute("storeStaff",storeByStoreStaffId.getName()); |
| | | // model.addAttribute("storePhone",storeByStoreStaffId.getPhone()); |
| | | model.addAttribute("bankList",bankList); |
| | | return PREFIX + "OperatorUser_auth.html"; |
| | | } |
| | | /** |
| | | * 获取运营商列表 |
| | | */ |
| | | @RequestMapping(value = "/listAll") |
| | | @ResponseBody |
| | | public Object listAll(String province,String city,String userName, String phone,Integer platform,Integer type,Integer state) { |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | List<Map<String,Object>> list = operatorUserService.listAll(page,province,city,userName,phone,platform,type,state); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 批量重置密码 |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/addProportion") |
| | | @ResponseBody |
| | | public Object pwd(Integer id, BigDecimal alipay,BigDecimal wechat) { |
| | | List<OperatorUser> list = operatorUserService.list(new QueryWrapper<OperatorUser>().eq("operatorId", id)); |
| | | for (OperatorUser operatorUser : list) { |
| | | if (operatorUser.getPlatform()==1){ |
| | | operatorUser.setProportion(wechat); |
| | | operatorUserService.updateById(operatorUser); |
| | | }else { |
| | | operatorUser.setProportion(alipay); |
| | | operatorUserService.updateById(operatorUser); |
| | | } |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.CouponDataVo; |
| | | import com.dsh.guns.modular.system.model.Region; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import com.dsh.guns.modular.system.util.OssUploadUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | |
| | | @RequestMapping("/tCouponManage") |
| | | public class TCouponController { |
| | | |
| | | |
| | | |
| | | private String PREFIX = "/system/tCoupon/"; |
| | | |
| | | |
| | | @Resource |
| | | private IRegionService regiService; |
| | |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private TOperatorCityService operatorCityService; |
| | | |
| | | /** |
| | | * 跳转到优惠券管理首页 |
| | |
| | | model.addAttribute("userType",objectType); |
| | | return PREFIX + "TQuestionAdd.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/coupon_record/{id}") |
| | | public String memberCouponAdd(@PathVariable Integer id,Model model) { |
| | |
| | | */ |
| | | @RequestMapping("/storeList") |
| | | public String storePage(Model model) { |
| | | return PREFIX + "TQuestionEdit.html"; |
| | | return PREFIX + "TStoreList.html"; |
| | | } |
| | | @RequestMapping("/updateType") |
| | | @ResponseBody |
| | |
| | | |
| | | @RequestMapping("/storeDetailsOfSearch") |
| | | @ResponseBody |
| | | public Object listOfStore(Integer provinceId,Integer cityId,Integer cityManagerId,String storeName){ |
| | | System.out.println("provinceId"+provinceId); |
| | | System.out.println("cityId"+cityId); |
| | | System.out.println("cityManagerId"+cityManagerId); |
| | | System.out.println("storeName"+storeName); |
| | | public Object listOfStore(Integer provinceId,Integer cityId,Integer operatorId,String storeName){ |
| | | String provinceCode = null; |
| | | String cityCode = null; |
| | | if (ToolUtil.isNotEmpty(provinceId)){ |
| | |
| | | cityCode = cityRegion.getCode(); |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String,Object>> storeList = storeService.queryListOfpage(provinceCode,cityCode,cityManagerId,storeName,page); |
| | | List<Map<String,Object>> storeList = storeService.queryListOfpage(provinceCode,cityCode,operatorId,storeName,page); |
| | | if (storeList.size() > 0 ){ |
| | | for (Map<String, Object> stringObjectMap : storeList) { |
| | | String provinceName = (String) stringObjectMap.get("province"); |
| | | String cityName = (String) stringObjectMap.get("city"); |
| | | stringObjectMap.put("provinceCity",provinceName+cityName); |
| | | Integer managerId = (Integer) stringObjectMap.get("cityManagerId"); |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(managerId); |
| | | if (ToolUtil.isNotEmpty(cityManager)){ |
| | | stringObjectMap.put("accountName",cityManager.getName()+"+"+cityManager.getPhone()); |
| | | Integer managerId = (Integer) stringObjectMap.get("operatorId"); |
| | | if (managerId==null){ |
| | | stringObjectMap.put("accountName","平台"); |
| | | }else{ |
| | | TOperator operator = operatorService.getOne(new QueryWrapper<TOperator>().eq("id", managerId)); |
| | | if (ToolUtil.isNotEmpty(operator)){ |
| | | stringObjectMap.put("accountName",operator.getName()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | return storeList; |
| | |
| | | return regiService.list(new LambdaQueryWrapper<Region>() |
| | | .eq(Region::getParentId,province)); |
| | | } |
| | | // 通过市 获取运营商 |
| | | @RequestMapping(value = "/getOperator") |
| | | @ResponseBody |
| | | public Object getOperator(Integer city){ |
| | | List<TOperatorCity> name = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("name", city)); |
| | | List<Integer> collect = name.stream().map(TOperatorCity::getOperatorId) |
| | | .collect(Collectors.toList()); |
| | | return operatorService.list(new QueryWrapper<TOperator>().in("id",collect)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/uploadPic") |
| | | @ResponseBody |
| | |
| | | temp.setAmount(rechargeRecordsVO.getAmount()); |
| | | } |
| | | temp.setIncomeType(2); |
| | | temp.setState(rechargeRecordsVO.getState()); |
| | | temp.setState(rechargeRecordsVO.getPayStatus()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | |
| | | } |
| | | return incomeVOS; |
| | | } |
| | | |
| | | /** |
| | | * 获取收入管理列表 |
| | | */ |
| | |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import com.sun.org.apache.regexp.internal.RE; |
| | | import groovyjarjarpicocli.CommandLine; |
| | | import net.bytebuddy.asm.Advice; |
| | | import org.aspectj.weaver.ast.Var; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private SiteLockClient siteLockClient; |
| | | |
| | | |
| | | /** |
| | | * 选择市 返回场地列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getSiteByCity") |
| | | public List<TSite> getSiteByCity(String oneId) { |
| | | if (oneId.equals("")){ |
| | | return siteService.list(new QueryWrapper<TSite>()); |
| | | } |
| | | return siteService.list(new QueryWrapper<TSite>().eq("cityCode",oneId)); |
| | | } |
| | | /** |
| | | * 跳转到场地管理首页 |
| | | */ |
| | |
| | | Region name = regionService.getOne(new QueryWrapper<Region>().eq("name", province)); |
| | | return regionService.list(new QueryWrapper<Region>().eq("parent_id", name.getId())); |
| | | } |
| | | |
| | | /** |
| | | * 添加场地管理 |
| | | */ |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.QueryByNamePhone; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * 优惠券管理 控制器 |
| | | */ |
| | | |
| | | @Controller |
| | | @RequestMapping("/ticket") |
| | | public class TicketController { |
| | | private String PREFIX = "/system/ticket/"; |
| | | @Resource |
| | | private IRegionService regiService; |
| | | @Resource |
| | | private IStoreService storeService; |
| | | |
| | | @Resource |
| | | private CouponClient client; |
| | | |
| | | @Resource |
| | | private CityManagerClient cmgrClient; |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private PointMercharsClient pointMercharsClient; |
| | | |
| | | /** |
| | | * 跳转到优惠券管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | return PREFIX + "ticket.html"; |
| | | } |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/add") |
| | | public String add(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | System.out.println(objectType); |
| | | model.addAttribute("userType",objectType); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "ticket_add.html"; |
| | | } |
| | | |
| | | @RequestMapping("/info/{id}") |
| | | public String info(@PathVariable Integer id,Model model) { |
| | | Coupon coupon = client.queryCouponById(id); |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("type",coupon.getType()); |
| | | return PREFIX + "ticket_info.html"; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param id |
| | | * @param model |
| | | * @param type = 1 编辑 type=2 查看详情 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/update/{id}/{type}") |
| | | public String update(@PathVariable("id") Integer id,Model model,@PathVariable("type")Integer type) { |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("type",type); |
| | | return PREFIX + "ticket_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 1为上架 2为下架 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/changeState") |
| | | @ResponseBody |
| | | public Object changeState(@RequestBody CoachChangeStateVO vo){ |
| | | pointMercharsClient.changeState(vo); |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 获取门票列表 |
| | | */ |
| | | @RequestMapping(value = "/listAll") |
| | | @ResponseBody |
| | | public Object listAll(String name,Integer type,Integer redemptionMethod, |
| | | Integer userPopulation,Integer activeStatus,Integer state) { |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | IntegralGoodsOfSearch integralGoodsOfSearch = new IntegralGoodsOfSearch(); |
| | | integralGoodsOfSearch.setName(name); |
| | | integralGoodsOfSearch.setType(type); |
| | | integralGoodsOfSearch.setRedemptionMethod(redemptionMethod); |
| | | integralGoodsOfSearch.setUserPopulation(userPopulation); |
| | | integralGoodsOfSearch.setActiveStatus(activeStatus); |
| | | integralGoodsOfSearch.setState(state); |
| | | integralGoodsOfSearch.setPage(page); |
| | | return pointMercharsClient.ticketList(integralGoodsOfSearch); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到门店管理列表页 |
| | | */ |
| | | @RequestMapping("/storeList") |
| | | public String storePage(Model model) { |
| | | return PREFIX + "TStoreList.html"; |
| | | } |
| | | @RequestMapping("/updateType") |
| | | @ResponseBody |
| | | public Object updateType(Long id) { |
| | | client.updateType(id); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | @RequestMapping("/storeDetailsOfSearch") |
| | | @ResponseBody |
| | | public Object listOfStore(Integer provinceId,Integer cityId,Integer cityManagerId,String storeName){ |
| | | System.out.println("provinceId"+provinceId); |
| | | System.out.println("cityId"+cityId); |
| | | System.out.println("cityManagerId"+cityManagerId); |
| | | System.out.println("storeName"+storeName); |
| | | String provinceCode = null; |
| | | String cityCode = null; |
| | | if (ToolUtil.isNotEmpty(provinceId)){ |
| | | Region provinceRegion = regiService.getById(provinceId); |
| | | provinceCode = provinceRegion.getCode(); |
| | | } |
| | | if (ToolUtil.isNotEmpty(cityId)){ |
| | | Region cityRegion = regiService.getById(cityId); |
| | | cityCode = cityRegion.getCode(); |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String,Object>> storeList = storeService.queryListOfpage(provinceCode,cityCode,cityManagerId,storeName,page); |
| | | if (storeList.size() > 0 ){ |
| | | for (Map<String, Object> stringObjectMap : storeList) { |
| | | String provinceName = (String) stringObjectMap.get("province"); |
| | | String cityName = (String) stringObjectMap.get("city"); |
| | | stringObjectMap.put("provinceCity",provinceName+cityName); |
| | | Integer managerId = (Integer) stringObjectMap.get("cityManagerId"); |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(managerId); |
| | | if (ToolUtil.isNotEmpty(cityManager)){ |
| | | stringObjectMap.put("accountName",cityManager.getName()+"+"+cityManager.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | return storeList; |
| | | } |
| | | |
| | | @RequestMapping(value = "/listRecord") |
| | | @ResponseBody |
| | | public Object listRecord(Integer id,String name, Integer type, String phone) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<TAppUser> tAppUsers = appUserClient.queryByNamePhone(new QueryByNamePhone(name, phone)); |
| | | if(tAppUsers.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | CouponRecordQuery ofSearch = new CouponRecordQuery(); |
| | | ofSearch.setId(id); |
| | | ofSearch.setLimit(page.getSize()); |
| | | ofSearch.setOffset(page.getCurrent()); |
| | | ofSearch.setIds(tAppUsers.stream().map(TAppUser::getId).collect(Collectors.toList())); |
| | | ofSearch.setType(type); |
| | | List<Map<String, Object>> maps = client.listRecord(ofSearch); |
| | | for (Map<String, Object> map : maps) { |
| | | map.put("id",map.get("id").toString()); |
| | | for (TAppUser tAppUser : tAppUsers) { |
| | | if(map.get("userId").equals(tAppUser.getId())){ |
| | | map.put("name",tAppUser.getName()); |
| | | map.put("phone",tAppUser.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | return maps; |
| | | } |
| | | |
| | | @RequestMapping(value = "/getProvince") |
| | | @ResponseBody |
| | | public Object getProvince(){ |
| | | return regiService.list(new LambdaQueryWrapper<Region>() |
| | | .eq(Region::getParentId,0)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/onShelf") |
| | | @ResponseBody |
| | | public Object onShelf(Integer id,Integer type){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setState(type); |
| | | client.updateCouponData(coupon); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/getCity") |
| | | @ResponseBody |
| | | public Object getCity(Integer province){ |
| | | return regiService.list(new LambdaQueryWrapper<Region>() |
| | | .eq(Region::getParentId,province)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/uploadPic") |
| | | @ResponseBody |
| | | public Object add(@RequestParam("file") MultipartFile imgFile) throws IOException { |
| | | String originalFilename = imgFile.getOriginalFilename(); |
| | | String newName = originalFilename.substring(imgFile.getOriginalFilename().lastIndexOf(".")); |
| | | String url = OBSUploadUtil.inputStreamUpload(imgFile); |
| | | Map<String, String> map = new HashMap<String, String>(); |
| | | //是否上传成功 |
| | | map.put("state", "SUCCESS"); |
| | | //现在文件名称 |
| | | map.put("title", newName); |
| | | //文件原名称 |
| | | map.put("original", originalFilename); |
| | | //文件类型 .+后缀名 |
| | | map.put("type", originalFilename.substring(imgFile.getOriginalFilename().lastIndexOf("."))); |
| | | //文件路径 |
| | | map.put("url", url); |
| | | //文件大小(字节数) |
| | | map.put("size", imgFile.getSize() + ""); |
| | | System.out.println(map); |
| | | return url; |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | @PostMapping(value = "/commitData") |
| | | @ResponseBody |
| | | public Object commitData( CouponDataVo dataVo){ |
| | | System.out.println(dataVo); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | dataVo.setUserType(objectType); |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer id,Integer num,Integer num1,String text){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setQuantityIssued(num); |
| | | coupon.setPickUpQuantity(num1); |
| | | coupon.setIllustrate(text); |
| | | client.updateCouponData(coupon); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取 积分商品列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object listOfIntegralGoods(String name, Integer type, Integer redemptionMethod , Integer userPopulation, Integer activeStatus, Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | |
| | | IntegralGoodsOfSearch ofSearch = new IntegralGoodsOfSearch(); |
| | | ofSearch.setPage(page); |
| | | ofSearch.setName(name); |
| | | ofSearch.setType(type); |
| | | ofSearch.setRedemptionMethod(redemptionMethod); |
| | | ofSearch.setUserPopulation(userPopulation); |
| | | ofSearch.setActiveStatus(activeStatus); |
| | | ofSearch.setState(state); |
| | | System.out.println(ofSearch); |
| | | return pointMercharsClient.getIntegralGoodsListOfSearch(ofSearch); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tGoods_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | System.out.println("id:"+id); |
| | | PointMercharsVo pointMercharsVo = pointMercharsClient.queryPointMerchaseDetailOfId(id); |
| | | System.out.println("pointMercharsVo:"+pointMercharsVo); |
| | | String[] split = pointMercharsVo.getPics().split(","); |
| | | model.addAttribute("item",pointMercharsVo); |
| | | model.addAttribute("pictures",split); |
| | | return PREFIX + "TGoods_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 上下架处理操作 |
| | | * @param id 商品id |
| | | * @param type 1=上架操作 2=下架操作 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/grounding") |
| | | @ResponseBody |
| | | public Object updateGrounding(Integer id,Integer type) { |
| | | System.out.println(id); |
| | | System.out.println(type); |
| | | Map<String,Integer> map = new HashMap<>(); |
| | | map.put("id",id); |
| | | map.put("type",type); |
| | | boolean b = pointMercharsClient.updateGoodsGroudingStatus(map); |
| | | System.out.println(b); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 购买详情 |
| | | * @param id 商品id |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tPay_detail/{id}") |
| | | public String payOfDetails(@PathVariable(value = "id") Integer id,Model model) { |
| | | System.out.println(id); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "TGoods_pay.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取 购买记录列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/payList/{id}") |
| | | public Object payList(@PathVariable(value = "id") Integer id, String name, String phone, Integer status) { |
| | | PointMercharsPayedVo payedVo = new PointMercharsPayedVo(); |
| | | payedVo.setId(id); |
| | | payedVo.setName(name); |
| | | payedVo.setPhone(phone); |
| | | payedVo.setStatus(status); |
| | | List<Map<String,Object>> points = pointMercharsClient.queryUserPayedGoodsList(payedVo); |
| | | System.out.println(points); |
| | | if (points.size() > 0 ){ |
| | | for (Map<String, Object> point : points) { |
| | | Integer userId = (Integer) point.get("userId"); |
| | | TAppUser tAppUser = appUserClient.queryById(userId); |
| | | if (ToolUtil.isNotEmpty(tAppUser)){ |
| | | point.put("name",tAppUser.getName()); |
| | | point.put("phone",tAppUser.getPhone()); |
| | | } |
| | | } |
| | | if (ToolUtil.isNotEmpty(name)){ |
| | | points = points.stream() |
| | | .filter(data -> { |
| | | String obtName = (String) data.get("name"); |
| | | return obtName != null && obtName.contains(name); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | if (ToolUtil.isNotEmpty(phone)){ |
| | | points = points.stream() |
| | | .filter(data -> { |
| | | String obtPhone = (String) data.get("phone"); |
| | | return obtPhone != null && obtPhone.contains(phone); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |
| | | return points; |
| | | } |
| | | |
| | | /** |
| | | * 核销操作 |
| | | * @param id 商品id |
| | | * @return |
| | | */ |
| | | @RequestMapping("/write_off") |
| | | @ResponseBody |
| | | public Object GoodsWriteOff(Integer id){ |
| | | System.out.println(id); |
| | | // TODO: 2023/8/15 核销操作 |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | model.addAttribute("id", id); |
| | | model.addAttribute("ids", ids); |
| | | |
| | | |
| | | TAppUser tAppUser = appUserClient.queryById(tStudentDto.getAppUserId()); |
| | | model.addAttribute("userName",tAppUser.getName()); |
| | | model.addAttribute("tStudentDto",tStudentDto); |
New file |
| | |
| | | package com.dsh.guns.modular.system.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 lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 银行 |
| | | */ |
| | | @TableName("t_bank") |
| | | @Data |
| | | public class Bank { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 银行名称 |
| | | */ |
| | | @TableField("bankName") |
| | | private String bankName; |
| | | /** |
| | | * 银行代码 |
| | | */ |
| | | @TableField("insurCom") |
| | | private String bankCode; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取激战球场接口数据 |
| | | */ |
| | | @Data |
| | | public class Batter { |
| | | private int code; |
| | | private String message; |
| | | private Batter.Data data; |
| | | private String nextUrl; |
| | | @lombok.Data |
| | | public static class Data { |
| | | private String all_batter_num; |
| | | private String all_batter_time; |
| | | private List<BatterData> list; |
| | | } |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取激战球场接口数据 |
| | | */ |
| | | @Data |
| | | public class BatterData { |
| | | private String date; |
| | | private String total_num; |
| | | private String batter_time; |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class Battlefield { |
| | | private Integer id; |
| | | private String name; |
| | | private Integer space_id; |
| | | private Integer red_region_id; |
| | | private Integer blue_region_id; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 闸机数据 |
| | | */ |
| | | @Data |
| | | public class GateDataResponse { |
| | | private int code; |
| | | private String message; |
| | | private Data data; |
| | | private String nextUrl; |
| | | @lombok.Data |
| | | public static class Data { |
| | | private int total_num; |
| | | private List<Region> region_num; |
| | | |
| | | @lombok.Data |
| | | public static class Region { |
| | | private String name; |
| | | private int enter_num; |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 运营商指定地区回显VO |
| | | */ |
| | | @Data |
| | | public class OperatorCityVO { |
| | | private Integer id; |
| | | private String province; |
| | | private Integer provinceCode; |
| | | private String city; |
| | | private Integer cityCode; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 运营商重置密码 |
| | | */ |
| | | @Data |
| | | public class OperatorRestPwd { |
| | | private List<Integer> ids; |
| | | |
| | | private String password; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @TableName("t_operator_user") |
| | | @Data |
| | | public class OperatorUser { |
| | | private Integer id; |
| | | private String province; |
| | | private Integer provinceCode; |
| | | private String city; |
| | | private Integer cityCode; |
| | | private Integer userId; |
| | | private Integer platform; |
| | | private Integer type; |
| | | private BigDecimal proportion; |
| | | private Integer state; |
| | | private Integer status; |
| | | private Integer operatorId; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 平台数据VO |
| | | */ |
| | | @Data |
| | | public class PlatFormDataVO { |
| | | |
| | | private Integer id; |
| | | private String provinceAndCity; |
| | | private String storeName; |
| | | private Integer storeId; |
| | | private String studentName; |
| | | private Integer studentId; |
| | | private String coachName; |
| | | // 教练id |
| | | private Integer coachId; |
| | | // 消课时间 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | private String courseName; |
| | | private String startAndEnd; |
| | | private String voucher; |
| | | private Integer cancelledClassesNumber; |
| | | private Long coursePackagePaymentId; |
| | | private Long coursePackageSchedulingId; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 营收数据-平台 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PointMerchandiseIncomeVo { |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | private BigDecimal cash; |
| | | } |
| | |
| | | private Integer state; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | private Integer payStatus; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取激战球场接口数据 |
| | | */ |
| | | @Data |
| | | public class SUTU { |
| | | private int code; |
| | | private String message; |
| | | private SUTU.Data data; |
| | | private String nextUrl; |
| | | @lombok.Data |
| | | public static class Data { |
| | | private String total_num; |
| | | private List<SUTUData> list; |
| | | } |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 获取激战球场接口数据 |
| | | */ |
| | | @Data |
| | | public class SUTUData { |
| | | private String game_id; |
| | | private String game_name; |
| | | private String count; |
| | | private String rate; |
| | | } |
| | | |
| | | |
| | |
| | | * 1 全国 2指定 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 商户绑定状态1否2是 |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 运营商状态1正常 2冻结 3删除 |
| | | */ |
| | | private Integer state; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
New file |
| | |
| | | package com.dsh.guns.modular.system.model.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 运营商添加DTO |
| | | */ |
| | | @Data |
| | | public class OperatorDTO { |
| | | private Integer id; |
| | | // 运营商名称 |
| | | private String name; |
| | | // 管理员名称 |
| | | private String userName; |
| | | // 管理员电话 |
| | | private String phone; |
| | | // 1 全国 2 指定 |
| | | private Integer type; |
| | | // 商户绑定状态 |
| | | private Integer status; |
| | | // 运营商状态 |
| | | private Integer state; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.core.dataScope.DataScope; |
| | | import com.dsh.guns.modular.system.model.OperatorUser; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 运营商商户 服务类 |
| | | */ |
| | | public interface IOperatorUserService extends IService<OperatorUser> { |
| | | |
| | | List<Map<String, Object>> listAll(Page<Map<String, Object>> page, String province, String city, String userName, String phone, Integer platform, Integer type, Integer state); |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.SiteBooking; |
| | | public interface ISiteBookingService extends IService<SiteBooking> { |
| | | |
| | | } |
| | |
| | | */ |
| | | List<Map<String, Object>> queryCity(String provinceCode, String cityCode); |
| | | |
| | | List<Map<String, Object>> queryListOfpage(String provinceCode, String cityCode, Integer cityManagerId, String storeName, Page<Map<String, Object>> page); |
| | | List<Map<String, Object>> queryListOfpage(String provinceCode, String cityCode, Integer operatorId, String storeName, Page<Map<String, Object>> page); |
| | | |
| | | List<Map<String, Object>> listOne(Page<Map<String, Object>> page, Integer id); |
| | | |
| | |
| | | @Param("endTime") String endTime, |
| | | @Param("deptid") Integer deptid); |
| | | |
| | | |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.Bank; |
| | | import com.dsh.guns.modular.system.model.CoachChangeStateVO; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOperatorService extends IService<TOperator> { |
| | | |
| | | List<Map<String, Object>> listAll(Page<Map<String, Object>> page,String userName, String phone,Integer type); |
| | | |
| | | int changeState(CoachChangeStateVO vo); |
| | | |
| | | List<Bank> getBankList(); |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.SiteBookingMapper; |
| | | import com.dsh.guns.modular.system.model.SiteBooking; |
| | | import com.dsh.guns.modular.system.service.ISiteBookingService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/13 16:49 |
| | | */ |
| | | @Service |
| | | public class SiteBookingServiceImpl extends ServiceImpl<SiteBookingMapper, SiteBooking> implements ISiteBookingService { |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryListOfpage(String provinceCode, String cityCode, Integer cityManagerId, String storeName, Page<Map<String, Object>> page) { |
| | | return this.baseMapper.queryListOfpage(provinceCode,cityCode,cityManagerId,storeName,page); |
| | | public List<Map<String, Object>> queryListOfpage(String provinceCode, String cityCode, Integer operatorId, String storeName, Page<Map<String, Object>> page) { |
| | | return this.baseMapper.queryListOfpage(provinceCode,cityCode,operatorId,storeName,page); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.TOperatorMapper; |
| | | import com.dsh.guns.modular.system.model.Bank; |
| | | import com.dsh.guns.modular.system.model.CoachChangeStateVO; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOperatorServiceImpl extends ServiceImpl<TOperatorMapper, TOperator> implements TOperatorService { |
| | | |
| | | @Autowired |
| | | private TOperatorMapper tOperatorMapper; |
| | | @Override |
| | | public List<Map<String, Object>> listAll(Page<Map<String, Object>> page,String userName, String phone,Integer type) { |
| | | return this.baseMapper.listAll(page,userName,phone,type); |
| | | } |
| | | |
| | | @Override |
| | | public int changeState(CoachChangeStateVO vo) { |
| | | return this.baseMapper.changeState(vo.getIds(),vo.getState()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Bank> getBankList() { |
| | | |
| | | return tOperatorMapper.getBankList(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.dto.StudentSearch; |
| | | import com.dsh.course.dto.TStudentDto; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.mapper.TOperatorUserMapper; |
| | | import com.dsh.course.mapper.TSiteMapper; |
| | | import com.dsh.guns.modular.system.model.OperatorUser; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TStudent; |
| | | import com.dsh.guns.modular.system.service.IOperatorUserService; |
| | | import com.dsh.guns.modular.system.service.ITStudentService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员信息 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-09-12 |
| | | */ |
| | | @Service |
| | | public class TOperatorUserServiceImpl extends ServiceImpl<TOperatorUserMapper, OperatorUser> implements IOperatorUserService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> listAll(Page<Map<String, Object>> page, String province, String city, String userName, String phone, Integer platform, Integer type, Integer state) { |
| | | return this.baseMapper.listAll(page,province,city,userName,phone,platform,type,state); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.TOperatorUserMapper"> |
| | | <select id="listAll" resultType="java.util.Map"> |
| | | select t1.id as id, t1.platform,t1.type,t1.proportion,CONCAT(t1.province,t1.city) as provinceAndCity |
| | | t1.state as state,t1.status as status,t2.name as userName,t2.phone as phone from t_operatorUser t1 |
| | | left join sys_user t2 on t1.userId = t2.id |
| | | where 1=1 |
| | | <if test="province != null and province != ''"> |
| | | and t1.provinceCode = #{province} |
| | | </if> |
| | | <if test="city != null and city != ''"> |
| | | and t1.cityCode = #{city} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and t2.name like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | and t2.phone like CONCAT('%',#{phone},'%') |
| | | </if> |
| | | <if test="platform != null and platform != ''"> |
| | | and t1.platform = #{platform} |
| | | </if> |
| | | <if test="type != null and type != ''"> |
| | | and t1.type = #{type} |
| | | </if> |
| | | <if test="proportion != null and proportion != ''"> |
| | | and t1.proportion = #{proportion} |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and t1.state = #{state} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and t1.status = #{status} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.TOperatorMapper"> |
| | | <update id="changeState"> |
| | | update t_operator set |
| | | state = #{state} |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_operator.id IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </update> |
| | | |
| | | |
| | | <select id="listAll" resultType="java.util.Map"> |
| | | select t1.id as id, t1.name as name,t1.type as `type`,t1.state as state,t1.status as status,t2.name as userName,t2.phone as phone from t_operator t1 |
| | | left join sys_user t2 on t1.userId = t2.id |
| | | where 1=1 |
| | | <if test="userName != null and userName != ''"> |
| | | and t2.name like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | and t2.phone like CONCAT('%',#{phone},'%') |
| | | </if> |
| | | <if test="type != null and type != ''"> |
| | | and t1.type = #{type} |
| | | </if> |
| | | </select> |
| | | <select id="getBankList" resultType="com.dsh.guns.modular.system.model.Bank"> |
| | | select * from t_bank |
| | | </select> |
| | | </mapper> |
| | |
| | | ) as aa order by aa.code |
| | | </select> |
| | | <select id="queryListOfpage" resultType="java.util.Map"> |
| | | SELECT `id`, `cityManagerId`, `province`, `city`, `name` |
| | | SELECT `id`, `operatorId`, `province`, `city`, `name`,ids |
| | | from t_store |
| | | where 1=1 |
| | | <if test="provinceCode != null"> |
| | |
| | | <if test="cityCode != null"> |
| | | and cityCode = #{cityCode} |
| | | </if> |
| | | <if test="cityManagerId != null"> |
| | | and cityManagerId = #{cityManagerId} |
| | | <if test="operatorId != null"> |
| | | and operatorId = #{operatorId} |
| | | </if> |
| | | <if test="storeName != null and storeName != ''"> |
| | | and `name` like CONCAT('%',#{storeName},'%') |
| | |
| | | <h2>营收数据</h2> |
| | | </br> |
| | | <div id = "money1" style="width: 1500px" > |
| | | <span>总营收:</span> |
| | | <span>本年度营收:</span> |
| | | <span>本月度营收:</span> |
| | | <span>本周营收:</span> |
| | | <span>本日营收:</span> |
| | | <span id="totalIncome">总营收:</span> |
| | | <span id="yearIncome">本年度营收:</span> |
| | | <span id="monthIncome">本月度营收:</span> |
| | | <span id="weekIncome">本周营收:</span> |
| | | <span id="todayIncome">本日营收:</span> |
| | | </br> |
| | | </br> |
| | | </div> |
| | | <div id="income" style="width: 1280px;height:500px;"></div> |
| | | <div id="main" style="width: 1280px;height:500px;"></div> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <h2>收入类型统计</h2> |
| | |
| | | <div class="col-sm-10" style="width: 1500px" > |
| | | </br> |
| | | </br> |
| | | <span>本年退费额度:</span> |
| | | <span>本月退费额度:</span> |
| | | <span>本周退费额度:</span> |
| | | <span>本日退费额度:</span> |
| | | <span id="yearRefund">本年退费额度:</span> |
| | | <span id="monthRefund">本月退费额度:</span> |
| | | <span id="weekRefund">本周退费额度:</span> |
| | | <span id="todayRefund">本日退费额度:</span> |
| | | </br> |
| | | </br> |
| | | <div id="refund" style="width: 1280px;height:500px;"></div> |
| | |
| | | <script src="${ctxPath}/modular/system/dataStatistics/echarts.min.js"></script> |
| | | <script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script> |
| | | <script> |
| | | var ans = []; |
| | | var weekX = []; |
| | | var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]; |
| | | var yearX = ["2023年","2024年","2025年","2026年","2027年","2028年"]; |
| | | var timeX = []; |
| | | var dataX = []; |
| | | // 创建一个日期对象 |
| | | var currentDate = new Date(); |
| | | // 获取当前日期的号数 |
| | | let currentDay = currentDate.getDate(); |
| | | // 循环添加号数到数组 |
| | | for (let i = 0; i < 7; i++) { |
| | | dataX.push(currentDay - 6+i); |
| | | } |
| | | // 获取当前月份 |
| | | var currentMonth = currentDate.getMonth(); |
| | | // 获取当前年份 |
| | | var currentYear = currentDate.getFullYear(); |
| | | // 计算指定年份和月份的天数 |
| | | function getDaysInMonth(year, month) { |
| | | // month 参数范围是 0-11,所以需要加 1 |
| | | return new Date(year, month + 1, 0).getDate(); |
| | | } |
| | | // 获取当前月份的天数 |
| | | var daysInMonth = getDaysInMonth(currentYear, currentMonth); |
| | | // 将天数按字符串格式添加到 timeX 数组中 |
| | | for (var i = 1; i <= daysInMonth; i++) { |
| | | timeX.push(String(i)); |
| | | } |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | , trigger: 'click' |
| | |
| | | getContent(1); |
| | | getContent1(1); |
| | | getContent2(1); |
| | | var ajax = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){ |
| | | var list = resp.yearMount; |
| | | console.log(list); |
| | | var t1 = document.getElementById("totalIncome"); |
| | | var t2 = document.getElementById("yearIncome"); |
| | | var t3 = document.getElementById("monthIncome"); |
| | | var t4 = document.getElementById("weekIncome"); |
| | | var t5 = document.getElementById("todayIncome"); |
| | | t1.innerText = "总营收:"+list[0]+" "; |
| | | t2.innerText = "年度营收:"+list[1]+" "; |
| | | t3.innerText = "月度营收:"+list[2]+" "; |
| | | t4.innerText = "周度营收:"+list[3]+" "; |
| | | t5.innerText = "日度营收:"+list[4]+" "; |
| | | var year = resp.yearIncome; |
| | | var month = resp.monthIncome; |
| | | var week = resp.weekIncome; |
| | | var days = week[0].length; |
| | | for (let i = 1; i <= days; i++) { |
| | | weekX.push(i); |
| | | } |
| | | var day = resp.dayIncome; |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | |
| | | data: ['年度营收', '月度营收','周度营收','日度营收'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度营收: true, |
| | | 月度营收: false, |
| | | 周度营收: false, |
| | | 日度营收: false |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [year[0].amount,year[1].amount,year[2].amount,year[3].amount,year[4].amount,year[5].amount] |
| | | }, |
| | | { |
| | | name: '月度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [month[0][0],month[0][1], month[0][2], month[0][3], month[0][4], |
| | | month[0][5], month[0][6], month[0][7], month[0][8], month[0][9], month[0][10], month[0][11]] |
| | | }, |
| | | { |
| | | name: '周度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [ |
| | | week[0][0], week[0][1], week[0][2], week[0][3], week[0][4] |
| | | , week[0][5], week[0][6], week[0][7], week[0][8], week[0][9] |
| | | , week[0][10], week[0][11], week[0][12], week[0][13], week[0][14] |
| | | , week[0][15], week[0][16], week[0][17], week[0][18], week[0][19], week[0][20] |
| | | , week[0][21], week[0][22], week[0][23], week[0][24], week[0][25], week[0][26] |
| | | , week[0][27], week[0][28], week[0][29], week[0][30], week[0][31] |
| | | ] |
| | | }, |
| | | { |
| | | name: '日度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [ |
| | | day[0][0], day[0][1],day[0][2], day[0][3], day[0][4], day[0][5], day[0][6] |
| | | ] |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax.set("type",1); |
| | | ajax.start(); |
| | | option2 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | |
| | | data: ['年度用户数', '月度用户数','周度用户数','日度用户数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度用户数: true, |
| | | 月度用户数: false, |
| | | 周度用户数: false, |
| | | 日度用户数: false |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [100,50,60,10,12,13,54,156] |
| | | }, |
| | | { |
| | | name: '月度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [26,44,55,12,6,7,98,541,223] |
| | | }, |
| | | { |
| | | name: '周度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [ |
| | | 33,22,11,12,61,17,23,33,41 |
| | | ] |
| | | }, |
| | | { |
| | | name: '日度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [ |
| | | 12,11,17,26,23,111,23,45,41 |
| | | ] |
| | | } |
| | | ] |
| | | }; |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){ |
| | | option3 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | |
| | | data: ['年度会员数', '月度会员数','周度会员数','日度会员数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度会员数: true, |
| | | 月度会员数: false, |
| | | 周度会员数: false, |
| | | 日度会员数: false |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [100,50,60,10,12,13,54,156] |
| | | }, |
| | | { |
| | | name: '月度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [26,44,55,12,6,7,98,541,223] |
| | | }, |
| | | { |
| | | name: '周度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [ |
| | | 33,22,11,12,61,17,23,33,41 |
| | | ] |
| | | }, |
| | | { |
| | | name: '日度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [ |
| | | 12,11,17,26,23,111,23,45,41 |
| | | ] |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax2.set("type",1); |
| | | ajax2.start(); |
| | | // 基于准备好的dom,初始化echarts实例 |
| | | var myChart = echarts.init(document.getElementById('income')); |
| | | var myChart = echarts.init(document.getElementById('main')); |
| | | var myChart1 = echarts.init(document.getElementById('refund')); |
| | | var myChart2 = echarts.init(document.getElementById('user')); |
| | | var myChart3 = echarts.init(document.getElementById('vip')); |
| | |
| | | var myChart5 = echarts.init(document.getElementById('prepare')); |
| | | var myChart6 = echarts.init(document.getElementById('teach')); |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度营收', '月度营收', '周度营收', '日度营收'] |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 134, 90, 230, 160, 190, 410, 330, 210, 330] |
| | | }, |
| | | { |
| | | name: '月度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [220, 182, 191, 234, 290, 330, 310, 190, 210, 330, 410, 160] |
| | | }, |
| | | { |
| | | name: '周度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [150, 232, 201, 154, 190, 330, 410, 160, 210, 195, 210, 188] |
| | | }, |
| | | { |
| | | name: '日度营收', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [320, 332, 301, 334, 390, 330, 320, 10, 195, 145, 188, 160] |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | option1 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | } |
| | | ] |
| | | }; |
| | | option2 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度用户数', '月度用户数', '周度用户数', '日度用户数'] |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 134, 90, 230, 160, 190, 410, 330, 210, 330] |
| | | }, |
| | | { |
| | | name: '月度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [220, 182, 191, 234, 290, 330, 310, 190, 210, 330, 410, 160] |
| | | }, |
| | | { |
| | | name: '周度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [150, 232, 201, 154, 190, 330, 410, 160, 210, 195, 210, 188] |
| | | }, |
| | | { |
| | | name: '日度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [320, 332, 301, 334, 390, 330, 320, 10, 195, 145, 188, 160] |
| | | } |
| | | ] |
| | | }; |
| | | option3 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度会员数', '月度会员数', '周度会员数', '日度会员数'] |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [1220, 1532, 101, 1394, 980, 2380, 1680, 1190, 1410, 1330, 2110, 1330] |
| | | }, |
| | | { |
| | | name: '月度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [1220, 1182, 2191, 3234, 1290, 1330, 2310, 2190, 2210, 1330, 2410, 1650] |
| | | }, |
| | | { |
| | | name: '周度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [2150, 3232, 2201, 5154, 5190, 1330, 1410, 1660, 2610, 1695, 2410, 1848] |
| | | }, |
| | | { |
| | | name: '日度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [2320, 3332, 1301, 3234, 3290, 1330, 1320, 1220, 1295, 1645, 1888, 1660] |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | |
| | | option4 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | } |
| | | ] |
| | | }; |
| | | myChart.on('legendselectchanged', obj => { |
| | | var options = myChart.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度营收') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度营收') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度营收') { |
| | | options.xAxis[0].data = weekX |
| | | } else if (obj.name == '日度营收') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart.setOption(options, true) |
| | | }) |
| | | myChart2.on('legendselectchanged', obj => { |
| | | var options = myChart2.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度用户数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度用户数') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度用户数') { |
| | | options.xAxis[0].data = weekX |
| | | } else if (obj.name == '日度用户数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart2.setOption(options, true) |
| | | }); |
| | | |
| | | myChart3.on('legendselectchanged', obj => { |
| | | var options = myChart3.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度会员数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度会员数') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度会员数') { |
| | | options.xAxis[0].data = weekX |
| | | } else if (obj.name == '日度会员数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart3.setOption(options, true) |
| | | }); |
| | | // 使用刚指定的配置项和数据显示图表。 |
| | | myChart.setOption(option); |
| | | myChart1.setOption(option1); |
| | |
| | | $("#nextB").hide(); |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <script> |
| | | $(function(){ |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style type="text/css"> |
| | | |
| | | ztree li span. { |
| | | margin-left: 4px; |
| | | margin-right: -1px; |
| | | background-position: -144px 0; |
| | | vertical-align: top; |
| | | *vertical-align: middle |
| | | } |
| | | |
| | | .titleDiv { |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .titleItem { |
| | | float: left; |
| | | text-align: center; |
| | | width: 180px; |
| | | line-height: 40px; |
| | | border-top: 1px solid #E7EBEE; |
| | | border-bottom: 1px solid #E7EBEE; |
| | | border-left: 1px solid #E7EBEE; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .titleItem1 { |
| | | float: left; |
| | | text-align: center; |
| | | width: 180px; |
| | | line-height: 40px; |
| | | border-bottom: 1px solid #E7EBEE; |
| | | border-left: 1px solid #E7EBEE; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .titleItemCk { |
| | | color: #fff !important; |
| | | background: #1AB395 !important; |
| | | } |
| | | |
| | | .titleItem:last-child { |
| | | border-right: 1px solid #E7EBEE; |
| | | } |
| | | |
| | | /* 订单分析 */ |
| | | ul { |
| | | list-style-type: none; |
| | | } |
| | | |
| | | .orderFenxiBox { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: white; |
| | | } |
| | | |
| | | .orderFenxiItem { |
| | | flex: 1; |
| | | padding: 20px 0; |
| | | } |
| | | |
| | | .orderFenxiItem:last-child .orderFenxiItem_number { |
| | | border-right: 0 none; |
| | | } |
| | | |
| | | .orderFenxiItem_number { |
| | | width: 80%; |
| | | height: 80%; |
| | | line-height: 90px; |
| | | padding: 20px 0; |
| | | font-size: 32px; |
| | | color: #1AB394; |
| | | text-align: center; |
| | | border-right: 1px solid #eaeaea; |
| | | } |
| | | |
| | | .orderFenxiItem_title, .orderFenxiItem_last { |
| | | line-height: 40px; |
| | | font-size: 14px; |
| | | } |
| | | </style> |
| | | <div style="height: 50px;line-height:50px;width: 100%;background-color: #eeeeee;font-size: 25px;font-weight: bold;padding-left: 8px"> |
| | | 汇总数据 |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="time" name="选择时间"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="HomePage.search()"/> |
| | | <#button name="重置" icon="fa-search" clickFun="HomePage.reset()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="row col-space15"> |
| | | <div class="col-md-3"> |
| | | <div class="panel"> |
| | | <div style="padding: 30px; font-size: 20px">注册用户数:<br><span id="userNum"></span></div> |
| | | </div> |
| | | </div> |
| | | <div class="col-md-3"> |
| | | <div class="panel"> |
| | | <div style="padding: 30px; font-size: 20px">群聊个数:<br><span id="groupNum"></span></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="col-md-3"> |
| | | <div class="panel"> |
| | | <div style="padding: 30px; font-size: 20px">充值金额:<br><span id="topUp"></span></div> |
| | | </div> |
| | | </div> |
| | | <div class="col-md-3"> |
| | | <div class="panel"> |
| | | <div style="padding: 30px; font-size: 20px">提现金额:<br><span id="withdraw"> </span> <br> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row col-space15"> |
| | | <div class="col-md-3"> |
| | | <div class="panel"> |
| | | <div style="padding: 30px; font-size: 20px">平台结余:<br><span id="balance"> </span> <br> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div style="height: 50px;line-height:50px;width: 100%;background-color: #eeeeee;font-size: 25px;font-weight: bold;padding-left: 8px"> |
| | | 近30天走势 |
| | | </div> |
| | | <div class="search_box" style="margin-left: 2%;"> |
| | | <div class="titleDiv"> |
| | | <div id="titleDiv1" class="titleItem titleItemCk" onclick="regisUser(this)" style="font-size: 20px">登录/注册</div> |
| | | <div id="titleDiv2" class="titleItem" onclick="chongzhi(this)" style="font-size: 20px">充值/提现金额</div> |
| | | <div id="titleDiv3" class="titleItem" onclick="groupNum(this)" style="font-size: 20px">群聊个数</div> |
| | | </div> |
| | | <div id="main" style="min-width: 400px; height: 400px"></div> |
| | | </div> |
| | | <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script> |
| | | <script> |
| | | $(function () { |
| | | regisUser(); |
| | | }); |
| | | |
| | | function chongzhi() { |
| | | document.getElementById("titleDiv1").setAttribute("class", "titleItem"); |
| | | document.getElementById("titleDiv2").setAttribute("class", "titleItem titleItemCk"); |
| | | document.getElementById("titleDiv3").setAttribute("class", "titleItem"); |
| | | var chartDom = document.getElementById('main'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | $.post(Feng.ctxPath + "/homePage/chongzhi", {type: 2}, function (data) { |
| | | let topUp = data.topUp |
| | | let withdraw = data.withdraw |
| | | // option = { |
| | | // title: { |
| | | // text: '充值/提现' |
| | | // }, |
| | | // tooltip: { |
| | | // trigger: 'axis' |
| | | // }, |
| | | // legend: { |
| | | // data: ['充值', '提现'] |
| | | // }, |
| | | // grid: { |
| | | // left: '3%', |
| | | // right: '4%', |
| | | // bottom: '3%', |
| | | // containLabel: true |
| | | // }, |
| | | // toolbox: { |
| | | // feature: { |
| | | // } |
| | | // }, |
| | | // xAxis: { |
| | | // type: 'category', |
| | | // boundaryGap: false, |
| | | // data: [topUp[29].time,topUp[28].time, topUp[27].time, topUp[26].time, topUp[25].time, topUp[24].time, topUp[23].time, topUp[22].time, topUp[21].time, topUp[20].time, topUp[19].time, topUp[18].time, topUp[17].time, topUp[16].time, topUp[15].time, topUp[14].time,topUp[13].time, topUp[12].time, topUp[11].time, topUp[10].time, topUp[9].time, topUp[8].time, topUp[7].time, topUp[6].time, topUp[5].time, topUp[4].time, topUp[3].time, topUp[2].time, topUp[1].time, topUp[0].time] |
| | | // }, |
| | | // yAxis: { |
| | | // type: 'value' |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | // name: '充值', |
| | | // type: 'line', |
| | | // stack: 'Total', |
| | | // data: [topUp[29].topUp,topUp[28].topUp, topUp[27].topUp, topUp[26].topUp, topUp[25].topUp, topUp[24].topUp, topUp[23].topUp, topUp[22].topUp, topUp[21].topUp, topUp[20].topUp, topUp[19].topUp, topUp[18].topUp, topUp[17].topUp, topUp[16].topUp, topUp[15].topUp, topUp[14].topUp,topUp[13].topUp, topUp[12].topUp, topUp[11].topUp, topUp[10].topUp, topUp[9].topUp, topUp[8].topUp, topUp[7].topUp, topUp[6].topUp, topUp[5].topUp, topUp[4].topUp, topUp[3].topUp, topUp[2].topUp, topUp[1].topUp, topUp[0].topUp] |
| | | // }, |
| | | // { |
| | | // name: '提现', |
| | | // type: 'line', |
| | | // stack: 'Total', |
| | | // data: [withdraw[29].withdraw,withdraw[28].withdraw, withdraw[27].withdraw, withdraw[26].withdraw, withdraw[25].withdraw, withdraw[24].withdraw, withdraw[23].withdraw, withdraw[22].withdraw, withdraw[21].withdraw, withdraw[20].withdraw, withdraw[19].withdraw, withdraw[18].withdraw, withdraw[17].withdraw, withdraw[16].withdraw, withdraw[15].withdraw, withdraw[14].withdraw,withdraw[13].withdraw, withdraw[12].withdraw, withdraw[11].withdraw, withdraw[10].withdraw, withdraw[9].withdraw, withdraw[8].withdraw, withdraw[7].withdraw, withdraw[6].withdraw, withdraw[5].withdraw, withdraw[4].withdraw, withdraw[3].withdraw, withdraw[2].withdraw, withdraw[1].withdraw, withdraw[0].withdraw] |
| | | // } |
| | | // |
| | | // ] |
| | | // }; |
| | | option = { |
| | | title: { |
| | | text: '充值/提现' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: {}, |
| | | toolbox: { |
| | | show: false, |
| | | feature: { |
| | | restore: {}, |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: [topUp[29].time,topUp[28].time, topUp[27].time, topUp[26].time, topUp[25].time, topUp[24].time, topUp[23].time, topUp[22].time, topUp[21].time, topUp[20].time, topUp[19].time, topUp[18].time, topUp[17].time, topUp[16].time, topUp[15].time, topUp[14].time,topUp[13].time, topUp[12].time, topUp[11].time, topUp[10].time, topUp[9].time, topUp[8].time, topUp[7].time, topUp[6].time, topUp[5].time, topUp[4].time, topUp[3].time, topUp[2].time, topUp[1].time, topUp[0].time] |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: '{value} ' |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '充值', |
| | | type: 'line', |
| | | data: [topUp[29].topUp,topUp[28].topUp, topUp[27].topUp, topUp[26].topUp, topUp[25].topUp, topUp[24].topUp, topUp[23].topUp, topUp[22].topUp, topUp[21].topUp, topUp[20].topUp, topUp[19].topUp, topUp[18].topUp, topUp[17].topUp, topUp[16].topUp, topUp[15].topUp, topUp[14].topUp,topUp[13].topUp, topUp[12].topUp, topUp[11].topUp, topUp[10].topUp, topUp[9].topUp, topUp[8].topUp, topUp[7].topUp, topUp[6].topUp, topUp[5].topUp, topUp[4].topUp, topUp[3].topUp, topUp[2].topUp, topUp[1].topUp, topUp[0].topUp] |
| | | }, |
| | | { |
| | | name: '提现', |
| | | type: 'line', |
| | | data: [withdraw[29].withdraw,withdraw[28].withdraw, withdraw[27].withdraw, withdraw[26].withdraw, withdraw[25].withdraw, withdraw[24].withdraw, withdraw[23].withdraw, withdraw[22].withdraw, withdraw[21].withdraw, withdraw[20].withdraw, withdraw[19].withdraw, withdraw[18].withdraw, withdraw[17].withdraw, withdraw[16].withdraw, withdraw[15].withdraw, withdraw[14].withdraw,withdraw[13].withdraw, withdraw[12].withdraw, withdraw[11].withdraw, withdraw[10].withdraw, withdraw[9].withdraw, withdraw[8].withdraw, withdraw[7].withdraw, withdraw[6].withdraw, withdraw[5].withdraw, withdraw[4].withdraw, withdraw[3].withdraw, withdraw[2].withdraw, withdraw[1].withdraw, withdraw[0].withdraw] |
| | | } |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option); |
| | | }); |
| | | } |
| | | |
| | | |
| | | function regisUser() { |
| | | document.getElementById("titleDiv1").setAttribute("class", "titleItem titleItemCk"); |
| | | document.getElementById("titleDiv2").setAttribute("class", "titleItem"); |
| | | document.getElementById("titleDiv3").setAttribute("class", "titleItem"); |
| | | var chartDom = document.getElementById('main'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | $.post(Feng.ctxPath + "/homePage/regisUser", {type: 1}, function (data) { |
| | | let login = data.login |
| | | let register = data.register |
| | | // option = { |
| | | // title: { |
| | | // text: '登录/注册' |
| | | // }, |
| | | // tooltip: { |
| | | // trigger: 'axis' |
| | | // }, |
| | | // legend: { |
| | | // data: ['登录', '注册'] |
| | | // }, |
| | | // grid: { |
| | | // left: '3%', |
| | | // right: '4%', |
| | | // bottom: '3%', |
| | | // containLabel: true |
| | | // }, |
| | | // toolbox: { |
| | | // feature: { |
| | | // } |
| | | // }, |
| | | // xAxis: { |
| | | // type: 'category', |
| | | // boundaryGap: false, |
| | | // data: [login[29].time,login[28].time, login[27].time, login[26].time, login[25].time, login[24].time, login[23].time, login[22].time, login[21].time, login[20].time, login[19].time, login[18].time, login[17].time, login[16].time, login[15].time, login[14].time,login[13].time, login[12].time, login[11].time, login[10].time, login[9].time, login[8].time, login[7].time, login[6].time, login[5].time, login[4].time, login[3].time, login[2].time, login[1].time, login[0].time] |
| | | // }, |
| | | // yAxis: { |
| | | // type: 'value' |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | // name: '登录', |
| | | // type: 'line', |
| | | // stack: 'Total', |
| | | // data: [login[29].loginNum,login[28].loginNum, login[27].loginNum, login[26].loginNum, login[25].loginNum, login[24].loginNum, login[23].loginNum, login[22].loginNum, login[21].loginNum, login[20].loginNum, login[19].loginNum, login[18].loginNum, login[17].loginNum, login[16].loginNum, login[15].loginNum, login[14].loginNum,login[13].loginNum, login[12].loginNum, login[11].loginNum, login[10].loginNum, login[9].loginNum, login[8].loginNum, login[7].loginNum, login[6].loginNum, login[5].loginNum, login[4].loginNum, login[3].loginNum, login[2].loginNum, login[1].loginNum, login[0].loginNum] |
| | | // }, |
| | | // { |
| | | // name: '注册', |
| | | // type: 'line', |
| | | // stack: 'Total', |
| | | // data: [register[29].registerNum,register[28].registerNum, register[27].registerNum, register[26].registerNum, register[25].registerNum, register[24].registerNum, register[23].registerNum, register[22].registerNum, register[21].registerNum, register[20].registerNum, register[19].registerNum, register[18].registerNum, register[17].registerNum, register[16].registerNum, register[15].registerNum, register[14].registerNum,register[13].registerNum, register[12].registerNum, register[11].registerNum, register[10].registerNum, register[9].registerNum, register[8].registerNum, register[7].registerNum, register[6].registerNum, register[5].registerNum, register[4].registerNum, register[3].registerNum, register[2].registerNum, register[1].registerNum, register[0].registerNum] |
| | | // } |
| | | // |
| | | // ] |
| | | // }; |
| | | option = { |
| | | title: { |
| | | text: '登录/注册' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: {}, |
| | | toolbox: { |
| | | show: false, |
| | | feature: { |
| | | restore: {}, |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: [login[29].time,login[28].time, login[27].time, login[26].time, login[25].time, login[24].time, login[23].time, login[22].time, login[21].time, login[20].time, login[19].time, login[18].time, login[17].time, login[16].time, login[15].time, login[14].time,login[13].time, login[12].time, login[11].time, login[10].time, login[9].time, login[8].time, login[7].time, login[6].time, login[5].time, login[4].time, login[3].time, login[2].time, login[1].time, login[0].time] |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: '{value} ' |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '登录', |
| | | type: 'line', |
| | | data: [login[29].loginNum,login[28].loginNum, login[27].loginNum, login[26].loginNum, login[25].loginNum, login[24].loginNum, login[23].loginNum, login[22].loginNum, login[21].loginNum, login[20].loginNum, login[19].loginNum, login[18].loginNum, login[17].loginNum, login[16].loginNum, login[15].loginNum, login[14].loginNum,login[13].loginNum, login[12].loginNum, login[11].loginNum, login[10].loginNum, login[9].loginNum, login[8].loginNum, login[7].loginNum, login[6].loginNum, login[5].loginNum, login[4].loginNum, login[3].loginNum, login[2].loginNum, login[1].loginNum, login[0].loginNum] |
| | | }, |
| | | { |
| | | name: '注册', |
| | | type: 'line', |
| | | data: [register[29].registerNum,register[28].registerNum, register[27].registerNum, register[26].registerNum, register[25].registerNum, register[24].registerNum, register[23].registerNum, register[22].registerNum, register[21].registerNum, register[20].registerNum, register[19].registerNum, register[18].registerNum, register[17].registerNum, register[16].registerNum, register[15].registerNum, register[14].registerNum,register[13].registerNum, register[12].registerNum, register[11].registerNum, register[10].registerNum, register[9].registerNum, register[8].registerNum, register[7].registerNum, register[6].registerNum, register[5].registerNum, register[4].registerNum, register[3].registerNum, register[2].registerNum, register[1].registerNum, register[0].registerNum] |
| | | } |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option); |
| | | |
| | | }); |
| | | |
| | | } |
| | | function groupNum() { |
| | | document.getElementById("titleDiv1").setAttribute("class", "titleItem"); |
| | | document.getElementById("titleDiv2").setAttribute("class", "titleItem"); |
| | | document.getElementById("titleDiv3").setAttribute("class", "titleItem titleItemCk"); |
| | | var chartDom = document.getElementById('main'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | $.post(Feng.ctxPath + "/homePage/groupNum", {type: 3}, function (data) { |
| | | console.log(data) |
| | | // option = { |
| | | // title: { |
| | | // text: '群聊个数' |
| | | // }, |
| | | // tooltip: { |
| | | // trigger: 'axis' |
| | | // }, |
| | | // legend: { |
| | | // data: ['群聊个数', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine'] |
| | | // }, |
| | | // grid: { |
| | | // left: '3%', |
| | | // right: '4%', |
| | | // bottom: '3%', |
| | | // containLabel: true |
| | | // }, |
| | | // toolbox: { |
| | | // feature: { |
| | | // saveAsImage: {} |
| | | // } |
| | | // }, |
| | | // xAxis: { |
| | | // type: 'category', |
| | | // boundaryGap: false, |
| | | // data: [data[29].time,data[28].time, data[27].time, data[26].time, data[25].time, data[24].time, data[23].time, data[22].time, data[21].time, data[20].time, data[19].time, data[18].time, data[17].time, data[16].time, data[15].time, data[14].time,data[13].time, data[12].time, data[11].time, data[10].time, data[9].time, data[8].time, data[7].time, data[6].time, data[5].time, data[4].time, data[3].time, data[2].time, data[1].time, data[0].time] |
| | | // }, |
| | | // yAxis: { |
| | | // type: 'value' |
| | | // }, |
| | | // series: [ |
| | | // |
| | | // { |
| | | // name: '群聊个数', |
| | | // type: 'line', |
| | | // stack: 'Total', |
| | | // data: [data[29].groupNum,data[28].groupNum, data[27].groupNum, data[26].groupNum, data[25].groupNum, data[24].groupNum, data[23].groupNum, data[22].groupNum, data[21].groupNum, data[20].groupNum, data[19].groupNum, data[18].groupNum, data[17].groupNum, data[16].groupNum, data[15].groupNum, data[14].groupNum,data[13].groupNum, data[12].groupNum, data[11].groupNum, data[10].groupNum, data[9].groupNum, data[8].groupNum, data[7].groupNum, data[6].groupNum, data[5].groupNum, data[4].groupNum, data[3].groupNum, data[2].groupNum, data[1].groupNum, data[0].groupNum] |
| | | // } |
| | | // ] |
| | | // }; |
| | | option = { |
| | | title: { |
| | | text: '群聊个数' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: {}, |
| | | toolbox: { |
| | | show: false, |
| | | feature: { |
| | | restore: {}, |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: [data[29].time,data[28].time, data[27].time, data[26].time, data[25].time, data[24].time, data[23].time, data[22].time, data[21].time, data[20].time, data[19].time, data[18].time, data[17].time, data[16].time, data[15].time, data[14].time,data[13].time, data[12].time, data[11].time, data[10].time, data[9].time, data[8].time, data[7].time, data[6].time, data[5].time, data[4].time, data[3].time, data[2].time, data[1].time, data[0].time] |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: '{value} ' |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '群聊个数', |
| | | type: 'line', |
| | | data: [data[29].groupNum,data[28].groupNum, data[27].groupNum, data[26].groupNum, data[25].groupNum, data[24].groupNum, data[23].groupNum, data[22].groupNum, data[21].groupNum, data[20].groupNum, data[19].groupNum, data[18].groupNum, data[17].groupNum, data[16].groupNum, data[15].groupNum, data[14].groupNum,data[13].groupNum, data[12].groupNum, data[11].groupNum, data[10].groupNum, data[9].groupNum, data[8].groupNum, data[7].groupNum, data[6].groupNum, data[5].groupNum, data[4].groupNum, data[3].groupNum, data[2].groupNum, data[1].groupNum, data[0].groupNum] |
| | | }, |
| | | { |
| | | name: '', |
| | | data: []} |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option); |
| | | |
| | | }); |
| | | } |
| | | |
| | | </script> |
| | | <script src="${ctxPath}/static/modular/system/homePage/homePage.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time' |
| | | , trigger: 'click' |
| | | , range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | |
| | | @layout("/common/_container.html"){ |
| | | <link href="${ctxPath}/static/css/plugins/switchery/switchery.css" rel="stylesheet"> |
| | | <style> |
| | | .table1{ |
| | | display: inline; |
| | | width: 25%; |
| | | float:left; |
| | | text-align:center; |
| | | border-collapse:collapse; |
| | | font-size: 18px; |
| | | } |
| | | .table2{ |
| | | display: inline; |
| | | width: 50%; |
| | | float:left; |
| | | text-align:center; |
| | | border-collapse:collapse; |
| | | font-size: 18px; |
| | | } |
| | | .table3{ |
| | | display: inline; |
| | | width: 50%; |
| | | float:left; |
| | | text-align:center; |
| | | border-collapse:collapse; |
| | | font-size: 18px; |
| | | } |
| | | .table1:hover{ |
| | | background-color: rgba(255,0,0,.3); |
| | | } |
| | | .newWidth, .single-line{ |
| | | max-width:150px !important;display: initial !important; |
| | | } |
| | | .companyValueClass td:first-child { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <div style="height: 50px;box-sizing: border-box;background:#f3f3f4;line-height: 50px;border:1px solid;margin-bottom: 20px;width: auto"> |
| | | <div id="div1" class='table1' onclick="getContent(1)" style="border-right: 1px solid #333;background-color: rgb(26, 179, 148);color: white;">激战球场</div> |
| | | <div id="div2" class='table1' onclick="getContent(2)" style="border-right: 1px solid #333;">SUTU智慧球门</div> |
| | | <div id="div3" class='table1' onclick="getContent(3)" style="border-right: 1px solid #333;">社区世界杯跨城赛</div> |
| | | <div id="div4" class='table1' onclick="getContent(4)" style="border-right: 1px solid #333;">社区世界杯90°准度赛</div> |
| | | </div> |
| | | <div class="row" id="content1" style="margin-left: 100px;"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group" style="display: flex;margin-left: 150px" > |
| | | <span id="totalNumber">全球场次总数:</span> |
| | | <span id="totalTime">全球比赛时长:</span> |
| | | </div> |
| | | </div> |
| | | </br> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group" style="display: flex;margin-left: -150px"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <select style="width: 300px" class="form-control" id="stores" name="stores"> |
| | | <option value="">全球</option> |
| | | @for(obj in stores){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <div class="row" id="t1" style="margin-left: 100px;"> |
| | | |
| | | <div id="number" style="width: 1280px;height:500px;"></div> |
| | | <div id="time" style="width: 1280px;height:500px;"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row" id="content2" style="margin-left: 100px;"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-10"> |
| | | </br> |
| | | </br> |
| | | </br> |
| | | <h2>总场次统计</h2> |
| | | <div id="gameTotal" style="width: 1500px;height:500px;"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-11" style="display: flex"> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*筛选内容:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="con1" placeholder="请输入年份或者月份" type="text"> |
| | | </div> |
| | | </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="cCode" name="cCode" onchange="getStoreByCity(this)"> |
| | | <option value="">全球</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.cityCode}">${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </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="site" name="site"> |
| | | <option value="">全球</option> |
| | | @for(obj in sites){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="col-sm-11" style="display: flex"> |
| | | <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="games" name="site"> |
| | | <option value="">全部</option> |
| | | <option style="width: 300px" value="1">方块球王</option> |
| | | <option style="width: 300px" value="2">社区小球王</option> |
| | | <option style="width: 300px" value="3">玩湃熊之力</option> |
| | | <option style="width: 300px" value="4">绿茵密码</option> |
| | | <option style="width: 300px" value="5">镜像阵容</option> |
| | | <option style="width: 300px" value="6">涨姿势</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <div class="row" id="t2" style="margin-left: 100px;"> |
| | | <div id="number1" style="width: 1280px;height:500px;"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row" id="content3" style="margin-left: 100px;"> |
| | | <div class="col-sm-11" style="display: flex"> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*筛选内容:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="con3" placeholder="请输入年份或者月份" type="text"> |
| | | </div> |
| | | </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="cCode3" name="cCode" onchange="getStoreByCity1(this)"> |
| | | <option value="">全球</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.cityCode}">${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </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="site3" name="site"> |
| | | <option value="">全球</option> |
| | | @for(obj in sites){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search3()"/> |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | <div class="row" id="content4" style="margin-left: 100px;"> |
| | | <div class="col-sm-11" style="display: flex"> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*筛选内容:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="con4" placeholder="请输入年份或者月份" type="text"> |
| | | </div> |
| | | </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="cCode4" name="cCode" onchange="getStoreByCity1(this)"> |
| | | <option value="">全球</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.cityCode}">${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </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="site4" name="site"> |
| | | <option value="">全球</option> |
| | | @for(obj in sites){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search4()"/> |
| | | </div> |
| | | <#table id="TSiteTable1"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/dataStatistics/echarts.min.js"></script> |
| | | <script src="${ctxPath}/modular/system/gameData/gameData.js"></script> |
| | | <script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script> |
| | | <script> |
| | | var ans = []; |
| | | var weekX = []; |
| | | var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]; |
| | | var yearX = []; |
| | | var timeX = []; |
| | | var dataX = []; |
| | | // 创建一个日期对象 |
| | | var currentDate = new Date(); |
| | | // 获取当前日期的号数 |
| | | let currentDay = currentDate.getDate(); |
| | | // 循环添加号数到数组 |
| | | for (let i = 0; i < 7; i++) { |
| | | dataX.push(currentDay - 6+i); |
| | | } |
| | | // 获取当前月份 |
| | | var currentMonth = currentDate.getMonth(); |
| | | // 获取当前年份 |
| | | var currentYear = currentDate.getFullYear(); |
| | | // 计算指定年份和月份的天数 |
| | | function getDaysInMonth(year, month) { |
| | | // month 参数范围是 0-11,所以需要加 1 |
| | | return new Date(year, month + 1, 0).getDate(); |
| | | } |
| | | // 获取当前月份的天数 |
| | | var daysInMonth = getDaysInMonth(currentYear, currentMonth); |
| | | // 将天数按字符串格式添加到 timeX 数组中 |
| | | for (var i = 1; i <= daysInMonth; i++) { |
| | | timeX.push(String(i)); |
| | | } |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | , trigger: 'click' |
| | | , range: true |
| | | }); |
| | | // 激战球场 |
| | | var yD=[]; |
| | | var mD=[]; |
| | | var yT=[]; |
| | | var mT=[]; |
| | | // SUTU智慧球场X轴数据 |
| | | var SUTU=[]; |
| | | // SUTU智慧球场数据 |
| | | var SUTUData1=[]; |
| | | function BatterData() { |
| | | var ajax = new $ax(Feng.ctxPath + "/gameData/list", function(resp){ |
| | | var mDataList= resp.mDataList; |
| | | var yDataList= resp.yDataList; |
| | | // 场次 |
| | | yD=[]; |
| | | mD=[]; |
| | | // 时长 |
| | | yT = []; |
| | | mT = []; |
| | | for (let i = 0; i <yDataList.length ; i++) { |
| | | |
| | | yD.push(yDataList[i].total_num); |
| | | yT.push(yDataList[i].batter_time); |
| | | } |
| | | for (let i = 0; i <mDataList.length ; i++) { |
| | | mD.push(mDataList[i].total_num); |
| | | mT.push(mDataList[i].batter_time); |
| | | } |
| | | for (let i = 0; i <resp.yearList.length ; i++) { |
| | | yearX.push(resp.yearList[i]) |
| | | } |
| | | var totalNumber= resp.totalNumber; |
| | | var totalTime= resp.totalTime; |
| | | var tN = document.getElementById("totalNumber"); |
| | | var tT = document.getElementById("totalTime"); |
| | | tN.innerText = "全球场次总数:"+totalNumber+"场" |
| | | tT.innerText = "全球比赛时长:"+totalTime+"小时" |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度', '月度'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度: true, |
| | | 月度: false, |
| | | |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | minInterval: 1, |
| | | axisLabel : { |
| | | formatter : '{value}' |
| | | }, |
| | | name: "场次", |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: yD |
| | | }, |
| | | { |
| | | name: '月度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: mD |
| | | } |
| | | ] |
| | | }; |
| | | option2 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度', '月度'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度: true, |
| | | 月度: false, |
| | | |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | name: "时长(小时)", |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: yT |
| | | }, |
| | | { |
| | | name: '月度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data:mT |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | if ($("#stores").val() == ""){ |
| | | ajax.set("storeId",0) |
| | | }else{ |
| | | ajax.set("storeId",$("#stores").val()); |
| | | } |
| | | ajax.start(); |
| | | } |
| | | function SUTUData() { |
| | | var ajax = new $ax(Feng.ctxPath + "/gameData/listSUTU", function(resp){ |
| | | for (let i = 0; i <resp.games.length ; i++) { |
| | | SUTU.push(resp.games[i]) |
| | | } |
| | | for (let i = 0; i <resp.data1.length ; i++) { |
| | | SUTUData1.push(resp.data1[i].count); |
| | | } |
| | | console.log("看看") |
| | | console.log(SUTUData) |
| | | option3 = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: SUTU |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: SUTUData1, |
| | | type: 'bar' |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | }); |
| | | ajax.start(); |
| | | } |
| | | $(function(){ |
| | | getContent(1); |
| | | BatterData(); |
| | | SUTUData(); |
| | | option4 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度', '月度'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度: true, |
| | | 月度: false, |
| | | |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [1,3,6,8,9,5] |
| | | }, |
| | | { |
| | | name: '月度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data:[1,2,3,4,5,6,6,5,4,3,2,1] |
| | | // data: [month[0][0],month[0][1], month[0][2], month[0][3], month[0][4], |
| | | // month[0][5], month[0][6], month[0][7], month[0][8], month[0][9], month[0][10], month[0][11]] |
| | | } |
| | | ] |
| | | }; |
| | | // 基于准备好的dom,初始化echarts实例 |
| | | var myChart = echarts.init(document.getElementById('number')); |
| | | |
| | | myChart.on('legendselectchanged', obj => { |
| | | var options = myChart.getOption() |
| | | options.series[0].data = yD; |
| | | options.series[1].data = mD; |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart.setOption(options, true) |
| | | }); |
| | | var myChart2 = echarts.init(document.getElementById('time')); |
| | | myChart2.on('legendselectchanged', obj => { |
| | | var options = myChart2.getOption(); |
| | | options.series[0].data = yT; |
| | | options.series[1].data = mT; |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart2.setOption(options, true) |
| | | }); |
| | | var myChart4 = echarts.init(document.getElementById('number1')); |
| | | myChart4.on('legendselectchanged', obj => { |
| | | var options = myChart4.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart4.setOption(options, true) |
| | | }); |
| | | // 使用刚指定的配置项和数据显示图表。 |
| | | myChart.setOption(option); |
| | | myChart2.setOption(option2); |
| | | myChart4.setOption(option4); |
| | | |
| | | var myChart3 = echarts.init(document.getElementById('gameTotal')); |
| | | myChart3.setOption(option3); |
| | | }); |
| | | function getContent(type){ |
| | | //设置点击字体颜色效果 |
| | | for(var i=1;i<5;i++){ |
| | | document.getElementById("div"+i).style.color="#888888";// |
| | | document.getElementById("div"+i).style.backgroundColor =""; |
| | | $("#content"+i).hide(); |
| | | } |
| | | //设置点击背景颜色效果 |
| | | document.getElementById("div"+type).style.color="white";// |
| | | document.getElementById("div"+type).style.backgroundColor ="rgb(26, 179, 148)"; |
| | | $("#type").val(type); |
| | | $("#content"+type).show(); |
| | | if(type!=3){ |
| | | $("#ensure").hide(); |
| | | $("#nextB").show(); |
| | | }else{ |
| | | $("#ensure").show(); |
| | | $("#nextB").hide(); |
| | | } |
| | | } |
| | | |
| | | function getStoreByCity(e) { |
| | | var cityCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getSiteByCity", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">全球</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#site").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",cityCode); |
| | | ajax.start(); |
| | | } |
| | | function getStoreByCity1(e) { |
| | | var cityCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getSiteByCity", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">全球</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#site1").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",cityCode); |
| | | ajax.start(); |
| | | } |
| | | </script> |
| | | |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>闸机数据统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <h3>场地总人次:</h3> |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/gateData/gateData.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>运营商管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="管理员姓名:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="管理员手机号:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 管理区域 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="type" > |
| | | <option value="">全部</option> |
| | | <option value="1">全国</option> |
| | | <option value="2">指定地区</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TSite.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TSite.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TSite.openAddTSite()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TSite.openInfo()" space="true"/> |
| | | <#button name="冻结" icon="fa-remove" clickFun="TSite.offShelf()" space="true"/> |
| | | <#button name="解冻" icon="fa-check" clickFun="TSite.onShelf()" space="true"/> |
| | | <#button name="重置密码" icon="fa-search" clickFun="TSite.reload()" space="true"/> |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/operator/operator.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*运营商名称:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="name" placeholder="请输入运营商名称" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*管理员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="userName" placeholder="请输入管理员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*管理员手机号:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="phone" placeholder="请输入管理员手机号" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*管理区域:</label> |
| | | <div class="col-sm-2" style="display: flex;align-items: center;"> |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="areaType1" value="1" name="areaType" onclick="TSite.areaTypeClick(1)"> |
| | | <label for="areaType1"> 全国 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="areaType2" value="2" name="areaType" checked="" onclick="TSite.areaTypeClick(2)"> |
| | | <label for="areaType2"> 指定地区 </label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#button btnCss="info" name="添加" id="ensure" icon="fa-check" clickFun="TSite.addArea()"/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="areaType1Div"> |
| | | <label class="col-sm-3 control-label">*管理地区:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="pCode" onchange="TSite.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in provinceList){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="cCode" > |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id = "data"> |
| | | <label class="col-sm-3 control-label">已添加管理地区</label> |
| | | <div class="col-sm-6"> |
| | | <div style="height: 200px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | | <thead> |
| | | <tr> |
| | | <th style="width: 300px;text-align: center;">所在省</th> |
| | | <th style="width: 300px;text-align: center;">所在市</th> |
| | | <th style="width: 100px;text-align: center;">操作</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="areaValue"> |
| | | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <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="TSite.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/operator/operator_add.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div class="form-group" > |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="type" value="${data.type}"> |
| | | <label class="col-sm-3 control-label">*运营商名称:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="name" value="${data.name}" placeholder="请输入运营商名称" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*管理员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="userName" value="${userName}" placeholder="请输入管理员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*管理员手机号:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="phone" value="${phone}" placeholder="请输入管理员手机号" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*管理区域:</label> |
| | | <div class="col-sm-2" style="display: flex;align-items: center;"> |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="areaType1" value="1" name="areaType" onclick="TSite.areaTypeClick(1)"> |
| | | <label for="areaType1"> 全国 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="areaType2" value="2" name="areaType" checked="" onclick="TSite.areaTypeClick(2)"> |
| | | <label for="areaType2"> 指定地区 </label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#button btnCss="info" name="添加" id="ensure" icon="fa-check" clickFun="TSite.addArea()"/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="areaType1Div"> |
| | | <label class="col-sm-3 control-label">*管理地区:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="pCode" onchange="TSite.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in provinceList){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="cCode" > |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id = "data"> |
| | | <label class="col-sm-3 control-label">已添加管理地区</label> |
| | | <div class="col-sm-6"> |
| | | <div style="height: 200px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | | <thead> |
| | | <tr> |
| | | <th style="width: 300px;text-align: center;">所在省</th> |
| | | <th style="width: 300px;text-align: center;">所在市</th> |
| | | <th style="width: 100px;text-align: center;">操作</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="areaValue"> |
| | | @for(obj in list){ |
| | | <tr class="areaValueClass"> |
| | | <td style="text-align: center;"><input type="hidden" id="provinceCode" name="provinceName" value="${obj.provinceCode}"> |
| | | <input type="hidden" id="provinceName" name="provinceCode" value="${obj.province}">${obj.province}</td> |
| | | <td style="text-align: center;"><input type="hidden" id="cityCode" name="cityName" value="${obj.cityCode}"> |
| | | <input type="hidden" id="cityName" name="cityCode" value="${obj.city}">${obj.city}</td> |
| | | <td style="text-align: center;"><button onclick="deleteSub(this)">移除</button></td> |
| | | </tr> |
| | | @} |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <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="TSite.updateSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/operator/operator_add.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | window.onload = function(){ |
| | | var OBJradio = document.querySelectorAll('input[type="radio"]'); |
| | | console.log("看看集合") |
| | | console.log(OBJradio) |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#type").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | if ($("#type").val()==1){ |
| | | $("#areaType1Div").hide(); |
| | | $("#areaType2Div").hide(); |
| | | $("#data").hide(); |
| | | $("#ensure").hide(); |
| | | } |
| | | } |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>运营商商户管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TSite.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in provinceList){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode"> |
| | | <option value="">请先选择省</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="管理员姓名:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="管理员手机号:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 认证平台 |
| | | </button> |
| | | </div> |
| | | <select style="width: 300px" class="form-control" id="platform" name = "platform"> |
| | | <option value="">全部</option> |
| | | <option value="1">微信</option> |
| | | <option value="2">支付宝</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 认证类型 |
| | | </button> |
| | | </div> |
| | | <select style="width: 300px" class="form-control" id="type" name = "platform"> |
| | | <option value="">全部</option> |
| | | <option value="1">法人</option> |
| | | <option value="2">个人</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 审核状态 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="state" > |
| | | <option value="">全部</option> |
| | | <option value="1">待审核</option> |
| | | <option value="2">审核中</option> |
| | | <option value="2">已审核</option> |
| | | <option value="2">已拒绝</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TSite.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TSite.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="分账比例" icon="fa-plus" clickFun="TSite.openAddTSite()"/> |
| | | <#button name="认证" icon="fa-plus" clickFun="TSite.openInfo()"/> |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/operatorUser/operatorUser.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | #app1{ |
| | | margin-left: 255px; |
| | | } |
| | | |
| | | |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <h2>商户信息</h2> |
| | | <div style="display: flex"> |
| | | <span id="storeName"></span> |
| | | <span id="storeStaff"></span> |
| | | <span id="storePhone"></span> |
| | | </div> |
| | | <h2>商户号信息</h2> |
| | | </br> |
| | | </br> |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label" > |
| | | 主题类型:<input type="radio" name="type" value="1" checked onclick="updateHalf(1)">个人 |
| | | <input type="radio" name="type" value="2" onclick="updateHalf(2)">企业 |
| | | </label> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*营业执照商户名称:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="merchantName" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法定代表人姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lrName" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*营业期限:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 300px" class="form-control" id="tradeTime" name="tradeTime" type="date"> |
| | | <input type="checkbox" style="margin-left: 10px" id="tradeT" value="0" onchange="TSite.tradeYse(this)">长期</input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*营业执照注册号:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="licenseRegistration" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*注册地址:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="registerAddress" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="license" name="营业执照" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人姓名:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="legalPerson" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人手机号:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="legalPhone" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*法人身份证有效期:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 300px" class="form-control" id="IDCardTime" name="IDCardTime" type="date"> |
| | | <input type="checkbox" style="margin-left: 10px" id="IDCardT" value="0" onchange="TSite.tradeYse(this)">长期</input> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="IDCardImg" name="法人身份证正面照" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*法人身份证号:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lIDNumber" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人邮箱:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lEmail" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人身份证地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lIDAddress" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="IDCardImg1" name="法人身份证背面照" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" > |
| | | <label class="col-sm-4 control-label" > |
| | | 结算账户类型:<input type="radio" name="type" value="1">对公 <input type="radio" name="type" value="2">对私 |
| | | </label> |
| | | </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="bank" name="bank"> |
| | | <option value="">选择开户银行</option> |
| | | @for(obj in bankList){ |
| | | <option value="${obj.bankCode}">${obj.bankName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">开户所在地:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <select style="width: 150px" class="form-control" id="pCode" onchange="TSite.oneChange(this)" name="bank"> |
| | | <option value="">选择省</option> |
| | | @for(obj in provinceList){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <select style="width: 150px" class="form-control" id="cCode" name="bank"> |
| | | <option value="">选择市区</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*银行卡号:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="backNumber" name="backNumber" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*开户名称:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="backUserName" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*开户行全称:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="backName" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row" id="benefit"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label" > |
| | | 法人是否为受益人:<input type="radio" name="type" value="1">是 <input type="radio" name="type" value="2">否 |
| | | </label> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="bName" name="bName" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人身份证地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="bAddress" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人身份证有效期:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="bTime" name="bTime" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="bImg1" name="受益人身份证正面照" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人身份证号:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="bIDNumber" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="bImg2" name="受益人身份证背面照" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*拒绝理由:</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="Img" name="上传图片" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*备注:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="remark" name="remark" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <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="TSite.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/operatorUser/operatorUser.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#tradeTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#IDCardTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#bTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | function updateHalf(e) { |
| | | if(e==1){ |
| | | $("#benefit").hide() |
| | | }else { |
| | | $("#benefit").show() |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="province"> |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="city"> |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | | <#SelectCon id="province" name="所在省" > |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="city" name="所在市" > |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="userPopulation" name="所属账号" > |
| | | <#SelectCon id="operator" name="所属运营商" > |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
| | |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="userPopulation" name="所属账号" > |
| | | <#SelectCon id="userPopulation" name="所属运营商" > |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <div class="ibox-title"> |
| | | <h5>门票管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="门票名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="门票类型"> |
| | | <option value="">全部</option> |
| | | <option value="1">日卡</option> |
| | | <option value="2">月卡</option> |
| | | <option value="3">季卡</option> |
| | | <option value="4">年卡</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="redemptionMethod" name="兑换方式"> |
| | | <option value="">全部</option> |
| | | <option value="1">积分</option> |
| | | <option value="2">现金+积分</option> |
| | | <option value="3">现金</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="userPopulation" name="用户人群"> |
| | | <option value="">全部</option> |
| | | <option value="1">全部用户</option> |
| | | <option value="2">年度会员</option> |
| | | <option value="3">已有学员用户</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="activeStatus" name="活动状态"> |
| | | <option value="">全部</option> |
| | | <option value="1">未开始</option> |
| | | <option value="2">已开始</option> |
| | | <option value="3">已结束</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="可售状态"> |
| | | <option value="">全部</option> |
| | | <option value="1">上架</option> |
| | | <option value="2">下架</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TPointProducts.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TPointProducts.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TPointProductsTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TPointProducts.openAddTPointProducts()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TPointProducts.openEditPage()" space="true"/> |
| | | <#button name="上架" icon="fa-remove" clickFun="TPointProducts.onShelf()" space="true"/> |
| | | <#button name="下架" icon="fa-remove" clickFun="TPointProducts.offShelf()" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TPointProducts.detail()" space="true"/> |
| | | <#button name="购买详情" icon="fa-remove" clickFun="TPointProducts.payDetail()" space="true"/> |
| | | </div> |
| | | <#table id="TPointProductsTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/ticket/ticket.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 34px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <#input id="name" name="门票名称" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">商品类型:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="type" value="1" checked onclick="updateType(1)"> 日卡 |
| | | <input type="radio" name="type" value="2" > 月卡 |
| | | <input type="radio" name="type" value="3" > 季卡 |
| | | <input type="radio" name="type" value="3" > 年卡 |
| | | </div> |
| | | </div> |
| | | <#input id="price" name="原价" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">兑换方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="redemptionMethod" value="1" checked> 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" > 现金+积分 |
| | | <input type="radio" name="redemptionMethod" value="3" > 现金 |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="y1" hidden> |
| | | <label class="col-sm-3 control-label">所需现金:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="cash" name="cash" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="y2"> |
| | | <label class="col-sm-3 control-label">所需积分:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="integral" name="integral" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | <#avatar id="cover" name="门票封面" /> |
| | | <div class="row" id="app" style="margin-left: 225px;" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门票图片: </label> |
| | | <div class="col-sm-2" style="margin-top: 2%"> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | :on-success="handleAvatarSuccess" |
| | | accept=".jpg,.jpeg,.png,.JPG,.JPEG" |
| | | :on-remove="handleRemove" |
| | | :before-upload="beforeAvatarUpload"> |
| | | <img v-if="imageUrl" :src="imageUrl" class="avatar"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">用户人群:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="userPopulation" value="1" checked> 全部用户 |
| | | <input type="radio" name="userPopulation" value="2" > 年度会员 |
| | | <input type="radio" name="userPopulation" value="3" > 已有学员用户 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">发放数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="quantityIssued" name="quantityIssued" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">限领数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="pickUpQuantity" name="pickUpQuantity" type="text"> |
| | | </div> |
| | | </div> |
| | | <#input id="startTime" name="有效期" type="text"/> |
| | | <div class="row" id="belongsCon" > |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <label class="col-sm-3">*适用范围: </label> |
| | | <div class="col-sm-2" id="belongsNationwide" > |
| | | <input class="col-sm-1" onclick="scopeOfApplication1()" name="company" type="radio" |
| | | value="0" checked style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">全国通用</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsCity" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication2()" type="radio" |
| | | value="1" style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">指定城市</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsStore" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" |
| | | value="1" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 6px;">指定门店</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="citySelect" hidden="hidden"> |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*指定城市: </label> |
| | | <div class="col-sm-9 control-label"> |
| | | <select class="col-sm-1" id="provinceData" style="margin-top: 1%;width: 25%" onchange="changeCity(null)"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | <label class="col-sm-1" style="width: 9%;margin-top: 7px">省</label> |
| | | <select class="col-sm-1" style="margin-top: 1%;width: 25%" id="cityData"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | <label class="col-sm-1" style="width: 7%;margin-top: 7px">市</label> |
| | | <label name="addBranch" class="col-sm-1" onclick="TCarInfoDlg.addBranch()" style="border: 0px;cursor: pointer;margin-top: 1%"><i class="fa fa-plus-circle"></i></label> |
| | | </div> |
| | | <div id="cityDemo"></div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="storeSelect" hidden="hidden"> |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-12"> |
| | | <label class="col-sm-3 control-label">*指定门店: </label> |
| | | <button onclick="storeList()" |
| | | style="height: 22px;width: 82px;background-color: #4a8ff1;color: white;z-index: 15;position:relative;border: none;margin-top: 1%"> |
| | | 选择门店 |
| | | </button> |
| | | </div> |
| | | <div class="col-sm-12" style="margin-left: -57px;margin-top: 20px"> |
| | | <table class="table table-bordered" style="width: 70%;margin-left: 228px;" id="storeTable"> |
| | | <thead> |
| | | <tr> |
| | | <td>所在省市</td> |
| | | <td>所属账号</td> |
| | | <td>门店名称</td> |
| | | <td>操作</td> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="coun"></tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="margin-left:262px"> |
| | | <label class="col-sm-1 control-label">兑换说明:</label> |
| | | <div class="col-sm-5"> |
| | | <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="sort" name="sort" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="b2" hidden> |
| | | |
| | | <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.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.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"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <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="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script src="${ctxPath}/modular/system/tGoods/tGoods_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/tGoods/TStoreInfo.js"></script> |
| | | <script> |
| | | |
| | | function updateType(e) { |
| | | if(e==2){ |
| | | $("#b1").hide() |
| | | $("#b2").show() |
| | | }else { |
| | | $("#b2 ").hide() |
| | | $("#b1").show() |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | function changeCity(n){ |
| | | |
| | | var provinceSelect = null; |
| | | if (n === undefined || n === null || n === ''){ |
| | | provinceSelect = document.getElementById("provinceData"); |
| | | }else { |
| | | provinceSelect = document.getElementById("provinceData"+n); |
| | | } |
| | | |
| | | var citySelect = null; |
| | | if (n === undefined || n === null || n === ''){ |
| | | citySelect = document.getElementById("cityData"); |
| | | }else { |
| | | citySelect = document.getElementById("cityData"+n); |
| | | } |
| | | |
| | | var selectedProvince = provinceSelect.value; |
| | | // 清空城市下拉框 |
| | | citySelect.innerHTML = '<option value="">请选择</option>'; |
| | | if (selectedProvince === "") { |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getCity", function(data){ |
| | | data.forEach(province => { |
| | | var option = document.createElement("option"); |
| | | option.value = province.id; // 根据你的数据结构确定省份的id字段 |
| | | option.text = province.name; // 根据你的数据结构确定省份的name字段 |
| | | citySelect.appendChild(option); |
| | | }); |
| | | },function(data){ |
| | | console.log('data:',data) |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('province',selectedProvince); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 全国通用 |
| | | */ |
| | | function scopeOfApplication1() { |
| | | $("#storeSelect").hide(); |
| | | $("#citySelect").hide(); |
| | | } |
| | | /** |
| | | * 指定城市 |
| | | */ |
| | | function scopeOfApplication2() { |
| | | $("#storeSelect").hide(); |
| | | $("#citySelect").show(); |
| | | } |
| | | /** |
| | | * 指定门店 |
| | | */ |
| | | function scopeOfApplication3() { |
| | | $("#storeSelect").show(); |
| | | $("#citySelect").hide(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | success: function(response) { |
| | | if (response == "5001"){ |
| | | Feng.error("当前课包预约人数已满!") |
| | | }else if(response == "5002"){ |
| | | Feng.error("剩余课时不足,无法购买!") |
| | | }else{ |
| | | Feng.success("上架成功!"); |
| | | TCompetition.close(); |
| | |
| | | TSite.search(); |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | picture:"", |
| | | fileUrl:"", |
| | | img:"", |
| | | plan:"", |
| | | goodsPicArray:[], |
| | | validateFields: { |
| | | } |
| | | }; |
| | | var TSite1 = { |
| | | id: "TSiteTable1", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | picture:"", |
| | | fileUrl:"", |
| | | img:"", |
| | | plan:"", |
| | | goodsPicArray:[], |
| | | validateFields: { |
| | | } |
| | | }; |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'number', visible:true, align: 'center', valign: 'middle'}, |
| | | {title: '昵称', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '成绩', field: 'score', visible: true, align: 'center', valign: 'middle'}, |
| | | ]; |
| | | }; |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite1.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'number', visible:true, align: 'center', valign: 'middle'}, |
| | | {title: '昵称', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '成绩', field: 'score', visible: true, align: 'center', valign: 'middle'}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TSite.close = function() { |
| | | parent.layer.close(window.parent.TSite.layerIndex); |
| | | } |
| | | |
| | | TSite.search3 = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#con3").val(); |
| | | queryData['city'] = $("#cCode3").val(); |
| | | queryData['siteTypeId'] = $("#site3").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | TSite1.search4 = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#con4").val(); |
| | | queryData['city'] = $("#cCode4").val(); |
| | | queryData['siteTypeId'] = $("#site4").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#store").val(""); |
| | | $("#sCode").val(""); |
| | | $("#storeName").val(""); |
| | | $("#siteTypeId").val(""); |
| | | $("#name").val(""); |
| | | $("#insuranceEndTime").val(""); |
| | | TSite.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/tSite/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TSite.table = table.init(); |
| | | |
| | | var defaultColunms1 = TSite1.initColumn(); |
| | | var table1 = new BSTable(TSite1.id, "/tSite/listAll", defaultColunms1); |
| | | table1.setPaginationType("client"); |
| | | TSite1.table = table1.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '场地区域名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '入场人次', field: 'number', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询跨城站点管理列表 |
| | | */ |
| | | TSite.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['insertUser'] = $("#insertUser").val(); |
| | | queryData['city'] = $("#city").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#name").val(""); |
| | | $("#insertUser").val(""); |
| | | $("#city").val(""); |
| | | $("#state").val(""); |
| | | TSite.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/gateData/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TSite.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | picture:"", |
| | | fileUrl:"", |
| | | img:"", |
| | | plan:"", |
| | | goodsPicArray:[], |
| | | validateFields: { |
| | | } |
| | | }; |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '运营商名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | |
| | | }, |
| | | {title: '管理员姓名', field: 'userName', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '管理员手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '管理区域', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"全国",2:"指定区域"}[data] |
| | | } |
| | | }, |
| | | {title: '商户绑定状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (data,row) { |
| | | var btn = ""; |
| | | if(data==1) { |
| | | var str = '<button class="btn btn-outline btn-primary" onclick="TSite.bindOperator('+row.id+')" >去绑定</button>' |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>'] |
| | | }else{ |
| | | var str = '<h3>已绑定</h3>' |
| | | btn = [str] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"正常",2:"冻结",3:"删除"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TSite.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TSite.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | TSite.bindOperator = function (e) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "认证", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/operatorUser/proportion/' + e |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | }; |
| | | /** |
| | | * 上架 |
| | | */ |
| | | TSite.onShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | console.log("查看选中") |
| | | console.log(obj) |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 1; |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/operator/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("解冻成功!"); |
| | | TSite.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "解冻失败!"; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 下架 |
| | | */ |
| | | TSite.offShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/operator/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("冻结成功!"); |
| | | TSite.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "冻结失败!"; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 跳转添加运营商页面 |
| | | */ |
| | | TSite.openAddTSite = function () { |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "添加运营商", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/operator/add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | /** |
| | | * 打开场地管理查看详情 |
| | | */ |
| | | TSite.openInfo = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一个问题进行编辑!"); |
| | | }else { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "编辑运营商", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/operator/update/' + TSite.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | TSite.reload = function () { |
| | | if (this.check()) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | password:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | | var operation = function() { |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/operator/pwd", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function (response) { |
| | | TSite.search(); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "冻结失败!"; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | Feng.confirm("确认重置密码?重置后密码为:a123456", operation); |
| | | } |
| | | }; |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TSite.close = function() { |
| | | parent.layer.close(window.parent.TSite.layerIndex); |
| | | }; |
| | | |
| | | TSite.search = function () { |
| | | var queryData = {}; |
| | | queryData['userName'] = $("#name").val(); |
| | | queryData['phone'] =$("#phone").val(); |
| | | queryData['type'] =$("#type").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#phone").val(""); |
| | | $("#type").val(""); |
| | | TSite.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/operator/listAll", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TSite.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | picture:"", |
| | | fileUrl:"", |
| | | img:"", |
| | | plan:"", |
| | | goodsPicArray:[], |
| | | validateFields: { |
| | | } |
| | | }; |
| | | //删除数据 |
| | | function deleteSub(e) { |
| | | $(e).parent().parent().remove(); |
| | | } |
| | | TSite.addArea = function () { |
| | | var province = $('#pCode option:selected').text(); |
| | | var provinceCode = $("#pCode").val(); |
| | | var city = $('#cCode option:selected').text(); |
| | | var cityCode = $("#cCode").val(); |
| | | var areaType = $("input[name='areaType']:checked").val(); |
| | | if (2 == areaType){ |
| | | if ("" == $("#pCode").val() || null == $("#pCode").val()){ |
| | | Feng.error("请选择省"); |
| | | return; |
| | | } |
| | | } |
| | | var subArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | subArr.push({ |
| | | province:$(this).find("input[name*='provinceName']").val(), |
| | | city:$(this).find("input[name*='cityName']").val(), |
| | | areaType:areaType, |
| | | }) |
| | | }); |
| | | //判断所选省市是否存在 |
| | | if (city=="选择市"){ |
| | | console.log("没有选择市") |
| | | city = ""; |
| | | } |
| | | for(var i=0;i<subArr.length;i++){ |
| | | var p = subArr[i].province; |
| | | var c = subArr[i].city; |
| | | console.log(c) |
| | | console.log(city) |
| | | console.log(province) |
| | | console.log(p) |
| | | console.log(provinceCode) |
| | | if (city==""){ |
| | | if (c==""){ |
| | | if (provinceCode == p) { |
| | | Feng.info("当前省已添加"); |
| | | return; |
| | | } |
| | | } |
| | | }else { |
| | | if (cityCode == c){ |
| | | Feng.info("当前所选省市已添加"); |
| | | return; |
| | | } |
| | | } |
| | | if (provinceCode == p){ |
| | | if (c == ""){ |
| | | Feng.info("当前省已添加"); |
| | | return; |
| | | } |
| | | if (city == ""){ |
| | | Feng.info("当前省已添加"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | var str = '<tr class="areaValueClass">' + |
| | | '<td style="text-align: center;"><input type="hidden" id="provinceValue" name="provinceName" value="'+provinceCode+'"><input type="hidden" id="provinceValue" name="provinceCode" value="'+province+'">'+province+'</td>' + |
| | | '<td style="text-align: center;"><input type="hidden" id="cityValue" name="cityName" value="'+cityCode+'"><input type="hidden" id="provinceValue" name="cityCode" value="'+city+'">'+city+'</td>' + |
| | | '<td style="text-align: center;"><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | $("#areaValue").append(str); |
| | | }; |
| | | |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TSite.areaTypeClick = function (e) { |
| | | if (1 == e){//全国 |
| | | $("#areaType1Div").hide(); |
| | | $("#areaType2Div").hide(); |
| | | $("#data").hide(); |
| | | $("#ensure").hide(); |
| | | } else if (2 == e){ |
| | | $("#areaType2Div").show(); |
| | | $("#data").show(); |
| | | $("#areaType1Div").show(); |
| | | $("#ensure").show(); |
| | | |
| | | } |
| | | }; |
| | | |
| | | TSite.oneChange = function (e) { |
| | | console.log("进入!") |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | }); |
| | | if (oneId==""){ |
| | | var temp = '<option value="">请先选择省</option>'; |
| | | $("#cCode").empty().append(temp); |
| | | } |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TSite.close = function() { |
| | | parent.layer.close(window.parent.TSite.layerIndex); |
| | | } |
| | | |
| | | |
| | | |
| | | TSite.addSubmit = function(){ |
| | | var areaType = $("input[name='areaType']:checked").val(); |
| | | if ("" == $("#name").val() || null == $("#name").val()){ |
| | | Feng.error("请输入运营商名称"); |
| | | return; |
| | | } |
| | | if ("" == $("#userName").val() || null == $("#userName").val()){ |
| | | Feng.error("请输入管理员姓名"); |
| | | return; |
| | | } |
| | | if ("" == $("#phone").val() || null == $("#phone").val()){ |
| | | Feng.error("请输入管理员电话"); |
| | | return; |
| | | } |
| | | if (areaType == 2){ |
| | | var comArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | comArr.push({ |
| | | provinceCode:$(this).find("input[name*='provinceName']").val(), |
| | | province:$(this).find("input[name*='provinceCode']").val(), |
| | | cityCode:$(this).find("input[name*='cityName']").val(), |
| | | city:$(this).find("input[name*='cityCode']").val(), |
| | | areaType:areaType, |
| | | }) |
| | | console.log("循环看看") |
| | | console.log($(this).find("input[name*='provinceName']").text()) |
| | | console.log($(this).find("input[name*='cityName']").text()) |
| | | }); |
| | | if(comArr.length <= 0){ |
| | | Feng.error("请至少添加一个管理地区"); |
| | | return; |
| | | } |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/operator/addOperator", function(data){ |
| | | Feng.success("操作成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSite.close(); |
| | | },function(data){ |
| | | Feng.error("操作失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("name",$("#name").val()); |
| | | ajax.set("userName",$("#userName").val()); |
| | | ajax.set("phone",$("#phone").val()); |
| | | ajax.set("type",areaType); |
| | | ajax.set("comArr",JSON.stringify(comArr)); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TSite.updateSubmit = function(){ |
| | | var areaType = $("input[name='areaType']:checked").val(); |
| | | if ("" == $("#name").val() || null == $("#name").val()){ |
| | | Feng.error("请输入运营商名称"); |
| | | return; |
| | | } |
| | | if ("" == $("#userName").val() || null == $("#userName").val()){ |
| | | Feng.error("请输入管理员姓名"); |
| | | return; |
| | | } |
| | | if ("" == $("#phone").val() || null == $("#phone").val()){ |
| | | Feng.error("请输入管理员电话"); |
| | | return; |
| | | } |
| | | var comArr=[]; |
| | | if (areaType == 2){ |
| | | $(".areaValueClass").each(function () { |
| | | comArr.push({ |
| | | provinceCode:$(this).find("input[name*='provinceName']").val(), |
| | | province:$(this).find("input[name*='provinceCode']").val(), |
| | | cityCode:$(this).find("input[name*='cityName']").val(), |
| | | city:$(this).find("input[name*='cityCode']").val(), |
| | | areaType:areaType, |
| | | }) |
| | | }); |
| | | if(comArr.length <= 0){ |
| | | Feng.error("请至少添加一个管理地区"); |
| | | return; |
| | | } |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/operator/updateOperator", function(data){ |
| | | Feng.success("操作成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSite.close(); |
| | | },function(data){ |
| | | Feng.error("操作失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("name",$("#name").val()); |
| | | ajax.set("userName",$("#userName").val()); |
| | | ajax.set("phone",$("#phone").val()); |
| | | ajax.set("type",areaType); |
| | | ajax.set("comArr",JSON.stringify(comArr)); |
| | | ajax.start(); |
| | | }; |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | picture:"", |
| | | fileUrl:"", |
| | | img:"", |
| | | plan:"", |
| | | goodsPicArray:[], |
| | | validateFields: { |
| | | } |
| | | }; |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在城市', field: 'provinceAndCity', visible: true, align: 'center', valign: 'middle',width:'20%',}, |
| | | {title: '管理员姓名', field: 'userName', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '管理员手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '认证平台', field: 'platform', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '认证类型', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '分账比例', field: 'proportion', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '审核状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"待审核",2:"审核中",3:"已通过",4:"已拒绝"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TSite.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TSite.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | /** |
| | | * 分账比例 |
| | | */ |
| | | TSite.openAddTSite = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一个运营商商户设置分账比例!"); |
| | | }else { |
| | | if (this.check()) { |
| | | var index = layer.load(1,{ |
| | | type: 1 |
| | | , title: '添加分账比例' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" >' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">支付宝分账比例:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" placeholder="请输入分账比例" type="text" id="alipay"> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">微信分账比例:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" placeholder="请输入分账比例" type="text" id="wechat"> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>' |
| | | , btn: ['关闭', '保存'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | ,load:1 |
| | | , yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | btn2:function () { |
| | | let wechat = $("#wechat").val() |
| | | let alipay = $("#alipay").val() |
| | | if(alipay==''){ |
| | | Feng.info("请输入支付宝分账比例") |
| | | return false; |
| | | } |
| | | if(wechat==''){ |
| | | Feng.info("请输入微信分账比例") |
| | | return false; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/operatorUser/addProportion", function (data) { |
| | | Feng.success("设置成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | }); |
| | | ajax.set("id", TSite.seItem.id); |
| | | ajax.set("alipay", alipay); |
| | | ajax.set("wechat", wechat); |
| | | ajax.start(); |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | }; |
| | | function UploadFileFn(){ |
| | | $('#upFile').click(); |
| | | } |
| | | TSite.oneChange = function (e) { |
| | | console.log("进入!") |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | }); |
| | | if (oneId==""){ |
| | | var temp = '<option value="">请先选择省</option>'; |
| | | $("#cCode").empty().append(temp); |
| | | } |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 打开场地管理查看详情 |
| | | */ |
| | | TSite.openInfo = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "认证", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/operatorUser/proportion/' + 5 |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | }; |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TSite.close = function() { |
| | | parent.layer.close(window.parent.TSite.layerIndex); |
| | | }; |
| | | |
| | | TSite.search = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#pCode").val(); |
| | | queryData['city'] =$("#cCode").val(); |
| | | queryData['userName'] =$("#name").val(); |
| | | queryData['phone'] =$("#phone").val(); |
| | | queryData['platform'] =$("#platform").val(); |
| | | queryData['type'] =$("#type").val(); |
| | | queryData['state'] =$("#state").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#name").val(""); |
| | | $("#phone").val(""); |
| | | $("#platform").val(""); |
| | | $("#type").val(""); |
| | | $("#state").val(""); |
| | | TSite.search(); |
| | | }; |
| | | TSite.tradeYse = function () { |
| | | var tradeT = document.getElementById('tradeT'); |
| | | var IDCardT = document.getElementById('IDCardT'); |
| | | var tradeTime = document.getElementById('tradeTime'); |
| | | var IDCardTime = document.getElementById('IDCardTime'); |
| | | // 判断是否被选中 |
| | | if (tradeT.checked) { |
| | | tradeTime.disabled = true; |
| | | } else { |
| | | tradeTime.disabled = false; |
| | | } |
| | | if (IDCardT.checked) { |
| | | IDCardTime.disabled = true; |
| | | } else { |
| | | IDCardTime.disabled = false; |
| | | } |
| | | }; |
| | | $(function () { |
| | | $("#benefit").hide() |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/operatorUser/listAll", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TSite.table = table.init(); |
| | | var c1 = new $WebUpload("license"); |
| | | var c2 = new $WebUpload("IDCardImg"); |
| | | var c3 = new $WebUpload("IDCardImg1"); |
| | | var c4 = new $WebUpload("bImg1"); |
| | | var c5 = new $WebUpload("bImg2"); |
| | | var c6 = new $WebUpload("Img"); |
| | | c1.setUploadBarId("progressBar"); |
| | | c1.init(); |
| | | c2.setUploadBarId("progressBar"); |
| | | c2.init(); |
| | | c3.setUploadBarId("progressBar"); |
| | | c3.init(); |
| | | c4.setUploadBarId("progressBar"); |
| | | c4.init(); |
| | | c5.setUploadBarId("progressBar"); |
| | | c5.init(); |
| | | c6.setUploadBarId("progressBar"); |
| | | c6.init(); |
| | | |
| | | }); |
| | |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | |
| | | }); |
| | | ajax.set('province',selectedProvinceId); |
| | | ajax.start(); |
| | | citySelect.addEventListener("change", queryOperator); |
| | | } |
| | | |
| | | // 获取运营商数据 |
| | | function queryOperator() { |
| | | var city = $('#city option:selected').text(); |
| | | var citySelect = document.getElementById("operator"); |
| | | citySelect.innerHTML = ""; |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getOperator", function(data){ |
| | | data.forEach(province => { |
| | | var option = document.createElement("option"); |
| | | option.value = province.id; |
| | | option.text = province.name; |
| | | citySelect.appendChild(option); |
| | | }); |
| | | },function(data){ |
| | | console.log('data:',data) |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('city',city); |
| | | ajax.start(); |
| | | } |
| | | $(function () { |
| | | var defaultColunms = TStoreProvince.initColumn(); |
| | | var table = new BSTable(TStoreProvince.id, "/tCouponManage/storeDetailsOfSearch", defaultColunms); |
| | |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | // 门票管理页面的门店列表展示 |
| | | function storeList1(){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '门店列表', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCouponManage/storeList' |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | TCarInfoDlg.selecUserOpt = function (arrays){ |
| | | console.log(arrays) |
| | | //获取所有的值 |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TPointProducts = { |
| | | id: "TPointProductsTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TPointProducts.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '商品名称', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | // formatter: function (value, row, index) { |
| | | // return {1: "日卡票", 2: "月卡票", 3: "季卡票", 4: "年卡票"}[value] |
| | | // } |
| | | }, |
| | | {title: '商品封面', field: 'cover', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | value = typeof value == "undefined" || value == '' ? '/static/img/NoPIC.png' : value; |
| | | return '<img src="' + value + '" style="height: 100px;"/>' |
| | | } |
| | | }, |
| | | {title: '有效期', field: 'timeValue', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '兑换地点', field: 'useScope', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "全国", 2: "指定城市", 3: "指定门店"}[value] |
| | | } |
| | | }, |
| | | {title: '用户人群', field: 'userPopulation', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "全部用户", 2: "年度会员", 3: "已有学员用户"}[value] |
| | | } |
| | | }, |
| | | {title: '发放数量', field: 'quantityIssued', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '限领数量', field: 'pickUpQuantity', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '已领数量', field: 'hasPickQty', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '已兑换数量', field: 'hasExchangeQty', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '排序', field: 'sort', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '活动状态', field: 'activeStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "未开始", 2: "已开始", 3: "已结束"}[value] |
| | | } |
| | | }, |
| | | {title: '可售状态', field: 'shelves', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "上架", 2: "下架"}[value] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D + h + m + s; |
| | | return strDate |
| | | } |
| | | |
| | | function currentTime1(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D ; |
| | | return strDate |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TPointProducts.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TPointProducts.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 添加 |
| | | */ |
| | | TPointProducts.openAddTPointProducts = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/ticket/add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | TPointProducts.detail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tCity_update/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 购买详情 |
| | | */ |
| | | TPointProducts.payDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'购买详情', |
| | | area: ['70%', '70%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tPay_detail/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 编辑页面 |
| | | */ |
| | | TPointProducts.openEditPage = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tGoods_update/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 上架处理 |
| | | * @param m |
| | | */ |
| | | TPointProducts.onShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 1; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/ticket/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("上架成功!"); |
| | | TPointProducts.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "修改失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | }; |
| | | /** |
| | | * 下架处理 |
| | | * @param m |
| | | */ |
| | | TPointProducts.offShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/ticket/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("下架成功!"); |
| | | TPointProducts.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | } |
| | | }); |
| | | |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TPointProducts.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | queryData['redemptionMethod'] = $("#redemptionMethod").val(); |
| | | queryData['userPopulation'] = $("#userPopulation").val(); |
| | | queryData['activeStatus'] = $("#activeStatus").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TPointProducts.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TPointProducts.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#type").val(""); |
| | | $("#redemptionMethod").val(""); |
| | | $("#userPopulation").val(""); |
| | | $("#activeStatus").val(""); |
| | | $("#state").val(""); |
| | | TPointProducts.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TPointProducts.initColumn(); |
| | | var table = new BSTable(TPointProducts.id, "/ticket/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TPointProducts.table = table.init(); |
| | | }); |
| | |
| | | @Autowired |
| | | private CityManagerClient cityManagerClient; |
| | | |
| | | |
| | | /** |
| | | * 获取所有场地 |
| | | */ |
| | | @RequestMapping("/base/site/getList") |
| | | @ResponseBody |
| | | public List<Site> getList(){ |
| | | return siteService.list(new QueryWrapper<Site>().ne("state",3)); |
| | | } |
| | | /** |
| | | * 获取场地预约记录 |
| | | */ |