Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
Conflicts:
cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/CouponListOfSearch.java
cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java
cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/CouponListOfSearch.java
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
| | |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | |
| | | private List<Integer> sid; |
| | | |
| | | private List<Integer> rid; |
| | | |
| | | } |
| | |
| | | |
| | | private Integer userId; |
| | | |
| | | private List<Integer> rid; |
| | | |
| | | private List<Integer> sid; |
| | | @ApiModelProperty(value = "1日卡 2月卡 3季卡 4年卡") |
| | | private Integer cardType; |
| | |
| | | @PostMapping("/base/coupon/queryCouponListSearch1") |
| | | public List<Map<String,Object>> getCouponListOfSearch1(@RequestBody CouponListOfSearch ofSearch){ |
| | | List<Map<String, Object>> mapList = couponService.queryCouponListOfSearch1(ofSearch); |
| | | |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String currentDateStr = sdf.format(currentDate); |
| | | |
| | | // Iterate over the mapList and remove entries where endTime is less than the current date |
| | | Iterator<Map<String, Object>> iterator = mapList.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map<String, Object> map = iterator.next(); |
| | | String endTime = (String) map.get("endTime"); |
| | | if (endTime.compareTo(currentDateStr) < 0) { |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (mapList.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | |
| | | }else{ |
| | | coupon.setAuditStatus(1); |
| | | } |
| | | if(dataVo.getObjType()!=1){ |
| | | coupon.setAuditStatus(1); |
| | | } |
| | | |
| | | boolean save = couponService.save(coupon); |
| | | if (save){ |
| | | if (dataVo.getCompany() == 3){ |
| | |
| | | if(merchandise.getUseScope()==1){ |
| | | sids.add(0); |
| | | detailsResponse.setSid(sids); |
| | | detailsResponse.setRid(new ArrayList<>()); |
| | | }else if(merchandise.getUseScope()==2){ |
| | | // 指定城市 |
| | | List<PointsMerchandiseCity> list = pmdsCityService.list(new LambdaQueryWrapper<PointsMerchandiseCity>().eq(PointsMerchandiseCity::getPointsMerchandiseId, merchandise.getId())); |
| | |
| | | } |
| | | List<Integer> storeIds = stoClient.queryStoreIdByCityCode(collect); |
| | | detailsResponse.setSid(storeIds); |
| | | if(storeIds.size()>0){ |
| | | // 获取rid |
| | | List<Integer> rid= stoClient.querySiteIdById(storeIds); |
| | | detailsResponse.setRid(rid); |
| | | } |
| | | |
| | | |
| | | }else if(merchandise.getUseScope()==3){ |
| | | // 指定门店 |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>().eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); |
| | | List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); |
| | | detailsResponse.setSid(collect); |
| | | |
| | | if(collect.size()>0){ |
| | | // 获取rid |
| | | List<Integer> rid= stoClient.querySiteIdById(collect); |
| | | detailsResponse.setRid(rid); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | private Integer userId; |
| | | |
| | | |
| | | |
| | | |
| | | private List<Integer> rid; |
| | | |
| | | private List<Integer> sid; |
| | | |
| | | @ApiModelProperty(value = "1日卡 2月卡 3季卡 4年卡") |
| | |
| | | @PostMapping("/store/queryStoreIdByCityCode") |
| | | List<Integer> queryStoreIdByCityCode(@RequestBody List<String> collect); |
| | | |
| | | @PostMapping("/store/querySiteIdById") |
| | | List<Integer> querySiteIdById(@RequestBody List<Integer> storeIds); |
| | | |
| | | |
| | | } |
| | |
| | | @Param("storeId")Integer storeId, |
| | | @Param("operatorId")Integer operatorId, |
| | | @Param("objType")Integer objType |
| | | @Param("storeId")Integer storeId, |
| | | @Param("objType")Integer objType |
| | | ); |
| | | |
| | | List<Map<String, Object>> queryCouponListOfSearch1(@Param("name")String name, |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryCouponListOfSearch(CouponListOfSearch ofSearch) { |
| | | return this.baseMapper.queryCouponListOfSearch(ofSearch.getName(), |
| | | ofSearch.getType(),ofSearch.getDistributionMethod(), |
| | | ofSearch.getUserPopulation(),ofSearch.getStatus(), |
| | | ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(), |
| | | ofSearch.getStoreId(),ofSearch.getObjType(),ofSearch.getOperatorId()); |
| | | return this.baseMapper.queryCouponListOfSearch(ofSearch.getName(),ofSearch.getType(),ofSearch.getDistributionMethod(),ofSearch.getUserPopulation(),ofSearch.getStatus(),ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(),ofSearch.getStoreId(),ofSearch.getObjType()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | auditStatus |
| | | from t_coupon |
| | | where 1=1 |
| | | <if test="objType == 1"> |
| | | and auditStatus =2 |
| | | </if> |
| | | where 1=1 |
| | | <if test="operatorId != null"> |
| | | and cityManagerId = #{operatorId} |
| | | </if> |
| | |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date endTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | |
| | | package com.dsh.competition.feignclient.account; |
| | | |
| | | import com.dsh.competition.feignclient.account.model.Student; |
| | | import com.dsh.competition.feignclient.account.model.TStudent; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | */ |
| | | @PostMapping("/student/queryStudentByPhone") |
| | | Student queryStudentByPhone(String phone); |
| | | |
| | | |
| | | @PostMapping("/student/queryStudentList") |
| | | List<TStudent> queryStudentList(@RequestBody Integer appUserId); |
| | | } |
New file |
| | |
| | | package com.dsh.competition.feignclient.account.model; |
| | | |
| | | import java.util.Date; |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员信息 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_student") |
| | | public class TStudent{ |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | /** |
| | | * 学员姓名 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 学员电话 |
| | | */ |
| | | @TableField("phone") |
| | | private String phone; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @TableField("birthday") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | @TableField("sex") |
| | | private Integer sex; |
| | | /** |
| | | * 身高 |
| | | */ |
| | | @TableField("height") |
| | | private Double height; |
| | | /** |
| | | * 体重 |
| | | */ |
| | | @TableField("weight") |
| | | private Double weight; |
| | | /** |
| | | * bmi健康值 |
| | | */ |
| | | @TableField("bmi") |
| | | private Double bmi; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | @TableField("idCard") |
| | | private String idCard; |
| | | /** |
| | | * 体侧表 |
| | | */ |
| | | @TableField("lateralSurface") |
| | | private String lateralSurface; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @TableField("headImg") |
| | | private String headImg; |
| | | /** |
| | | * 是否默认 1默认 2不是默认 |
| | | */ |
| | | @TableField("isDefault") |
| | | private Integer isDefault; |
| | | |
| | | |
| | | private String image1; |
| | | |
| | | private String image2; |
| | | private String image3; |
| | | } |
| | |
| | | private Integer gender; |
| | | @ApiModelProperty("剩余课时") |
| | | private Integer residueClassHour; |
| | | @ApiModelProperty("是否为学员") |
| | | private Integer isStudent; |
| | | } |
| | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Store store = storeClient.queryStoreById(Integer.valueOf(s)); |
| | | map.put("name",store.getName()); |
| | | map.put("address",store.getAddress()); |
| | | |
| | | |
| | | String str = store.getAddress(); |
| | | str = str.substring(str.indexOf("省") + 1); |
| | | |
| | | // 去掉第一个“市”及之前的字符串 |
| | | str = str.substring(str.indexOf("市") + 1); |
| | | |
| | | // 去掉第一个“区”及之前的字符串 |
| | | str = str.substring(str.indexOf("区") + 1); |
| | | |
| | | map.put("address",str); |
| | | map.put("storeLon",store.getLon()); |
| | | map.put("storeLat",store.getLat()); |
| | | map.put("storeCoverDrawing",store.getCoverDrawing()); |
| | |
| | | import com.dsh.competition.entity.UserCompetition; |
| | | import com.dsh.competition.feignclient.account.StudentClient; |
| | | import com.dsh.competition.feignclient.account.model.Student; |
| | | import com.dsh.competition.feignclient.account.model.TStudent; |
| | | import com.dsh.competition.feignclient.course.CoursePackagePaymentClient; |
| | | import com.dsh.competition.feignclient.model.CompetitionUser; |
| | | import com.dsh.competition.mapper.ParticipantMapper; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取参赛人员列表 |
| | | * @param uid |
| | |
| | | */ |
| | | @Override |
| | | public List<ParticipantVo> queryParticipantList(Integer uid) throws Exception { |
| | | //拿到学员列表 |
| | | List<TStudent> tStudents = studentClient.queryStudentList(uid); |
| | | //利用HashMap去重身份证 |
| | | LinkedHashMap<String,ParticipantVo> linkedHashMap =new LinkedHashMap<>(); |
| | | SimpleDateFormat sdf_year = new SimpleDateFormat("yyyy"); |
| | | for (TStudent tStudent : tStudents) { |
| | | ParticipantVo participantVo = new ParticipantVo(); |
| | | participantVo.setId(tStudent.getId()); |
| | | participantVo.setName(tStudent.getName()); |
| | | participantVo.setIdcard(tStudent.getIdCard()); |
| | | Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(tStudent.getBirthday())); |
| | | participantVo.setAge(age); |
| | | Integer integer = coursePackagePaymentClient.queryResidueClassHour(tStudent.getId()); |
| | | participantVo.setResidueClassHour(integer); |
| | | participantVo.setPhone(tStudent.getPhone()); |
| | | participantVo.setHeight(tStudent.getHeight().intValue()); |
| | | participantVo.setWeight(tStudent.getWeight()); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | if(null != tStudent.getBirthday()){ |
| | | String format = sdf.format(tStudent.getBirthday()); |
| | | participantVo.setBirthday(format); |
| | | } |
| | | participantVo.setGender(tStudent.getSex()); |
| | | participantVo.setIsStudent(1); |
| | | linkedHashMap.put(tStudent.getIdCard(),participantVo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //查出临时表里的数据,也去重 |
| | | List<Participant> list = this.list(new QueryWrapper<Participant>().eq("appUserId", uid).eq("state", 1)); |
| | | List<ParticipantVo> listVo = new ArrayList<>(); |
| | | SimpleDateFormat sdf_year = new SimpleDateFormat("yyyy"); |
| | | for (Participant participant : list) { |
| | | ParticipantVo participantVo = new ParticipantVo(); |
| | | participantVo.setId(participant.getId()); |
| | |
| | | Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(participant.getBirthday())); |
| | | participantVo.setAge(age); |
| | | Student student = studentClient.queryStudentByPhone(participant.getPhone()==null?"0":participant.getPhone()); |
| | | |
| | | //设为不是学员 |
| | | participantVo.setIsStudent(0); |
| | | |
| | | if(null != student){ |
| | | Integer integer = coursePackagePaymentClient.queryResidueClassHour(student.getId()); |
| | | participantVo.setResidueClassHour(integer); |
| | | participantVo.setIsStudent(1); |
| | | |
| | | }else{ |
| | | participantVo.setResidueClassHour(0); |
| | | } |
| | |
| | | participantVo.setBirthday(format); |
| | | } |
| | | participantVo.setGender(participant.getGender()); |
| | | |
| | | linkedHashMap.put(participant.getIdcard(),participantVo); |
| | | listVo.add(participantVo); |
| | | } |
| | | return listVo; |
| | | |
| | | |
| | | |
| | | |
| | | List<ParticipantVo> listVo1 = new ArrayList<>(linkedHashMap.values()); |
| | | |
| | | |
| | | return listVo1; |
| | | } |
| | | |
| | | |
| | |
| | | //SDK已经封装掉了公共参数,这里只需要传入业务参数。以下方法为sdk的model入参方式(model和biz_content同时存在的情况下取biz_content)。 |
| | | AlipayTradeAppPayModel model = new AlipayTradeAppPayModel(); |
| | | model.setBody(body);//对一笔交易的具体描述信息。如果是多种商品,请将商品描述字符串累加传给body。 |
| | | model.setSubject(subject);//商品的标题/交易标题/订单标题/订单关键字等。 |
| | | model.setSubject("报名赛事");//商品的标题/交易标题/订单标题/订单关键字等。 |
| | | model.setOutTradeNo(outTradeNo);//商户网站唯一订单号 |
| | | model.setTimeoutExpress("30m"); |
| | | model.setTotalAmount(amount);//付款金额 |
| | |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | |
| | | private List<Integer> sid; |
| | | |
| | | private List<Integer> rid; |
| | | |
| | | } |
| | |
| | | //查询运营商 |
| | | @PostMapping("/store/queryByStoreId") |
| | | OperatorUser queryByStoreId(Integer storeId); |
| | | |
| | | @PostMapping("/store/querySiteId") |
| | | List<Integer> querySiteId(Integer storeId); |
| | | |
| | | } |
| | |
| | | coursePackage = tcpmapper.selectById(coursePackageStudent.getCoursePackageId()); |
| | | coursePackageId = coursePackageStudent.getCoursePackageId(); |
| | | } |
| | | |
| | | recordVo.setSid(Arrays.asList(coursePackage.getStoreId())); |
| | | List<Integer> rid = stoClient.querySiteId(coursePackage.getStoreId()); |
| | | recordVo.setRid(rid); |
| | | recordVo.setUserId(appUserId); |
| | | recordVo.setSiteId(coursePackage.getSiteId()); |
| | | List<Integer> ids1 = getIds(coursePackage.getSiteId()); |
| | |
| | | FROM t_course_package_payment py |
| | | LEFT JOIN t_course_package cp ON py.coursePackageId = cp.id |
| | | GROUP BY studentId |
| | | ORDER BY studentId, totalClassHours |
| | | ORDER BY studentId, length(name) desc ,totalClassHours |
| | | ) subquery |
| | | ) a |
| | | <where> |
| | |
| | | private Integer operatorId; |
| | | private Integer objType; |
| | | |
| | | |
| | | } |
| | |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date endTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | |
| | | model.addAttribute("objectType",objectType); |
| | | Competition competition = competitionClient.queryById(id); |
| | | System.out.println("======competition======"+competition); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | String startTime = formatter.format(competition.getStartTime()); |
| | | model.addAttribute("startTime",startTime); |
| | | String endTime = formatter.format(competition.getEndTime()); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | model.addAttribute("item",competition); |
| | | String[] split = competition.getStoreId().split(","); |
| | | List<Integer> integers = new ArrayList<>(); |
| | | for (String s : split) { |
| | | integers.add(Integer.valueOf(s)); |
| | | } |
| | | |
| | | model.addAttribute("storeIds",integers); |
| | | |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | |
| | | dataVo.setCompany(3); |
| | | } |
| | | dataVo.setObjType(UserExt.getUser().getObjectType()); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | dataVo.setStoreIds(UserExt.getUser().getObjectId().toString()); |
| | | dataVo.setCompany(3); |
| | | } |
| | | dataVo.setObjType(UserExt.getUser().getObjectType()); |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | |
| | | model.addAttribute("item", tCoursePackage); |
| | | model.addAttribute("type", tCoursePackage.getType()); |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("objectType",objectType); |
| | | |
| | | String classStartTime = tCoursePackage.getClassStartTime(); |
| | | String classEndTime = tCoursePackage.getClassEndTime(); |
| | | |
| | |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | |
| | | |
| | | @Autowired |
| | | private TOperatorService tOperatorService; |
| | | |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | |
| | | |
| | | /** |
| | |
| | | user.setObjectId(tStore.getId()); |
| | | |
| | | |
| | | |
| | | |
| | | // 添加场地 |
| | | TSite tSite = new TSite(); |
| | | tSite.setName(tStore.getName()); |
| | | tSite.setStoreId(tStore.getId()); |
| | | tSite.setSign(1); |
| | | siteService.save(tSite); |
| | | |
| | | HashMap<String, String> mapSite = new HashMap<>(); |
| | | mapSite.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | mapSite.put("name",tStore.getName()); |
| | | mapSite.put("space_id",tStore.getId().toString()); |
| | | mapSite.put("area_id",tSite.getId().toString()); |
| | | HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", mapSite); |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id",tStore.getId()+""); |
| | | map.put("device_id",s); |
| | | map.put("region_id",""); |
| | | map.put("region_id",tSite.getId().toString()); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | System.out.println(s1); |
| | |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("name",site.getName()); |
| | | map.put("space_id",integer1.toString()); |
| | | map.put("space_id",site.getStoreId().toString()); |
| | | map.put("area_id",integer1.toString()); |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", map); |
| | | |
| | | // 添加门禁 |
| | |
| | | private String imgs; |
| | | @TableField("ids") |
| | | private String ids; |
| | | @TableField("sign") |
| | | private Integer sign; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时有效期:</label> |
| | | <div class="col-sm-4"> |
| | | <label class="col-sm-3 control-label" ${type == 2||type == 3 ? 'hidden=hidden' : ''}>*课时有效期:</label> |
| | | <div class="col-sm-4" ${type == 2||type == 3 ? 'hidden=hidden' : ''}> |
| | | 购买后 <input id="validDays" name="validDays" type="number" value="${item.validDays}" min="0" placeholder="天数" style="width: 80px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 天内有效 |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | laydate.render({ |
| | | elem: '#startTime' |
| | | ,type:"datetime" |
| | | ,type:"datetime", |
| | | format: "yyyy-MM-dd HH:mm" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | ,type:"datetime" |
| | | ,type:"datetime", |
| | | format: "yyyy-MM-dd HH:mm" |
| | | }); |
| | | |
| | | |
| | |
| | | |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | ,type:"date" |
| | | ,type:"date", |
| | | format: "yyyy-MM-dd HH:mm" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#startTime' |
| | | ,type:"date" |
| | | ,type:"date", |
| | | format: "yyyy-MM-dd HH:mm" |
| | | }); |
| | | |
| | | laydate.render({ |
| | | elem: '#registerEndTime' |
| | | ,type:"datetime" |
| | | ,type:"datetime", |
| | | format: "yyyy-MM-dd HH:mm" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStart' |
| | |
| | | <option value="${obj.id}" ${obj.id == item.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <input id="storeIds" type="hidden" value="${storeIds}"> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="赛事名称" type="text" value="${item.name}"/> |
| | |
| | | multiple: true, |
| | | closeOnSelect: false |
| | | }); |
| | | |
| | | console.log("===========storeIds="+$('#storeIds').val()) |
| | | var selectedValues = JSON.parse($('#storeIds').val()); // Replace with the desired selected values |
| | | |
| | | $('#shopId').val(selectedValues); // Set the selected values |
| | | |
| | | $('#shopId').trigger('change') |
| | | }); |
| | | |
| | | let id = "${item.imgs}" |
| | |
| | | laydate.render({ |
| | | elem: '#startTime' |
| | | ,type:"datetime" |
| | | ,format: 'yyyy-MM-dd HH:mm:ss' |
| | | ,format: 'yyyy-MM-dd HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | ,type:"datetime" |
| | | ,type:"datetime", |
| | | format: "yyyy-MM-dd HH:mm" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerEndTime' |
| | | ,type:"datetime" |
| | | ,type:"datetime", |
| | | format: "yyyy-MM-dd HH:mm" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStart' |
| | |
| | | if (this.check()) { |
| | | var nickname = TCompetition.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | nickname = "该赛事"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: language==1?"您是否确认删除" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"), |
| | | title: language==1?"您是否确认取消" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"), |
| | | text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'), |
| | | type: "warning", |
| | | showCancelButton: true, |
| | |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.response.AlipayTradeQueryResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.other.entity.TGame; |
| | |
| | | if(one.getStatus() == 1){ |
| | | break; |
| | | } |
| | | ResultUtil<Map<String, String>> resultUtil = payMoneyUtil.queryALIOrder(code); |
| | | if(resultUtil.getCode() == 200 && one.getStatus() == 0){ |
| | | AlipayTradeQueryResponse resultUtil = payMoneyUtil.queryALIOrder(code); |
| | | if(resultUtil.getCode().equals("10000") && one.getStatus() == 0){ |
| | | /** |
| | | * WAIT_BUYER_PAY(交易创建,等待买家付款)、 |
| | | * TRADE_CLOSED(未付款交易超时关闭,或支付完成后全额退款)、 |
| | | * TRADE_SUCCESS(交易支付成功)、 |
| | | * TRADE_FINISHED(交易结束,不可退款) |
| | | */ |
| | | Map<String, String> data1 = resultUtil.getData(); |
| | | String s = data1.get("tradeStatus"); |
| | | String tradeNo = data1.get("tradeNo"); |
| | | // Map<String, String> data1 = resultUtil.getData(); |
| | | // String s = data1.get("tradeStatus"); |
| | | // String tradeNo = data1.get("tradeNo"); |
| | | String tradeNo = resultUtil.getTradeNo(); |
| | | String s = resultUtil.getTradeStatus(); |
| | | if("TRADE_CLOSED".equals(s) || "TRADE_FINISHED".equals(s) || num == 10){ |
| | | break; |
| | | } |
| | |
| | | import cn.hutool.http.HttpResponse; |
| | | 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.dsh.other.entity.*; |
| | | import com.dsh.other.feignclient.account.CityManagerClient; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | |
| | | List<Integer> ids = getIds(byId.getSiteId()); |
| | | byId.setStorePhone(byId1.getPhone()); |
| | | |
| | | byId.setSid(Arrays.asList(storeId)); |
| | | List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().eq(Site::getStoreId, storeId).eq(Site::getSign, 1)); |
| | | List<Integer> collect = list.stream().map(Site::getId).collect(Collectors.toList()); |
| | | byId.setRid(collect); |
| | | map.put("data",byId); |
| | | |
| | | |
| | | map.put("ids",ids); |
| | | return ResultUtil.success(map); |
| | | }catch (Exception e){ |
| | |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/store/querySiteIdById") |
| | | public List<Integer> querySiteIdById(@RequestBody List<Integer> storeIds){ |
| | | List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().in(Site::getStoreId, storeIds)); |
| | | List<Integer> collect = list.stream().map(Site::getId).collect(Collectors.toList()); |
| | | return collect; |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private ISiteService siteService; |
| | | @ResponseBody |
| | | @PostMapping("/store/querySiteId") |
| | | public List<Integer> querySiteId(@RequestBody Integer storeId){ |
| | | List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().eq(Site::getStoreId, storeId).eq(Site::getSign, 1)); |
| | | List<Integer> collect = list.stream().map(Site::getId).collect(Collectors.toList()); |
| | | return collect; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/store/addBackRecord") |
| | | public void addBackRecord(@RequestBody String s){ |
| | | TBackRecord tBackRecord = new TBackRecord(); |
| | |
| | | private Double playPaiCoinOne; |
| | | @TableField("ids") |
| | | private String ids; |
| | | |
| | | @TableField("sign") |
| | | private Integer sign; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | private String money; |
| | | @TableField(exist = false) |
| | | private String storePhone; |
| | | @TableField(exist = false) |
| | | private List<Integer> sid; |
| | | @TableField(exist = false) |
| | | private List<Integer> rid; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.response.AlipayTradeQueryResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | Double payMoney = 0D; |
| | | if(reservationSite.getPayType() == 3){ |
| | | if(reservationSite.getIsHalf()==2){ |
| | | payMoney = new BigDecimal(site.getPlayPaiCoin()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | payMoney = new BigDecimal(site.getPlayPaiCoin()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue() ; |
| | | }else { |
| | | payMoney = new BigDecimal(site.getPlayPaiCoinOne()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | payMoney = new BigDecimal(site.getPlayPaiCoinOne()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue() /2; |
| | | } |
| | | if(appUser.getPlayPaiCoins().compareTo(payMoney.intValue()) < 0){ |
| | | |
| | | return new ResultUtil(3,"玩湃币不足"); |
| | | } |
| | | }else{ |
| | | payMoney = new BigDecimal(site.getCashPrice()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | if(reservationSite.getIsHalf()==2){ |
| | | payMoney = new BigDecimal(site.getCashPrice()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue() ; |
| | | }else { |
| | | payMoney = new BigDecimal(site.getCashPrice()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue() / 2; |
| | | |
| | | } |
| | | } |
| | | |
| | | //校验优惠券 |
| | |
| | | siteBooking.setIsHalf(reservationSite.getIsHalf()); |
| | | siteBooking.setHalfName(reservationSite.getHalfName()); |
| | | siteBookingService.save(siteBooking); |
| | | |
| | | |
| | | |
| | | |
| | | if(reservationSite.getPayType() == 1){//微信支付 |
| | | ResultUtil resultUtil = weChatPaymentSite(payMoney, siteBooking); |
| | |
| | | if(siteBooking.getStatus() != 0){ |
| | | break; |
| | | } |
| | | ResultUtil<Map<String, String>> resultUtil = payMoneyUtil.queryALIOrder(code); |
| | | if(resultUtil.getCode() == 200 && siteBooking.getStatus() == 0){ |
| | | AlipayTradeQueryResponse resultUtil = payMoneyUtil.queryALIOrder(code); |
| | | if(resultUtil.getCode().equals("10000") && siteBooking.getStatus() == 0){ |
| | | /** |
| | | * WAIT_BUYER_PAY(交易创建,等待买家付款)、 |
| | | * TRADE_CLOSED(未付款交易超时关闭,或支付完成后全额退款)、 |
| | | * TRADE_SUCCESS(交易支付成功)、 |
| | | * TRADE_FINISHED(交易结束,不可退款) |
| | | */ |
| | | Map<String, String> data1 = resultUtil.getData(); |
| | | String s = data1.get("tradeStatus"); |
| | | String tradeNo = data1.get("tradeNo"); |
| | | // Map<String, String> data1 = resultUtil.getData(); |
| | | // String s = data1.get("tradeStatus"); |
| | | String tradeNo = resultUtil.getTradeNo(); |
| | | String s = resultUtil.getTradeStatus(); |
| | | if("TRADE_CLOSED".equals(s) || "TRADE_FINISHED".equals(s) || num == 10){ |
| | | break; |
| | | } |
| | |
| | | siteBooking.setStatus(1); |
| | | siteBooking.setPayOrderNo(tradeNo); |
| | | siteBookingService.updateById(siteBooking); |
| | | System.err.println("======完成支付"); |
| | | break; |
| | | } |
| | | if("WAIT_BUYER_PAY".equals(s)){ |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public ResultUtil queryALIOrder(String out_trade_no) throws Exception{ |
| | | public AlipayTradeQueryResponse queryALIOrder(String out_trade_no) throws Exception{ |
| | | AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",aliAppid, appPrivateKey,"json","UTF-8",alipay_public_key,"RSA2"); |
| | | AlipayTradeQueryRequest request = new AlipayTradeQueryRequest(); |
| | | request.setBizContent("{" + |
| | | " \"out_trade_no\":\"" + out_trade_no + "\"" + |
| | | "}"); |
| | | AlipayTradeQueryResponse response = alipayClient.execute(request); |
| | | |
| | | if(response.isSuccess()){ |
| | | String tradeStatus = response.getTradeStatus();//交易状态:WAIT_BUYER_PAY(交易创建,等待买家付款)、TRADE_CLOSED(未付款交易超时关闭,或支付完成后全额退款)、TRADE_SUCCESS(交易支付成功)、TRADE_FINISHED(交易结束,不可退款) |
| | | return ResultUtil.success(tradeStatus); |
| | | return response; |
| | | } else { |
| | | return ResultUtil.error(response.getMsg()); |
| | | // return ResultUtil.error(response.getMsg()); |
| | | return response; |
| | | } |
| | | } |
| | | |
| | |
| | | select t1.*,t2.name storeName,t3.name siteTypeName from t_site t1 |
| | | inner join t_store t2 on t1.storeId = t2.id |
| | | left join t_site_type t3 on t1.siteTypeId = t3.id |
| | | <where> |
| | | where |
| | | t1.sign=0 |
| | | <if test="query.objectType == 2"> |
| | | and t1.cityManagerId = #{query.objectId} |
| | | </if> |
| | |
| | | and t1.name like concat('%',#{query.name},'%') |
| | | </if> |
| | | and t1.state != 3 |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="listExipre" resultType="com.dsh.other.model.dto.siteDto.TSiteDTO"> |
| | | select t1.*,t2.name storeName,t3.name siteTypeName ,t4.name operator from t_site t1 |