Merge remote-tracking branch 'origin/master'
# Conflicts:
# ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
# ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
| | |
| | | |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | |
| | |
| | | return new AppUserClient() { |
| | | @Override |
| | | public AppUser getAppUserById(Long id) { |
| | | log.error("根据id获取用户失败:" + cause.getMessage()); |
| | | log.error("根据id获取用户失败:{}", cause.getMessage()); |
| | | throw new RuntimeException("根据id获取用户失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Void> editAppUserById(AppUser appUser) { |
| | | log.error("编辑用户信息失败:{}", cause.getMessage()); |
| | | throw new RuntimeException("编辑用户信息失败"); |
| | | } |
| | | |
| | | }; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.account.api.factory.AppUserClientFallbackFactory; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | @PostMapping("/appUser/getAppUserById") |
| | | AppUser getAppUserById(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 根据id编辑用户 |
| | | */ |
| | | @PostMapping("/appUser/editAppUserById") |
| | | R<Void> editAppUserById(@RequestParam("appUser") AppUser appUser); |
| | | } |
| | |
| | | @TableField("invite_user_id") |
| | | private Long inviteUserId; |
| | | |
| | | @ApiModelProperty(value = "拥有门店id") |
| | | @ApiModelProperty(value = "绑定门店id") |
| | | @TableField("shop_id") |
| | | private Integer shopId; |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(value = "合伙人积分数") |
| | | @TableField("part_point") |
| | |
| | | @TableField("last_shop_time") |
| | | private LocalDateTime lastShopTime; |
| | | |
| | | @ApiModelProperty(value = "可提现金额") |
| | | @TableField("withdrawable_amount") |
| | | private BigDecimal withdrawal_amount; |
| | | |
| | | @ApiModelProperty(value = "已提现金额") |
| | | @TableField("withdrawn_amount") |
| | | private BigDecimal withdrawn_amount; |
| | | |
| | | @ApiModelProperty(value = "充值总金额") |
| | | @TableField("total_recharge_amount") |
| | | private BigDecimal total_recharge_amount; |
| | | |
| | | @ApiModelProperty(value = "红包总金额") |
| | | @TableField("total_red_packet_amount") |
| | | private BigDecimal total_red_packet_amount; |
| | | |
| | | @ApiModelProperty(value = "分销总金额") |
| | | @TableField("total_distribution_amount") |
| | | private BigDecimal total_distribution_amount; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_balance_change_record") |
| | | @ApiModel(value = "变更记录对象", description = "") |
| | | public class BalanceChangeRecord implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private Long appUserId; |
| | | |
| | | @ApiModelProperty("订单id") |
| | | private Long orderId; |
| | | |
| | | @ApiModelProperty("类型:1充值2提现3红包4分佣5商城购物") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("变更前金额") |
| | | private BigDecimal beforeAmount; |
| | | |
| | | @ApiModelProperty("变更金额") |
| | | private BigDecimal changeAmount; |
| | | |
| | | @ApiModelProperty("变更后金额") |
| | | private BigDecimal afterAmount; |
| | | |
| | | @ApiModelProperty("删除(0=否,1=是") |
| | | private Integer delFlag; |
| | | |
| | | @ApiModelProperty("添加时间") |
| | | private LocalDateTime createTime; |
| | | } |
New file |
| | |
| | | package factory; |
| | | |
| | | import feignClient.RemoteOrderClient; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 订单服务降级处理 |
| | | * @author luofl |
| | | */ |
| | | @Component |
| | | public class RemoteOrderFallbackFactory implements FallbackFactory<RemoteOrderClient> { |
| | | |
| | | @Override |
| | | public RemoteOrderClient create(Throwable cause) { |
| | | return new RemoteOrderClient() { |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import feignClient.RemoteOrderGoodsClient; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import model.OrderGood; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | public class RemoteOrderGoodsFallbackFactory implements FallbackFactory<RemoteOrderGoodsClient> { |
| | | @Override |
| | | public RemoteOrderGoodsClient create(Throwable cause) { |
| | | return new RemoteOrderGoodsClient(){ |
| | | @Override |
| | | public R<List<OrderGood>> goodsOrder(List<Long> goodsIds) { |
| | | log.error("编辑用户信息失败:{}", cause.getMessage()); |
| | | throw new RuntimeException("编辑用户信息失败"); |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package feignClient; |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import factory.RemoteOrderFallbackFactory; |
| | | import model.Order; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * 订单远程调用接口 |
| | | * @author luofl |
| | | */ |
| | | @FeignClient(contextId = "RemoteOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderFallbackFactory.class) |
| | | public interface RemoteOrderClient { |
| | | } |
New file |
| | |
| | | package feignClient; |
| | | |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import factory.RemoteOrderGoodsFallbackFactory; |
| | | import model.OrderGood; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderGoodsFallbackFactory.class) |
| | | public interface RemoteOrderGoodsClient { |
| | | |
| | | /** |
| | | * 查询指定商品订单 |
| | | */ |
| | | @PostMapping("/order-good/selectGoodsOrder") |
| | | public R<List<OrderGood>> goodsOrder(@RequestBody List<Long> goodsIds); |
| | | } |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | @TableField("goods_id") |
| | | private Long goodsId; |
| | | |
| | | @ApiModelProperty(value = "订单id") |
| | | @TableField("order_id") |
| | | private Integer orderId; |
| | |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "名称") |
| | | @TableField("name") |
| | |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | |
| | | @ApiModelProperty(value = "销量") |
| | | @TableField("sale_num") |
| | | private Integer saleNum; |
| | | |
| | | @ApiModelProperty(value = "商品权限JSON(0=全部,1=游客,2=普通会员,3=黄金会员,4=钻石会员,5=准代理,6=代理,7=总代,8=合伙人)") |
| | | @TableField("commodity_authority") |
| | | private Integer commodityAuthority; |
| | |
| | | @TableField("end_time") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "封面图片") |
| | | @TableField("home_picture") |
| | | private String homePicture; |
| | | |
| | | @ApiModelProperty(value = "详情图,多个逗号分隔") |
| | | @TableField("details_picture") |
| | | private String detailsPicture; |
| | | |
| | | @ApiModelProperty(value = "店长姓名") |
| | | @TableField("shop_manager") |
| | | private String shopManager; |
| | |
| | | |
| | | @ApiModelProperty(value = "店长用户id") |
| | | @TableField("app_user_id") |
| | | private Integer appUserId; |
| | | private Long appUserId; |
| | | |
| | | @ApiModelProperty(value = "客户电话(同步到t_phone表)") |
| | | @TableField("service_tel") |
| | |
| | | @TableField("custom_order_number") |
| | | private Integer customOrderNumber; |
| | | |
| | | @ApiModelProperty(value = "总评分") |
| | | @TableField("score") |
| | | private Integer score; |
| | | |
| | | @ApiModelProperty(value = "评分数量") |
| | | @TableField("score_number") |
| | | private Integer scoreNumber; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
New file |
| | |
| | | package com.ruoyi.other.api.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_shopping_cart") |
| | | @ApiModel(value = "购物车对象", description = "") |
| | | public class ShoppingCart implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | @ApiModelProperty("主键") |
| | | @TableId |
| | | private Long id; |
| | | @ApiModelProperty("用户id") |
| | | private Long appUserId; |
| | | @ApiModelProperty("商品id") |
| | | private Long goodsId; |
| | | @ApiModelProperty("数量") |
| | | private Integer number; |
| | | } |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("app_user_id") |
| | | private Long appUserId; |
| | | |
| | | @ApiModelProperty(value = "门店id") |
| | | @TableField("shop_id") |
| | | private Integer shopId; |
New file |
| | |
| | | package com.ruoyi.common.core.web.page; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/25 10:45 |
| | | */ |
| | | @Data |
| | | public class BaseTable<T> implements Serializable { |
| | | /** 总记录数 */ |
| | | private long total; |
| | | |
| | | /** 列表数据 */ |
| | | private List<T> rows; |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import com.ruoyi.account.vo.*; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.BaseTable; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/app-user") |
| | | public class AppUserController { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/appletLogin") |
| | | @ApiOperation(value = "小程序一键登录", tags = {"登录注册-小程序"}) |
| | | public AjaxResult<LoginVo> appletLogin(@RequestBody AppletLogin appletLogin){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/mobileLogin") |
| | | @ApiOperation(value = "手机号登录", tags = {"登录注册-小程序"}) |
| | | public AjaxResult<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getSMSCode") |
| | | @ApiOperation(value = "获取短信验证码", tags = {"登录注册-小程序"}) |
| | | public AjaxResult getSMSCode(@RequestBody SMSCode smsCode){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/registerAccount") |
| | | @ApiOperation(value = "注册新账号", tags = {"登录注册-小程序"}) |
| | | public AjaxResult<LoginVo> registerAccount(@RequestBody RegisterAccount registerAccount){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getReferrer/{id}") |
| | | @ApiOperation(value = "获取推荐人信息", tags = {"登录注册-小程序"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "推荐人id", required = true, dataType = "long") |
| | | }) |
| | | public AjaxResult<String> getReferrer(@PathVariable("id") Long id){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getNearbyReferrer") |
| | | @ApiOperation(value = "获取附近推荐人列表", tags = {"登录注册-小程序"}) |
| | | public AjaxResult<BaseTable<NearbyReferrerVo>> getNearbyReferrer(NearbyReferrer nearbyReferrer){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
New file |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.account.api.model.BalanceChangeRecord; |
| | | import com.ruoyi.account.service.BalanceChangeRecordService; |
| | | import com.ruoyi.account.vo.WalletVO; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Api("钱包") |
| | | @RestController |
| | | @RequestMapping("wallet") |
| | | public class WalletController extends BaseController { |
| | | @Resource |
| | | private BalanceChangeRecordService balanceChangeRecordService; |
| | | |
| | | /** |
| | | * 钱包详情 |
| | | */ |
| | | @GetMapping("detail") |
| | | @ApiOperation(value = "钱包详情", notes = "钱包详情", tags = {"小程序-个人中心-我的钱包-钱包详情"}) |
| | | public AjaxResult detail() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | // TODO 查询钱包详情 |
| | | WalletVO walletVO = new WalletVO(); |
| | | return AjaxResult.success(walletVO); |
| | | } |
| | | |
| | | /** |
| | | * 变更明细 |
| | | */ |
| | | @ApiOperation(value = "变更明细", notes = "变更明细", tags = {"小程序-个人中心-我的钱包-变更记录"}) |
| | | @GetMapping("change") |
| | | public AjaxResult change() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | return AjaxResult.success(balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>() |
| | | .eq(BalanceChangeRecord::getAppUserId, userId))); |
| | | } |
| | | |
| | | // /** |
| | | // * 充值 |
| | | // */ |
| | | // @GetMapping("recharge") |
| | | // @ApiOperation(value = "充值", notes = "钱包充值") |
| | | // public AjaxResult recharge(@ApiParam(value = "充值金额", required = true) @RequestParam BigDecimal amount) { |
| | | // Long userId = SecurityUtils.getUserId(); |
| | | // String openId; |
| | | // // 商户号 |
| | | // String partnerTradeNo; |
| | | // // TODO 充值 |
| | | // return AjaxResult.success(); |
| | | // } |
| | | |
| | | } |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import com.ruoyi.account.dto.WithdrawalRequestsDTO; |
| | | import com.ruoyi.account.service.WithdrawalRequestsService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/withdrawal-requests") |
| | | @Api(tags = "提现申请") |
| | | public class WithdrawalRequestsController { |
| | | |
| | | @Resource |
| | | private WithdrawalRequestsService withdrawalRequestsService; |
| | | |
| | | /** |
| | | * 提现申请 |
| | | */ |
| | | @PostMapping("/withdrawalApply") |
| | | @ApiOperation(value = "提现申请", tags = {"提现申请-小程序"}) |
| | | public AjaxResult withdrawalApply(@RequestBody WithdrawalRequestsDTO params){ |
| | | withdrawalRequestsService.withdrawalApply(params); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.account.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @ApiModel(value="提现申请对象", description="") |
| | | @Data |
| | | public class WithdrawalRequestsDTO { |
| | | |
| | | @ApiModelProperty(value = "提现金额") |
| | | private BigDecimal withdrawalAmount; |
| | | |
| | | @ApiModelProperty(value = "1微信2银行卡") |
| | | private Integer withdrawalMethod; |
| | | |
| | | @ApiModelProperty(value = "开户人") |
| | | private String accountHolder; |
| | | |
| | | @ApiModelProperty(value = "银行卡号") |
| | | private String bankCardNumber; |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.account.api.model.BalanceChangeRecord; |
| | | |
| | | public interface BalanceChangeRecordMapper extends BaseMapper<BalanceChangeRecord> { |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.account.api.model.BalanceChangeRecord; |
| | | |
| | | public interface BalanceChangeRecordService extends IService<BalanceChangeRecord> { |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.account.api.model.WithdrawalRequests; |
| | | import com.ruoyi.account.dto.WithdrawalRequestsDTO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface WithdrawalRequestsService extends IService<WithdrawalRequests> { |
| | | |
| | | /** |
| | | * 提现申请 |
| | | */ |
| | | void withdrawalApply(WithdrawalRequestsDTO params); |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.model.BalanceChangeRecord; |
| | | import com.ruoyi.account.mapper.BalanceChangeRecordMapper; |
| | | import com.ruoyi.account.service.BalanceChangeRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class BalanceChangeRecordServiceImpl extends ServiceImpl<BalanceChangeRecordMapper, BalanceChangeRecord> implements BalanceChangeRecordService { |
| | | } |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.dto.WithdrawalRequestsDTO; |
| | | import com.ruoyi.account.mapper.WithdrawalRequestsMapper; |
| | | import com.ruoyi.account.api.model.WithdrawalRequests; |
| | | import com.ruoyi.account.service.WithdrawalRequestsService; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class WithdrawalRequestsServiceImpl extends ServiceImpl<WithdrawalRequestsMapper, WithdrawalRequests> implements WithdrawalRequestsService { |
| | | |
| | | @Override |
| | | public void withdrawalApply(WithdrawalRequestsDTO params) { |
| | | WithdrawalRequests withdrawalRequests = new WithdrawalRequests(); |
| | | BeanUtils.copyBeanProp(withdrawalRequests, params); |
| | | withdrawalRequests.setDelFlag(0); |
| | | withdrawalRequests.setAppUserId(SecurityUtils.getUserId()); |
| | | withdrawalRequests.setAuditStatus(1); |
| | | save(withdrawalRequests); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/25 9:39 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class LoginVo { |
| | | @ApiModelProperty("token") |
| | | private String token; |
| | | @ApiModelProperty("失效时间(秒)") |
| | | private Long failureTime; |
| | | @ApiModelProperty("跳转页面(1=首页,2=注册页)") |
| | | private Integer skipPage; |
| | | @ApiModelProperty("微信解密的手机号") |
| | | private String phone; |
| | | @ApiModelProperty("是否首次登录") |
| | | private Boolean firstTime; |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/25 9:48 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class MobileLogin { |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | @ApiModelProperty("短信验证码") |
| | | private String code; |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/25 10:36 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class NearbyReferrer extends BasePage { |
| | | @ApiModelProperty(value = "经度", required = true) |
| | | private String longitude; |
| | | @ApiModelProperty(value = "纬度", required = true) |
| | | private String latitude; |
| | | @ApiModelProperty(value = "搜索内容", required = false) |
| | | private String name; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/25 10:42 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class NearbyReferrerVo { |
| | | @ApiModelProperty("id") |
| | | private String id; |
| | | @ApiModelProperty("头像") |
| | | private String avatar; |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | @ApiModelProperty("会员类型名称") |
| | | private String vip; |
| | | @ApiModelProperty("距离(km)") |
| | | private BigDecimal distance; |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/25 10:03 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class RegisterAccount { |
| | | @ApiModelProperty(value = "推广人id", required = false) |
| | | private Long promoter; |
| | | @ApiModelProperty(value = "头像", required = true) |
| | | private String avatar; |
| | | @ApiModelProperty(value = "姓名", required = true) |
| | | private String name; |
| | | @ApiModelProperty(value = "手机号", required = true) |
| | | private String phone; |
| | | @ApiModelProperty(value = "短信验证码", required = true) |
| | | private String code; |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/25 9:53 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class SMSCode { |
| | | @ApiModelProperty("类型(1=登录注册)") |
| | | private Integer type; |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value="钱包对象", description="") |
| | | public class WalletVO { |
| | | |
| | | @ApiModelProperty(value = "可提现金额") |
| | | private BigDecimal withdrawal_amount; |
| | | |
| | | @ApiModelProperty(value = "已提现金额") |
| | | private BigDecimal withdrawn_amount; |
| | | |
| | | @ApiModelProperty(value = "最低提现门槛") |
| | | private BigDecimal vipWithdrawalMinAmount; |
| | | |
| | | @ApiModelProperty(value = "提现审核中金额") |
| | | private BigDecimal audit_amount; |
| | | |
| | | @ApiModelProperty(value = "充值总金额") |
| | | private BigDecimal total_recharge_amount; |
| | | |
| | | @ApiModelProperty(value = "红包总金额") |
| | | private BigDecimal total_red_packet_amount; |
| | | |
| | | @ApiModelProperty(value = "分销总金额") |
| | | private BigDecimal total_distribution_amount; |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.mapper.BalanceChangeRecordMapper"> |
| | | |
| | | </mapper> |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.order.service.OrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author luodangjia |
| | | * @since 2024-11-21 |
| | | */ |
| | | @Api("订单") |
| | | @RestController |
| | | @RequestMapping("/order") |
| | | public class OrderController { |
| | | @Resource |
| | | private OrderService orderService; |
| | | |
| | | |
| | | /** |
| | | * 扫码校验 |
| | | */ |
| | | @ApiOperation(value = "扫码校验", tags = {"小程序-个人中心-门店管理-扫码核销校验"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "分享id", name = "shareId", required = true, dataType = "int"), |
| | | }) |
| | | @GetMapping("/check/{orderId}/{shopId}") |
| | | public AjaxResult check(@PathVariable("orderId") Integer orderId, @PathVariable("shopId") Integer shopId){ |
| | | return AjaxResult.ok(orderService.check(orderId, shopId)); |
| | | } |
| | | |
| | | /** |
| | | * 订单详情 |
| | | */ |
| | | @ApiOperation(value = "订单详情", tags = {"订单详情"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), |
| | | }) |
| | | @GetMapping("/detail/{orderId}") |
| | | public AjaxResult detail(@PathVariable("orderId") Integer orderId){ |
| | | return AjaxResult.success(orderService.getById(orderId)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.order.service.OrderGoodService; |
| | | import model.OrderGood; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/order-good") |
| | | public class OrderGoodController { |
| | | public class OrderGoodController extends BaseController { |
| | | @Resource |
| | | private OrderGoodService orderGoodService; |
| | | |
| | | /** |
| | | * 查询指定商品订单 |
| | | */ |
| | | @PostMapping("/selectGoodsOrder") |
| | | public R<List<OrderGood>> selectGoodsOrder(@RequestBody List<Long> goodsIds){ |
| | | startPage(); |
| | | List<OrderGood> orderGoods = orderGoodService.list(new LambdaQueryWrapper<OrderGood>() |
| | | .in(OrderGood::getGoodsId, goodsIds)); |
| | | return R.ok(orderGoods); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.order.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import model.RefundPassOrder; |
| | | import model.Order; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | package com.ruoyi.order.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import model.OrderGood; |
| | | import model.RefundPassOrderGood; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.order.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import model.RefundPassOrder; |
| | | import model.Order; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-11-21 |
| | | */ |
| | | public interface OrderService extends IService<Order> { |
| | | |
| | | boolean check(Integer orderId, Integer shopId); |
| | | } |
| | |
| | | package com.ruoyi.order.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.mapper.OrderMapper; |
| | | import model.RefundPassOrder; |
| | | import com.ruoyi.account.service.OrderService; |
| | | import com.ruoyi.order.mapper.OrderMapper; |
| | | import com.ruoyi.order.service.OrderService; |
| | | import model.Order; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService { |
| | | |
| | | @Override |
| | | public boolean check(Integer orderId, Integer shopId) { |
| | | return false; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.other.api.domain.GoodsCategory; |
| | | import com.ruoyi.other.service.GoodsCategoryService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.other.service.GoodsCategoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/goods-category") |
| | | @Api(tags = "商品分类") |
| | | public class GoodsCategoryController { |
| | | @Resource |
| | | private GoodsCategoryService goodsCategoryService; |
| | | |
| | | @PostMapping("/index/list") |
| | | @ApiOperation(value = "商品分类", tags = {"小程序-首页"}) |
| | | public R<List<GoodsCategory>> list(){ |
| | | List<GoodsCategory> list = goodsCategoryService.lambdaQuery() |
| | | public R<List<GoodsCategory>> indexlist(){ |
| | | List<GoodsCategory> indexlist = goodsCategoryService.lambdaQuery() |
| | | .orderByDesc(GoodsCategory::getCreateTime) |
| | | .last("limit 8") |
| | | .list() |
| | | ; |
| | | return R.ok(list); |
| | | } |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "商品分类列表", tags = {"小程序-商城-商城-首页-筛选"}) |
| | | public AjaxResult list(){ |
| | | return AjaxResult.success(goodsCategoryService.list()); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.service.GoodsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/goods") |
| | | public class GoodsController { |
| | | @Api("商品") |
| | | public class GoodsController extends BaseController { |
| | | @Resource |
| | | private GoodsService goodsService; |
| | | |
| | | /** |
| | | * 商品列表 |
| | | */ |
| | | @GetMapping("/goodsList") |
| | | @ApiOperation(value = "商品列表", tags = {"小程序-商城-首页-热门商品列表"}) |
| | | public TableDataInfo goodsList(Goods goods){ |
| | | startPage(); |
| | | return getDataTable(goodsService.goodsList(goods)); |
| | | } |
| | | |
| | | /** |
| | | * 商品详情 |
| | | */ |
| | | @GetMapping("/goodsDetail/{goodsId}") |
| | | @ApiOperation(value = "商品详情", tags = {"小程序-商城-首页-商品详情"}) |
| | | public AjaxResult goodsDetail(@PathVariable("goodsId") Long goodsId){ |
| | | return success(goodsService.goodsDetail(goodsId)); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.other.vo.Home; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @Api(tags = "个人中心") |
| | | @RestController |
| | | @RequestMapping("/personalCenter") |
| | | public class PersonalCenterController { |
| | | |
| | | @GetMapping("/getUserInfo") |
| | | @ApiOperation(value = "获取用户信息") |
| | | public AjaxResult getUserInfo(){ |
| | | Long userId = SecurityUtils.getUserId(); |
| | | Home home = new Home(); |
| | | return AjaxResult.success(home); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.service.SeckillActivityInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author luodangjia |
| | | * @since 2024-11-20 |
| | | */ |
| | | @Api(tags = "秒杀活动信息") |
| | | @RestController |
| | | @RequestMapping("/seckill-activity-info") |
| | | public class SeckillActivityInfoController { |
| | | public class SeckillActivityInfoController extends BaseController { |
| | | @Resource |
| | | private SeckillActivityInfoService seckillActivityInfoService; |
| | | |
| | | /** |
| | | * 秒杀活动列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "秒杀活动列表",tags = {"小程序-商城-首页-秒杀活动列表"}) |
| | | public AjaxResult list(Goods goods) |
| | | { |
| | | startPage(); |
| | | return AjaxResult.success(seckillActivityInfoService.listSeckillActivity(goods)); |
| | | } |
| | | |
| | | /** |
| | | * 秒杀活动详情 |
| | | */ |
| | | @GetMapping("/detail/{id}") |
| | | @ApiOperation(value = "秒杀活动详情", tags = {"小程序-商城-首页-秒杀活动列表-秒杀活动详情"}) |
| | | public AjaxResult detail(@PathVariable("id") Integer id) |
| | | { |
| | | return AjaxResult.success(seckillActivityInfoService.detail(id)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.other.enums.ShareAddType; |
| | | import com.ruoyi.other.api.domain.Share; |
| | | import com.ruoyi.other.enums.ShareAuditStatus; |
| | | import com.ruoyi.other.service.ShareService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author luodangjia |
| | | * @since 2024-11-20 |
| | | */ |
| | | @Api("分享") |
| | | @RestController |
| | | @RequestMapping("/share") |
| | | public class ShareController { |
| | | public class ShareController extends BaseController { |
| | | @Resource |
| | | private ShareService shareService; |
| | | |
| | | /** |
| | | * 分享列表 |
| | | */ |
| | | @ApiOperation(value = "分享列表", tags = {"小程序-个人中心-门店管理-分享列表"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "对象id(addType=1:平台添加,addType=2:推广人添加,addType=3:门店添加)", name = "objectId", required = true, dataType = "int"), |
| | | }) |
| | | @GetMapping("/list") |
| | | public AjaxResult list(@RequestParam Integer objectId){ |
| | | return AjaxResult.success(shareService.list(new LambdaQueryWrapper<Share>() |
| | | .eq(Share::getObjectId, objectId))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分享添加 |
| | | */ |
| | | @ApiOperation(value = "小程序-个人中心-门店管理-分享添加", tags = {"分享添加-小程序"}) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody Share share){ |
| | | share.setAddType(ShareAddType.STORE.getCode()); |
| | | share.setAuditStatus(ShareAuditStatus.WAIT.getCode()); |
| | | share.setDelFlag(0); |
| | | share.setAppletShare(1); |
| | | return toAjax(shareService.save(share)); |
| | | } |
| | | |
| | | /** |
| | | * 分享删除 |
| | | */ |
| | | @ApiOperation(value = "分享删除", tags = {"小程序-个人中心-门店管理-分享删除-小程序"}) |
| | | @DeleteMapping |
| | | public AjaxResult delete(@RequestBody Share share){ |
| | | return toAjax(shareService.removeById(share)); |
| | | } |
| | | |
| | | /** |
| | | * 分享编辑 |
| | | */ |
| | | @ApiOperation(value = "分享编辑", tags = {"小程序-个人中心-门店管理-分享编辑-小程序"}) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody Share share){ |
| | | share.setAuditStatus(ShareAuditStatus.WAIT.getCode()); |
| | | return toAjax(shareService.updateById(share)); |
| | | } |
| | | |
| | | /** |
| | | * 分享详情 |
| | | */ |
| | | @ApiOperation(value = "分享详情", tags = {"小程序-个人中心-门店管理-分享详情-小程序"}) |
| | | @GetMapping("/detail/{id}") |
| | | public AjaxResult detail(@PathVariable("id") Integer id){ |
| | | return AjaxResult.success(shareService.getById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.api.domain.Technician; |
| | | import com.ruoyi.other.enums.ShopStatus; |
| | | import com.ruoyi.other.service.ShopService; |
| | | import com.ruoyi.other.service.TechnicianService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/shop") |
| | | public class ShopController { |
| | | @Api("门店") |
| | | public class ShopController extends BaseController { |
| | | @Resource |
| | | private TechnicianService technicianService; |
| | | @Resource |
| | | private ShopService shopService; |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | /** |
| | | * 附近门店列表 |
| | | */ |
| | | @GetMapping("/nearbyShopList") |
| | | @ApiOperation(value = "附近门店列表", tags = {"小程序-首页-附近门店列表"}) |
| | | public AjaxResult nearbyShopList(@ApiParam("经度") @RequestParam String longitude, |
| | | @ApiParam("纬度") @RequestParam String latitude){ |
| | | return success(shopService.nearbyShopList(longitude,latitude)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 指定门店技师列表 |
| | | */ |
| | | @GetMapping("/technicianList") |
| | | @ApiOperation(value = "技师列表", tags = {"技师列表-小程序"}) |
| | | public AjaxResult technicianList(@ApiParam("门店id") @RequestParam String shopId){ |
| | | return success(technicianService.list(new LambdaQueryWrapper<Technician>() |
| | | .eq(Technician::getShopId,shopId) |
| | | .eq(Technician::getStatus,2) |
| | | .eq(Technician::getSubscribeStatus,1))); |
| | | } |
| | | |
| | | /** |
| | | * 查询当前店长所属门店 |
| | | */ |
| | | @GetMapping("/shopByUser") |
| | | @ApiOperation(value = "查询当前店长所属门店", tags = {"小程序-个人中心-首页-关联门店列表"}) |
| | | public AjaxResult shopByUser(){ |
| | | List<Shop> list = shopService.list(new LambdaQueryWrapper<Shop>() |
| | | .eq(Shop::getAppUserId, SecurityUtils.getUserId()) |
| | | .eq(Shop::getStatus, ShopStatus.SHOP_STATUS_NORMAL.getCode())); |
| | | return success(list); |
| | | } |
| | | |
| | | /** |
| | | * 绑定门店 |
| | | */ |
| | | @GetMapping("/bindShop") |
| | | @ApiOperation(value = "绑定门店", tags = {"小程序-个人中心-绑定门店"}) |
| | | public AjaxResult bindShop(@ApiParam("门店id") @RequestParam Long shopId){ |
| | | AppUser appUser = appUserClient.getAppUserById(SecurityUtils.getUserId()); |
| | | appUser.setShopId(shopId); |
| | | appUserClient.editAppUserById(appUser); |
| | | return success(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("/shopping-cart") |
| | | @Api(tags = "购物车") |
| | | public class ShoppingCartController { |
| | | } |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.other.api.domain.TechnicianSubscribe; |
| | | import com.ruoyi.other.service.TechnicianSubscribeService; |
| | | import com.ruoyi.other.vo.TechnicianSubscribeVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author luodangjia |
| | | * @since 2024-11-20 |
| | | */ |
| | | @Api(tags = "技师预约管理") |
| | | @RestController |
| | | @RequestMapping("/technician-subscribe") |
| | | public class TechnicianSubscribeController { |
| | | public class TechnicianSubscribeController extends BaseController { |
| | | @Resource |
| | | private TechnicianSubscribeService technicianSubscribeService; |
| | | |
| | | /** |
| | | * 预约列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "预约列表", notes = "预约列表", tags = {"小程序-个人中心-门店管理-预约列表"}) |
| | | public TableDataInfo list(@ApiParam(value = "状态") @RequestParam Integer status, |
| | | @ApiParam(value = "门店id") @RequestParam Long shopId){ |
| | | startPage(); |
| | | List<TechnicianSubscribeVO> list = technicianSubscribeService |
| | | .getTechnicianSubscribeByUserAndShop(SecurityUtils.getUserId(),shopId); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 取消服务 |
| | | */ |
| | | @GetMapping("/cancel") |
| | | @ApiOperation(value = "取消服务", notes = "取消服务", tags = {"小程序-个人中心-门店管理-预约列表-取消服务"}) |
| | | public AjaxResult cancel(@ApiParam(value = "预约id") @RequestParam Long id){ |
| | | |
| | | TechnicianSubscribe subscribe = technicianSubscribeService.getOne(new LambdaQueryWrapper<TechnicianSubscribe>() |
| | | .eq(TechnicianSubscribe::getId, id) |
| | | .eq(TechnicianSubscribe::getStatus, 0)); |
| | | if (null == subscribe){ |
| | | return error("不满足取消条件"); |
| | | } |
| | | subscribe.setStatus(2); |
| | | technicianSubscribeService.updateById(subscribe); |
| | | return success(); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.other.enums; |
| | | |
| | | public enum GoodsStatus { |
| | | DOWN(0, "下架"), |
| | | UP(1, "上架"); |
| | | |
| | | private Integer code; |
| | | private String desc; |
| | | |
| | | GoodsStatus(Integer code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | @Getter |
| | | public enum ShareAddType { |
| | | PLATFORM(1, "平台添加"), |
| | | PROMPOTERS(2, "推广人添加"), |
| | | STORE(3, "门店添加"); |
| | | |
| | | private final Integer code; |
| | | private final String message; |
| | | |
| | | ShareAddType(Integer code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.enums; |
| | | |
| | | public enum ShareAuditStatus { |
| | | WAIT(0, "待审核"), |
| | | SUCCESS(1, "审核通过"), |
| | | FAIL(2, "审核失败"); |
| | | |
| | | private final Integer code; |
| | | private final String message; |
| | | |
| | | ShareAuditStatus(Integer code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | @Getter |
| | | public enum ShopStatus { |
| | | SHOP_STATUS_NORMAL(1, "正常"), |
| | | SHOP_STATUS_FREEZE(2, "冻结"); |
| | | |
| | | private final Integer code; |
| | | private final String message; |
| | | |
| | | ShopStatus(Integer code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.api.domain.SeckillActivityInfo; |
| | | import com.ruoyi.other.vo.SeckillActivityDetailVO; |
| | | import com.ruoyi.other.vo.SeckillActivityVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface SeckillActivityInfoMapper extends BaseMapper<SeckillActivityInfo> { |
| | | |
| | | List<SeckillActivityVO> listSeckillActivity(Goods goods); |
| | | |
| | | SeckillActivityDetailVO selectDetail(Integer seckillActivityId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.vo.NearbyShopVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ShopMapper extends BaseMapper<Shop> { |
| | | |
| | | List<NearbyShopVO> selectNearbyShopList(String longitude, String latitude); |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.ShoppingCart; |
| | | |
| | | public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> { |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.TechnicianSubscribe; |
| | | import com.ruoyi.other.vo.TechnicianSubscribeVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TechnicianSubscribeMapper extends BaseMapper<TechnicianSubscribe> { |
| | | |
| | | /** |
| | | * 查看用户预约记录 |
| | | * @param shopId |
| | | * @return |
| | | */ |
| | | public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(@Param("userId") Long userId, |
| | | @Param("shopId") Long shopId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.vo.GoodsVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface GoodsService extends IService<Goods> { |
| | | |
| | | List<GoodsVO> goodsList(Goods goods); |
| | | |
| | | GoodsVO goodsDetail(Long goodsId); |
| | | } |
| | |
| | | package com.ruoyi.other.service; |
| | | |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.api.domain.SeckillActivityInfo; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.other.vo.SeckillActivityDetailVO; |
| | | import com.ruoyi.other.vo.SeckillActivityVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface SeckillActivityInfoService extends IService<SeckillActivityInfo> { |
| | | |
| | | List<SeckillActivityVO> listSeckillActivity(Goods goods); |
| | | |
| | | SeckillActivityDetailVO detail(Integer seckillActivityId); |
| | | } |
| | |
| | | * @since 2024-11-20 |
| | | */ |
| | | public interface ShareService extends IService<Share> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.vo.NearbyShopVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ShopService extends IService<Shop> { |
| | | |
| | | List<NearbyShopVO> nearbyShopList(String longitude, String latitude); |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.other.api.domain.ShoppingCart; |
| | | |
| | | public interface ShoppingCartService extends IService<ShoppingCart> { |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.other.api.domain.TechnicianSubscribe; |
| | | import com.ruoyi.other.vo.TechnicianSubscribeVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TechnicianSubscribeService extends IService<TechnicianSubscribe> { |
| | | |
| | | /** |
| | | * 查询用于指定门店的相关预约记录 |
| | | */ |
| | | List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.other.mapper.GoodsMapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.enums.GoodsStatus; |
| | | import com.ruoyi.other.mapper.GoodsMapper; |
| | | import com.ruoyi.other.service.GoodsService; |
| | | import com.ruoyi.other.vo.GoodsVO; |
| | | import feignClient.RemoteOrderGoodsClient; |
| | | import model.OrderGood; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService { |
| | | @Resource |
| | | private RemoteOrderGoodsClient orderGoodsClient; |
| | | |
| | | @Override |
| | | public List<GoodsVO> goodsList(Goods search) { |
| | | List<Goods> goodsList = this.list(new LambdaQueryWrapper<Goods>() |
| | | .eq(Goods::getStatus, GoodsStatus.UP) |
| | | .eq(Objects.nonNull(search.getGoodsCategoryId()) ,Goods::getGoodsCategoryId, search.getGoodsCategoryId()) |
| | | .like(StringUtils.isNotEmpty(search.getName()), Goods::getName, search.getName())); |
| | | |
| | | List<GoodsVO> result = new ArrayList<>(); |
| | | for (Goods goods : goodsList) { |
| | | GoodsVO goodsVO = new GoodsVO(); |
| | | BeanUtils.copyBeanProp(goodsVO, goods); |
| | | result.add(goodsVO); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public GoodsVO goodsDetail(Long goodsId) { |
| | | // TODO 根据会员等级展示价格 |
| | | Goods goods = this.getById(goodsId); |
| | | if (Objects.nonNull(goods)){ |
| | | GoodsVO goodsVO = new GoodsVO(); |
| | | BeanUtils.copyBeanProp(goodsVO, goods); |
| | | return goodsVO; |
| | | } |
| | | return new GoodsVO(); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.other.mapper.SeckillActivityInfoMapper; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.api.domain.GoodsShop; |
| | | import com.ruoyi.other.api.domain.SeckillActivityInfo; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.mapper.GoodsShopMapper; |
| | | import com.ruoyi.other.mapper.SeckillActivityInfoMapper; |
| | | import com.ruoyi.other.mapper.ShopMapper; |
| | | import com.ruoyi.other.service.SeckillActivityInfoService; |
| | | import com.ruoyi.other.vo.SeckillActivityDetailVO; |
| | | import com.ruoyi.other.vo.SeckillActivityVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class SeckillActivityInfoServiceImpl extends ServiceImpl<SeckillActivityInfoMapper, SeckillActivityInfo> implements SeckillActivityInfoService { |
| | | @Resource |
| | | private SeckillActivityInfoMapper seckillActivityInfoMapper; |
| | | @Resource |
| | | private GoodsShopMapper goodsShopMapper; |
| | | @Resource |
| | | private ShopMapper shopMapper; |
| | | |
| | | @Override |
| | | public List<SeckillActivityVO> listSeckillActivity(Goods goods) { |
| | | return seckillActivityInfoMapper.listSeckillActivity(goods); |
| | | } |
| | | |
| | | @Override |
| | | public SeckillActivityDetailVO detail(Integer seckillActivityId) { |
| | | SeckillActivityDetailVO seckillActivityDetailVO = seckillActivityInfoMapper.selectDetail(seckillActivityId); |
| | | Long goodsId = seckillActivityDetailVO.getGoodsId(); |
| | | |
| | | List<Integer> shopIdList = goodsShopMapper.selectList(new LambdaQueryWrapper<GoodsShop>() |
| | | .eq(GoodsShop::getGoodsId, goodsId)).stream().map(GoodsShop::getShopId).collect(Collectors.toList()); |
| | | |
| | | List<String> shopNames = shopMapper.selectObjs(new LambdaQueryWrapper<Shop>() |
| | | .select(Shop::getName) |
| | | .in(Shop::getId, shopIdList)) |
| | | .stream() |
| | | .map(Object::toString) |
| | | .collect(Collectors.toList()); |
| | | seckillActivityDetailVO.setShopList(shopNames); |
| | | return seckillActivityDetailVO; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Service |
| | | public class ShareServiceImpl extends ServiceImpl<ShareMapper, Share> implements ShareService { |
| | | |
| | | } |
| | |
| | | import com.ruoyi.other.mapper.ShopMapper; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.service.ShopService; |
| | | import com.ruoyi.other.vo.NearbyShopVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements ShopService { |
| | | @Resource |
| | | private ShopMapper shopMapper; |
| | | |
| | | @Override |
| | | public List<NearbyShopVO> nearbyShopList(String longitude, String latitude) { |
| | | return shopMapper.selectNearbyShopList(longitude,latitude); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.other.api.domain.ShoppingCart; |
| | | import com.ruoyi.other.mapper.ShoppingCartMapper; |
| | | import com.ruoyi.other.service.ShoppingCartService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartMapper, ShoppingCart> implements ShoppingCartService { |
| | | } |
| | |
| | | import com.ruoyi.other.mapper.TechnicianSubscribeMapper; |
| | | import com.ruoyi.other.api.domain.TechnicianSubscribe; |
| | | import com.ruoyi.other.service.TechnicianSubscribeService; |
| | | import com.ruoyi.other.vo.TechnicianSubscribeVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class TechnicianSubscribeServiceImpl extends ServiceImpl<TechnicianSubscribeMapper, TechnicianSubscribe> implements TechnicianSubscribeService { |
| | | @Resource |
| | | private TechnicianSubscribeMapper technicianSubscribeMapper; |
| | | |
| | | @Override |
| | | public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId) { |
| | | return technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(userId, shopId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @ApiModel(value="商品热销对象", description="热门商品") |
| | | @Data |
| | | public class GoodsVO { |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | private Long goodsId; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "限购数量(-1不限购)") |
| | | private Integer purchaseLimit; |
| | | |
| | | @ApiModelProperty(value = "类型(1=服务商品,2=单品商品)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "商品简介") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty(value = "商品详情") |
| | | private String detail; |
| | | |
| | | @ApiModelProperty(value = "封面图") |
| | | private String homePagePicture; |
| | | |
| | | @ApiModelProperty(value = "详情图,多个逗号分隔") |
| | | private String detailPicture; |
| | | |
| | | @ApiModelProperty(value = "积分支付(0=否,1=是)") |
| | | private Integer pointPayment; |
| | | |
| | | @ApiModelProperty(value = "基础积分") |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | |
| | | @ApiModelProperty(value = "划线价") |
| | | private BigDecimal originalPrice; |
| | | |
| | | @ApiModelProperty(value = "基础售价") |
| | | private BigDecimal sellingPrice; |
| | | |
| | | @ApiModelProperty(value = "已售数量") |
| | | private Integer saleNum; |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value="首页用户信息", description="") |
| | | public class Home { |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @ApiModelProperty(value = "头像") |
| | | private String avatar; |
| | | /** |
| | | * 上级 |
| | | */ |
| | | @ApiModelProperty(value = "上级") |
| | | private String parentName; |
| | | /** |
| | | * 绑定店铺 |
| | | */ |
| | | @ApiModelProperty(value = "绑定店铺") |
| | | private String shopName; |
| | | |
| | | /** |
| | | * 普通会员数量 |
| | | */ |
| | | @ApiModelProperty(value = "普通会员数量") |
| | | private Integer ordinaryMemberNum; |
| | | |
| | | /** |
| | | * 黄金会员数量 |
| | | */ |
| | | @ApiModelProperty(value = "黄金会员数量") |
| | | private Integer goldenMemberNum; |
| | | |
| | | /** |
| | | * 钻石会员数量 |
| | | */ |
| | | @ApiModelProperty(value = "钻石会员数量") |
| | | private Integer diamondMemberNum; |
| | | |
| | | /** |
| | | * 代理数量 |
| | | */ |
| | | @ApiModelProperty(value = "代理数量") |
| | | private Integer agentNum; |
| | | |
| | | /** |
| | | * 准代理数量 |
| | | */ |
| | | @ApiModelProperty(value = "准代理数量") |
| | | private Integer proxyNum; |
| | | |
| | | /** |
| | | * 总代理数量 |
| | | */ |
| | | @ApiModelProperty(value = "总代理数量") |
| | | private Integer totalAgentNum; |
| | | |
| | | /** |
| | | * 合伙人数量 |
| | | */ |
| | | @ApiModelProperty(value = "合伙人数量") |
| | | private Integer partnerNum; |
| | | |
| | | /** |
| | | * 营业时间 |
| | | */ |
| | | @ApiModelProperty(value = "营业星期") |
| | | private String businessDate; |
| | | |
| | | /** |
| | | * 评分 |
| | | */ |
| | | @ApiModelProperty(value = "评分") |
| | | private Integer score; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @ApiModelProperty(value = "经度") |
| | | private String longitude; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @ApiModelProperty(value = "纬度") |
| | | private String latitude; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class NearbyShopVO { |
| | | |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "封面图片") |
| | | private String homePicture; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "详细地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "距离") |
| | | private String distance; |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SeckillActivityDetailVO extends SeckillActivityVO{ |
| | | |
| | | @ApiModelProperty(value = "产品id") |
| | | private Long goodsId; |
| | | |
| | | @ApiModelProperty(value = "详情图,多个逗号分隔") |
| | | private String detailPicture; |
| | | |
| | | @ApiModelProperty(value = "活动结束日期") |
| | | private LocalDateTime endTime; |
| | | |
| | | @ApiModelProperty(value = "可用门店") |
| | | private List<String> shopList; |
| | | |
| | | @ApiModelProperty(value = "商品详情") |
| | | private String detail; |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | public class SeckillActivityVO { |
| | | |
| | | @ApiModelProperty(value = "活动id") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "商品简介") |
| | | private String introduction; |
| | | |
| | | @ApiModelProperty(value = "封面图") |
| | | private String homePagePicture; |
| | | |
| | | @ApiModelProperty(value = "划线价") |
| | | private BigDecimal originalPrice; |
| | | |
| | | @ApiModelProperty(value = "基础售价") |
| | | private BigDecimal sellingPrice; |
| | | |
| | | @ApiModelProperty(value = "已售数量") |
| | | private Integer saleNum; |
| | | |
| | | @ApiModelProperty(value = "开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Integer startTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel(value="技师预约对象", description="") |
| | | public class TechnicianSubscribeVO { |
| | | |
| | | /** |
| | | * 门店名称 |
| | | */ |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | /** |
| | | * 门店地址 |
| | | */ |
| | | @ApiModelProperty(value = "门店地址") |
| | | private String shopAddress; |
| | | |
| | | /** |
| | | * 用户地址 |
| | | */ |
| | | @ApiModelProperty(value = "用户地址") |
| | | private String userAddress; |
| | | |
| | | /** |
| | | * 技师名字 |
| | | */ |
| | | @ApiModelProperty(value = "技师名字") |
| | | private String technicianName; |
| | | |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @ApiModelProperty(value = "预约时间") |
| | | private LocalDateTime subscribeTime; |
| | | |
| | | /** |
| | | * 服务方式:1=上门服务,2=到店服务 |
| | | */ |
| | | @ApiModelProperty(value = "服务方式:1=上门服务,2=到店服务") |
| | | private Integer serviceMode; |
| | | |
| | | /** |
| | | * 预约状态:0=待服务,1=已服务,2=已取消 |
| | | */ |
| | | @ApiModelProperty(value = "预约状态:0=待服务,1=已服务,2=已取消") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value="变更明细", description="") |
| | | public class WalletChangeVO { |
| | | |
| | | @ApiModelProperty(value = "变更类型:1-充值 2-提现 3-红包 4-分佣 5商城购物") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "变更时间") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date changeTime; |
| | | |
| | | @ApiModelProperty(value = "分佣消费金额") |
| | | private BigDecimal price; |
| | | } |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 192.168.110.169:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: cdf47c5f-2bf9-4dec-a616-a8dc653aceb9 |
| | |
| | | password: nacos |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 192.168.110.169:8848 |
| | | namespace: cdf47c5f-2bf9-4dec-a616-a8dc653aceb9 |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 192.168.110.169:8848 |
| | | service: ${spring.application.name} |
| | | group: DEFAULT_GROUP |
| | | namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 192.168.110.169:8848 |
| | | namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce |
| | | group: DEFAULT_GROUP |
| | | name: ${spring.application.name} |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.other.mapper.GoodsMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.other.mapper.SeckillActivityInfoMapper"> |
| | | |
| | | <select id="listSeckillActivity" resultType="com.ruoyi.other.vo.SeckillActivityVO"> |
| | | SELECT |
| | | tsai.id, |
| | | tg.`name`, |
| | | tg.introduction, |
| | | tg.home_page_picture, |
| | | tg.original_price, |
| | | tgs.selling_price, |
| | | tg.sale_num, |
| | | tsai.start_time |
| | | FROM |
| | | t_seckill_activity_info tsai |
| | | LEFT JOIN t_goods tg ON tsai.good_id = tg.id |
| | | LEFT JOIN t_goods_seckill tgs ON tgs.goods_id = tg.id |
| | | WHERE tsai.end_time >= NOW() |
| | | <if test="goodsName != null and goodsName != ''"> |
| | | AND tg.`name` LIKE concat('%',#{goodsName},'%') |
| | | </if> |
| | | <if test="goodsCategoryId != null"> |
| | | AND tg.goods_category_id = #{goodsCategoryId} |
| | | </if> |
| | | </select> |
| | | <select id="selectDetail" resultType="com.ruoyi.other.vo.SeckillActivityDetailVO"> |
| | | SELECT |
| | | tsai.id, |
| | | tg.`name`, |
| | | tg.introduction, |
| | | tg.home_page_picture, |
| | | tg.original_price, |
| | | tgs.selling_price, |
| | | tg.sale_num, |
| | | tsai.start_time, |
| | | tg.detail_picture, |
| | | tsal.end_time, |
| | | tg.detail |
| | | FROM |
| | | t_seckill_activity_info tsai |
| | | LEFT JOIN t_goods tg ON tsai.good_id = tg.id |
| | | LEFT JOIN t_goods_seckill tgs ON tgs.goods_id = tg.id |
| | | WHERE tsai.id = #{seckillActivityId} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.other.mapper.ShopMapper"> |
| | | |
| | | <select id="selectNearbyShopList" resultType="com.ruoyi.other.vo.NearbyShopVO"> |
| | | |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.other.mapper.ShoppingCartMapper"> |
| | | |
| | | <select id="selectNearbyShopList" resultType="com.ruoyi.other.vo.NearbyShopVO"> |
| | | |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.other.mapper.TechnicianSubscribeMapper"> |
| | | |
| | | <select id="getTechnicianSubscribeByUserAndShop" |
| | | resultType="com.ruoyi.other.vo.TechnicianSubscribeVO"> |
| | | SELECT |
| | | tts.user_address, |
| | | ts.`name` shopName, |
| | | ts.address shopAddress, |
| | | tt.name technicianName, |
| | | tts.subscribe_time, |
| | | tts.service_mode, |
| | | tts.status |
| | | FROM |
| | | t_technician_subscribe tts |
| | | LEFT JOIN t_technician tt ON tts.technician_id = tt.id AND tt.del_flag = 0 |
| | | LEFT JOIN t_shop ts ON tt.shop_id = ts.id AND ts.del_flag = 0 |
| | | WHERE |
| | | ( (ts.app_user_id = #{userId} AND ts.id = #{shopId}) |
| | | OR |
| | | (tt.app_user_id = #{userId} AND ts.id = #{shopId})) |
| | | AND tts.del_flag = 0 |
| | | ORDER BY tts.create_time DESC |
| | | </select> |
| | | </mapper> |