springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/microCommercialStreet/McsGameDTO.java
@@ -40,7 +40,7 @@ @NotNull(groups = {AddGroup.class}, message = "游戏类别不能为空") private Integer type; @ApiModelProperty("奖励类型(1.免费产品 2.免费服务)") @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") private Integer awardType; @ApiModelProperty("戳戳币分配方式(1.随机分配 2.平均分配)") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/microCommercialStreet/McsCouponVO.java
@@ -56,7 +56,7 @@ @ApiModelProperty("游戏封面") private String cover; @ApiModelProperty("奖励类型(1.免费产品 2.免费服务)") @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") private Integer awardType; @ApiModelProperty("戳戳币分配方式(1.随机分配 2.平均分配)") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/microCommercialStreet/McsGameVO.java
@@ -34,7 +34,7 @@ @ApiModelProperty("游戏类别(1.戳戳币游戏 2.体验游戏)") private Integer type; @ApiModelProperty("奖励类型(1.免费产品 2.免费服务)") @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") private Integer awardType; @ApiModelProperty("戳戳币分配方式(1.随机分配 2.平均分配)") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/microCommercialStreet/VerifiedReturnVO.java
@@ -41,6 +41,6 @@ @ApiModelProperty("游戏封面") private String cover; @ApiModelProperty("奖励类型(1.免费产品 2.免费服务)") @ApiModelProperty("奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券)") private Integer awardType; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsGameDAO.java
@@ -78,15 +78,10 @@ /** * h5分页游戏查询 * @param page * @param minX * @param maxX * @param minY * @param maxY * @param pageMcsGameDTO * @return */ IPage<McsGameVO> pageH5McsGame(@Param("page") Page page, @Param("minX") Double minX, @Param("maxX") Double maxX, @Param("minY") Double minY, @Param("maxY") Double maxY, @Param("pageMcsGameDTO") PageMcsGameDTO pageMcsGameDTO); IPage<McsGameVO> pageH5McsGame(@Param("page") Page page, @Param("pageMcsGameDTO") PageMcsGameDTO pageMcsGameDTO); /** * 游戏详情 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsGame.java
@@ -36,7 +36,7 @@ */ private Integer type; /** * 奖励类型(1.免费产品 2.免费服务) * 奖励类型(1.免费领 2.产品试用 3.消费赠礼 4.优惠券) */ private Integer awardType; /** springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java
@@ -2,7 +2,6 @@ import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static org.apache.commons.lang3.StringUtils.isNotEmpty; import java.util.ArrayList; import java.util.Date; @@ -37,9 +36,7 @@ import com.panzhihua.service_community.entity.McsGame; import com.panzhihua.service_community.entity.McsMerchant; import com.panzhihua.service_community.service.McsGameService; import com.panzhihua.service_community.util.NearbyUtil; import com.panzhihua.service_community.util.QRCodeUtil; import com.spatial4j.core.shape.Rectangle; /** * (McsGame)表服务实现类 @@ -392,9 +389,13 @@ //体验游戏 Integer awardType = mcsGame.getAwardType(); if (awardType.equals(1)) { mcsCoupon.setAward("免费产品"); mcsCoupon.setAward("免费领"); } else if (awardType.equals(2)) { mcsCoupon.setAward("产品试用"); } else if (awardType.equals(3)) { mcsCoupon.setAward("消费赠礼"); } else { mcsCoupon.setAward("免费服务"); mcsCoupon.setAward("优惠券"); } } int num = mcsCouponDAO.insert(mcsCoupon); @@ -421,19 +422,7 @@ Page page = new Page<>(); page.setSize(pageMcsGameDTO.getPageSize()); page.setCurrent(pageMcsGameDTO.getPageNum()); String lat = pageMcsGameDTO.getLat(); String lon = pageMcsGameDTO.getLon(); Integer distance = pageMcsGameDTO.getDistance(); IPage<McsGameVO> mcsGames; if (isNotEmpty(lat) && isNotEmpty(lon) && nonNull(distance)) { Rectangle rectangle = new NearbyUtil().getRectangle(pageMcsGameDTO.getDistance(), Double.parseDouble(pageMcsGameDTO.getLon()), Double.parseDouble(pageMcsGameDTO.getLat())); mcsGames = this.baseMapper.pageH5McsGame(page, rectangle.getMinX(), rectangle.getMaxX(), rectangle.getMinY(), rectangle.getMaxY(), pageMcsGameDTO); } else { mcsGames = this.baseMapper.pageH5McsGame(page, null, null, null, null, pageMcsGameDTO); } IPage<McsGameVO> mcsGames = this.baseMapper.pageH5McsGame(page, pageMcsGameDTO); return R.ok(mcsGames); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsGameMapper.xml
@@ -75,7 +75,7 @@ <select id="pageMcsGame" resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO"> (SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.publish_at, t1.`status`, t1.merchant_id, t2.`name` AS merchantName, t1.is_popular, t1.cover t1.publish_at, t1.expire_at, t1.`status`, t1.merchant_id, t2.`name` AS merchantName, t1.is_popular, t1.cover FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id WHERE t1.is_del = 0 AND t1.`status` = 2 @@ -141,23 +141,31 @@ </select> <select id="pageH5McsGame" resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO"> SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.award_type, t1.cover, t1.publish_at, t1.`status`, t1.merchant_id, t1.lat, t1.lon, t2.`name` AS merchantName FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.expire_at > NOW() AND t3.`status` = 1 <if test="pageMcsGameDTO.keyword != null and pageMcsGameDTO.keyword != """> AND t1.`name` LIKE CONCAT(#{pageMcsGameDTO.keyword}, '%') SELECT * FROM ( SELECT t1.id, t1.`name`, t1.`type`, t1.coupons, t1.surplus_coupons, t1.award_type, t1.cover, t1.publish_at, t1.`status`, t1.merchant_id, t1.lat, t1.lon, t2.`name` AS merchantName, ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN((t1.lat * PI() / 180 - #{pageMcsGameDTO.lat} * PI() / 180) / 2),2) + COS(t1.lat * PI() / 180) * COS(#{pageMcsGameDTO.lat} * PI() / 180) * POW(SIN((t1.lon * PI() / 180 - #{pageMcsGameDTO.lon} * PI() / 180) / 2),2))), 2) AS distance FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.expire_at > NOW() AND t3.`status` = 1 <if test="pageMcsGameDTO.keyword != null and pageMcsGameDTO.keyword != """> AND t1.`name` LIKE CONCAT(#{pageMcsGameDTO.keyword}, '%') </if> <if test="pageMcsGameDTO.type != null"> AND t1.`type` = #{pageMcsGameDTO.type} </if> <if test="pageMcsGameDTO.merchantId != null"> AND t1.merchant_id = #{pageMcsGameDTO.merchantId} </if> ORDER BY t1.created_at DESC ) temp WHERE 1=1 <if test="pageMcsGameDTO.distance != null"> AND distance <= #{pageMcsGameDTO.distance} </if> <if test="pageMcsGameDTO.merchantId != null"> AND t1.merchant_id = #{pageMcsGameDTO.merchantId} </if> <if test="maxX != null"> AND (t1.lon BETWEEN #{minX} AND #{maxX}) AND (t1.lat BETWEEN #{minY} AND #{maxY}) </if> ORDER BY t1.created_at DESC </select> <select id="selectDetailById" resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO"> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsMerchantMapper.xml
@@ -116,12 +116,12 @@ (SELECT COUNT(t1.id) FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.expire_at > NOW() AND t2.is_del = 0 AND t3.`status` = 1) AS gameTotal, WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.`type` = 1 AND t1.expire_at > NOW() AND t2.is_del = 0 AND t3.`status` = 1) AS gameTotal, (SELECT COUNT(t1.id) FROM mcs_information t1 (SELECT COUNT(t1.id) FROM mcs_game t1 LEFT JOIN mcs_merchant t2 ON t1.merchant_id = t2.id LEFT JOIN sys_user t3 ON t2.user_id = t3.user_id WHERE t1.is_del = 0 AND t1.`status` = 2 AND t2.is_del = 0 AND t3.`status` = 1) AS infoTotal WHERE t1.is_del = 0 AND t1.`status` = 2 AND t1.`type` = 2 AND t1.expire_at > NOW() AND t2.is_del = 0 AND t3.`status` = 1) AS infoTotal ) temp </select> <select id="pageH5McsMerchant" springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -2869,12 +2869,8 @@ } catch (Exception e) { e.printStackTrace(); log.error("修改数字商业街商家用户报错【{}】", e.getMessage()); if (e.getMessage().contains("union_phone_type")) { return R.fail("手机号已存在"); } else if (e.getMessage().contains("union_account_type")) { if (e.getMessage().contains("union_account_type") || e.getMessage().contains("23000")) { return R.fail("账户已经存在"); }else if(e.getMessage().contains("23000")){ return R.fail("手机号已存在"); } else { return R.fail("账户或手机号已存在,请重新填写尝试"); }