| | |
| | | public static final String ABOUT_US = "ABOUT_US"; |
| | | public static final String SERVER_INTRODUCE = "SERVER_INTRODUCE"; |
| | | public static final String SERVER_PHONE ="SERVER_PHONE" ; |
| | | public static final String SHOP_INTEGRAL_BG ="SHOP_INTEGRAL_BG" ; |
| | | public static final String USER_INVITE_BG ="USER_INVITE_BG" ; |
| | | public static final String CENTER_INVITE_BG ="CENTER_INVITE_BG" ; |
| | | public static final String USER_SHARE_BG ="USER_SHARE_BG" ; |
| | | |
| | | |
| | | |
| | | /** |
| | | * mq tag |
| | |
| | | ORDER_DONE_AMOUNT(16,"订单结算","${param1}订单结算成功,获得¥${param}",0,1),//${param}订单编号,${param1}金额 |
| | | WITHDRAW_APPLY(17,"余额提现","余额提现已提交,消耗¥${param}",0,1), |
| | | WITHDRAW_APPLY_BACK(19,"提现退回","余额提现失败,获得¥${param}",0,1), |
| | | SHOP_ORDER_REFUND_CASH(25,"订单退款","${param1}订单退款,扣除结算金额¥${param}",0,0), |
| | | SHOP_ORDER_REFUND_CASH(25,"订单结算退回","${param1}订单退款,扣除结算金额¥${param}",0,0), |
| | | |
| | | |
| | | SHOP_ORDER(21,"消费返积分","会员${param1}交易成功,获得${param}积分",0,0),//${param}昵称-手机号 |
| | |
| | | |
| | | @ApiModelProperty(value = "客服电话 多个以,分割") |
| | | private String serverPhone; |
| | | |
| | | |
| | | @ApiModelProperty(value = "商户积分页面背景图") |
| | | private String shopIntegralBg;//SHOP_INTEGRAL_BG |
| | | |
| | | @ApiModelProperty(value = "用户邀请页面背景图") |
| | | private String userInviteBg;//USER_INVITE_BG |
| | | |
| | | @ApiModelProperty(value = "个人中心邀请背景图") |
| | | private String centerInviteBg;//CENTER_INVITE_BG |
| | | |
| | | @ApiModelProperty(value = "用户分享邀请背景图") |
| | | private String userShareBg;//USER_SHARE_BG |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | .set(Goods::getEditor,user.getId()) |
| | | .set(Goods::getStatus,Constants.ONE ) |
| | | .in(Goods::getId,idList)); |
| | | |
| | | //批量下架 sku数据 |
| | | goodsSkuMapper.update(null,new UpdateWrapper<GoodsSku>().lambda() |
| | | .set(GoodsSku::getEditDate,new Date() ) |
| | | .set(GoodsSku::getEditor,user.getId()) |
| | | .set(GoodsSku::getStatus,Constants.ONE ) |
| | | .eq(GoodsSku::getIsdeleted,Constants.ZERO) |
| | | .in(GoodsSku::getGoodsId,idList)); |
| | | return; |
| | | }else{ |
| | | //批量上架 sku数据 |
| | | goodsSkuMapper.update(null,new UpdateWrapper<GoodsSku>().lambda() |
| | | .set(GoodsSku::getEditDate,new Date() ) |
| | | .set(GoodsSku::getEditor,user.getId()) |
| | | .set(GoodsSku::getStatus,Constants.ZERO ) |
| | | .eq(GoodsSku::getIsdeleted,Constants.ZERO) |
| | | .in(GoodsSku::getGoodsId,idList)); |
| | | } |
| | | long shopNum = shopMapper.selectCount(new QueryWrapper<Shop>().lambda() |
| | | .eq(Shop::getIsdeleted,Constants.ZERO) |
| | |
| | | } |
| | | goodsorder.setPickUpShopId(shop.getId()); |
| | | goodsorder.setDistributionShopId(shop.getId()); |
| | | goodsorder.setLinkname(member.getName()); |
| | | goodsorder.setLinkphone(member.getPhone()); |
| | | if(Objects.isNull(member.getBindShopId())){ |
| | | member.setBindShopId(shop.getId()); |
| | | member.setBindShopDate(new Date()); |
| | |
| | | this.orderAddShopIntegral(goodsorder); |
| | | //下单完成 根据信息确认是否需要赠送邀请者优惠券 |
| | | this.orderDoneRewardInviteCoupon(goodsorder); |
| | | //消费者确认收货 |
| | | //赠送消费者下单积分 |
| | | this.orderAddMemberIntegral(goodsorder); |
| | | //经销商 结算金额 |
| | | this.orderAddShopCash(goodsorder); |
| | |
| | | continue; |
| | | } |
| | | MemberCoupon memberCoupon = MemberCoupon.couponToBean(coupon,inviteMember,new Date(),Constants.ONE,null); |
| | | if(Constants.equalsInteger(memberCoupon.getCouponType(),Constants.ZERO)){ |
| | | memberCoupon.setMaxPrice(memberCoupon.getPrice()); |
| | | }else if(Constants.equalsInteger(memberCoupon.getCouponType(),Constants.ONE)){ |
| | | memberCoupon.setMaxPrice(memberCoupon.getLimitPrice().subtract(memberCoupon.getLimitPrice().multiply(memberCoupon.getPrice()).divide(new BigDecimal("100"),2, RoundingMode.HALF_UP))); |
| | | }else{ |
| | | memberCoupon.setMaxPrice(BigDecimal.ZERO); |
| | | } |
| | | for (int i = 0; i < num; i++) { |
| | | memberCouponList.add(memberCoupon); |
| | | } |
| | | couponIds = couponIds + (StringUtils.isBlank(couponIds)? ",":"" )+ couponId ; |
| | | couponNames = couponNames + (StringUtils.isBlank(couponNames)? ",":"" )+ coupon.getName() ; |
| | | |
| | | |
| | | CouponNoticeRequest couponNoticeRequest = new CouponNoticeRequest(); |
| | | couponNoticeRequest.setMemberCoupon(memberCoupon); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public String addBatch(MemberCouponAddDTO memberCoupon){ |
| | | checkAddBatchParamValid(memberCoupon); |
| | | public String addBatch(MemberCouponAddDTO memberCouponAddDTO){ |
| | | checkAddBatchParamValid(memberCouponAddDTO); |
| | | |
| | | List<Coupon> couponList = getCouponListByParam(memberCoupon); |
| | | List<Member> memberList = getMemberListByParam(memberCoupon); |
| | | List<Coupon> couponList = getCouponListByParam(memberCouponAddDTO); |
| | | List<Member> memberList = getMemberListByParam(memberCouponAddDTO); |
| | | List<MemberCoupon> addList = new ArrayList<>(); |
| | | int index =1; |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | Date now = new Date(); |
| | | for(Coupon param : memberCoupon.getAddCouponList()){ |
| | | for(Coupon param : memberCouponAddDTO.getAddCouponList()){ |
| | | Coupon coupon = getCouponFromListById(param.getId(),couponList); |
| | | if(coupon == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第【"+index+"】个优惠券查询无效,请刷新页面重新!"); |
| | | } |
| | | BigDecimal maxPrice = BigDecimal.ZERO; |
| | | if(Constants.equalsInteger(coupon.getCouponType(),Constants.ZERO)){ |
| | | maxPrice = coupon.getPrice(); |
| | | }else if(Constants.equalsInteger(coupon.getCouponType(),Constants.ONE)){ |
| | | maxPrice = coupon.getLimitPrice().subtract(coupon.getLimitPrice().multiply(coupon.getPrice()).divide(new BigDecimal("100"),2, RoundingMode.HALF_UP)); |
| | | } |
| | | for(Member member : memberList){ |
| | | for (int i = 0; i < Constants.formatLongNum(param.getNum()); i++) { |
| | | MemberCoupon memberCoupon = MemberCoupon.couponToBean(coupon,member,now,Constants.TWO,loginUserInfo); |
| | | memberCoupon.setMaxPrice(maxPrice); |
| | | //挨个送 |
| | | addList.add(MemberCoupon.couponToBean(coupon,member,now,Constants.TWO,loginUserInfo)); |
| | | addList.add(memberCoupon); |
| | | } |
| | | } |
| | | index++; |
| | |
| | | memberCouponMapper.insert(addList); |
| | | } |
| | | return "操作成功,成功人员数量:"+memberList.size()+",共发放优惠券数量:"+addList.size(); |
| | | |
| | | } |
| | | /* |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | userCenterVO.setServerPhone(StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SERVER_PHONE).getCode())); |
| | | userCenterVO.setUserAgreement(StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.USER_AGREEMENT).getCode())); |
| | | userCenterVO.setPrivacyAgreement(StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.PRIVACY_AGREEMENT).getCode())); |
| | | |
| | | userCenterVO.setShopIntegralBg(StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SHOP_INTEGRAL_BG).getCode())); |
| | | |
| | | userCenterVO.setUserInviteBg(StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.USER_INVITE_BG).getCode())); |
| | | |
| | | userCenterVO.setCenterInviteBg(StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.CENTER_INVITE_BG).getCode())); |
| | | |
| | | userCenterVO.setUserShareBg(StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.USER_SHARE_BG).getCode())); |
| | | |
| | | return userCenterVO; |
| | | } |
| | | |
| | |
| | | appSecret: 3462fa186da7cb06c544df8d8664b63a |
| | | mchId: 1229817002 |
| | | mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | notifyUrl: http://xiaopiqiu2.natapp1.cc/web/api/wxPayNotify #https://dmtest.ahapp.net/dmmall_interface/web/api/wxPayNotify |
| | | notifyUrl: https://test.doumee.cn/dmmall_web_api/web/api/wxPayNotify |
| | | keyPath: /usr/local/apiclient_cert.p12 |
| | | |
| | | tencent: |
| | |
| | | <artifactId>dmmall</artifactId> |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </parent> |
| | | |
| | | <artifactId>dmmall_web</artifactId> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <build> |
| | | <finalName>dmmall_web_api</finalName> |
| | | <resources> |
| | | <resource> |
| | | <directory>src/main/resources</directory> |
| | | </resource> |
| | | </resources> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <configuration> |
| | | <fork>true</fork> |
| | | <mainClass>com.doumee.InterfaceApplication</mainClass> |
| | | <layout>ZIP</layout> |
| | | </configuration> |
| | | <executions> |
| | | <execution> |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <!--<plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-war-plugin</artifactId> |
| | | <version>2.6</version> |
| | | </plugin>--> |
| | | </plugins> |
| | | </build> |
| | | </project> |