From 1e64ef03770f4e3a7f357049a6fe744f39c2c4b6 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期二, 21 十一月 2023 09:12:20 +0800 Subject: [PATCH] 后台bug修改 --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java | 8 cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceRewards.java | 92 +++++++ cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUserQuery.java | 8 cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop.html | 2 cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceUser.java | 36 +++ cloud-server-account/src/main/java/com/dsh/account/dto/IntroduceUserQuery.java | 20 + cloud-server-account/src/main/java/com/dsh/account/entity/TAppGift.java | 42 +++ cloud-server-account/src/main/resources/mapper/TAppGiftMapper.xml | 20 + cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_three.html | 2 cloud-server-management/src/main/webapp/static/modular/system/introduce/introduce_user.js | 22 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java | 71 +++-- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java | 8 cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html | 32 -- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java | 9 cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java | 22 + cloud-server-management/src/main/webapp/static/modular/system/tIntegral/tIntegral.js | 2 cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js | 6 cloud-server-activity/src/main/resources/mapper/CouponMapper.xml | 1 cloud-server-management/src/main/java/com/dsh/course/feignClient/account/AppUserClient.java | 16 cloud-server-account/src/main/java/com/dsh/account/service/TAppGiftService.java | 6 cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java | 5 cloud-server-other/src/main/java/com/dsh/other/controller/OperatorController.java | 47 +++ cloud-server-management/src/main/webapp/static/modular/system/tShop/tShop_info.js | 3 cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUser.java | 22 + cloud-server-account/src/main/java/com/dsh/account/mapper/TAppGiftMapper.java | 7 cloud-server-activity/src/main/java/com/dsh/activity/controller/IntroduceRewardsController.java | 19 + cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppGiftServiceImpl.java | 11 cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/CouponListOfSearch.java | 3 cloud-server-management/src/main/webapp/WEB-INF/view/system/introduce/introduce_user.html | 8 cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java | 1 cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_device.html | 20 - cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/CouponListOfSearch.java | 3 cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java | 89 ++++-- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TIntroductionCourtesyController.java | 16 + cloud-server-account/src/main/java/com/dsh/account/feignclient/activity/IntroduceRewardsClient.java | 3 35 files changed, 516 insertions(+), 166 deletions(-) diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java index 8e09a9d..f588d89 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java +++ b/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.dsh.account.dto.BindDto; +import com.dsh.account.dto.IntroduceUserQuery; import com.dsh.account.dto.SelectDto; import com.dsh.account.dto.UpdateInfoDto; import com.dsh.account.entity.*; @@ -18,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import io.swagger.models.auth.In; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -51,6 +53,26 @@ @Autowired private TCourseInfoRecordService courseInfoRecordService; + @Autowired + private TAppGiftService appGiftService; + /** + * 根据介绍有礼id查询当前活动参与次数 + */ + @ResponseBody + @PostMapping("/base/appUser/getActivityPeoples") + public Integer getActivityPeoples(@RequestBody Integer activityId){ + int activityId1 = appGiftService.list(new QueryWrapper<TAppGift>().eq("activityId", activityId)) + .size(); + return activityId1; + } + /** + * 介绍有礼 -- 参与用户列表 + */ + @ResponseBody + @PostMapping("/base/appUser/queryIntroduceAll") + public List<IntroduceUser> queryIntroduceAll(@RequestBody IntroduceUserQuery query){ + return appGiftService.queryIntroduceAll(query); + } /** * 获取所有用户 */ diff --git a/cloud-server-account/src/main/java/com/dsh/account/dto/IntroduceUserQuery.java b/cloud-server-account/src/main/java/com/dsh/account/dto/IntroduceUserQuery.java new file mode 100644 index 0000000..5751c83 --- /dev/null +++ b/cloud-server-account/src/main/java/com/dsh/account/dto/IntroduceUserQuery.java @@ -0,0 +1,20 @@ +package com.dsh.account.dto; + +import lombok.Data; + +/** + * 介绍有礼-参与用户列表查询Query + */ +@Data +public class IntroduceUserQuery { + // 介绍有礼id + private Integer activityId; + // 分享用户姓名 + private String userName; + // 分享用户电话 + private String userPhone; + // 被分享用户姓名 + private String shareUserName; + // 被分享用户电话 + private String shareUserPhone; +} diff --git a/cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceRewards.java b/cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceRewards.java new file mode 100644 index 0000000..a40a7a2 --- /dev/null +++ b/cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceRewards.java @@ -0,0 +1,92 @@ +package com.dsh.account.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + * <p> + * 介绍奖励 + * </p> + * + * @author jqs + * @since 2023-06-29 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_introduce_rewards") +public class IntroduceRewards extends Model<IntroduceRewards> { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + /** + * 省 + */ + @TableField("province") + private String province; + /** + * 省编号 + */ + @TableField("provinceCode") + private String provinceCode; + /** + * 市 + */ + @TableField("city") + private String city; + /** + * 市编号 + */ + @TableField("cityCode") + private String cityCode; + /** + * 开始时间 + */ + @TableField("startTime") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8") + private Date startTime; + /** + * 结束时间 + */ + @TableField("endTime") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8") + private Date endTime; + /** + * 赠送课时 + */ + @TableField("giveClass") + private Integer giveClass; + /** + * 状态(1=正常,2=冻结,3=删除) + */ + @TableField("state") + private Integer state; + /** + * 添加时间 + */ + @TableField("insertTime") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date insertTime; + + + @Override + protected Serializable pkVal() { + return this.id; + } + +} diff --git a/cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceUser.java b/cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceUser.java new file mode 100644 index 0000000..399666c --- /dev/null +++ b/cloud-server-account/src/main/java/com/dsh/account/entity/IntroduceUser.java @@ -0,0 +1,36 @@ +package com.dsh.account.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * 介绍有礼参与用户实体类 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class IntroduceUser { + private Integer id; + + // 新用户id + private Integer shareUserId; + // 新用户名称 + private String shareUserName; + // 新用户电话 + private String shareUserPhone; + + // 推荐人id + private Integer userId; + // 推荐人电话 + private String userPhone; + // 推荐人名称 + private String userName; + // 活动id + private Integer activityId; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date insertTime; +} diff --git a/cloud-server-account/src/main/java/com/dsh/account/entity/TAppGift.java b/cloud-server-account/src/main/java/com/dsh/account/entity/TAppGift.java index 5eb6ddc..6d9b805 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/entity/TAppGift.java +++ b/cloud-server-account/src/main/java/com/dsh/account/entity/TAppGift.java @@ -6,6 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -30,16 +33,53 @@ private Integer id; /** - * 用户id + * 用户id 推荐人id */ @TableField("userId") private Integer userId; + /** + * 用户姓名 推荐人姓名 + */ + @TableField("userName") + private String userName; + /** + * 用户电话 推荐人电话 + */ + @TableField("userPhone") + private String userPhone; /** * 未分配课时数 */ private Integer num; + /** + * 注册用户id + */ + @TableField("shareUserId") + private Integer shareUserId; + /** + * 注册用户姓名 + */ + @TableField("shareUserName") + private String shareUserName; + /** + * 注册用户电话 + */ + @TableField("shareUserPhone") + private String shareUserPhone; + /** + * 介绍有礼活动id + */ + @TableField("activityId") + private Integer activityId; + + /** + * 介绍有礼活动id + */ + @TableField("insertTime") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date insertTime; @Override protected Serializable pkVal() { diff --git a/cloud-server-account/src/main/java/com/dsh/account/feignclient/activity/IntroduceRewardsClient.java b/cloud-server-account/src/main/java/com/dsh/account/feignclient/activity/IntroduceRewardsClient.java index 1998736..393b0ec 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/feignclient/activity/IntroduceRewardsClient.java +++ b/cloud-server-account/src/main/java/com/dsh/account/feignclient/activity/IntroduceRewardsClient.java @@ -1,6 +1,7 @@ package com.dsh.account.feignclient.activity; +import com.dsh.account.entity.IntroduceRewards; import com.dsh.account.feignclient.activity.model.IntrduceOfUserRequest; import com.dsh.account.feignclient.competition.model.PurchaseRecordVo; import org.springframework.cloud.openfeign.FeignClient; @@ -17,7 +18,7 @@ public List<PurchaseRecordVo> queryAppUsersofIntroduce(@RequestBody IntrduceOfUserRequest request); @PostMapping("/base/introduce/getGiftList") - Integer getGiftList(@RequestBody String cityCode); + IntroduceRewards getGiftList(@RequestBody String cityCode); } diff --git a/cloud-server-account/src/main/java/com/dsh/account/mapper/TAppGiftMapper.java b/cloud-server-account/src/main/java/com/dsh/account/mapper/TAppGiftMapper.java index e8110a4..e2b04cc 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/mapper/TAppGiftMapper.java +++ b/cloud-server-account/src/main/java/com/dsh/account/mapper/TAppGiftMapper.java @@ -1,7 +1,12 @@ package com.dsh.account.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dsh.account.dto.IntroduceUserQuery; +import com.dsh.account.entity.IntroduceUser; import com.dsh.account.entity.TAppGift; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * <p> @@ -13,4 +18,6 @@ */ public interface TAppGiftMapper extends BaseMapper<TAppGift> { + List<IntroduceUser> queryIntroduceAll(@Param("query") IntroduceUserQuery query); + } diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/TAppGiftService.java b/cloud-server-account/src/main/java/com/dsh/account/service/TAppGiftService.java index 919ab30..588625d 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/service/TAppGiftService.java +++ b/cloud-server-account/src/main/java/com/dsh/account/service/TAppGiftService.java @@ -1,7 +1,11 @@ package com.dsh.account.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.dsh.account.dto.IntroduceUserQuery; +import com.dsh.account.entity.IntroduceUser; import com.dsh.account.entity.TAppGift; + +import java.util.List; /** * <p> @@ -16,4 +20,6 @@ Integer weeksOfAddHours(Long packetId,Integer appUserId,Integer num); + List<IntroduceUser> queryIntroduceAll(IntroduceUserQuery query); + } diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppGiftServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppGiftServiceImpl.java index e3d4252..a1e7a7b 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppGiftServiceImpl.java +++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppGiftServiceImpl.java @@ -1,6 +1,8 @@ package com.dsh.account.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dsh.account.dto.IntroduceUserQuery; +import com.dsh.account.entity.IntroduceUser; import com.dsh.account.entity.TAppGift; import com.dsh.account.feignclient.course.CourseListClient; import com.dsh.account.feignclient.course.CoursePaymentClient; @@ -9,6 +11,8 @@ import org.checkerframework.checker.units.qual.A; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; + +import java.util.List; /** * <p> @@ -22,10 +26,17 @@ public class TAppGiftServiceImpl extends ServiceImpl<TAppGiftMapper, TAppGift> implements TAppGiftService { @Autowired private CoursePaymentClient coursePaymentClient; + @Autowired + private TAppGiftMapper mapper; @Override public Integer weeksOfAddHours(Long packetId,Integer appUserId,Integer num) { Integer b = coursePaymentClient.sendHours(packetId+"_"+appUserId+"_"+num); return b; } + + @Override + public List<IntroduceUser> queryIntroduceAll(IntroduceUserQuery query) { + return mapper.queryIntroduceAll(query); + } } diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java index 8e5de5e..78f0e7a 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java +++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java @@ -419,7 +419,9 @@ */ @Override public ResultUtil addAppUser(AddAppUserVo addAppUserVo) throws Exception { - TAppUser tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>().eq("phone", addAppUserVo.getPhone()).ne("state", 3)); + TAppUser tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>() + .eq("phone", addAppUserVo.getPhone()) + .ne("state", 3)); if(null != tAppUser){ return ResultUtil.error("账号已存在"); } @@ -435,42 +437,58 @@ tAppUser.setIsVip(0); tAppUser.setState(1); tAppUser.setInsertTime(new Date()); - - - - // 介绍有礼 - if(addAppUserVo.getReferralUserId()!=null || ToolUtil.isNotEmpty(addAppUserVo.getInvitePhone())){ - if(ToolUtil.isEmpty(addAppUserVo.getLat()) || ToolUtil.isEmpty(addAppUserVo.getLon())){ - return ResultUtil.error("请先开启定位", ""); - } - Map<String, String> geocode = gdMapGeocodingUtil.geocode(addAppUserVo.getLon(), addAppUserVo.getLat()); - Integer num=0; - if(null != geocode){ - String province = geocode.get("province"); - String provinceCode = geocode.get("provinceCode"); - String city = geocode.get("city"); - String cityCode = geocode.get("cityCode"); - num = introduceRewardsClient.getGiftList(cityCode); - } - if(ToolUtil.isNotEmpty(addAppUserVo.getInvitePhone())){ - List<TAppUser> tAppUsers = this.baseMapper.selectList(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getPhone, addAppUserVo.getInvitePhone())); - if(tAppUsers.size()>0){ - addAppUserVo.setReferralUserId(tAppUsers.get(0).getId()); + // 注册用户 + int insert = this.baseMapper.insert(tAppUser); + // 介绍有礼 + if(addAppUserVo.getReferralUserId()!=null || ToolUtil.isNotEmpty(addAppUserVo.getInvitePhone())){ + if(ToolUtil.isEmpty(addAppUserVo.getLat()) || ToolUtil.isEmpty(addAppUserVo.getLon())){ + return ResultUtil.error("请先开启定位", ""); + } + Map<String, String> geocode = gdMapGeocodingUtil.geocode(addAppUserVo.getLon(), addAppUserVo.getLat()); + Integer num=0; + Integer activityId=null; + if(null != geocode){ + String province = geocode.get("province"); + String provinceCode = geocode.get("provinceCode"); + String city = geocode.get("city"); + String cityCode = geocode.get("cityCode"); + // 根据所在市code 查询是否有介绍有礼活动 + IntroduceRewards res = introduceRewardsClient.getGiftList(cityCode); + if (res!=null){ + num = res.getGiveClass(); + activityId = res.getId(); + if(ToolUtil.isNotEmpty(addAppUserVo.getInvitePhone())){ + List<TAppUser> tAppUsers = this.baseMapper.selectList(new LambdaQueryWrapper<TAppUser>() + .eq(TAppUser::getPhone, addAppUserVo.getInvitePhone())); + if(tAppUsers.size()>0){ + addAppUserVo.setReferralUserId(tAppUsers.get(0).getId()); + } + } + if (num!=0){ + TAppGift tAppGift = new TAppGift(); + TAppUser phone = appUserService.getOne(new QueryWrapper<TAppUser>() + .eq("phone", addAppUserVo.getInvitePhone())); + if (phone == null){ + return ResultUtil.error("推荐人手机号未注册玩湃会员!"); + }else{ + tAppGift.setUserName(phone.getName()); + tAppGift.setUserPhone(phone.getPhone()); + } + tAppGift.setUserId(addAppUserVo.getReferralUserId()); + tAppGift.setNum(num); + tAppGift.setShareUserId(tAppUser.getId()); + tAppGift.setShareUserName(tAppUser.getPhone()); + tAppGift.setShareUserPhone(tAppUser.getPhone()); + tAppGift.setActivityId(activityId); + tAppGift.setInsertTime(new Date()); + appGiftService.save(tAppGift); + } + } } } - TAppGift one = appGiftService.getOne(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, addAppUserVo.getReferralUserId())); - if(one!=null){ - one.setNum(one.getNum()+num); - appGiftService.updateById(one); - }else { - TAppGift tAppGift = new TAppGift(); - tAppGift.setUserId(addAppUserVo.getReferralUserId()); - tAppGift.setNum(num); - appGiftService.save(tAppGift); - } - } - this.baseMapper.insert(tAppUser); + + return ResultUtil.success(); } @@ -1161,7 +1179,8 @@ String provinceCode = geocode.get("provinceCode"); String city = geocode.get("city"); String cityCode = geocode.get("cityCode"); - num = introduceRewardsClient.getGiftList(cityCode); + IntroduceRewards giftList = introduceRewardsClient.getGiftList(cityCode); + num = giftList.getGiveClass(); } Integer userId=null; if(ToolUtil.isNotEmpty(dto.getInvitePhone())){ diff --git a/cloud-server-account/src/main/resources/mapper/TAppGiftMapper.xml b/cloud-server-account/src/main/resources/mapper/TAppGiftMapper.xml index f830c3f..c4c1b6a 100644 --- a/cloud-server-account/src/main/resources/mapper/TAppGiftMapper.xml +++ b/cloud-server-account/src/main/resources/mapper/TAppGiftMapper.xml @@ -3,4 +3,24 @@ <mapper namespace="com.dsh.account.mapper.TAppGiftMapper"> + <select id="queryIntroduceAll" resultType="com.dsh.account.entity.IntroduceUser"> + select t1.* from t_app_gift t1 + <where> + <if test="query.shareUserName!=null and query.shareUserName!= ''"> + and t1.shareUserName like concat('%',#{query.shareUserName},'%') + </if> + <if test="query.shareUserphone!=null and query.shareUserphone!= ''"> + and t1.shareUserPhone like concat('%',#{query.shareUserPhone},'%') + </if> + <if test="query.userName!=null and query.userName!= ''"> + and t1.userName like concat('%',#{query.userName},'%') + </if> + <if test="query.userPhone!=null and query.userPhone!= ''"> + and t1.userPhone like concat('%',#{query.userPhone},'%') + </if> + <if test="query.activityId!=null and query.activityId!= ''"> + and t1.activityId = #{query.activityId} + </if> + </where> + </select> </mapper> diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java index 8f70ff6..5fdb57d 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java @@ -323,7 +323,7 @@ // 获取到优惠券id 查询这个优惠券指定了哪些城市 Integer id = Integer.parseInt(String.valueOf(map.get("id"))); // 获取到运营商管理的省和市 - List<TOperatorCity> cityByOperatorId = operatorClient.getCityByOperatorId(ofSearch.getOperatorId()); + List<TOperatorCity> cityByOperatorId = ofSearch.getOperatorCities(); // 拿到运营商市的code集合 List<String> collect = cityByOperatorId.stream().filter(t -> t.getPid() != 0) .map(tOperatorCity -> Integer.toString(tOperatorCity.getCode())) @@ -397,12 +397,11 @@ @ResponseBody @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()) { diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/IntroduceRewardsController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/IntroduceRewardsController.java index 0f9268d..8bb9b84 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/IntroduceRewardsController.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/IntroduceRewardsController.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.dsh.activity.entity.BodySideAppointment; import com.dsh.activity.entity.IntroduceRewards; +import com.dsh.activity.feignclient.account.AppUserClient; import com.dsh.activity.feignclient.model.IntrduceOfUserRequest; import com.dsh.activity.feignclient.model.PurchaseRecordVo; import com.dsh.activity.feignclient.other.model.Store; @@ -34,6 +35,7 @@ @Autowired private IntroduceUserService introduceUserService; + private final SimpleDateFormat mat = new SimpleDateFormat("MM-dd HH:mm"); /** @@ -62,6 +64,7 @@ Date date = new Date(); List<IntroduceVO> introduceVOS = idrService.listAll(query); for (IntroduceVO introduceVO : introduceVOS) { + Date startTime = introduceVO.getStartTime(); Date endTime = introduceVO.getEndTime(); if (date.after(startTime) && date.before(endTime)) { @@ -117,10 +120,18 @@ } @PostMapping("/base/introduce/getGiftList") - public Integer getGiftList(@RequestBody String cityCode){ - List<IntroduceRewards> list = idrService.list(new LambdaQueryWrapper<IntroduceRewards>().eq(IntroduceRewards::getCityCode,cityCode).le(IntroduceRewards::getStartTime,new Date()).ge(IntroduceRewards::getEndTime,new Date())); - int sum = list.stream().mapToInt(IntroduceRewards::getGiveClass).sum(); - return sum; + @ResponseBody + public IntroduceRewards getGiftList(@RequestBody String cityCode){ + List<IntroduceRewards> list = idrService.list(new LambdaQueryWrapper<IntroduceRewards>() + .eq(IntroduceRewards::getCityCode,cityCode) + .le(IntroduceRewards::getStartTime,new Date()) + .ge(IntroduceRewards::getEndTime,new Date()) + .orderByDesc(IntroduceRewards::getInsertTime) + .last("LIMIT 1")); + if (list.size()>0){ + return list.get(0); + } + return null; } } diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/CouponListOfSearch.java b/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/CouponListOfSearch.java index 48a53d0..fc2a538 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/CouponListOfSearch.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/CouponListOfSearch.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.dsh.activity.feignclient.other.model.TOperatorCity; import lombok.Data; import java.util.List; @@ -28,4 +29,6 @@ private Integer operatorId; private Integer objType; private List<Integer> storeIds; + // 运营商使用 + private List<TOperatorCity> operatorCities; } diff --git a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml index cbe7368..9d85767 100644 --- a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml +++ b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml @@ -92,7 +92,6 @@ <if test="cityCode != null"> and id in( SELECT DISTINCT couponId FROM - (SELECT DISTINCT couponId from t_coupon_store WHERE storeId = #{storeId} diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/AppUserClient.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/AppUserClient.java index 4d72852..1865f39 100644 --- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/AppUserClient.java +++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/AppUserClient.java @@ -8,9 +8,7 @@ import com.dsh.course.dto.StudentSearch; import com.dsh.course.dto.TStudentDto; import com.dsh.course.feignClient.other.model.SiteChangeStateVO; -import com.dsh.guns.modular.system.model.AdvertisementChangeStateDTO; -import com.dsh.guns.modular.system.model.AppUserByNameAndPhoneDTO; -import com.dsh.guns.modular.system.model.TStudent; +import com.dsh.guns.modular.system.model.*; import com.dsh.guns.modular.system.model.dto.GiftSearchDto; import com.dsh.guns.modular.system.model.dto.SelectDto; import org.springframework.cloud.openfeign.FeignClient; @@ -22,8 +20,16 @@ @FeignClient("mb-cloud-account") public interface AppUserClient { - - + /** + * 根据介绍有礼id查询当前活动参与次数 + */ + @PostMapping("/base/appUser/getActivityPeoples") + Integer getActivityPeoples(@RequestBody Integer activityId); + /** + * 介绍有礼 -- 参与用户列表 + */ + @PostMapping("/base/appUser/queryIntroduceAll") + List<IntroduceUser> queryIntroduceAll(@RequestBody IntroduceUserQuery query); /** * 根据用户姓名和电话模糊查询 */ diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/CouponListOfSearch.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/CouponListOfSearch.java index ab56486..e61efcd 100644 --- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/CouponListOfSearch.java +++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/CouponListOfSearch.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.dsh.guns.modular.system.model.TOperatorCity; import lombok.Data; import java.util.List; @@ -28,5 +29,7 @@ private Integer operatorId; private Integer objType; private List<Integer> storeIds; + // 运营商使用 + private List<TOperatorCity> operatorCities; } diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java index 9afcddf..162d693 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java @@ -59,14 +59,7 @@ private IOperatorAuthService operatorAuthService; - /** - * 根据运营商ID 获取运营商管理的省市 - */ - @RequestMapping(value = "/getCityByOperatorId") - @ResponseBody - public List<TOperatorCity> getCityByOperatorId(@RequestBody Integer operatorId) { - return operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("operatorId",operatorId)); - } + /** * 跳转运营商管理首页 diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java index e1f7218..8d39cc3 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java @@ -238,6 +238,9 @@ ofSearch.setStoreIds(storeIds); ofSearch.setObjType(UserExt.getUser().getObjectType()); ofSearch.setOperatorId(UserExt.getUser().getObjectId()); + // 查询当前门店属于哪个运营商 + List<TOperatorCity> operatorId = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("operatorId", UserExt.getUser().getObjectId())); + ofSearch.setOperatorCities(operatorId); } if (UserExt.getUser().getObjectType()==3) { ofSearch.setStoreId(UserExt.getUser().getObjectId()); @@ -249,6 +252,9 @@ return couponListOfSearch; } + /** + * 根据运营商ID 获取运营商管理的省市 + */ /** * 获取 优惠券管理 @@ -267,6 +273,8 @@ ofSearch.setState(state); ofSearch.setCityCode(cityCode); ofSearch.setStoreId(storeId); + ofSearch.setObjType(UserExt.getUser().getObjectType()); + ofSearch.setOperatorId(UserExt.getUser().getObjectId()); return client.getCouponListOfSearch1(ofSearch); } diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TIntroductionCourtesyController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TIntroductionCourtesyController.java index 9f3ecf9..71c744f 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TIntroductionCourtesyController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TIntroductionCourtesyController.java @@ -3,6 +3,7 @@ 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.model.TAppUser; import com.dsh.course.feignClient.activity.IntroduceClient; import com.dsh.course.feignClient.activity.model.IntroduceRewards; @@ -35,6 +36,8 @@ private ICityService cityService; @Autowired private IntroduceClient introduceClient; + @Autowired + private AppUserClient appUserClient; /** * 上/下架 1为上架 2为下架 @@ -66,6 +69,7 @@ model.addAttribute("id",id); return PREFIX + "introduce_user.html"; } + /** * 介绍有礼添加页 */ @@ -103,17 +107,21 @@ @RequestMapping(value = "/listAll") @ResponseBody public List<IntroduceVO> listAll(IntroduceQuery query) { - - return introduceClient.listAll(query); + List<IntroduceVO> list = introduceClient.listAll(query); + for (IntroduceVO introduceVO : list) { + Integer activityPeoples = appUserClient.getActivityPeoples(introduceVO.getId()); + introduceVO.setNumber(activityPeoples); + } + return list; } /** - * 获取介绍有礼记录列表 + * 获取介绍有礼--参与用户记录列表 */ @RequestMapping(value = "/listAllUser") @ResponseBody public List<IntroduceUser> listAll(IntroduceUserQuery query) { - return introduceClient.listAllUser(query); + return appUserClient.queryIntroduceAll(query); } /** * 新增介绍有礼记录表 diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java index 4f9e5a3..4558895 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java @@ -86,24 +86,23 @@ private IUserService userService; + // 添加SUTU @RequestMapping("/tShop_addDevice/{id}") public String addDevice(@PathVariable("id") Integer id,Model model) { - // 查询门店下的所有场地 - List<TSite> list = siteService.list(new QueryWrapper<TSite>().eq("storeId", id)); // 门店id model.addAttribute("id",id); - model.addAttribute("list",list); return PREFIX + "TShop_add_device.html"; } @RequestMapping("/addDevice") - public Object addDevice(Integer id,Integer siteId,String device) { + public Object addDevice(Integer id,String device) { HashMap<String, String> map = new HashMap<>(); map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); map.put("space_id",id.toString()); - map.put("device_id",device); - map.put("region_id",siteId+""); + map.put("name",device); + map.put("city_code",""); // 添加门禁 - String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); + String s1 = HttpRequestUtil.postRequest + ("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map); return SUCCESS_TIP; } @@ -536,25 +535,49 @@ storeConfigs.add(storeConfig); } storeConfigService.saveBatch(storeConfigs); + // 添加场地 + 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); + // 添加门店 + HashMap<String, String> map1 = new HashMap<>(); + map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); + map1.put("name",tStore.getName()); + map1.put("short_name",tStore.getName()); + map1.put("location",tStore.getCity()); + map1.put("address",tStore.getAddress()); + map1.put("telephone",tStore.getPhone()); + map1.put("linkman",userName); + map1.put("business_time","[{\"start_time\":\""+tStore.getStartTime()+"\",\"close_time\":\""+tStore.getEndTime()+"\"}]"); + map1.put("logo",tStore.getCoverDrawing()); + map1.put("remark",tStore.getIntroduce()); + map1.put("lat",tStore.getLat()); + map1.put("lng",tStore.getLon()); + map1.put("space_id",tStore.getId().toString()); + String result = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map1); + System.out.println(result); -// // 添加门店 -// HashMap<String, String> map1 = new HashMap<>(); -// map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); -// map1.put("name",tStore.getName()); -// map1.put("short_name",tStore.getName()); -// map1.put("location",tStore.getCity()); -// map1.put("address",tStore.getAddress()); -// map1.put("telephone",tStore.getPhone()); -// map1.put("linkman",userName); -// map1.put("business_time","[{\"start_time\":\""+tStore.getStartTime()+"\",\"close_time\":\""+tStore.getEndTime()+"\"}]"); -// map1.put("logo",tStore.getCoverDrawing()); -// map1.put("remark",tStore.getIntroduce()); -// map1.put("lat",tStore.getLat()); -// map1.put("lng",tStore.getLon()); -// map1.put("space_id",tStore.getId().toString()); -// String result = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map1); -// System.out.println(result); + + for (String s : tStore.getIds().split(",")) { + HashMap<String, String> map = new HashMap<>(); + map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); + map.put("space_id",tStore.getId()+""); + map.put("device_id",s); + 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); + } return new SuccessTip<>(); diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java index 5544936..31a6afe 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java @@ -478,8 +478,8 @@ HashMap<String, String> map = new HashMap<>(); map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); map.put("name",site.getName()); - map.put("space_id",integer1.toString()); - map.put("area_id",store.getId().toString()); + map.put("space_id",store.getId().toString()); + map.put("area_id",integer1.toString()); String s = HttpRequestUtil.postRequest ("https://try.daowepark.com/v7/user_api/general/addSpaceArea", map); // 添加门禁 @@ -490,9 +490,9 @@ for (String s1 : site.getIds().split(",")) { HashMap<String, String> map1 = new HashMap<>(); map1.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); - map1.put("space_id", integer1 + ""); + map1.put("space_id", store.getId().toString() + ""); map1.put("device_id", s1); - map1.put("region_id", store.getId().toString() + ""); + map1.put("region_id", integer1 + ""); String s2 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1); System.out.println("添加闸机:" + s2); } diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUser.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUser.java index b4266b7..9846b54 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUser.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUser.java @@ -16,14 +16,22 @@ @NoArgsConstructor public class IntroduceUser { private Integer id; - // 分享用户id - private Integer shareUsers; - private String shareUsersName; - private String shareUsersphone; - private String userName; + + // 新用户id + private Integer shareUserId; + // 新用户名称 + private String shareUserName; + // 新用户电话 + private String shareUserPhone; + + // 推荐人id private Integer userId; + // 推荐人电话 private String userPhone; - private Integer introduceRewards; + // 推荐人名称 + private String userName; + // 活动id + private Integer activityId; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - private Date registerTime; + private Date insertTime; } diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUserQuery.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUserQuery.java index 48c9b9d..78c7811 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUserQuery.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/IntroduceUserQuery.java @@ -10,11 +10,11 @@ // 介绍有礼id private Integer introduceId; // 分享用户姓名 - private String shareUsersName; + private String shareUserName; // 分享用户i淡化 - private String shareUsersphone; + private String shareUserPhone; // 被分享用户姓名 - private Integer userName; + private String userName; // 被分享用户电话 - private Integer userPhone; + private String userPhone; } diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java index 65c5561..7a741f5 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java @@ -505,6 +505,7 @@ for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { integers.add(coursePackageScheduling.getId()); coursePackageScheduling.setCourseId(courseId); + coursePackageScheduling.setIntegral(integral); } coursePackageSchedulingClient.editCoursePackageScheduling(coursePackageSchedulings); diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html index 5c7650b..6473ccf 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_add.html @@ -56,21 +56,9 @@ <div class="col-sm-4"> <select class="form-control" id="siteId" name="siteId" > <option >请选择场地</option> - - @for(obj in site){ <option value="${obj.id}" data-custom-data="1">${obj.name}</option> @} - </select> - </div> - </div> - - - <div class="form-group" id="half1" hidden="hidden"> - <label class="col-sm-3 control-label">*选择半场:</label> - <div class="col-sm-4"> - <select class="form-control" name="half" id="half"> - </select> </div> </div> @@ -83,16 +71,6 @@ </div> </div> - - - - - - - - - - <div class="form-group"> <label class="col-sm-3 control-label">*预约时间段:</label> <div class="col-sm-5" id="ttt1"> @@ -102,12 +80,18 @@ </div> </div> + <div class="form-group" id="half1" hidden="hidden"> + <label class="col-sm-3 control-label">*选择半场:</label> + <div class="col-sm-4"> + <select class="form-control" name="half" id="half"> + </select> + </div> + </div> + <div class="form-group"> <label class="col-sm-3 control-label">现金价格:</label> <div class="col-sm-4"> <input class="form-control " id="cash" name="cash" type="text" disabled> - - </div> 元 </div> diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/introduce/introduce_user.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/introduce/introduce_user.html index d2fb521..872bac9 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/introduce/introduce_user.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/introduce/introduce_user.html @@ -36,16 +36,16 @@ <div class="col-sm-12"> <div class="row"> <div class="col-sm-3"> - <#NameCon id="shareUsersName" name="分享用户" /> + <#NameCon id="userName" name="分享用户" /> </div> <div class="col-sm-3"> - <#NameCon id="shareUsersphone" name="分享用户联系方式" /> + <#NameCon id="userPhone" name="分享用户联系方式" /> </div> <div class="col-sm-3"> - <#NameCon id="userName" name="被分享用户" /> + <#NameCon id="shareUserName" name="被分享用户" /> </div> <div class="col-sm-3"> - <#NameCon id="userPhone" name="被分享用户联系方式" /> + <#NameCon id="shareUserPhone" name="被分享用户联系方式" /> </div> <div class="col-sm-3"> <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop.html index 9fc2efc..ea2c6a4 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop.html @@ -69,7 +69,7 @@ @} <#button name="免费福利" icon="fa-remove" clickFun="TCompetition.gift()" space="true"/> <#button name="首页设置" icon="fa-remove" clickFun="TCompetition.indexSet()" space="true"/> - <#button name="门禁设置" icon="fa-plus" clickFun="TCompetition.addDevice()" space="true"/> + <#button name="SUTU设置" icon="fa-plus" clickFun="TCompetition.addDevice()" space="true"/> </div> <#table id="TCompetitionTable"/> diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_device.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_device.html index 733263f..10729b5 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_device.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_device.html @@ -3,25 +3,13 @@ <div class="ibox-content"> <div class="form-horizontal" id="carInfoForm"> <input id="id" value="${id}" hidden> - <div class="form-group" id="cityCode"> - <label class="col-sm-3 control-label">*选择场地:</label> - <div class="col-sm-9"> - <select class="form-control" id="site" name="site" > - <option value="">选择场地</option> - @for(i in list){ - <option value="${i.id}" >${i.name}</option> - @} - </select> - </div> - </div> - <#input id="device" name="*添加入园闸机" placeholder= "请输入入园闸机id" type="text"/> + <#input id="device" name="*添加SUTU名称" placeholder= "请输入SUTU名称" type="text"/> </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="TCompetition.addSubmit3()"/> - <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCompetition.close()"/> + <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit3()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> </div> </div> diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_three.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_three.html index 0d8cf0c..f5fb35c 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_three.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_add_three.html @@ -107,6 +107,7 @@ $("#t1").hide() $("#t2").hide() $("#t3").hide() + $("#turnId").hide() }else { $("#t1").show() $("#t2").show() @@ -155,6 +156,7 @@ $("#t1").hide() $("#t2").hide() $("#t3").hide() + $("#turnId").hide() } } </script> diff --git a/cloud-server-management/src/main/webapp/static/modular/system/introduce/introduce_user.js b/cloud-server-management/src/main/webapp/static/modular/system/introduce/introduce_user.js index e9f667c..cbea37c 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/introduce/introduce_user.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/introduce/introduce_user.js @@ -15,11 +15,11 @@ return [ {field: 'selectItem', checkbox: true}, {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, - {title: '分享用户', field: 'shareUsersName', visible: true, align: 'center', valign: 'middle',}, - {title: '联系方式', field: 'shareUsersphone', visible: true, align: 'center', valign: 'middle',}, - {title: '被分享用户', field: 'userName', visible: true, align: 'center', valign: 'middle',}, + {title: '分享用户', field: 'userName', visible: true, align: 'center', valign: 'middle',}, {title: '联系方式', field: 'userPhone', visible: true, align: 'center', valign: 'middle',}, - {title: '注册时间', field: 'registerTime', visible: true, align: 'center', valign: 'middle',} + {title: '被分享用户', field: 'shareUserName', visible: true, align: 'center', valign: 'middle',}, + {title: '联系方式', field: 'shareUserPhone', visible: true, align: 'center', valign: 'middle',}, + {title: '注册时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',} ]; }; @@ -35,20 +35,20 @@ */ TCompetition.search = function () { var queryData = {}; - queryData['shareUsersName'] = $("#pCode").val(); - queryData['shareUsersphone'] = $("#cCode").val(); - queryData['userName'] = $("#activityState").val(); - queryData['userPhone'] = $("#createTime").val(); - queryData['introduceId'] = $("#id").val(); + queryData['userName'] = $("#userName").val(); + queryData['userPhone'] = $("#userPhone").val(); + queryData['shareUserName'] = $("#shareUserName").val(); + queryData['shareUserPhone'] = $("#shareUserPhone").val(); + queryData['activityId'] = $("#id").val(); TCompetition.table.refresh({query: queryData}); }; TCompetition.resetSearch = function () { - $("#shareUsersName").val(""); - $("#shareUsersphone").val(""); $("#userName").val(""); $("#userPhone").val(""); + $("#shareUserName").val(""); + $("#shareUserPhone").val(""); TCompetition.search(); }; diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js index f4ae456..036ea58 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js @@ -247,9 +247,6 @@ this.clearData(); this.collectData(); - - - const quantityIssuedInput = document.getElementById('quantityIssued'); const pickUpQuantityInput = document.getElementById('pickUpQuantity'); @@ -268,9 +265,6 @@ return console.log('quantityIssued is not greater than pickUpQuantity.'); } - - - let typeAll = document.querySelector('input[name="type"]:checked').value; if(typeAll==2){ let pCode = $("#pCode").val() diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tIntegral/tIntegral.js b/cloud-server-management/src/main/webapp/static/modular/system/tIntegral/tIntegral.js index f1c2a35..c0fc2b7 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tIntegral/tIntegral.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tIntegral/tIntegral.js @@ -112,7 +112,7 @@ var index = layer.open({ type: 2, title: language==1?'赠送积分':(language==2?'Add':'Tambahkan'), - area: ['50%', '50%'], //宽高 + area: ['60%', '60%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/tIntegral/tIntegral_add' diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShop_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShop_info.js index 4403ce4..d1035a6 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShop_info.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShop_info.js @@ -102,11 +102,10 @@ } TCarInfoDlg.addSubmit3 = function() { var ajax = new $ax(Feng.ctxPath + "/tShop/addDevice", function(data){ - window.parent.TCompetition.table.refresh(); + console.log("调用方法") TCarInfoDlg.close(); }); ajax.set("id",$("#id")); - ajax.set("siteId",$("#site")); ajax.set("device",$("#device")); ajax.start(); } diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/OperatorController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/OperatorController.java new file mode 100644 index 0000000..78bca8e --- /dev/null +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/OperatorController.java @@ -0,0 +1,47 @@ +package com.dsh.other.controller; + + +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.model.*; +import com.dsh.other.model.BaseVo; +import com.dsh.other.model.ProvinceAndCityVo; +import com.dsh.other.model.QueryStoreList; +import com.dsh.other.model.StoreFreeBenefitVo; +import com.dsh.other.model.dto.siteDto.StoreInfoDto; +import com.dsh.other.service.*; +import com.dsh.other.util.GDMapGeocodingUtil; +import com.dsh.other.util.GeodesyUtil; +import com.dsh.other.util.ResultUtil; +import com.dsh.other.util.ToolUtil; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.*; +import java.util.stream.Collectors; + +@RestController +@RequestMapping("") +public class OperatorController { + + @Autowired + private StoreService storeService; + + + @Autowired + private GDMapGeocodingUtil gdMapGeocodingUtil; + + @Autowired + private TStoreOtherService tStoreOtherService; + + @Autowired + private TBackRecordService backRecordService; + + +} -- Gitblit v1.7.1