This commit is contained in:
tangzh 2025-03-05 22:32:22 +08:00
parent afcaf8b201
commit 97cae5e6b6
14 changed files with 733 additions and 737 deletions

View File

@ -71,6 +71,6 @@ public class Home implements Serializable {
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private List<HomeProducts> hpList; private List<HomeProducts> products;
} }

View File

@ -16,8 +16,8 @@ public class SetMealFloorResponse implements Serializable {
private static final long serialVersionUID=1L; private static final long serialVersionUID=1L;
@ApiModelProperty(value = "id") @ApiModelProperty(value = "homeId")
private Integer id; private Integer homeId;
@ApiModelProperty(value = "名称") @ApiModelProperty(value = "名称")
private String name; private String name;
@ -37,6 +37,6 @@ public class SetMealFloorResponse implements Serializable {
@ApiModelProperty(value = "跳转类型") @ApiModelProperty(value = "跳转类型")
private String jumpType; private String jumpType;
private Object obj; private Object homeProducts;
} }

View File

@ -59,6 +59,6 @@ public class HomeVo implements Serializable {
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private List<HomeProductVo> hpList; private List<HomeProductVo> products;
} }

View File

@ -1,112 +1,112 @@
package com.zbkj.front.controller; //package com.zbkj.front.controller;
//
import com.zbkj.common.page.CommonPage; //import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.ActivityListRequest; //import com.zbkj.common.request.ActivityListRequest;
import com.zbkj.common.response.ArticleResponse; //import com.zbkj.common.response.ArticleResponse;
import com.zbkj.common.response.CommonResult; //import com.zbkj.common.response.CommonResult;
import com.zbkj.common.request.PageParamRequest; //import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.model.article.Article; //import com.zbkj.common.model.article.Article;
import com.zbkj.common.model.category.Category; //import com.zbkj.common.model.category.Category;
import com.zbkj.service.service.ArticleService; //import com.zbkj.service.service.ArticleService;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; //import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; //import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; //import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; //import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
//
//
/** ///**
* 文章 // * 文章
//
*/ // */
@Slf4j //@Slf4j
@RestController("ArticleFrontController") //@RestController("ArticleFrontController")
@RequestMapping("api/front/article") //@RequestMapping("api/front/article")
@Api(tags = "文章") //@Api(tags = "文章")
public class ArticleController { //public class ArticleController {
//
@Autowired // @Autowired
private ArticleService articleService; // private ArticleService articleService;
//
//
//
/** // /**
* 分页列表 原来文章接口 // * 分页列表 原来文章接口
*/ // */
@ApiOperation(value = "分页列表") // @ApiOperation(value = "分页列表")
@RequestMapping(value = "/list/{cid}", method = RequestMethod.GET) // @RequestMapping(value = "/list/{cid}", method = RequestMethod.GET)
public CommonResult<CommonPage<ArticleResponse>> getListArticle(@PathVariable(name="cid") String cid, // public CommonResult<CommonPage<ArticleResponse>> getListArticle(@PathVariable(name="cid") String cid,
@Validated PageParamRequest pageParamRequest) { // @Validated PageParamRequest pageParamRequest) {
return CommonResult.success(CommonPage.restPage(articleService.getListArticle(cid, pageParamRequest))); // return CommonResult.success(CommonPage.restPage(articleService.getListArticle(cid, pageParamRequest)));
} // }
//
//
//
/** // /**
* 分页列表 // * 分页列表
*/ // */
@ApiOperation(value = "分页列表") // @ApiOperation(value = "分页列表")
@RequestMapping(value = "/list", method = RequestMethod.GET) // @RequestMapping(value = "/list", method = RequestMethod.GET)
public CommonResult<CommonPage<ArticleResponse>> getList(@Validated ActivityListRequest request, // public CommonResult<CommonPage<ArticleResponse>> getList(@Validated ActivityListRequest request,
@Validated PageParamRequest pageParamRequest) { // @Validated PageParamRequest pageParamRequest) {
return CommonResult.success(CommonPage.restPage(articleService.getList(request, pageParamRequest))); // return CommonResult.success(CommonPage.restPage(articleService.getList(request, pageParamRequest)));
} // }
//
/** // /**
* 热门列表 // * 热门列表
*/ // */
@ApiOperation(value = "热门列表") // @ApiOperation(value = "热门列表")
@RequestMapping(value = "/hot/list", method = RequestMethod.GET) // @RequestMapping(value = "/hot/list", method = RequestMethod.GET)
public CommonResult<CommonPage<ArticleResponse>> getHotList() { // public CommonResult<CommonPage<ArticleResponse>> getHotList() {
return CommonResult.success(CommonPage.restPage(articleService.getHotList())); // return CommonResult.success(CommonPage.restPage(articleService.getHotList()));
} // }
//
/** // /**
* 轮播列表 // * 轮播列表
*/ // */
@ApiOperation(value = "轮播列表") // @ApiOperation(value = "轮播列表")
@RequestMapping(value = "/banner/list", method = RequestMethod.GET) // @RequestMapping(value = "/banner/list", method = RequestMethod.GET)
public CommonResult<CommonPage<Article>> getList() { // public CommonResult<CommonPage<Article>> getList() {
return CommonResult.success(CommonPage.restPage(articleService.getBannerList())); // return CommonResult.success(CommonPage.restPage(articleService.getBannerList()));
} // }
//
/** // /**
* 文章分类列表 // * 文章分类列表
*/ // */
@ApiOperation(value = "文章分类列表") // @ApiOperation(value = "文章分类列表")
@RequestMapping(value = "/category/list", method = RequestMethod.GET) // @RequestMapping(value = "/category/list", method = RequestMethod.GET)
public CommonResult<CommonPage<Category>> categoryList() { // public CommonResult<CommonPage<Category>> categoryList() {
return CommonResult.success(CommonPage.restPage(articleService.getCategoryList())); // return CommonResult.success(CommonPage.restPage(articleService.getCategoryList()));
} // }
//
/** // /**
* 查询文章详情 // * 查询文章详情
* @param id Integer // * @param id Integer
*/ // */
@ApiOperation(value = "详情") // @ApiOperation(value = "详情")
@RequestMapping(value = "/info", method = RequestMethod.GET) // @RequestMapping(value = "/info", method = RequestMethod.GET)
@ApiImplicitParam(name="id", value="文章ID") // @ApiImplicitParam(name="id", value="文章ID")
public CommonResult<ArticleResponse> info(@RequestParam(value = "id") Integer id) { // public CommonResult<ArticleResponse> info(@RequestParam(value = "id") Integer id) {
return CommonResult.success(articleService.getVoByFront(id)); // return CommonResult.success(articleService.getVoByFront(id));
} // }
//
/** // /**
* 文章点赞 // * 文章点赞
* @param id Integer // * @param id Integer
*/ // */
@ApiOperation(value = "点赞/取消点赞") // @ApiOperation(value = "点赞/取消点赞")
@RequestMapping(value = "/praise", method = RequestMethod.GET) // @RequestMapping(value = "/praise", method = RequestMethod.GET)
@ApiImplicitParam(name="id", value="文章ID") // @ApiImplicitParam(name="id", value="文章ID")
public CommonResult<Boolean> praise(@RequestParam(value = "id") Integer id) { // public CommonResult<Boolean> praise(@RequestParam(value = "id") Integer id) {
if (articleService.praise(id)) { // if (articleService.praise(id)) {
return CommonResult.success(); // return CommonResult.success();
} else { // } else {
return CommonResult.failed(); // return CommonResult.failed();
} // }
} // }
} //}
//
//
//

View File

@ -30,7 +30,7 @@ import java.util.Map;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("api/front/cart") @RequestMapping("api/front/cart")
@Api(tags = "商品 -- 购物车") //配合swagger使用 @Api(tags = "购物车") //配合swagger使用
public class CartController { public class CartController {
@Autowired @Autowired

View File

@ -36,31 +36,26 @@ public class IndexController {
private IndexService indexService; private IndexService indexService;
/** /**
* 首页数据c * 首页数据
*/ */
@RequestMapping(value = "/index", method = RequestMethod.GET) @RequestMapping(value = "/index", method = RequestMethod.GET)
@ApiOperation(value="首页数据", notes="首页数据" @ApiOperation(value="首页数据", notes="首页数据"
+ " \n \n" + " \n \n"
+ "响应参数:" + " \n" + "响应参数:" + " \n"
+ "homeList首页顶部滚动图" + " \n" + "homeList楼层" + " \n"
+ " --> name名称" + " \n"
+ " --> title标题" + " \n"
+ " --> directUrl列表路径\"" + " \n"
+ " --> image图片" + " \n" + " --> image图片" + " \n"
+ " --> jump_url跳转路径" + " \n" + " --> jumpIds跳转idlist_ids/product_id" + " \n"
+ "navigation导航栏" + " \n" + " --> jumpType跳转类型1列表0详情" + " \n"
+ " --> image图片" + " \n" + " -->--> products商品" + " \n"
+ " --> jump_url跳转路径" + " \n" + " -->-->--> productId产品id" + " \n"
+ "shardingTitle1诗韵嘉木【标题】shardingTitle2优选/活动/视频【标题】shardingTitle3热门推荐【标题】" + " \n" + " -->-->--> imgUrl图片" + " \n"
+ " --> image图片" + " \n" + " -->-->--> directUrl跳转地址" + " \n"
+ " --> jump_url【更多>】跳转链接" + " \n" + "logoUrl企业logo" + " \n"
+ " --> data_type数据类型(1静态数据2动态数据)" + " \n" + "consumerHotline客服电话" + " \n"
+ " --> static_api静态数据api" + " \n" + "telephoneServiceSwitch客服电话服务开关" + " \n"
+ " --> dynamic_api动态数据api" + " \n"
+ "menus菜单栏" + " \n"
+ " --> image图片" + " \n"
+ " --> jump_url跳转路径" + " \n"
+ "gamePrizeDrawId抽奖游戏若存在有效返回id【抽奖接口需要用】否则null" + " \n"
+ "gameTreeId农场游戏若存在有效返回id【抽奖接口需要用】否则null" + " \n"
+ "longitude场地预约-经度" + " \n"
+ "latitude场地预约-纬度" + " \n"
) )
public CommonResult<IndexInfoResponse> getIndexInfo() { public CommonResult<IndexInfoResponse> getIndexInfo() {
return CommonResult.success(indexService.getIndexInfo()); return CommonResult.success(indexService.getIndexInfo());
@ -73,7 +68,6 @@ public class IndexController {
@RequestMapping(value = "/index/product/{type}", method = RequestMethod.GET) @RequestMapping(value = "/index/product/{type}", method = RequestMethod.GET)
@ApiImplicitParam(name = "type", value = "类型 【1 精品推荐 2 热门榜单 3首发新品 4促销单品】", dataType = "int", required = true) @ApiImplicitParam(name = "type", value = "类型 【1 精品推荐 2 热门榜单 3首发新品 4促销单品】", dataType = "int", required = true)
public CommonResult<CommonPage<IndexProductResponse>> getProductList(@PathVariable(value = "type") Integer type, PageParamRequest pageParamRequest) { public CommonResult<CommonPage<IndexProductResponse>> getProductList(@PathVariable(value = "type") Integer type, PageParamRequest pageParamRequest) {
return CommonResult.success(indexService.findIndexProductList(type, pageParamRequest)); return CommonResult.success(indexService.findIndexProductList(type, pageParamRequest));
} }
@ -95,23 +89,23 @@ public class IndexController {
return CommonResult.success(indexService.getShareConfig()); return CommonResult.success(indexService.getShareConfig());
} }
/** // /**
* 颜色配置 // * 颜色配置
*/ // */
@ApiOperation(value = "颜色配置") // @ApiOperation(value = "颜色配置")
@RequestMapping(value = "/index/color/config", method = RequestMethod.GET) // @RequestMapping(value = "/index/color/config", method = RequestMethod.GET)
public CommonResult<SystemConfig> getColorConfig() { // public CommonResult<SystemConfig> getColorConfig() {
return CommonResult.success(indexService.getColorConfig()); // return CommonResult.success(indexService.getColorConfig());
} // }
/** // /**
* 版本信息 // * 版本信息
*/ // */
@ApiOperation(value = "获取版本信息") // @ApiOperation(value = "获取版本信息")
@RequestMapping(value = "/index/get/version", method = RequestMethod.GET) // @RequestMapping(value = "/index/get/version", method = RequestMethod.GET)
public CommonResult<Map<String, Object>> getVersion() { // public CommonResult<Map<String, Object>> getVersion() {
return CommonResult.success(indexService.getVersion()); // return CommonResult.success(indexService.getVersion());
} // }
/** /**
* 全局本地图片域名 * 全局本地图片域名

View File

@ -1,86 +1,86 @@
package com.zbkj.front.controller; //package com.zbkj.front.controller;
//
//
import com.zbkj.common.request.LoginMobileRequest; //import com.zbkj.common.request.LoginMobileRequest;
import com.zbkj.common.request.LoginRequest; //import com.zbkj.common.request.LoginRequest;
import com.zbkj.common.response.CommonResult; //import com.zbkj.common.response.CommonResult;
import com.zbkj.common.response.LoginResponse; //import com.zbkj.common.response.LoginResponse;
import com.zbkj.front.service.LoginService; //import com.zbkj.front.service.LoginService;
import com.zbkj.service.service.SmsService; //import com.zbkj.service.service.SmsService;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; //import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; //import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; //import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; //import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; //import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
//
import javax.servlet.http.HttpServletRequest; //import javax.servlet.http.HttpServletRequest;
//
/** ///**
* 用户登陆 前端控制器 // * 用户登陆 前端控制器
//
*/ // */
@Slf4j //@Slf4j
@RestController("FrontLoginController") //@RestController("FrontLoginController")
@RequestMapping("api/front") //@RequestMapping("api/front")
@Api(tags = "用户 -- 登录注册") //@Api(tags = "用户 -- 登录注册")
public class LoginController { //public class LoginController {
//
@Autowired // @Autowired
private SmsService smsService; // private SmsService smsService;
//
@Autowired // @Autowired
private LoginService loginService; // private LoginService loginService;
//
/** // /**
* 手机号登录接口 // * 手机号登录接口
*/ // */
@ApiOperation(value = "手机号登录接口") // @ApiOperation(value = "手机号登录接口")
@RequestMapping(value = "/login/mobile", method = RequestMethod.POST) // @RequestMapping(value = "/login/mobile", method = RequestMethod.POST)
public CommonResult<LoginResponse> phoneLogin(@RequestBody @Validated LoginMobileRequest loginRequest) { // public CommonResult<LoginResponse> phoneLogin(@RequestBody @Validated LoginMobileRequest loginRequest) {
return CommonResult.success(loginService.phoneLogin(loginRequest)); // return CommonResult.success(loginService.phoneLogin(loginRequest));
} // }
//
/** // /**
* 账号密码登录 // * 账号密码登录
*/ // */
@ApiOperation(value = "账号密码登录") // @ApiOperation(value = "账号密码登录")
@RequestMapping(value = "/login", method = RequestMethod.POST) // @RequestMapping(value = "/login", method = RequestMethod.POST)
public CommonResult<LoginResponse> login(@RequestBody @Validated LoginRequest loginRequest) { // public CommonResult<LoginResponse> login(@RequestBody @Validated LoginRequest loginRequest) {
return CommonResult.success(loginService.login(loginRequest)); // return CommonResult.success(loginService.login(loginRequest));
} // }
//
//
/** // /**
* 退出登录 // * 退出登录
*/ // */
@ApiOperation(value = "退出") // @ApiOperation(value = "退出")
@RequestMapping(value = "/logout", method = RequestMethod.GET) // @RequestMapping(value = "/logout", method = RequestMethod.GET)
public CommonResult<String> loginOut(HttpServletRequest request){ // public CommonResult<String> loginOut(HttpServletRequest request){
loginService.loginOut(request); // loginService.loginOut(request);
return CommonResult.success(); // return CommonResult.success();
} // }
//
/** // /**
* 发送短信登录验证码 // * 发送短信登录验证码
* @param phone 手机号码 // * @param phone 手机号码
* @return 发送是否成功 // * @return 发送是否成功
*/ // */
@ApiOperation(value = "发送短信登录验证码") // @ApiOperation(value = "发送短信登录验证码")
@RequestMapping(value = "/sendCode", method = RequestMethod.POST) // @RequestMapping(value = "/sendCode", method = RequestMethod.POST)
@ApiImplicitParams({ // @ApiImplicitParams({
@ApiImplicitParam(name="phone", value="手机号码", required = true) // @ApiImplicitParam(name="phone", value="手机号码", required = true)
}) // })
public CommonResult<Object> sendCode(@RequestParam String phone){ // public CommonResult<Object> sendCode(@RequestParam String phone){
if(smsService.sendCommonCode(phone)){ // if(smsService.sendCommonCode(phone)){
return CommonResult.success("发送成功"); // return CommonResult.success("发送成功");
}else{ // }else{
return CommonResult.failed("发送失败"); // return CommonResult.failed("发送失败");
} // }
} // }
} //}
//
//
//

View File

@ -1,65 +1,65 @@
package com.zbkj.front.controller; //package com.zbkj.front.controller;
//
import com.zbkj.common.page.CommonPage; //import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.PageParamRequest; //import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.response.*; //import com.zbkj.common.response.*;
import com.zbkj.service.service.StoreSeckillService; //import com.zbkj.service.service.StoreSeckillService;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; //import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; //import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
//
import java.util.List; //import java.util.List;
//
/** ///**
* SecKillController // * SecKillController
//
*/ // */
@Slf4j //@Slf4j
@RestController //@RestController
@RequestMapping("api/front/seckill") //@RequestMapping("api/front/seckill")
@Api(tags = "秒杀商品") //@Api(tags = "秒杀商品")
public class SecKillController { //public class SecKillController {
//
@Autowired // @Autowired
StoreSeckillService storeSeckillService; // StoreSeckillService storeSeckillService;
//
/** // /**
* 秒杀首页数据 // * 秒杀首页数据
* @return 可秒杀配置 // * @return 可秒杀配置
*/ // */
@ApiOperation(value = "秒杀首页数据") // @ApiOperation(value = "秒杀首页数据")
@RequestMapping(value = "/index", method = RequestMethod.GET) // @RequestMapping(value = "/index", method = RequestMethod.GET)
public CommonResult<SeckillIndexResponse> index() { // public CommonResult<SeckillIndexResponse> index() {
return CommonResult.success(storeSeckillService.getIndexInfo()); // return CommonResult.success(storeSeckillService.getIndexInfo());
} // }
//
/** // /**
* 秒杀Index // * 秒杀Index
* @return 可秒杀配置 // * @return 可秒杀配置
*/ // */
@ApiOperation(value = "秒杀Header") // @ApiOperation(value = "秒杀Header")
@RequestMapping(value = "/header", method = RequestMethod.GET) // @RequestMapping(value = "/header", method = RequestMethod.GET)
public CommonResult<List<SecKillResponse>> header() { // public CommonResult<List<SecKillResponse>> header() {
return CommonResult.success(storeSeckillService.getForH5Index()); // return CommonResult.success(storeSeckillService.getForH5Index());
} // }
//
/** // /**
* 根据时间段查询秒杀信息 // * 根据时间段查询秒杀信息
* @return 查询时间内的秒杀商品列表 // * @return 查询时间内的秒杀商品列表
*/ // */
@ApiOperation(value = "秒杀列表") // @ApiOperation(value = "秒杀列表")
@RequestMapping(value = "/list/{timeId}", method = RequestMethod.GET) // @RequestMapping(value = "/list/{timeId}", method = RequestMethod.GET)
public CommonResult<CommonPage<StoreSecKillH5Response>> list(@PathVariable("timeId") String timeId, @ModelAttribute PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<StoreSecKillH5Response>> list(@PathVariable("timeId") String timeId, @ModelAttribute PageParamRequest pageParamRequest) {
return CommonResult.success(CommonPage.restPage(storeSeckillService.getKillListByTimeId(timeId, pageParamRequest))); // return CommonResult.success(CommonPage.restPage(storeSeckillService.getKillListByTimeId(timeId, pageParamRequest)));
} // }
//
//
@ApiOperation(value = "详情") // @ApiOperation(value = "详情")
@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET) // @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
public CommonResult<StoreSeckillDetailResponse> info(@PathVariable(value = "id") Integer id) { // public CommonResult<StoreSeckillDetailResponse> info(@PathVariable(value = "id") Integer id) {
StoreSeckillDetailResponse storeSeckill = storeSeckillService.getDetailH5(id); // StoreSeckillDetailResponse storeSeckill = storeSeckillService.getDetailH5(id);
return CommonResult.success(storeSeckill); // return CommonResult.success(storeSeckill);
} // }
} //}

View File

@ -22,15 +22,16 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@RestController("StoreController") @RestController("StoreController")
@RequestMapping("api/front/store") @RequestMapping("api/front/store")
@Api(tags = "提货点") @Api(tags = "门店")
public class StoreController { public class StoreController {
@Autowired @Autowired
private SystemStoreService systemStoreService; private SystemStoreService systemStoreService;
/** /**
* 附近的提货点 * 附近的提货点
*/ */
@ApiOperation(value = "附近的提货点") @ApiOperation(value = "附近的门店")
@RequestMapping(value = "/list", method = RequestMethod.POST) @RequestMapping(value = "/list", method = RequestMethod.POST)
public CommonResult<StoreNearResponse> register(@Validated StoreNearRequest request, @Validated PageParamRequest pageParamRequest){ public CommonResult<StoreNearResponse> register(@Validated StoreNearRequest request, @Validated PageParamRequest pageParamRequest){
return CommonResult.success(systemStoreService.getNearList(request, pageParamRequest)); return CommonResult.success(systemStoreService.getNearList(request, pageParamRequest));

View File

@ -34,29 +34,28 @@ public class StoreOrderController {
@Autowired @Autowired
private StoreOrderVerification storeOrderVerification; private StoreOrderVerification storeOrderVerification;
/** // /**
* 核销员核销订单 // * 核销员核销订单
* @param vCode 核销码 // * @param vCode 核销码
* @return // * @return
*/ // */
@ApiOperation(value = "核销员核销订单") // @ApiOperation(value = "核销员核销订单")
@RequestMapping(value = "/writeUpdate/{vCode}", method = RequestMethod.GET) // @RequestMapping(value = "/writeUpdate/{vCode}", method = RequestMethod.GET)
public CommonResult<Object> verificationOrder(@PathVariable String vCode) { // public CommonResult<Object> verificationOrder(@PathVariable String vCode) {
return CommonResult.success(storeOrderVerification.prosecutorVerificationOrderByCode(vCode)); // return CommonResult.success(storeOrderVerification.prosecutorVerificationOrderByCode(vCode));
} // }
//
/** // /**
* 核销码查询待核销订单 // * 核销码查询待核销订单
* @param vCode 核销码 // * @param vCode 核销码
* @return // * @return
*/ // */
@PreAuthorize("hasAuthority('admin:order:write:confirm')") // @ApiOperation(value = "核销码查询待核销订单")
@ApiOperation(value = "核销码查询待核销订单") // @RequestMapping(value = "/writeConfirm/{vCode}", method = RequestMethod.GET)
@RequestMapping(value = "/writeConfirm/{vCode}", method = RequestMethod.GET) // public CommonResult<Object> verificationConfirmOrder(
public CommonResult<Object> verificationConfirmOrder( // @PathVariable String vCode) {
@PathVariable String vCode) { // return CommonResult.success(storeOrderVerification.getVerificationOrderByCode(vCode));
return CommonResult.success(storeOrderVerification.getVerificationOrderByCode(vCode)); // }
}
/** /**
* 预下单 * 预下单

View File

@ -43,14 +43,15 @@ public class UserController {
@Autowired @Autowired
private UserCenterService userCenterService; private UserCenterService userCenterService;
/**
* 修改密码 // /**
*/ // * 修改密码
@ApiOperation(value = "手机号修改密码") // */
@RequestMapping(value = "/register/reset", method = RequestMethod.POST) // @ApiOperation(value = "手机号修改密码")
public CommonResult<Boolean> password(@RequestBody @Validated PasswordRequest request) { // @RequestMapping(value = "/register/reset", method = RequestMethod.POST)
return CommonResult.success(userService.password(request)); // public CommonResult<Boolean> password(@RequestBody @Validated PasswordRequest request) {
} // return CommonResult.success(userService.password(request));
// }
/** /**
* 修改个人资料 * 修改个人资料
@ -73,23 +74,23 @@ public class UserController {
return CommonResult.success(userService.getUserCenter()); return CommonResult.success(userService.getUserCenter());
} }
/** // /**
* 换绑手机号校验 // * 换绑手机号校验
*/ // */
@ApiOperation(value = "换绑手机号校验") // @ApiOperation(value = "换绑手机号校验")
@RequestMapping(value = "update/binding/verify", method = RequestMethod.POST) // @RequestMapping(value = "update/binding/verify", method = RequestMethod.POST)
public CommonResult<Boolean> updatePhoneVerify(@RequestBody @Validated UserBindingPhoneUpdateRequest request) { // public CommonResult<Boolean> updatePhoneVerify(@RequestBody @Validated UserBindingPhoneUpdateRequest request) {
return CommonResult.success(userService.updatePhoneVerify(request)); // return CommonResult.success(userService.updatePhoneVerify(request));
} // }
/** // /**
* 绑定手机号 // * 绑定手机号
*/ // */
@ApiOperation(value = "换绑手机号") // @ApiOperation(value = "换绑手机号")
@RequestMapping(value = "update/binding", method = RequestMethod.POST) // @RequestMapping(value = "update/binding", method = RequestMethod.POST)
public CommonResult<Boolean> updatePhone(@RequestBody @Validated UserBindingPhoneUpdateRequest request) { // public CommonResult<Boolean> updatePhone(@RequestBody @Validated UserBindingPhoneUpdateRequest request) {
return CommonResult.success(userService.updatePhone(request)); // return CommonResult.success(userService.updatePhone(request));
} // }
/** /**
* 用户中心菜单 * 用户中心菜单
@ -100,196 +101,196 @@ public class UserController {
return CommonResult.success(systemGroupDataService.getMenuUser()); return CommonResult.success(systemGroupDataService.getMenuUser());
} }
/** // /**
* 推广数据接口(昨天的佣金 累计提现金额 当前佣金) // * 推广数据接口(昨天的佣金 累计提现金额 当前佣金)
*/ // */
@ApiOperation(value = "推广数据接口(昨天的佣金 累计提现金额 当前佣金)") // @ApiOperation(value = "推广数据接口(昨天的佣金 累计提现金额 当前佣金)")
@RequestMapping(value = "/commission", method = RequestMethod.GET) // @RequestMapping(value = "/commission", method = RequestMethod.GET)
public CommonResult<UserCommissionResponse> getCommission() { // public CommonResult<UserCommissionResponse> getCommission() {
return CommonResult.success(userCenterService.getCommission()); // return CommonResult.success(userCenterService.getCommission());
} // }
/** // /**
* 推广佣金明细 // * 推广佣金明细
*/ // */
@ApiOperation(value = "推广佣金明细") // @ApiOperation(value = "推广佣金明细")
@RequestMapping(value = "/spread/commission/detail", method = RequestMethod.GET) // @RequestMapping(value = "/spread/commission/detail", method = RequestMethod.GET)
public CommonResult<CommonPage<SpreadCommissionDetailResponse>> getSpreadCommissionDetail(@Validated PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<SpreadCommissionDetailResponse>> getSpreadCommissionDetail(@Validated PageParamRequest pageParamRequest) {
PageInfo<SpreadCommissionDetailResponse> commissionDetail = userCenterService.getSpreadCommissionDetail(pageParamRequest); // PageInfo<SpreadCommissionDetailResponse> commissionDetail = userCenterService.getSpreadCommissionDetail(pageParamRequest);
return CommonResult.success(CommonPage.restPage(commissionDetail)); // return CommonResult.success(CommonPage.restPage(commissionDetail));
} // }
/** // /**
* 推广佣金/提现总和 // * 推广佣金/提现总和
*/ // */
@ApiOperation(value = "推广佣金/提现总和") // @ApiOperation(value = "推广佣金/提现总和")
@RequestMapping(value = "/spread/count/{type}", method = RequestMethod.GET) // @RequestMapping(value = "/spread/count/{type}", method = RequestMethod.GET)
@ApiImplicitParam(name = "type", value = "类型 佣金类型3=佣金,4=提现", allowableValues = "range[3,4]", dataType = "int") // @ApiImplicitParam(name = "type", value = "类型 佣金类型3=佣金,4=提现", allowableValues = "range[3,4]", dataType = "int")
public CommonResult<Map<String, BigDecimal>> getSpreadCountByType(@PathVariable Integer type) { // public CommonResult<Map<String, BigDecimal>> getSpreadCountByType(@PathVariable Integer type) {
Map<String, BigDecimal> map = new HashMap<>(); // Map<String, BigDecimal> map = new HashMap<>();
map.put("count", userCenterService.getSpreadCountByType(type)); // map.put("count", userCenterService.getSpreadCountByType(type));
return CommonResult.success(map); // return CommonResult.success(map);
} // }
/** // /**
* 提现申请 // * 提现申请
*/ // */
@ApiOperation(value = "提现申请") // @ApiOperation(value = "提现申请")
@RequestMapping(value = "/extract/cash", method = RequestMethod.POST) // @RequestMapping(value = "/extract/cash", method = RequestMethod.POST)
public CommonResult<Boolean> extractCash(@RequestBody @Validated UserExtractRequest request) { // public CommonResult<Boolean> extractCash(@RequestBody @Validated UserExtractRequest request) {
return CommonResult.success(userCenterService.extractCash(request)); // return CommonResult.success(userCenterService.extractCash(request));
} // }
//
/** // /**
* 提现记录 // * 提现记录
*/ // */
@ApiOperation(value = "提现记录") // @ApiOperation(value = "提现记录")
@RequestMapping(value = "/extract/record", method = RequestMethod.GET) // @RequestMapping(value = "/extract/record", method = RequestMethod.GET)
public CommonResult<CommonPage<UserExtractRecordResponse>> getExtractRecord(@Validated PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<UserExtractRecordResponse>> getExtractRecord(@Validated PageParamRequest pageParamRequest) {
return CommonResult.success(CommonPage.restPage(userCenterService.getExtractRecord(pageParamRequest))); // return CommonResult.success(CommonPage.restPage(userCenterService.getExtractRecord(pageParamRequest)));
} // }
//
/** // /**
* 提现用户信息 // * 提现用户信息
*/ // */
@ApiOperation(value = "提现用户信息") // @ApiOperation(value = "提现用户信息")
@RequestMapping(value = "/extract/user", method = RequestMethod.GET) // @RequestMapping(value = "/extract/user", method = RequestMethod.GET)
public CommonResult<UserExtractCashResponse> getExtractUser() { // public CommonResult<UserExtractCashResponse> getExtractUser() {
return CommonResult.success(userCenterService.getExtractUser()); // return CommonResult.success(userCenterService.getExtractUser());
} // }
//
/** // /**
* 提现银行 // * 提现银行
*/ // */
@ApiOperation(value = "提现银行/提现最低金额") // @ApiOperation(value = "提现银行/提现最低金额")
@RequestMapping(value = "/extract/bank", method = RequestMethod.GET) // @RequestMapping(value = "/extract/bank", method = RequestMethod.GET)
public CommonResult<List<String>> getExtractBank() { // public CommonResult<List<String>> getExtractBank() {
return CommonResult.success(userCenterService.getExtractBank()); // return CommonResult.success(userCenterService.getExtractBank());
} // }
//
/** // /**
* 会员等级列表 // * 会员等级列表
*/ // */
@ApiOperation(value = "会员等级列表") // @ApiOperation(value = "会员等级列表")
@RequestMapping(value = "/user/level/grade", method = RequestMethod.GET) // @RequestMapping(value = "/user/level/grade", method = RequestMethod.GET)
public CommonResult<List<SystemUserLevel>> getUserLevelList() { // public CommonResult<List<SystemUserLevel>> getUserLevelList() {
return CommonResult.success(userCenterService.getUserLevelList()); // return CommonResult.success(userCenterService.getUserLevelList());
} // }
//
/** // /**
* 推广人统计 // * 推广人统计
*/ // */
@ApiOperation(value = "推广人统计") // @ApiOperation(value = "推广人统计")
@RequestMapping(value = "/spread/people/count", method = RequestMethod.GET) // @RequestMapping(value = "/spread/people/count", method = RequestMethod.GET)
public CommonResult<UserSpreadPeopleResponse> getSpreadPeopleCount() { // public CommonResult<UserSpreadPeopleResponse> getSpreadPeopleCount() {
return CommonResult.success(userCenterService.getSpreadPeopleCount()); // return CommonResult.success(userCenterService.getSpreadPeopleCount());
} // }
//
/** // /**
* 推广人列表 // * 推广人列表
*/ // */
@ApiOperation(value = "推广人列表") // @ApiOperation(value = "推广人列表")
@RequestMapping(value = "/spread/people", method = RequestMethod.GET) // @RequestMapping(value = "/spread/people", method = RequestMethod.GET)
public CommonResult<CommonPage<UserSpreadPeopleItemResponse>> getSpreadPeopleList(@Validated UserSpreadPeopleRequest request, @Validated PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<UserSpreadPeopleItemResponse>> getSpreadPeopleList(@Validated UserSpreadPeopleRequest request, @Validated PageParamRequest pageParamRequest) {
List<UserSpreadPeopleItemResponse> spreadPeopleList = userCenterService.getSpreadPeopleList(request, pageParamRequest); // List<UserSpreadPeopleItemResponse> spreadPeopleList = userCenterService.getSpreadPeopleList(request, pageParamRequest);
CommonPage<UserSpreadPeopleItemResponse> commonPage = CommonPage.restPage(spreadPeopleList); // CommonPage<UserSpreadPeopleItemResponse> commonPage = CommonPage.restPage(spreadPeopleList);
return CommonResult.success(commonPage); // return CommonResult.success(commonPage);
} // }
//
/** // /**
* 用户积分信息 // * 用户积分信息
*/ // */
@ApiOperation(value = "用户积分信息") // @ApiOperation(value = "用户积分信息")
@RequestMapping(value = "/integral/user", method = RequestMethod.GET) // @RequestMapping(value = "/integral/user", method = RequestMethod.GET)
public CommonResult<IntegralUserResponse> getIntegralUser() { // public CommonResult<IntegralUserResponse> getIntegralUser() {
return CommonResult.success(userCenterService.getIntegralUser()); // return CommonResult.success(userCenterService.getIntegralUser());
} // }
//
/** // /**
* 积分记录 // * 积分记录
*/ // */
@ApiOperation(value = "积分记录") // @ApiOperation(value = "积分记录")
@RequestMapping(value = "/integral/list", method = RequestMethod.GET) // @RequestMapping(value = "/integral/list", method = RequestMethod.GET)
public CommonResult<CommonPage<UserIntegralRecord>> getIntegralList(@Validated PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<UserIntegralRecord>> getIntegralList(@Validated PageParamRequest pageParamRequest) {
return CommonResult.success(CommonPage.restPage(userCenterService.getUserIntegralRecordList(pageParamRequest))); // return CommonResult.success(CommonPage.restPage(userCenterService.getUserIntegralRecordList(pageParamRequest)));
} // }
//
/** // /**
* 经验记录 // * 经验记录
*/ // */
@ApiOperation(value = "经验记录") // @ApiOperation(value = "经验记录")
@RequestMapping(value = "/user/expList", method = RequestMethod.GET) // @RequestMapping(value = "/user/expList", method = RequestMethod.GET)
public CommonResult<CommonPage<UserExperienceRecord>> getExperienceList(@Validated PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<UserExperienceRecord>> getExperienceList(@Validated PageParamRequest pageParamRequest) {
return CommonResult.success(CommonPage.restPage(userCenterService.getUserExperienceList(pageParamRequest))); // return CommonResult.success(CommonPage.restPage(userCenterService.getUserExperienceList(pageParamRequest)));
} // }
//
/** // /**
* 用户资金统计 // * 用户资金统计
*/ // */
@ApiOperation(value = "用户资金统计") // @ApiOperation(value = "用户资金统计")
@RequestMapping(value = "/user/balance", method = RequestMethod.GET) // @RequestMapping(value = "/user/balance", method = RequestMethod.GET)
public CommonResult<UserBalanceResponse> getUserBalance() { // public CommonResult<UserBalanceResponse> getUserBalance() {
return CommonResult.success(userCenterService.getUserBalance()); // return CommonResult.success(userCenterService.getUserBalance());
} // }
//
/** // /**
* 推广订单 // * 推广订单
*/ // */
@ApiOperation(value = "推广订单") // @ApiOperation(value = "推广订单")
@RequestMapping(value = "/spread/order", method = RequestMethod.GET) // @RequestMapping(value = "/spread/order", method = RequestMethod.GET)
public CommonResult<UserSpreadOrderResponse> getSpreadOrder(@Validated PageParamRequest pageParamRequest) { // public CommonResult<UserSpreadOrderResponse> getSpreadOrder(@Validated PageParamRequest pageParamRequest) {
return CommonResult.success(userCenterService.getSpreadOrder(pageParamRequest)); // return CommonResult.success(userCenterService.getSpreadOrder(pageParamRequest));
} // }
//
/** // /**
* 推广人排行 // * 推广人排行
* @return List<User> // * @return List<User>
*/ // */
@ApiOperation(value = "推广人排行") // @ApiOperation(value = "推广人排行")
@RequestMapping(value = "/rank", method = RequestMethod.GET) // @RequestMapping(value = "/rank", method = RequestMethod.GET)
public CommonResult<List<User>> getTopSpreadPeopleListByDate(@RequestParam(required = false) String type, @Validated PageParamRequest pageParamRequest) { // public CommonResult<List<User>> getTopSpreadPeopleListByDate(@RequestParam(required = false) String type, @Validated PageParamRequest pageParamRequest) {
return CommonResult.success(userCenterService.getTopSpreadPeopleListByDate(type, pageParamRequest)); // return CommonResult.success(userCenterService.getTopSpreadPeopleListByDate(type, pageParamRequest));
} // }
//
/** // /**
* 佣金排行 // * 佣金排行
* @return 优惠券集合 // * @return 优惠券集合
*/ // */
@ApiOperation(value = "佣金排行") // @ApiOperation(value = "佣金排行")
@RequestMapping(value = "/brokerage_rank", method = RequestMethod.GET) // @RequestMapping(value = "/brokerage_rank", method = RequestMethod.GET)
public CommonResult<List<User>> getTopBrokerageListByDate(@RequestParam String type, @Validated PageParamRequest pageParamRequest) { // public CommonResult<List<User>> getTopBrokerageListByDate(@RequestParam String type, @Validated PageParamRequest pageParamRequest) {
return CommonResult.success(userCenterService.getTopBrokerageListByDate(type, pageParamRequest)); // return CommonResult.success(userCenterService.getTopBrokerageListByDate(type, pageParamRequest));
} // }
//
/** // /**
* 当前用户在佣金排行第几名 // * 当前用户在佣金排行第几名
*/ // */
@ApiOperation(value = "当前用户在佣金排行第几名") // @ApiOperation(value = "当前用户在佣金排行第几名")
@RequestMapping(value = "/user/brokerageRankNumber", method = RequestMethod.GET) // @RequestMapping(value = "/user/brokerageRankNumber", method = RequestMethod.GET)
public CommonResult<Integer> getNumberByTop(@RequestParam String type) { // public CommonResult<Integer> getNumberByTop(@RequestParam String type) {
return CommonResult.success(userCenterService.getNumberByTop(type)); // return CommonResult.success(userCenterService.getNumberByTop(type));
} // }
//
/** // /**
* 海报背景图 // * 海报背景图
*/ // */
@ApiOperation(value = "推广海报图") // @ApiOperation(value = "推广海报图")
@RequestMapping(value = "/user/spread/banner", method = RequestMethod.GET) // @RequestMapping(value = "/user/spread/banner", method = RequestMethod.GET)
public CommonResult<List<UserSpreadBannerResponse>> getSpreadBannerList() { // public CommonResult<List<UserSpreadBannerResponse>> getSpreadBannerList() {
return CommonResult.success(userCenterService.getSpreadBannerList()); // return CommonResult.success(userCenterService.getSpreadBannerList());
} // }
//
/** // /**
* 绑定推广关系登录状态 // * 绑定推广关系登录状态
* @param spreadPid 推广id // * @param spreadPid 推广id
* @return 绑定结果 // * @return 绑定结果
*/ // */
@ApiOperation(value = "绑定推广关系(登录状态)") // @ApiOperation(value = "绑定推广关系(登录状态)")
@RequestMapping(value = "/user/bindSpread", method = RequestMethod.GET) // @RequestMapping(value = "/user/bindSpread", method = RequestMethod.GET)
public CommonResult<Boolean> bindsSpread(Integer spreadPid) { // public CommonResult<Boolean> bindsSpread(Integer spreadPid) {
userService.bindSpread(spreadPid); // userService.bindSpread(spreadPid);
return CommonResult.success(); // return CommonResult.success();
} // }
} }

View File

@ -1,93 +1,93 @@
package com.zbkj.front.controller; //package com.zbkj.front.controller;
//
import com.zbkj.common.constants.Constants; //import com.zbkj.common.constants.Constants;
import com.zbkj.common.page.CommonPage; //import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.PageParamRequest; //import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.request.UserRechargeRequest; //import com.zbkj.common.request.UserRechargeRequest;
import com.zbkj.common.response.CommonResult; //import com.zbkj.common.response.CommonResult;
import com.zbkj.common.response.OrderPayResultResponse; //import com.zbkj.common.response.OrderPayResultResponse;
import com.zbkj.common.response.UserRechargeBillRecordResponse; //import com.zbkj.common.response.UserRechargeBillRecordResponse;
import com.zbkj.common.response.UserRechargeFrontResponse; //import com.zbkj.common.response.UserRechargeFrontResponse;
import com.zbkj.common.utils.CrmebUtil; //import com.zbkj.common.utils.CrmebUtil;
import com.zbkj.front.service.UserCenterService; //import com.zbkj.front.service.UserCenterService;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; //import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; //import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; //import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; //import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
//
import javax.servlet.http.HttpServletRequest; //import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; //import java.math.BigDecimal;
import java.util.HashMap; //import java.util.HashMap;
import java.util.Map; //import java.util.Map;
//
/** ///**
* 用户 -- 充值 // * 用户 -- 充值
//
*/ // */
@Slf4j //@Slf4j
@RestController("UserRechargeController") //@RestController("UserRechargeController")
@RequestMapping("api/front/recharge") //@RequestMapping("api/front/recharge")
@Api(tags = "用户 -- 充值") //@Api(tags = "用户 -- 充值")
public class UserRechargeController { //public class UserRechargeController {
@Autowired // @Autowired
private UserCenterService userCenterService; // private UserCenterService userCenterService;
//
/** // /**
* 充值额度选择 // * 充值额度选择
*/ // */
@ApiOperation(value = "充值额度选择") // @ApiOperation(value = "充值额度选择")
@RequestMapping(value = "/index", method = RequestMethod.GET) // @RequestMapping(value = "/index", method = RequestMethod.GET)
public CommonResult<UserRechargeFrontResponse> getRechargeConfig() { // public CommonResult<UserRechargeFrontResponse> getRechargeConfig() {
return CommonResult.success(userCenterService.getRechargeConfig()); // return CommonResult.success(userCenterService.getRechargeConfig());
} // }
//
/** // /**
* 小程序充值 // * 小程序充值
*/ // */
@ApiOperation(value = "小程序充值") // @ApiOperation(value = "小程序充值")
@RequestMapping(value = "/routine", method = RequestMethod.POST) // @RequestMapping(value = "/routine", method = RequestMethod.POST)
public CommonResult<Map<String, Object>> routineRecharge(HttpServletRequest httpServletRequest, @RequestBody @Validated UserRechargeRequest request) { // public CommonResult<Map<String, Object>> routineRecharge(HttpServletRequest httpServletRequest, @RequestBody @Validated UserRechargeRequest request) {
request.setFromType(Constants.PAY_TYPE_WE_CHAT_FROM_PROGRAM); // request.setFromType(Constants.PAY_TYPE_WE_CHAT_FROM_PROGRAM);
request.setClientIp(CrmebUtil.getClientIp(httpServletRequest)); // request.setClientIp(CrmebUtil.getClientIp(httpServletRequest));
OrderPayResultResponse recharge = userCenterService.recharge(request); // OrderPayResultResponse recharge = userCenterService.recharge(request);
Map<String, Object> map = new HashMap<>(); // Map<String, Object> map = new HashMap<>();
map.put("data", recharge); // map.put("data", recharge);
map.put("type", request.getFromType()); // map.put("type", request.getFromType());
return CommonResult.success(map); // return CommonResult.success(map);
} // }
//
/** // /**
* 公众号充值 // * 公众号充值
*/ // */
@ApiOperation(value = "公众号充值") // @ApiOperation(value = "公众号充值")
@RequestMapping(value = "/wechat", method = RequestMethod.POST) // @RequestMapping(value = "/wechat", method = RequestMethod.POST)
public CommonResult<OrderPayResultResponse> weChatRecharge(HttpServletRequest httpServletRequest, @RequestBody @Validated UserRechargeRequest request) { // public CommonResult<OrderPayResultResponse> weChatRecharge(HttpServletRequest httpServletRequest, @RequestBody @Validated UserRechargeRequest request) {
request.setClientIp(CrmebUtil.getClientIp(httpServletRequest)); // request.setClientIp(CrmebUtil.getClientIp(httpServletRequest));
return CommonResult.success(userCenterService.recharge(request)); // return CommonResult.success(userCenterService.recharge(request));
} // }
//
/** // /**
* 佣金转入余额 // * 佣金转入余额
*/ // */
@ApiOperation(value = "佣金转入余额") // @ApiOperation(value = "佣金转入余额")
@RequestMapping(value = "/transferIn", method = RequestMethod.POST) // @RequestMapping(value = "/transferIn", method = RequestMethod.POST)
public CommonResult<Boolean> transferIn(@RequestParam(name = "price") BigDecimal price) { // public CommonResult<Boolean> transferIn(@RequestParam(name = "price") BigDecimal price) {
return CommonResult.success(userCenterService.transferIn(price)); // return CommonResult.success(userCenterService.transferIn(price));
} // }
//
/** // /**
* 用户账单记录 // * 用户账单记录
*/ // */
@ApiOperation(value = "用户账单记录") // @ApiOperation(value = "用户账单记录")
@RequestMapping(value = "/bill/record", method = RequestMethod.GET) // @RequestMapping(value = "/bill/record", method = RequestMethod.GET)
@ApiImplicitParam(name = "type", value = "记录类型all-全部expenditure-支出income-收入", required = true) // @ApiImplicitParam(name = "type", value = "记录类型all-全部expenditure-支出income-收入", required = true)
public CommonResult<CommonPage<UserRechargeBillRecordResponse>> billRecord(@RequestParam(name = "type") String type, @ModelAttribute PageParamRequest pageRequest) { // public CommonResult<CommonPage<UserRechargeBillRecordResponse>> billRecord(@RequestParam(name = "type") String type, @ModelAttribute PageParamRequest pageRequest) {
return CommonResult.success(userCenterService.nowMoneyBillRecord(type, pageRequest)); // return CommonResult.success(userCenterService.nowMoneyBillRecord(type, pageRequest));
} // }
} //}
//
//
//

View File

@ -1,97 +1,97 @@
package com.zbkj.front.controller; //package com.zbkj.front.controller;
//
import com.zbkj.common.page.CommonPage; //import com.zbkj.common.page.CommonPage;
import com.zbkj.common.response.CommonResult; //import com.zbkj.common.response.CommonResult;
import com.zbkj.common.request.PageParamRequest; //import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.response.UserSignInfoResponse; //import com.zbkj.common.response.UserSignInfoResponse;
import com.zbkj.common.vo.SystemGroupDataSignConfigVo; //import com.zbkj.common.vo.SystemGroupDataSignConfigVo;
import com.zbkj.common.vo.UserSignMonthVo; //import com.zbkj.common.vo.UserSignMonthVo;
import com.zbkj.common.vo.UserSignVo; //import com.zbkj.common.vo.UserSignVo;
import com.zbkj.service.service.UserSignService; //import com.zbkj.service.service.UserSignService;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; //import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; //import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; //import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; //import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; //import org.springframework.web.bind.annotation.RestController;
//
import java.util.HashMap; //import java.util.HashMap;
import java.util.List; //import java.util.List;
//
//
/** ///**
* 签到记录表 前端控制器 // * 签到记录表 前端控制器
//
*/ // */
@Slf4j //@Slf4j
@RestController //@RestController
@RequestMapping("api/front/user/sign") //@RequestMapping("api/front/user/sign")
@Api(tags = "用户 -- 签到") //@Api(tags = "用户 -- 签到")
public class UserSignController { //public class UserSignController {
//
@Autowired // @Autowired
private UserSignService userSignService; // private UserSignService userSignService;
//
/** // /**
* 签到列表 // * 签到列表
* @param pageParamRequest 分页参数 // * @param pageParamRequest 分页参数
*/ // */
@ApiOperation(value = "分页列表") // @ApiOperation(value = "分页列表")
@RequestMapping(value = "/list", method = RequestMethod.GET) // @RequestMapping(value = "/list", method = RequestMethod.GET)
public CommonResult<CommonPage<UserSignVo>> getList(@Validated PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<UserSignVo>> getList(@Validated PageParamRequest pageParamRequest) {
CommonPage<UserSignVo> userSignCommonPage = CommonPage.restPage(userSignService.getList(pageParamRequest)); // CommonPage<UserSignVo> userSignCommonPage = CommonPage.restPage(userSignService.getList(pageParamRequest));
return CommonResult.success(userSignCommonPage); // return CommonResult.success(userSignCommonPage);
} // }
//
/** // /**
* 签到列表年月纬度 // * 签到列表年月纬度
* @param pageParamRequest 分页参数 // * @param pageParamRequest 分页参数
*/ // */
@ApiOperation(value = "分页列表") // @ApiOperation(value = "分页列表")
@RequestMapping(value = "/month", method = RequestMethod.GET) // @RequestMapping(value = "/month", method = RequestMethod.GET)
public CommonResult<CommonPage<UserSignMonthVo>> getListGroupMonth(@Validated PageParamRequest pageParamRequest) { // public CommonResult<CommonPage<UserSignMonthVo>> getListGroupMonth(@Validated PageParamRequest pageParamRequest) {
CommonPage<UserSignMonthVo> userSignCommonPage = CommonPage.restPage(userSignService.getListGroupMonth(pageParamRequest)); // CommonPage<UserSignMonthVo> userSignCommonPage = CommonPage.restPage(userSignService.getListGroupMonth(pageParamRequest));
return CommonResult.success(userSignCommonPage); // return CommonResult.success(userSignCommonPage);
} // }
//
/** // /**
* 配置 // * 配置
*/ // */
@ApiOperation(value = "配置") // @ApiOperation(value = "配置")
@RequestMapping(value = "/config", method = RequestMethod.GET) // @RequestMapping(value = "/config", method = RequestMethod.GET)
public CommonResult<List<SystemGroupDataSignConfigVo>> config() { // public CommonResult<List<SystemGroupDataSignConfigVo>> config() {
return CommonResult.success(userSignService.getSignConfig()); // return CommonResult.success(userSignService.getSignConfig());
} // }
//
/** // /**
* 签到 // * 签到
*/ // */
@ApiOperation(value = "签到") // @ApiOperation(value = "签到")
@RequestMapping(value = "/integral", method = RequestMethod.GET) // @RequestMapping(value = "/integral", method = RequestMethod.GET)
public CommonResult<SystemGroupDataSignConfigVo> info() { // public CommonResult<SystemGroupDataSignConfigVo> info() {
return CommonResult.success(userSignService.sign()); // return CommonResult.success(userSignService.sign());
} // }
//
/** // /**
* 今日记录详情 // * 今日记录详情
*/ // */
@ApiOperation(value = "今日记录详情") // @ApiOperation(value = "今日记录详情")
@RequestMapping(value = "/get", method = RequestMethod.GET) // @RequestMapping(value = "/get", method = RequestMethod.GET)
public CommonResult<HashMap<String, Object>> get() { // public CommonResult<HashMap<String, Object>> get() {
return CommonResult.success(userSignService.get()); // return CommonResult.success(userSignService.get());
} // }
//
/** // /**
* 签到用户信息 // * 签到用户信息
*/ // */
@ApiOperation(value = "签到用户信息") // @ApiOperation(value = "签到用户信息")
@RequestMapping(value = "/user", method = RequestMethod.POST) // @RequestMapping(value = "/user", method = RequestMethod.POST)
public CommonResult<UserSignInfoResponse> getUserInfo() { // public CommonResult<UserSignInfoResponse> getUserInfo() {
return CommonResult.success(userSignService.getUserSignInfo()); // return CommonResult.success(userSignService.getUserSignInfo());
} // }
} //}
//
//
//

View File

@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.zbkj.common.model.article.Article; import com.zbkj.common.model.article.Article;
import com.zbkj.common.model.cat.StoreCart; import com.zbkj.common.model.cat.StoreCart;
import com.zbkj.common.model.home.Home; import com.zbkj.common.model.home.Home;
@ -50,8 +52,8 @@ public class EbHomeServiceImpl extends ServiceImpl<HomeDao, Home> implements EbH
qHomePro.eq(HomeProducts::getHomeId, home.getId()); qHomePro.eq(HomeProducts::getHomeId, home.getId());
qHomePro.eq(HomeProducts::getDelFlag, 1); qHomePro.eq(HomeProducts::getDelFlag, 1);
qHomePro.orderByDesc(HomeProducts::getOrderNo); qHomePro.orderByDesc(HomeProducts::getOrderNo);
List<HomeProducts> hpList = homeProductsDao.selectList(qHomePro); List<HomeProducts> products = homeProductsDao.selectList(qHomePro);
home.setHpList(hpList); home.setProducts(products);
} }
value = JSONObject.toJSONString(hList); value = JSONObject.toJSONString(hList);
redisUtil.set(key, value); redisUtil.set(key, value);
@ -69,15 +71,14 @@ public class EbHomeServiceImpl extends ServiceImpl<HomeDao, Home> implements EbH
public CommonPage<SetMealFloorResponse> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page) { public CommonPage<SetMealFloorResponse> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page) {
List<SetMealFloorResponse> list = dao.selectPageSetMealFloor(entity, page); List<SetMealFloorResponse> list = dao.selectPageSetMealFloor(entity, page);
for (SetMealFloorResponse res : list) { for (SetMealFloorResponse res : list) {
Integer hId = res.getId(); // 默认展示6个
PageParamRequest pPage = new PageParamRequest(); PageParamRequest pPage = new PageParamRequest();
pPage.setPage(1); pPage.setPage(1);
pPage.setLimit(6); pPage.setLimit(6);
HomeProducts qHp = new HomeProducts(); HomeProducts qHp = new HomeProducts();
qHp.setHomeId(hId); qHp.setHomeId(res.getHomeId());
List<SetMealFloorProResponse> pList = homeProductsDao.selectPageFloorProduct(qHp, pPage); List<SetMealFloorProResponse> pList = homeProductsDao.selectPageFloorProduct(qHp, pPage);
res.setObj(CommonPage.restPage(pList)); res.setHomeProducts(CommonPage.restPage(pList));
} }
return CommonPage.restPage(list); return CommonPage.restPage(list);
} }