提交
This commit is contained in:
parent
858570ad40
commit
d4890cdc42
@ -1,110 +1,110 @@
|
|||||||
package com.zbkj.admin.controller;
|
//package com.zbkj.admin.controller;
|
||||||
|
//
|
||||||
import com.zbkj.common.model.article.Article;
|
//import com.zbkj.common.model.article.Article;
|
||||||
import com.zbkj.common.page.CommonPage;
|
//import com.zbkj.common.page.CommonPage;
|
||||||
import com.zbkj.common.request.ArticleRequest;
|
//import com.zbkj.common.request.ArticleRequest;
|
||||||
import com.zbkj.common.request.ArticleSearchRequest;
|
//import com.zbkj.common.request.ArticleSearchRequest;
|
||||||
import com.zbkj.common.request.PageParamRequest;
|
//import com.zbkj.common.request.PageParamRequest;
|
||||||
import com.zbkj.common.response.CommonResult;
|
//import com.zbkj.common.response.CommonResult;
|
||||||
import com.zbkj.common.vo.ArticleVo;
|
//import com.zbkj.common.vo.ArticleVo;
|
||||||
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.security.access.prepost.PreAuthorize;
|
//import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
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
|
//@RestController
|
||||||
@RequestMapping("api/admin/article")
|
//@RequestMapping("api/admin/article")
|
||||||
@Api(tags = "文章管理")
|
//@Api(tags = "文章管理")
|
||||||
public class ArticleController {
|
//public class ArticleController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private ArticleService articleService;
|
// private ArticleService articleService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 分页显示文章管理表
|
// * 分页显示文章管理表
|
||||||
* @param request ArticleSearchRequest 搜索条件
|
// * @param request ArticleSearchRequest 搜索条件
|
||||||
* @param pageParamRequest 分页参数
|
// * @param pageParamRequest 分页参数
|
||||||
*/
|
// */
|
||||||
@PreAuthorize("hasAuthority('admin:article:list')")
|
// @PreAuthorize("hasAuthority('admin:article:list')")
|
||||||
@ApiOperation(value = "分页列表")
|
// @ApiOperation(value = "分页列表")
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
// @RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||||
@ApiImplicitParam(name="keywords", value="搜索关键字")
|
// @ApiImplicitParam(name="keywords", value="搜索关键字")
|
||||||
public CommonResult<CommonPage<ArticleVo>> getList(@Validated ArticleSearchRequest request,
|
// public CommonResult<CommonPage<ArticleVo>> getList(@Validated ArticleSearchRequest request,
|
||||||
@Validated PageParamRequest pageParamRequest) {
|
// @Validated PageParamRequest pageParamRequest) {
|
||||||
return CommonResult.success(CommonPage.restPage(articleService.getAdminList(request, pageParamRequest)));
|
// return CommonResult.success(CommonPage.restPage(articleService.getAdminList(request, pageParamRequest)));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 新增文章管理表
|
// * 新增文章管理表
|
||||||
* @param articleRequest 新增参数
|
// * @param articleRequest 新增参数
|
||||||
*/
|
// */
|
||||||
@PreAuthorize("hasAuthority('admin:article:save')")
|
// @PreAuthorize("hasAuthority('admin:article:save')")
|
||||||
@ApiOperation(value = "新增")
|
// @ApiOperation(value = "新增")
|
||||||
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
// @RequestMapping(value = "/save", method = RequestMethod.POST)
|
||||||
public CommonResult<String> save(@RequestBody @Validated ArticleRequest articleRequest) {
|
// public CommonResult<String> save(@RequestBody @Validated ArticleRequest articleRequest) {
|
||||||
if (articleService.create(articleRequest)) {
|
// if (articleService.create(articleRequest)) {
|
||||||
return CommonResult.success();
|
// return CommonResult.success();
|
||||||
} else {
|
// } else {
|
||||||
return CommonResult.failed();
|
// return CommonResult.failed();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除文章管理表
|
// * 删除文章管理表
|
||||||
* @param id Integer
|
// * @param id Integer
|
||||||
*/
|
// */
|
||||||
@PreAuthorize("hasAuthority('admin:article:delete')")
|
// @PreAuthorize("hasAuthority('admin:article:delete')")
|
||||||
@ApiOperation(value = "删除")
|
// @ApiOperation(value = "删除")
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.GET)
|
// @RequestMapping(value = "/delete", method = RequestMethod.GET)
|
||||||
@ApiImplicitParam(name="id", value="文章ID")
|
// @ApiImplicitParam(name="id", value="文章ID")
|
||||||
public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
|
// public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
|
||||||
if (articleService.deleteById(id)) {
|
// if (articleService.deleteById(id)) {
|
||||||
return CommonResult.success();
|
// return CommonResult.success();
|
||||||
} else {
|
// } else {
|
||||||
return CommonResult.failed();
|
// return CommonResult.failed();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 修改文章管理表
|
// * 修改文章管理表
|
||||||
* @param id integer id
|
// * @param id integer id
|
||||||
* @param articleRequest 修改参数
|
// * @param articleRequest 修改参数
|
||||||
*/
|
// */
|
||||||
@PreAuthorize("hasAuthority('admin:article:update')")
|
// @PreAuthorize("hasAuthority('admin:article:update')")
|
||||||
@ApiOperation(value = "修改")
|
// @ApiOperation(value = "修改")
|
||||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
// @RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||||
@ApiImplicitParam(name="id", value="文章ID")
|
// @ApiImplicitParam(name="id", value="文章ID")
|
||||||
public CommonResult<String> update(@RequestParam Integer id, @RequestBody @Validated ArticleRequest articleRequest) {
|
// public CommonResult<String> update(@RequestParam Integer id, @RequestBody @Validated ArticleRequest articleRequest) {
|
||||||
if (articleService.updateArticle(id, articleRequest)) {
|
// if (articleService.updateArticle(id, articleRequest)) {
|
||||||
return CommonResult.success();
|
// return CommonResult.success();
|
||||||
} else {
|
// } else {
|
||||||
return CommonResult.failed();
|
// return CommonResult.failed();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询文章管理表信息
|
// * 查询文章管理表信息
|
||||||
* @param id Integer
|
// * @param id Integer
|
||||||
*/
|
// */
|
||||||
@PreAuthorize("hasAuthority('admin:article:info')")
|
// @PreAuthorize("hasAuthority('admin:article:info')")
|
||||||
@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<Article> info(@RequestParam(value = "id") Integer id) {
|
// public CommonResult<Article> info(@RequestParam(value = "id") Integer id) {
|
||||||
return CommonResult.success(articleService.getDetail(id));
|
// return CommonResult.success(articleService.getDetail(id));
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
@ -134,7 +134,7 @@ public class CategoryController {
|
|||||||
@ApiOperation(value = "获取tree结构的列表")
|
@ApiOperation(value = "获取tree结构的列表")
|
||||||
@RequestMapping(value = "/list/tree", method = RequestMethod.GET)
|
@RequestMapping(value = "/list/tree", method = RequestMethod.GET)
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name="type", value="类型ID | 类型,1 产品分类,2 附件分类,3 文章分类, 4 设置分类, 5 菜单分类, 6 配置分类, 7 秒杀配置", example = "1"),
|
@ApiImplicitParam(name="type", value="类型ID | 类型,1 产品分类,2 附件分类,3 文章分类, 4 设置分类, 5 菜单分类, 6 配置分类, 7 秒杀配置, 8 套餐分类", example = "1"),
|
||||||
@ApiImplicitParam(name="status", value="-1=全部,0=未生效,1=已生效", example = "1"),
|
@ApiImplicitParam(name="status", value="-1=全部,0=未生效,1=已生效", example = "1"),
|
||||||
@ApiImplicitParam(name="name", value="模糊搜索", example = "电视")
|
@ApiImplicitParam(name="name", value="模糊搜索", example = "电视")
|
||||||
})
|
})
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
package com.zbkj.admin.controller;
|
|
||||||
|
|
||||||
import com.zbkj.common.model.place.PlaceRegister;
|
|
||||||
import com.zbkj.common.page.CommonPage;
|
|
||||||
import com.zbkj.common.request.*;
|
|
||||||
import com.zbkj.common.response.CommonResult;
|
|
||||||
import com.zbkj.common.vo.PlaceRegisterVo;
|
|
||||||
import com.zbkj.service.service.PlaceRegisterService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("api/admin/place")
|
|
||||||
@Api(tags = "场地预约")
|
|
||||||
public class PlaceRegisterController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PlaceRegisterService placeRegisterService;
|
|
||||||
|
|
||||||
@PreAuthorize("hasAuthority('admin:place:list')")
|
|
||||||
@ApiOperation(value = "分页列表")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
public CommonResult<CommonPage<PlaceRegisterVo>> getList(@Validated PlaceRegisterSearchRequest request,
|
|
||||||
@Validated PageParamRequest pageParamRequest) {
|
|
||||||
return CommonResult.success(CommonPage.restPage(placeRegisterService.getAdminList(request, pageParamRequest)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
* @param id Integer
|
|
||||||
*/
|
|
||||||
@PreAuthorize("hasAuthority('admin:activity:delete')")
|
|
||||||
@ApiOperation(value = "删除参与记录")
|
|
||||||
@RequestMapping(value = "/records/delete", method = RequestMethod.GET)
|
|
||||||
@ApiImplicitParam(name="id", value="记录ID")
|
|
||||||
public CommonResult<String> recordsDelete(@RequestParam(value = "id") Integer id) {
|
|
||||||
if (placeRegisterService.recordsDelete(id)) {
|
|
||||||
return CommonResult.success();
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改
|
|
||||||
* @param id integer id
|
|
||||||
* @param request 修改参数
|
|
||||||
*/
|
|
||||||
@PreAuthorize("hasAuthority('admin:place:update')")
|
|
||||||
@ApiOperation(value = "修改")
|
|
||||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
|
||||||
@ApiImplicitParam(name="id", value="预约ID")
|
|
||||||
public CommonResult<String> updateRegister(@RequestParam Integer id, @RequestBody @Validated PlaceRegisterRequest request) {
|
|
||||||
if (placeRegisterService.updateRegister(id, request)) {
|
|
||||||
return CommonResult.success();
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询
|
|
||||||
* @param id Integer
|
|
||||||
*/
|
|
||||||
@PreAuthorize("hasAuthority('admin:place:info')")
|
|
||||||
@ApiOperation(value = "详情")
|
|
||||||
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
|
||||||
@ApiImplicitParam(name="id", value="预约ID")
|
|
||||||
public CommonResult<PlaceRegister> info(@RequestParam(value = "id") Integer id) {
|
|
||||||
return CommonResult.success(placeRegisterService.getDetail(id));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -17,15 +17,6 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 物流控制器
|
* 物流控制器
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | Author: CRMEB Team <admin@crmeb.com>
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -17,15 +17,6 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 物流付费前端控制器
|
* 物流付费前端控制器
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
* | Author: CRMEB Team <admin@crmeb.com>
|
|
||||||
* +----------------------------------------------------------------------
|
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -37,7 +37,7 @@ public class WechatMediaController {
|
|||||||
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
||||||
public CommonResult<Map<String, String>> upload(
|
public CommonResult<Map<String, String>> upload(
|
||||||
@RequestParam("media") @ApiParam(name = "media", value = "待上传素材图片文件", required = true) MultipartFile file,
|
@RequestParam("media") @ApiParam(name = "media", value = "待上传素材图片文件", required = true) MultipartFile file,
|
||||||
@RequestParam("type") @ApiParam(name = "type", value = "媒体文件类型,分别有图片(image)、语音(voice", required = true, allowableValues = "range[image,voice]") String type
|
@RequestParam("type") @ApiParam(name = "type", value = "媒体文件类型,分别有图片(image)、语音(voice)", required = true, allowableValues = "range[image,voice]") String type
|
||||||
) {
|
) {
|
||||||
return CommonResult.success(wechatMediaService.upload(file, type));
|
return CommonResult.success(wechatMediaService.upload(file, type));
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ spring:
|
|||||||
max-file-size: 50MB #设置单个文件大小
|
max-file-size: 50MB #设置单个文件大小
|
||||||
max-request-size: 50MB #设置单次请求文件的总大小
|
max-request-size: 50MB #设置单次请求文件的总大小
|
||||||
application:
|
application:
|
||||||
name: cemrb-admin #这个很重要,这在以后的服务与服务之间相互调用一般都是根据这个name
|
name: food-admin #这个很重要,这在以后的服务与服务之间相互调用一般都是根据这个name
|
||||||
jackson:
|
jackson:
|
||||||
locale: zh_CN
|
locale: zh_CN
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.zbkj.common.config;
|
package com.zbkj.common.config;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@ -66,6 +66,11 @@ public class SysConfigConstants {
|
|||||||
/** 下单支付金额按比例赠送积分(实际支付1元赠送多少积分) */
|
/** 下单支付金额按比例赠送积分(实际支付1元赠送多少积分) */
|
||||||
public static final String CONFIG_KEY_INTEGRAL_RATE_ORDER_GIVE = "order_give_integral";
|
public static final String CONFIG_KEY_INTEGRAL_RATE_ORDER_GIVE = "order_give_integral";
|
||||||
|
|
||||||
|
/** 订单自动完成天数-配送 */
|
||||||
|
public static final String DELIVERY_AUTO_COMPLETE_NUM = "delivery_auto_complete_num";
|
||||||
|
/** 订单自动完成天数-快递 */
|
||||||
|
public static final String EXPRESS_AUTO_COMPLETE_NUM = "express_auto_complete_num";
|
||||||
|
|
||||||
/** 微信支付开关 */
|
/** 微信支付开关 */
|
||||||
public static final String CONFIG_PAY_WEIXIN_OPEN = "pay_weixin_open";
|
public static final String CONFIG_PAY_WEIXIN_OPEN = "pay_weixin_open";
|
||||||
/** 余额支付状态 */
|
/** 余额支付状态 */
|
||||||
|
@ -84,6 +84,9 @@ public class StoreOrder implements Serializable {
|
|||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "签收时间")
|
||||||
|
private Date signForTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "订单状态(0:待发货;1:待收货;2:已收货,待评价;3:已完成;)")
|
@ApiModelProperty(value = "订单状态(0:待发货;1:待收货;2:已收货,待评价;3:已完成;)")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ -117,6 +120,9 @@ public class StoreOrder implements Serializable {
|
|||||||
@ApiModelProperty(value = "快递单号/手机号")
|
@ApiModelProperty(value = "快递单号/手机号")
|
||||||
private String deliveryId;
|
private String deliveryId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "预约配送时间")
|
||||||
|
private String deliveryTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "消费赚取积分")
|
@ApiModelProperty(value = "消费赚取积分")
|
||||||
private Integer gainIntegral;
|
private Integer gainIntegral;
|
||||||
|
|
||||||
|
@ -88,6 +88,4 @@ public class StoreOrderInfo implements Serializable {
|
|||||||
@ApiModelProperty(value = "商品类型:0-普通,1-秒杀,2-砍价,3-拼团,4-视频号")
|
@ApiModelProperty(value = "商品类型:0-普通,1-秒杀,2-砍价,3-拼团,4-视频号")
|
||||||
private Integer productType;
|
private Integer productType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "预约送达时间")
|
|
||||||
private String deliveryTime;
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,10 @@ public class StoreOrderReturn implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Integer uid;
|
||||||
/**
|
/**
|
||||||
* 订单id
|
* 订单id
|
||||||
*/
|
*/
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
package com.zbkj.common.model.order;
|
package com.zbkj.common.model.order;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Transient;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -21,30 +25,47 @@ public class StoreOrderReturnInfo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 退款表id
|
* 退款表id
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "退款表id")
|
||||||
private Integer returnId;
|
private Integer returnId;
|
||||||
/**
|
/**
|
||||||
* 订单id
|
* 订单id
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "订单id")
|
||||||
private Integer orderId;
|
private Integer orderId;
|
||||||
/**
|
/**
|
||||||
* 商品id
|
* 商品id
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "商品ID")
|
||||||
private Integer productId;
|
private Integer productId;
|
||||||
/**
|
/**
|
||||||
* 规格属性值id
|
* 规格属性值id
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "规格属性值id")
|
||||||
private Integer attrValueId;
|
private Integer attrValueId;
|
||||||
/**
|
/**
|
||||||
* 商品数量
|
* 商品数量
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "售后数量")
|
||||||
private Integer returnNum;
|
private Integer returnNum;
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "商品图片")
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "商品名称")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,9 +31,6 @@ public class PreOrderDetailRequest {
|
|||||||
@ApiModelProperty(value = "订单编号(再次购买必填)")
|
@ApiModelProperty(value = "订单编号(再次购买必填)")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
@ApiModelProperty(value = "果实兑换商品id")
|
|
||||||
private Integer fruitExchangeId = 0;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "砍价商品id")
|
@ApiModelProperty(value = "砍价商品id")
|
||||||
private Integer bargainId = 0;
|
private Integer bargainId = 0;
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.zbkj.common.response;
|
||||||
|
|
||||||
|
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="ApplyRecordsResponse对象", description="ApplyRecordsResponse对象")
|
||||||
|
public class ApplyRecordsResponse implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1387727608277207652L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请编号")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单号")
|
||||||
|
private Integer orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态:1退款审核中 2审核通过 3审核拒绝 4退款失败")
|
||||||
|
private Integer returnState;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "售后数量")
|
||||||
|
private Integer returnNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款金额")
|
||||||
|
private BigDecimal returnAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款审核时间")
|
||||||
|
private Date returnVerifyDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款原因")
|
||||||
|
private String returnReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "退款图片")
|
||||||
|
private String returnImage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请退款失败原因")
|
||||||
|
private String refundVerifyFailReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "售后详情对象列表")
|
||||||
|
private List<StoreOrderReturnInfo> returnInfoList;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.zbkj.common.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="CanApplyOrderResponse对象", description="CanApplyOrderResponse对象")
|
||||||
|
public class CanApplyOrderResponse implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1387727608277207652L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单编号")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付金额")
|
||||||
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单详情对象列表")
|
||||||
|
private List<OrderInfoResponse> orderInfoList;
|
||||||
|
|
||||||
|
}
|
@ -79,9 +79,6 @@ public class OrderInfoVo {
|
|||||||
@ApiModelProperty(value = "用户砍价活动id")
|
@ApiModelProperty(value = "用户砍价活动id")
|
||||||
private Integer bargainUserId;
|
private Integer bargainUserId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "果实兑换商品id")
|
|
||||||
private Integer fruitExchangeId = 0;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "拼团商品Id")
|
@ApiModelProperty(value = "拼团商品Id")
|
||||||
private Integer combinationId = 0;
|
private Integer combinationId = 0;
|
||||||
|
|
||||||
|
@ -87,15 +87,14 @@ public class ProductController {
|
|||||||
return CommonResult.success(productService.getSkuDetail(id));
|
return CommonResult.success(productService.getSkuDetail(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 商品列表
|
// * 商品列表
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "商品列表(个别分类模型使用)")
|
// @ApiOperation(value = "商品列表(个别分类模型使用)")
|
||||||
@RequestMapping(value = "/product/list", method = RequestMethod.GET)
|
// @RequestMapping(value = "/product/list", method = RequestMethod.GET)
|
||||||
public CommonResult<CommonPage<IndexProductResponse>> getProductList(@Validated ProductListRequest request, @Validated PageParamRequest pageParamRequest) {
|
// public CommonResult<CommonPage<IndexProductResponse>> getProductList(@Validated ProductListRequest request, @Validated PageParamRequest pageParamRequest) {
|
||||||
return CommonResult.success(productService.getCategoryProductList(request, pageParamRequest));
|
// return CommonResult.success(productService.getCategoryProductList(request, pageParamRequest));
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品详情评论
|
* 商品详情评论
|
||||||
|
@ -1,69 +1,69 @@
|
|||||||
package com.zbkj.front.controller;
|
//package com.zbkj.front.controller;
|
||||||
|
//
|
||||||
import com.alibaba.fastjson.JSONObject;
|
//import com.alibaba.fastjson.JSONObject;
|
||||||
import com.zbkj.common.response.CommonResult;
|
//import com.zbkj.common.response.CommonResult;
|
||||||
import com.zbkj.common.constants.Constants;
|
//import com.zbkj.common.constants.Constants;
|
||||||
import com.zbkj.common.exception.CrmebException;
|
//import com.zbkj.common.exception.CrmebException;
|
||||||
import com.zbkj.front.service.QrCodeService;
|
//import com.zbkj.front.service.QrCodeService;
|
||||||
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.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 验证码
|
// * 验证码
|
||||||
|
//
|
||||||
*/
|
// */
|
||||||
|
//
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("api/front/qrcode")
|
//@RequestMapping("api/front/qrcode")
|
||||||
@Api(tags = "二维码服务")
|
//@Api(tags = "二维码服务")
|
||||||
public class QrCodeController {
|
//public class QrCodeController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private QrCodeService qrCodeService;
|
// private QrCodeService qrCodeService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取二维码
|
// * 获取二维码
|
||||||
* @return CommonResult
|
// * @return CommonResult
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value="获取二维码")
|
// @ApiOperation(value="获取二维码")
|
||||||
@RequestMapping(value = "/get", method = RequestMethod.POST)
|
// @RequestMapping(value = "/get", method = RequestMethod.POST)
|
||||||
public CommonResult<Map<String, Object>> get(@RequestBody JSONObject data) {
|
// public CommonResult<Map<String, Object>> get(@RequestBody JSONObject data) {
|
||||||
return CommonResult.success(qrCodeService.get(data));
|
// return CommonResult.success(qrCodeService.get(data));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 远程图片转base64
|
// * 远程图片转base64
|
||||||
* @return CommonResult
|
// * @return CommonResult
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value="远程图片转base64")
|
// @ApiOperation(value="远程图片转base64")
|
||||||
@RequestMapping(value = "/base64", method = RequestMethod.POST)
|
// @RequestMapping(value = "/base64", method = RequestMethod.POST)
|
||||||
public CommonResult<Map<String, Object>> get(@RequestParam String url) {
|
// public CommonResult<Map<String, Object>> get(@RequestParam String url) {
|
||||||
return CommonResult.success(qrCodeService.base64(url));
|
// return CommonResult.success(qrCodeService.base64(url));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 将字符串 转base64
|
// * 将字符串 转base64
|
||||||
* @return CommonResult
|
// * @return CommonResult
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value="将字符串 转base64")
|
// @ApiOperation(value="将字符串 转base64")
|
||||||
@RequestMapping(value = "/str2base64", method = RequestMethod.POST)
|
// @RequestMapping(value = "/str2base64", method = RequestMethod.POST)
|
||||||
public CommonResult<Map<String, Object>> getQrcodeByString(
|
// public CommonResult<Map<String, Object>> getQrcodeByString(
|
||||||
@RequestParam String text,
|
// @RequestParam String text,
|
||||||
@RequestParam int width,
|
// @RequestParam int width,
|
||||||
@RequestParam int height) {
|
// @RequestParam int height) {
|
||||||
if((width < 50 || height < 50) && (width > 500 || height > 500) && text.length() >= 999){
|
// if((width < 50 || height < 50) && (width > 500 || height > 500) && text.length() >= 999){
|
||||||
throw new CrmebException(Constants.RESULT_QRCODE_PRAMERROR);
|
// throw new CrmebException(Constants.RESULT_QRCODE_PRAMERROR);
|
||||||
}
|
// }
|
||||||
return CommonResult.success(qrCodeService.base64String(text, width,height));
|
// return CommonResult.success(qrCodeService.base64String(text, width,height));
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
@ -101,7 +101,7 @@ public class StoreOrderController {
|
|||||||
@ApiOperation(value = "订单列表")
|
@ApiOperation(value = "订单列表")
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||||
@ApiImplicitParams ({
|
@ApiImplicitParams ({
|
||||||
@ApiImplicitParam(name = "type", value = "评价等级|null=全部,0=未支付,1=待发货,2=待收货,3=待评价,4=已完成,5=备货中,-3=售后/退款"),
|
@ApiImplicitParam(name = "type", value = "类型|null=全部,0=未支付,1=待发货,2=待收货,3=待评价,4=已完成,5=备货中,-3=售后/退款"),
|
||||||
})
|
})
|
||||||
public CommonResult<CommonPage<OrderDetailResponse>> orderList(@RequestParam(name = "type") Integer type, @ModelAttribute PageParamRequest pageRequest) {
|
public CommonResult<CommonPage<OrderDetailResponse>> orderList(@RequestParam(name = "type") Integer type, @ModelAttribute PageParamRequest pageRequest) {
|
||||||
return CommonResult.success(orderService.list(type, pageRequest));
|
return CommonResult.success(orderService.list(type, pageRequest));
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package com.zbkj.front.controller;
|
package com.zbkj.front.controller;
|
||||||
|
|
||||||
|
import com.zbkj.common.page.CommonPage;
|
||||||
import com.zbkj.common.request.*;
|
import com.zbkj.common.request.*;
|
||||||
import com.zbkj.common.response.*;
|
import com.zbkj.common.response.*;
|
||||||
import com.zbkj.service.service.OrderService;
|
import com.zbkj.service.service.OrderService;
|
||||||
|
import com.zbkj.service.service.StoreOrderReturnService;
|
||||||
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;
|
||||||
@ -16,15 +18,15 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
@Api(tags = "售后")
|
@Api(tags = "售后")
|
||||||
public class StoreOrderReturnController {
|
public class StoreOrderReturnController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired private OrderService orderService;
|
||||||
private OrderService orderService;
|
@Autowired private StoreOrderReturnService storeOrderReturnService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取申请订单退款信息
|
* 获取申请订单退款信息
|
||||||
* @param orderId 订单编号
|
* @param orderId 订单编号
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取申请订单退款信息")
|
@ApiOperation(value = "获取申请订单退款信息")
|
||||||
@RequestMapping(value = "/refund/{orderId}", method = RequestMethod.GET)
|
@RequestMapping(value = "/getOrder/{orderId}", method = RequestMethod.GET)
|
||||||
public CommonResult<ApplyRefundOrderInfoResponse> refundApplyOrder(@PathVariable String orderId) {
|
public CommonResult<ApplyRefundOrderInfoResponse> refundApplyOrder(@PathVariable String orderId) {
|
||||||
return CommonResult.success(orderService.applyRefundOrderInfo(orderId));
|
return CommonResult.success(orderService.applyRefundOrderInfo(orderId));
|
||||||
}
|
}
|
||||||
@ -33,7 +35,7 @@ public class StoreOrderReturnController {
|
|||||||
* 根据参数计算订单价格
|
* 根据参数计算订单价格
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取退款计算")
|
@ApiOperation(value = "获取退款计算")
|
||||||
@RequestMapping(value = "/refund/computedPrice", method = RequestMethod.POST)
|
@RequestMapping(value = "/computedPrice", method = RequestMethod.POST)
|
||||||
public CommonResult<RefundComputedResponse> refundComputedPrice(@Validated @RequestBody RefundComputedRequest request) {
|
public CommonResult<RefundComputedResponse> refundComputedPrice(@Validated @RequestBody RefundComputedRequest request) {
|
||||||
return CommonResult.success(orderService.refundComputedPrice(request));
|
return CommonResult.success(orderService.refundComputedPrice(request));
|
||||||
}
|
}
|
||||||
@ -44,12 +46,45 @@ public class StoreOrderReturnController {
|
|||||||
* @param request OrderRefundApplyRequest 订单id
|
* @param request OrderRefundApplyRequest 订单id
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "订单退款申请")
|
@ApiOperation(value = "订单退款申请")
|
||||||
@RequestMapping(value = "/refund", method = RequestMethod.POST)
|
@RequestMapping(value = "/returnApply", method = RequestMethod.POST)
|
||||||
public CommonResult<Boolean> refundApply(@RequestBody @Validated OrderRefundApplyRequest request) {
|
public CommonResult<Boolean> returnApply(@RequestBody @Validated OrderRefundApplyRequest request) {
|
||||||
if(orderService.refundApply(request)) {
|
if(orderService.refundApply(request)) {
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}else{
|
}else{
|
||||||
return CommonResult.failed();
|
return CommonResult.failed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款/售后-售后申请列表
|
||||||
|
* @param pageRequest 分页
|
||||||
|
* @return 订单列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "退款/售后-售后申请列表")
|
||||||
|
@RequestMapping(value = "/canApplyOrderList", method = RequestMethod.GET)
|
||||||
|
public CommonResult<CommonPage<CanApplyOrderResponse>> canApplyOrderList(@ModelAttribute PageParamRequest pageRequest) {
|
||||||
|
return CommonResult.success(orderService.canApplyOrderList(pageRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款/售后-售后记录
|
||||||
|
* @param pageRequest 分页
|
||||||
|
* @return 订单列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "退款/售后-售后记录")
|
||||||
|
@RequestMapping(value = "/applyRecordsList", method = RequestMethod.GET)
|
||||||
|
public CommonResult<CommonPage<ApplyRecordsResponse>> applyRecordsList(@ModelAttribute PageParamRequest pageRequest) {
|
||||||
|
return CommonResult.success(storeOrderReturnService.applyRecordsList(pageRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 售后记录详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "售后记录详情")
|
||||||
|
@RequestMapping(value = "/getApplyRecord/{id}", method = RequestMethod.GET)
|
||||||
|
public CommonResult<ApplyRecordsResponse> getApplyRecord(@PathVariable String id) {
|
||||||
|
return CommonResult.success(storeOrderReturnService.getApplyRecord(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,14 +92,14 @@ public class UserController {
|
|||||||
// return CommonResult.success(userService.updatePhone(request));
|
// return CommonResult.success(userService.updatePhone(request));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 用户中心菜单
|
// * 用户中心菜单
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "获取个人中心菜单")
|
// @ApiOperation(value = "获取个人中心菜单")
|
||||||
@RequestMapping(value = "/menu/user", method = RequestMethod.GET)
|
// @RequestMapping(value = "/menu/user", method = RequestMethod.GET)
|
||||||
public CommonResult<HashMap<String, Object>> getMenuUser() {
|
// public CommonResult<HashMap<String, Object>> getMenuUser() {
|
||||||
return CommonResult.success(systemGroupDataService.getMenuUser());
|
// return CommonResult.success(systemGroupDataService.getMenuUser());
|
||||||
}
|
// }
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 推广数据接口(昨天的佣金 累计提现金额 当前佣金)
|
// * 推广数据接口(昨天的佣金 累计提现金额 当前佣金)
|
||||||
|
@ -23,7 +23,7 @@ spring:
|
|||||||
resources:
|
resources:
|
||||||
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${crmeb.filePath}
|
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${crmeb.filePath}
|
||||||
application:
|
application:
|
||||||
name: front-front #这个很重要,这在以后的服务与服务之间相互调用一般都是根据这个name
|
name: food-front #这个很重要,这在以后的服务与服务之间相互调用一般都是根据这个name
|
||||||
jackson:
|
jackson:
|
||||||
locale: zh_CN
|
locale: zh_CN
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
package com.zbkj.front.user;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.zbkj.common.model.game.Game;
|
|
||||||
import com.zbkj.common.page.CommonPage;
|
|
||||||
import com.zbkj.common.request.PageParamRequest;
|
|
||||||
import com.zbkj.common.request.RegisterThirdUserRequest;
|
|
||||||
import com.zbkj.common.response.*;
|
|
||||||
import com.zbkj.common.vo.SystemCityTreeVo;
|
|
||||||
import com.zbkj.front.service.UserCenterService;
|
|
||||||
import com.zbkj.service.service.*;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@SpringBootTest
|
|
||||||
@RunWith(SpringRunner.class)
|
|
||||||
public class ActivityTest {
|
|
||||||
|
|
||||||
@Autowired private ActivityService activityService;
|
|
||||||
@Autowired private ActivityRegisterService activityRegisterService;
|
|
||||||
@Autowired private UserCenterService userCenterService;
|
|
||||||
@Autowired private TeaPlantService teaPlantService;
|
|
||||||
@Autowired private SystemCityService systemCityService;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getListTree(){
|
|
||||||
List<SystemCityTreeVo> listTree = systemCityService.getListTree();
|
|
||||||
System.out.println(JSON.toJSONString(listTree));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void nowMoneyBillRecord(){
|
|
||||||
String type = "all";
|
|
||||||
PageParamRequest page = new PageParamRequest();
|
|
||||||
page.setPage(1);
|
|
||||||
page.setLimit(99999999);
|
|
||||||
CommonPage<UserRechargeBillRecordResponse> list = userCenterService.nowMoneyBillRecord(type, page);
|
|
||||||
System.out.println(JSON.toJSONString(list));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void myRegisterList(){
|
|
||||||
String cid = "746";
|
|
||||||
PageParamRequest page = new PageParamRequest();
|
|
||||||
page.setPage(1);
|
|
||||||
page.setLimit(10);
|
|
||||||
PageInfo list= activityRegisterService.myRegisterList(cid, page);
|
|
||||||
System.out.println(JSON.toJSONString(list));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getList(){
|
|
||||||
PageParamRequest page = new PageParamRequest();
|
|
||||||
page.setPage(1);
|
|
||||||
page.setLimit(10);
|
|
||||||
PageInfo<TeaPlantResponse> list = teaPlantService.getList(page);
|
|
||||||
System.out.println(JSON.toJSONString(list));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void weChatAuthorizeProgramLogin(){
|
|
||||||
String code = "123456789";
|
|
||||||
RegisterThirdUserRequest request = new RegisterThirdUserRequest();
|
|
||||||
request.setOpenId("123456789");
|
|
||||||
request.setProvince("");
|
|
||||||
request.setCity("");
|
|
||||||
request.setCountry("");
|
|
||||||
userCenterService.weChatAuthorizeProgramLogin(code, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void list(){
|
|
||||||
PageParamRequest page = new PageParamRequest();
|
|
||||||
page.setPage(1);
|
|
||||||
page.setLimit(10);
|
|
||||||
PageInfo<ActivityResponse> list = activityService.getList("753", page);
|
|
||||||
System.out.println(JSON.toJSONString(list));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,113 +0,0 @@
|
|||||||
//package com.zbkj.front.user;
|
|
||||||
//
|
|
||||||
//import com.alibaba.fastjson.JSON;
|
|
||||||
//import com.github.pagehelper.PageInfo;
|
|
||||||
//import com.zbkj.common.constants.Constants;
|
|
||||||
//import com.zbkj.common.model.game.Game;
|
|
||||||
//import com.zbkj.common.request.*;
|
|
||||||
//import com.zbkj.common.response.*;
|
|
||||||
//import com.zbkj.common.utils.DateUtil;
|
|
||||||
//import com.zbkj.front.service.ProductService;
|
|
||||||
//import com.zbkj.service.service.GameService;
|
|
||||||
//import com.zbkj.service.service.GameTreeProductService;
|
|
||||||
//import com.zbkj.service.service.SystemGroupDataService;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import org.junit.runner.RunWith;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
//import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
//import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
//
|
|
||||||
//import java.util.HashMap;
|
|
||||||
//import java.util.List;
|
|
||||||
//
|
|
||||||
//@SpringBootTest
|
|
||||||
//@RunWith(SpringRunner.class)
|
|
||||||
//public class GameTest {
|
|
||||||
//
|
|
||||||
// @Autowired private GameService gameService;
|
|
||||||
// @Autowired private GameTreeProductService gameTreeProductService;
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void fruitExchange(){
|
|
||||||
// UserExchangeRequest request = new UserExchangeRequest();
|
|
||||||
// request.setTreeProductId("2");
|
|
||||||
// request.setStoreId("1");
|
|
||||||
// request.setNumber("1");
|
|
||||||
// request.setPhone("16621399662");
|
|
||||||
// request.setRealName("唐");
|
|
||||||
// Boolean b = gameTreeProductService.fruitExchange(request);
|
|
||||||
// System.out.println(b);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void gameTreeProductService(){
|
|
||||||
// PageParamRequest page = new PageParamRequest();
|
|
||||||
// page.setLimit(10);
|
|
||||||
// page.setPage(1);
|
|
||||||
// GameTreeProductListRequest request = new GameTreeProductListRequest();
|
|
||||||
// PageInfo<GameTreeProductResponse> res = gameTreeProductService.getList(request, page);
|
|
||||||
// System.out.println(JSON.toJSONString(res));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getUserFarm(){
|
|
||||||
// UserTreeFarmRequest request = new UserTreeFarmRequest();
|
|
||||||
// request.setGameId("3");
|
|
||||||
// UserTreeFarmResponse userFarm = gameService.getUserFarm(request);
|
|
||||||
// System.out.println(JSON.toJSONString(userFarm));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void info(){
|
|
||||||
// GameResponse res = gameService.getVoByFront("2");
|
|
||||||
// System.out.println(JSON.toJSONString(res));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getUserWater(){
|
|
||||||
// UserWaterRequest req = new UserWaterRequest();
|
|
||||||
// req.setUserItemId("1");
|
|
||||||
// UserWaterResponse userWater = gameService.getUserWater(req);
|
|
||||||
// System.out.println(JSON.toJSONString(userWater));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getGameItem(){
|
|
||||||
// Object gameItem = gameService.getGameItem("3", "9");
|
|
||||||
// System.out.println(JSON.toJSONString(gameItem));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getPrizeDraw(){
|
|
||||||
// GameResponse data = gameService.getVoByFront("2");
|
|
||||||
// System.out.println(JSON.toJSONString(data));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getTree(){
|
|
||||||
// GameResponse data = gameService.getVoByFront("3");
|
|
||||||
// System.out.println(JSON.toJSONString(data));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getGameItemList(){
|
|
||||||
// PageParamRequest page = new PageParamRequest();
|
|
||||||
// page.setLimit(10);
|
|
||||||
// page.setPage(1);
|
|
||||||
// PageInfo<Object> list = gameService.getGameItemList("2", page);
|
|
||||||
// System.out.println(JSON.toJSONString(list));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void detail(){
|
|
||||||
// Game detail = gameService.getDetail(2);
|
|
||||||
// System.out.println(JSON.toJSONString(detail));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void prizeDraw(){
|
|
||||||
// PrizeDrawResponse res = gameService.prizeDraw("2");
|
|
||||||
// System.out.println(JSON.toJSONString(res));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
@ -1,29 +0,0 @@
|
|||||||
//package com.zbkj.front.user;
|
|
||||||
//
|
|
||||||
//import com.alibaba.fastjson.JSON;
|
|
||||||
//import com.zbkj.common.vo.CategoryTreeVo;
|
|
||||||
//import com.zbkj.front.service.ProductService;
|
|
||||||
//import com.zbkj.service.service.SystemGroupDataService;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import org.junit.runner.RunWith;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
//import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
//import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
//
|
|
||||||
//import java.util.HashMap;
|
|
||||||
//import java.util.List;
|
|
||||||
//
|
|
||||||
//@SpringBootTest
|
|
||||||
//@RunWith(SpringRunner.class)
|
|
||||||
//public class GroupDataTest {
|
|
||||||
//
|
|
||||||
// @Autowired private SystemGroupDataService systemGroupDataService;
|
|
||||||
// @Autowired private ProductService productService;
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getMenuUser(){
|
|
||||||
// List<HashMap<String, Object>> data = systemGroupDataService.getListMapByGid(37);
|
|
||||||
// System.out.println(JSON.toJSONString(data));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
@ -1,29 +0,0 @@
|
|||||||
//package com.zbkj.front.user;
|
|
||||||
//
|
|
||||||
//import com.alibaba.fastjson.JSON;
|
|
||||||
//import com.zbkj.common.response.IndexInfoResponse;
|
|
||||||
//import com.zbkj.common.vo.CategoryTreeVo;
|
|
||||||
//import com.zbkj.front.service.IndexService;
|
|
||||||
//import com.zbkj.front.service.ProductService;
|
|
||||||
//import com.zbkj.service.service.SystemGroupDataService;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import org.junit.runner.RunWith;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
//import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
//import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
//
|
|
||||||
//import java.util.List;
|
|
||||||
//
|
|
||||||
//@SpringBootTest
|
|
||||||
//@RunWith(SpringRunner.class)
|
|
||||||
//public class IdexTest {
|
|
||||||
//
|
|
||||||
// @Autowired private IndexService indexService;
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getMenuUser(){
|
|
||||||
// IndexInfoResponse res = indexService.getIndexInfo();
|
|
||||||
// System.out.println(JSON.toJSONString(res));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
@ -1,29 +0,0 @@
|
|||||||
//package com.zbkj.front.user;
|
|
||||||
//
|
|
||||||
//import com.alibaba.fastjson.JSON;
|
|
||||||
//import com.zbkj.common.vo.CategoryTreeVo;
|
|
||||||
//import com.zbkj.front.service.ProductService;
|
|
||||||
//import com.zbkj.service.service.SystemGroupDataService;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import org.junit.runner.RunWith;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
//import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
//import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
//
|
|
||||||
//import java.util.HashMap;
|
|
||||||
//import java.util.List;
|
|
||||||
//
|
|
||||||
//@SpringBootTest
|
|
||||||
//@RunWith(SpringRunner.class)
|
|
||||||
//public class ProductTest {
|
|
||||||
//
|
|
||||||
// @Autowired private SystemGroupDataService systemGroupDataService;
|
|
||||||
// @Autowired private ProductService productService;
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getMenuUser(){
|
|
||||||
// List<CategoryTreeVo> res = productService.getCategory();
|
|
||||||
// System.out.println(JSON.toJSONString(res));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
@ -1,25 +0,0 @@
|
|||||||
//package com.zbkj.front.user;
|
|
||||||
//
|
|
||||||
//import com.alibaba.fastjson.JSON;
|
|
||||||
//import com.zbkj.service.service.SystemGroupDataService;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import org.junit.runner.RunWith;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
//import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
//import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
//
|
|
||||||
//import java.util.HashMap;
|
|
||||||
//
|
|
||||||
//@SpringBootTest
|
|
||||||
//@RunWith(SpringRunner.class)
|
|
||||||
//public class UserTest {
|
|
||||||
//
|
|
||||||
// @Autowired private SystemGroupDataService systemGroupDataService;
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void getMenuUser(){
|
|
||||||
// HashMap<String, Object> menuUser = systemGroupDataService.getMenuUser();
|
|
||||||
// System.out.println(JSON.toJSONString(menuUser));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
@ -1,16 +0,0 @@
|
|||||||
package com.zbkj.service.dao;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.zbkj.common.model.place.PlaceRegister;
|
|
||||||
import com.zbkj.common.response.PlaceRegisterResponse;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface PlaceRegisterDao extends BaseMapper<PlaceRegister> {
|
|
||||||
|
|
||||||
List<PlaceRegisterResponse> myRegisterList(@Param("userId") Integer uid);
|
|
||||||
|
|
||||||
}
|
|
@ -4,10 +4,7 @@ import com.zbkj.common.model.order.StoreOrder;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.zbkj.common.request.StoreDateRangeSqlPram;
|
import com.zbkj.common.request.StoreDateRangeSqlPram;
|
||||||
import com.zbkj.common.request.StoreOrderStaticsticsRequest;
|
import com.zbkj.common.request.StoreOrderStaticsticsRequest;
|
||||||
import com.zbkj.common.response.OrderBrokerageData;
|
import com.zbkj.common.response.*;
|
||||||
import com.zbkj.common.response.OrderReplyListResponse;
|
|
||||||
import com.zbkj.common.response.StoreOrderStatisticsChartItemResponse;
|
|
||||||
import com.zbkj.common.response.StoreStaffDetail;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -69,4 +66,12 @@ public interface StoreOrderDao extends BaseMapper<StoreOrder> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OrderReplyListResponse> selectOrderReplyList(@Param("uid") Integer uid, @Param("type") Integer type);
|
List<OrderReplyListResponse> selectOrderReplyList(@Param("uid") Integer uid, @Param("type") Integer type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可售后的订单列表
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CanApplyOrderResponse> canApplyOrderList(Integer userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,13 @@ package com.zbkj.service.dao;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.zbkj.common.model.order.StoreOrderReturn;
|
import com.zbkj.common.model.order.StoreOrderReturn;
|
||||||
|
import com.zbkj.common.response.ApplyRecordsResponse;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface StoreOrderReturnDao extends BaseMapper<StoreOrderReturn> {
|
public interface StoreOrderReturnDao extends BaseMapper<StoreOrderReturn> {
|
||||||
|
|
||||||
|
List<ApplyRecordsResponse> applyRecordsList(@Param("uid") Integer userId, @Param("returnId") Integer returnId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,10 @@ package com.zbkj.service.dao;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface StoreOrderReturnInfoDao extends BaseMapper<StoreOrderReturnInfo> {
|
public interface StoreOrderReturnInfoDao extends BaseMapper<StoreOrderReturnInfo> {
|
||||||
|
|
||||||
|
List<StoreOrderReturnInfo> selectByReturnId(Integer id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -155,4 +155,11 @@ public interface OrderService {
|
|||||||
*/
|
*/
|
||||||
RefundComputedResponse refundComputedPrice(RefundComputedRequest request);
|
RefundComputedResponse refundComputedPrice(RefundComputedRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可申请售后的订单列表
|
||||||
|
* @param pageRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
CommonPage<CanApplyOrderResponse> canApplyOrderList(PageParamRequest pageRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
package com.zbkj.service.service;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.zbkj.common.model.place.PlaceRegister;
|
|
||||||
import com.zbkj.common.request.*;
|
|
||||||
import com.zbkj.common.response.PlaceRegisterResponse;
|
|
||||||
import com.zbkj.common.vo.PlaceRegisterVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public interface PlaceRegisterService extends IService<PlaceRegister> {
|
|
||||||
|
|
||||||
Boolean subscribe(PlaceRegisterFrontRequest request);
|
|
||||||
|
|
||||||
PageInfo<PlaceRegisterVo> getAdminList(PlaceRegisterSearchRequest request, PageParamRequest pageParamRequest);
|
|
||||||
|
|
||||||
Boolean updateRegister(Integer id, PlaceRegisterRequest request);
|
|
||||||
|
|
||||||
PlaceRegister getDetail(Integer id);
|
|
||||||
|
|
||||||
PageInfo<PlaceRegisterResponse> myRegisterList(PageParamRequest pageParamRequest);
|
|
||||||
|
|
||||||
Boolean cancel(PlaceCancelRequest request);
|
|
||||||
|
|
||||||
Boolean recordsDelete(Integer id);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -4,7 +4,11 @@ package com.zbkj.service.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface StoreOrderReturnInfoService extends IService<StoreOrderReturnInfo> {
|
public interface StoreOrderReturnInfoService extends IService<StoreOrderReturnInfo> {
|
||||||
|
|
||||||
|
List<StoreOrderReturnInfo> selectByReturnId(Integer id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@ package com.zbkj.service.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zbkj.common.model.order.StoreOrderReturn;
|
import com.zbkj.common.model.order.StoreOrderReturn;
|
||||||
|
import com.zbkj.common.page.CommonPage;
|
||||||
|
import com.zbkj.common.request.PageParamRequest;
|
||||||
|
import com.zbkj.common.response.ApplyRecordsResponse;
|
||||||
|
|
||||||
public interface StoreOrderReturnService extends IService<StoreOrderReturn> {
|
public interface StoreOrderReturnService extends IService<StoreOrderReturn> {
|
||||||
|
|
||||||
@ -11,5 +14,19 @@ public interface StoreOrderReturnService extends IService<StoreOrderReturn> {
|
|||||||
|
|
||||||
void refundOk(Integer orderId);
|
void refundOk(Integer orderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 售后申请记录
|
||||||
|
* @param pageRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
CommonPage<ApplyRecordsResponse> applyRecordsList(PageParamRequest pageRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 售后详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ApplyRecordsResponse getApplyRecord(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,4 +378,11 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OrderReplyListResponse> selectOrderReplyList(Integer userId, Integer type);
|
List<OrderReplyListResponse> selectOrderReplyList(Integer userId, Integer type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询可申请售后的订单
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CanApplyOrderResponse> canApplyOrderList(Integer userId);
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryDao, Category> impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<CategoryTreeVo> getListTree(Integer type, Integer status, String name) {
|
public List<CategoryTreeVo> getListTree(Integer type, Integer status, String name) {
|
||||||
return getTree(type, status,name,null);
|
return getTree(type, status, name, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -235,13 +235,13 @@ public class OrderPayServiceImpl implements OrderPayService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Boolean execute = transactionTemplate.execute(e -> {
|
Boolean execute = transactionTemplate.execute(e -> {
|
||||||
//订单日志
|
// 订单日志
|
||||||
storeOrderStatusService.createLog(storeOrder.getId(), Constants.ORDER_LOG_PAY_SUCCESS, Constants.ORDER_LOG_MESSAGE_PAY_SUCCESS);
|
storeOrderStatusService.createLog(storeOrder.getId(), Constants.ORDER_LOG_PAY_SUCCESS, Constants.ORDER_LOG_MESSAGE_PAY_SUCCESS);
|
||||||
|
|
||||||
// 用户信息变更
|
// 用户信息变更
|
||||||
userService.updateById(user);
|
userService.updateById(user);
|
||||||
|
|
||||||
//资金变动
|
// 资金变动
|
||||||
userBillService.saveBatch(billList);
|
userBillService.saveBatch(billList);
|
||||||
|
|
||||||
// 积分记录
|
// 积分记录
|
||||||
@ -250,7 +250,7 @@ public class OrderPayServiceImpl implements OrderPayService {
|
|||||||
// 经验记录
|
// 经验记录
|
||||||
userExperienceRecordService.save(experienceRecord);
|
userExperienceRecordService.save(experienceRecord);
|
||||||
|
|
||||||
//经验升级
|
// 经验升级
|
||||||
userLevelService.upLevel(user);
|
userLevelService.upLevel(user);
|
||||||
|
|
||||||
// // 佣金记录
|
// // 佣金记录
|
||||||
@ -292,7 +292,7 @@ public class OrderPayServiceImpl implements OrderPayService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (payNotification.getIsWechat().equals(1) || payNotification.getIsRoutine().equals(1)) {
|
if (payNotification.getIsWechat().equals(1) || payNotification.getIsRoutine().equals(1)) {
|
||||||
//下发模板通知
|
// 下发模板通知
|
||||||
pushMessageOrder(storeOrder, user, payNotification);
|
pushMessageOrder(storeOrder, user, payNotification);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,6 +255,7 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
}
|
}
|
||||||
//已收货,待评价
|
//已收货,待评价
|
||||||
storeOrder.setStatus(Constants.ORDER_STATUS_INT_BARGAIN);
|
storeOrder.setStatus(Constants.ORDER_STATUS_INT_BARGAIN);
|
||||||
|
storeOrder.setSignForTime(new Date());
|
||||||
boolean result = storeOrderService.updateById(storeOrder);
|
boolean result = storeOrderService.updateById(storeOrder);
|
||||||
if (result) {
|
if (result) {
|
||||||
//后续操作放入redis
|
//后续操作放入redis
|
||||||
@ -317,6 +318,7 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
existStoreOrder.setRefundPrice(new BigDecimal(refundComputedResponse.getReturnAmount()));
|
existStoreOrder.setRefundPrice(new BigDecimal(refundComputedResponse.getReturnAmount()));
|
||||||
|
|
||||||
StoreOrderReturn oReturn = new StoreOrderReturn();
|
StoreOrderReturn oReturn = new StoreOrderReturn();
|
||||||
|
oReturn.setUid(existStoreOrder.getUid());
|
||||||
oReturn.setOrderId(existStoreOrder.getId());
|
oReturn.setOrderId(existStoreOrder.getId());
|
||||||
oReturn.setContactPhone(request.getContactPhone());
|
oReturn.setContactPhone(request.getContactPhone());
|
||||||
oReturn.setReturnReason(existStoreOrder.getRefundReasonWap());
|
oReturn.setReturnReason(existStoreOrder.getRefundReasonWap());
|
||||||
@ -875,6 +877,31 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonPage<CanApplyOrderResponse> canApplyOrderList(PageParamRequest page) {
|
||||||
|
Integer userId = userService.getUserIdException();
|
||||||
|
PageHelper.startPage(page.getPage(), page.getLimit());
|
||||||
|
List<CanApplyOrderResponse> orderList = storeOrderService.canApplyOrderList(userId);
|
||||||
|
for (CanApplyOrderResponse storeOrder : orderList) {
|
||||||
|
// 订单详情对象列表
|
||||||
|
List<StoreOrderInfo> orderInfoList = storeOrderInfoService.getListByOrderNo(storeOrder.getOrderId());
|
||||||
|
List<OrderInfoResponse> infoResponseList = CollUtil.newArrayList();
|
||||||
|
orderInfoList.forEach(e -> {
|
||||||
|
OrderInfoResponse orderInfoResponse = new OrderInfoResponse();
|
||||||
|
orderInfoResponse.setStoreName(e.getProductName());
|
||||||
|
orderInfoResponse.setImage(e.getImage());
|
||||||
|
orderInfoResponse.setCartNum(e.getPayNum());
|
||||||
|
orderInfoResponse.setPrice(ObjectUtil.isNotNull(e.getVipPrice()) ? e.getVipPrice() : e.getPrice());
|
||||||
|
orderInfoResponse.setProductId(e.getProductId());
|
||||||
|
orderInfoResponse.setCouponPrice(e.getCouponPrice());
|
||||||
|
orderInfoResponse.setAttrId(e.getAttrValueId());
|
||||||
|
infoResponseList.add(orderInfoResponse);
|
||||||
|
});
|
||||||
|
storeOrder.setOrderInfoList(infoResponseList);
|
||||||
|
}
|
||||||
|
return CommonPage.restPage(orderList);
|
||||||
|
}
|
||||||
|
|
||||||
private ComputedOrderPriceResponse computedPrice(OrderComputedPriceRequest request, OrderInfoVo orderInfoVo, User user) {
|
private ComputedOrderPriceResponse computedPrice(OrderComputedPriceRequest request, OrderInfoVo orderInfoVo, User user) {
|
||||||
// 计算各种价格
|
// 计算各种价格
|
||||||
ComputedOrderPriceResponse priceResponse = new ComputedOrderPriceResponse();
|
ComputedOrderPriceResponse priceResponse = new ComputedOrderPriceResponse();
|
||||||
@ -1270,7 +1297,6 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
soInfo.setWeight(detailVo.getWeight());
|
soInfo.setWeight(detailVo.getWeight());
|
||||||
soInfo.setVolume(detailVo.getVolume());
|
soInfo.setVolume(detailVo.getVolume());
|
||||||
soInfo.setCouponPrice(detailVo.getCouponPrice());
|
soInfo.setCouponPrice(detailVo.getCouponPrice());
|
||||||
soInfo.setDeliveryTime(request.getDeliveryTime());
|
|
||||||
if (ObjectUtil.isNotNull(detailVo.getGiveIntegral()) && detailVo.getGiveIntegral() > 0) {
|
if (ObjectUtil.isNotNull(detailVo.getGiveIntegral()) && detailVo.getGiveIntegral() > 0) {
|
||||||
soInfo.setGiveIntegral(detailVo.getGiveIntegral());
|
soInfo.setGiveIntegral(detailVo.getGiveIntegral());
|
||||||
} else {
|
} else {
|
||||||
@ -1369,6 +1395,7 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
storeOrder.setPaid(false);
|
storeOrder.setPaid(false);
|
||||||
storeOrder.setCost(BigDecimal.ZERO);
|
storeOrder.setCost(BigDecimal.ZERO);
|
||||||
storeOrder.setType(0);
|
storeOrder.setType(0);
|
||||||
|
storeOrder.setDeliveryTime(request.getDeliveryTime());
|
||||||
if (orderInfoVo.getIsVideo()) {
|
if (orderInfoVo.getIsVideo()) {
|
||||||
storeOrder.setType(1);// 视频号订单
|
storeOrder.setType(1);// 视频号订单
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.zbkj.common.constants.Constants;
|
import com.zbkj.common.constants.Constants;
|
||||||
|
import com.zbkj.common.constants.SysConfigConstants;
|
||||||
import com.zbkj.common.constants.TaskConstants;
|
import com.zbkj.common.constants.TaskConstants;
|
||||||
import com.zbkj.common.exception.CrmebException;
|
import com.zbkj.common.exception.CrmebException;
|
||||||
import com.zbkj.common.model.order.StoreOrder;
|
import com.zbkj.common.model.order.StoreOrder;
|
||||||
@ -59,6 +60,9 @@ public class OrderTaskServiceImpl implements OrderTaskService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private OrderPayService orderPayService;
|
private OrderPayService orderPayService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SystemConfigService systemConfigService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户取消订单
|
* 用户取消订单
|
||||||
* @author Mr.Zhang
|
* @author Mr.Zhang
|
||||||
@ -269,6 +273,8 @@ public class OrderTaskServiceImpl implements OrderTaskService {
|
|||||||
if (CollUtil.isEmpty(orderList)) {
|
if (CollUtil.isEmpty(orderList)) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
String delivery_auto_complete_num = systemConfigService.getValueByKey(SysConfigConstants.DELIVERY_AUTO_COMPLETE_NUM);
|
||||||
|
// String express_auto_complete_num = systemConfigService.getValueByKey(SysConfigConstants.EXPRESS_AUTO_COMPLETE_NUM);
|
||||||
logger.info("OrderTaskServiceImpl.autoComplete | size:0");
|
logger.info("OrderTaskServiceImpl.autoComplete | size:0");
|
||||||
|
|
||||||
// 根据订单状态表判断订单是否可以自动完成
|
// 根据订单状态表判断订单是否可以自动完成
|
||||||
@ -279,7 +285,8 @@ public class OrderTaskServiceImpl implements OrderTaskService {
|
|||||||
continue ;
|
continue ;
|
||||||
}
|
}
|
||||||
// 判断是否到自动完成时间(收货时间向后偏移7天)
|
// 判断是否到自动完成时间(收货时间向后偏移7天)
|
||||||
String comTime = DateUtil.addDay(orderStatus.getCreateTime(), 7, Constants.DATE_FORMAT);
|
// 快递是7天,配送是2天
|
||||||
|
String comTime = DateUtil.addDay(orderStatus.getCreateTime(), Integer.parseInt(delivery_auto_complete_num), Constants.DATE_FORMAT);
|
||||||
int compareDate = DateUtil.compareDate(comTime, DateUtil.nowDateTime(Constants.DATE_FORMAT), Constants.DATE_FORMAT);
|
int compareDate = DateUtil.compareDate(comTime, DateUtil.nowDateTime(Constants.DATE_FORMAT), Constants.DATE_FORMAT);
|
||||||
if (compareDate < 0) {
|
if (compareDate < 0) {
|
||||||
continue ;
|
continue ;
|
||||||
@ -328,6 +335,7 @@ public class OrderTaskServiceImpl implements OrderTaskService {
|
|||||||
reply.setAvatar(user.getAvatar());
|
reply.setAvatar(user.getAvatar());
|
||||||
reply.setSku(orderInfo.getInfo().getSku());
|
reply.setSku(orderInfo.getInfo().getSku());
|
||||||
reply.setCreateTime(DateUtil.nowDateTime());
|
reply.setCreateTime(DateUtil.nowDateTime());
|
||||||
|
reply.setIsPrivacy(1); // 是否匿名 0否,1是
|
||||||
replyList.add(reply);
|
replyList.add(reply);
|
||||||
}
|
}
|
||||||
order.setStatus(Constants.ORDER_STATUS_INT_COMPLETE);
|
order.setStatus(Constants.ORDER_STATUS_INT_COMPLETE);
|
||||||
|
@ -1,131 +0,0 @@
|
|||||||
package com.zbkj.service.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.zbkj.common.exception.CrmebException;
|
|
||||||
import com.zbkj.common.model.activity.ActivityRegister;
|
|
||||||
import com.zbkj.common.model.game.Game;
|
|
||||||
import com.zbkj.common.model.place.PlaceRegister;
|
|
||||||
import com.zbkj.common.model.user.User;
|
|
||||||
import com.zbkj.common.page.CommonPage;
|
|
||||||
import com.zbkj.common.request.*;
|
|
||||||
import com.zbkj.common.response.ActivityRegisterResponse;
|
|
||||||
import com.zbkj.common.response.PlaceRegisterResponse;
|
|
||||||
import com.zbkj.common.vo.PlaceRegisterVo;
|
|
||||||
import com.zbkj.service.dao.PlaceRegisterDao;
|
|
||||||
import com.zbkj.service.service.PlaceRegisterService;
|
|
||||||
import com.zbkj.service.service.UserService;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class PlaceRegisterServiceImpl extends ServiceImpl<PlaceRegisterDao, PlaceRegister> implements PlaceRegisterService {
|
|
||||||
|
|
||||||
@Resource private PlaceRegisterDao dao;
|
|
||||||
|
|
||||||
@Autowired private UserService userService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean subscribe(PlaceRegisterFrontRequest request) {
|
|
||||||
Integer userId = userService.getUserIdException();
|
|
||||||
LambdaQueryWrapper<PlaceRegister> lambdaQueryWrapper = Wrappers.lambdaQuery();
|
|
||||||
lambdaQueryWrapper.select(PlaceRegister::getId);
|
|
||||||
lambdaQueryWrapper.eq(PlaceRegister::getUid, userId);
|
|
||||||
lambdaQueryWrapper.eq(PlaceRegister::getStatus, 0);
|
|
||||||
List<PlaceRegister> list = dao.selectList(lambdaQueryWrapper);
|
|
||||||
if (list.size() > 0) {
|
|
||||||
throw new CrmebException("您目前存在正在审核的预约信息,请注意来电");
|
|
||||||
}
|
|
||||||
PlaceRegister add = JSON.parseObject(JSON.toJSONString(request), PlaceRegister.class);
|
|
||||||
add.setUid(userId);
|
|
||||||
add.setStatus(0);
|
|
||||||
dao.insert(add);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageInfo<PlaceRegisterVo> getAdminList(PlaceRegisterSearchRequest request, PageParamRequest pageParamRequest) {
|
|
||||||
Page<PlaceRegister> page = PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
|
||||||
LambdaQueryWrapper<PlaceRegister> lambdaQueryWrapper = Wrappers.lambdaQuery();
|
|
||||||
if (!StringUtils.isBlank(request.getKeywords())) {
|
|
||||||
lambdaQueryWrapper.and(i -> i
|
|
||||||
.or().like(PlaceRegister::getUserName, request.getKeywords())
|
|
||||||
.or().like(PlaceRegister::getCellPhone, request.getKeywords()));
|
|
||||||
}
|
|
||||||
if (null != request.getStatus()) {
|
|
||||||
lambdaQueryWrapper.eq(PlaceRegister::getStatus, request.getStatus());
|
|
||||||
}
|
|
||||||
if (null != request.getBeginDate()) {
|
|
||||||
lambdaQueryWrapper.ge(PlaceRegister::getSubscribeDate, request.getBeginDate());
|
|
||||||
}
|
|
||||||
if (null != request.getEndDate()) {
|
|
||||||
lambdaQueryWrapper.le(PlaceRegister::getSubscribeDate, request.getEndDate());
|
|
||||||
}
|
|
||||||
lambdaQueryWrapper.eq(PlaceRegister::getIsShow, false);
|
|
||||||
lambdaQueryWrapper.orderByAsc(PlaceRegister::getStatus).orderByDesc(PlaceRegister::getId);
|
|
||||||
List<PlaceRegister> list = dao.selectList(lambdaQueryWrapper);
|
|
||||||
List<PlaceRegisterVo> voList = JSON.parseArray(JSON.toJSONString(list), PlaceRegisterVo.class);
|
|
||||||
return CommonPage.copyPageInfo(page, voList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean updateRegister(Integer id, PlaceRegisterRequest request) {
|
|
||||||
PlaceRegister upd = JSON.parseObject(JSON.toJSONString(request), PlaceRegister.class);
|
|
||||||
upd.setId(id);
|
|
||||||
if (null != upd.getStatus() && upd.getStatus() == 2) { upd.setCancelData(new Date()); }
|
|
||||||
dao.updateById(upd);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PlaceRegister getDetail(Integer id) {
|
|
||||||
PlaceRegister pr = getById(id);
|
|
||||||
if (ObjectUtil.isNull(pr)) {
|
|
||||||
throw new CrmebException("数据不存在");
|
|
||||||
}
|
|
||||||
return pr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageInfo<PlaceRegisterResponse> myRegisterList(PageParamRequest pageParamRequest) {
|
|
||||||
User info = userService.getInfoException();
|
|
||||||
Page<PlaceRegisterResponse> page = PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
|
||||||
List<PlaceRegisterResponse> list = dao.myRegisterList(info.getUid());
|
|
||||||
return CommonPage.copyPageInfo(page, list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean cancel(PlaceCancelRequest request) {
|
|
||||||
PlaceRegister pr = dao.selectById(Integer.parseInt(request.getPlaceActivityId()));
|
|
||||||
if (null != pr && pr.getStatus() == 0) {
|
|
||||||
PlaceRegister upd = new PlaceRegister();
|
|
||||||
upd.setId(pr.getId());
|
|
||||||
upd.setStatus(2);
|
|
||||||
upd.setCancelReason(request.getCancelReason());
|
|
||||||
dao.updateById(upd);
|
|
||||||
} else {
|
|
||||||
throw new CrmebException("当前状态不能取消了欧");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean recordsDelete(Integer id) {
|
|
||||||
PlaceRegister upd = new PlaceRegister();
|
|
||||||
upd.setId(id);
|
|
||||||
upd.setIsShow(1);
|
|
||||||
dao.updateById(upd);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,10 +4,18 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
||||||
import com.zbkj.service.dao.StoreOrderReturnInfoDao;
|
import com.zbkj.service.dao.StoreOrderReturnInfoDao;
|
||||||
import com.zbkj.service.service.StoreOrderReturnInfoService;
|
import com.zbkj.service.service.StoreOrderReturnInfoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class StoreOrderReturnInfoServiceImpl extends ServiceImpl<StoreOrderReturnInfoDao, StoreOrderReturnInfo> implements StoreOrderReturnInfoService {
|
public class StoreOrderReturnInfoServiceImpl extends ServiceImpl<StoreOrderReturnInfoDao, StoreOrderReturnInfo> implements StoreOrderReturnInfoService {
|
||||||
|
|
||||||
|
@Autowired private StoreOrderReturnInfoDao dao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StoreOrderReturnInfo> selectByReturnId(Integer id) {
|
||||||
|
return dao.selectByReturnId(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,19 +2,32 @@ package com.zbkj.service.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.zbkj.common.exception.CrmebException;
|
||||||
import com.zbkj.common.model.order.StoreOrderReturn;
|
import com.zbkj.common.model.order.StoreOrderReturn;
|
||||||
|
import com.zbkj.common.model.order.StoreOrderReturnInfo;
|
||||||
|
import com.zbkj.common.page.CommonPage;
|
||||||
|
import com.zbkj.common.request.PageParamRequest;
|
||||||
|
import com.zbkj.common.response.ApplyRecordsResponse;
|
||||||
import com.zbkj.service.dao.StoreOrderReturnDao;
|
import com.zbkj.service.dao.StoreOrderReturnDao;
|
||||||
import com.zbkj.service.service.StoreOrderReturnInfoService;
|
import com.zbkj.service.service.StoreOrderReturnInfoService;
|
||||||
import com.zbkj.service.service.StoreOrderReturnService;
|
import com.zbkj.service.service.StoreOrderReturnService;
|
||||||
|
import com.zbkj.service.service.StoreOrderService;
|
||||||
|
import com.zbkj.service.service.UserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class StoreOrderReturnServiceImpl extends ServiceImpl<StoreOrderReturnDao, StoreOrderReturn> implements StoreOrderReturnService {
|
public class StoreOrderReturnServiceImpl extends ServiceImpl<StoreOrderReturnDao, StoreOrderReturn> implements StoreOrderReturnService {
|
||||||
|
|
||||||
@Autowired private StoreOrderReturnDao dao;
|
@Autowired private StoreOrderReturnDao dao;
|
||||||
|
@Autowired private UserService userService;
|
||||||
|
@Autowired @Lazy private StoreOrderService storeOrderService;
|
||||||
@Autowired private StoreOrderReturnInfoService storeOrderReturnInfoService;
|
@Autowired private StoreOrderReturnInfoService storeOrderReturnInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -48,4 +61,29 @@ public class StoreOrderReturnServiceImpl extends ServiceImpl<StoreOrderReturnDao
|
|||||||
upd.setReturnState(2);
|
upd.setReturnState(2);
|
||||||
dao.updateById(upd);
|
dao.updateById(upd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonPage<ApplyRecordsResponse> applyRecordsList(PageParamRequest page) {
|
||||||
|
Integer userId = userService.getUserIdException();
|
||||||
|
PageHelper.startPage(page.getPage(), page.getLimit());
|
||||||
|
List<ApplyRecordsResponse> list = dao.applyRecordsList(userId, null);
|
||||||
|
PageHelper.clearPage();
|
||||||
|
for (ApplyRecordsResponse ar : list) {
|
||||||
|
ar.setReturnInfoList(storeOrderReturnInfoService.selectByReturnId(ar.getId()));
|
||||||
|
}
|
||||||
|
return CommonPage.restPage(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplyRecordsResponse getApplyRecord(String id) {
|
||||||
|
Integer userId = userService.getUserIdException();
|
||||||
|
List<ApplyRecordsResponse> list = dao.applyRecordsList(userId, Integer.parseInt(id));
|
||||||
|
if (list.isEmpty()) { throw new CrmebException("未找到信息"); }
|
||||||
|
|
||||||
|
ApplyRecordsResponse response = list.get(0);
|
||||||
|
List<StoreOrderReturnInfo> returnInfoList = storeOrderReturnInfoService.selectByReturnId(response.getId());
|
||||||
|
response.setReturnInfoList(returnInfoList);
|
||||||
|
response.setReturnNum(returnInfoList.stream().map(StoreOrderReturnInfo::getReturnNum).reduce(0, Integer::sum));
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ import com.zbkj.service.service.*;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.support.TransactionTemplate;
|
import org.springframework.transaction.support.TransactionTemplate;
|
||||||
|
|
||||||
@ -118,7 +119,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderDao, StoreOrder
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SmsTemplateService smsTemplateService;
|
private SmsTemplateService smsTemplateService;
|
||||||
|
|
||||||
@Autowired private StoreOrderReturnService storeOrderReturnService;
|
@Autowired @Lazy
|
||||||
|
private StoreOrderReturnService storeOrderReturnService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
@ -1414,6 +1416,11 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderDao, StoreOrder
|
|||||||
return dao.selectOrderReplyList(userId, type);
|
return dao.selectOrderReplyList(userId, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CanApplyOrderResponse> canApplyOrderList(Integer userId) {
|
||||||
|
return dao.canApplyOrderList(userId);
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////// 以下为自定义方法
|
///////////////////////////////////////////////////////////////////////////////////////////////////// 以下为自定义方法
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +24,6 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 易联云打印订单 service
|
* 易联云打印订单 service
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class YlyPrintServiceImpl implements YlyPrintService {
|
public class YlyPrintServiceImpl implements YlyPrintService {
|
||||||
@ -40,34 +39,35 @@ public class YlyPrintServiceImpl implements YlyPrintService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private YlyUtil ylyUtil;
|
private YlyUtil ylyUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 易联云打印商品信息
|
* 易联云打印商品信息
|
||||||
*
|
*
|
||||||
* @param orderId 订单id
|
* @param orderId 订单id
|
||||||
* @param isAuto 是否自动打印
|
* @param isAuto 是否自动打印
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void YlyPrint(String orderId,boolean isAuto) {
|
public void YlyPrint(String orderId, boolean isAuto) {
|
||||||
if(ylyUtil.checkYlyPrintStatus()){
|
if (ylyUtil.checkYlyPrintStatus()) {
|
||||||
throw new CrmebException("易联云 未开启打印");
|
throw new CrmebException("易联云 未开启打印");
|
||||||
}
|
}
|
||||||
// 判断是否开启自动打印
|
// 判断是否开启自动打印
|
||||||
if(isAuto && ylyUtil.checkYlyPrintAfterPaySuccess()){
|
if (isAuto && ylyUtil.checkYlyPrintAfterPaySuccess()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
StoreOrder exitOrder = storeOrderService.getByOderId(orderId);
|
StoreOrder exitOrder = storeOrderService.getByOderId(orderId);
|
||||||
if(ObjectUtil.isNull(exitOrder)){
|
if (ObjectUtil.isNull(exitOrder)) {
|
||||||
throw new CrmebException("易联云 打印时未找到 订单信息");
|
throw new CrmebException("易联云 打印时未找到 订单信息");
|
||||||
}
|
}
|
||||||
if(!exitOrder.getPaid()){
|
if (!exitOrder.getPaid()) {
|
||||||
throw new CrmebException("易联云 打印时出错, 订单未支付");
|
throw new CrmebException("易联云 打印时出错, 订单未支付");
|
||||||
}
|
}
|
||||||
List<StoreOrderInfoOldVo> exitOrderInfo = storeOrderInfoService.getOrderListByOrderId(exitOrder.getId());
|
List<StoreOrderInfoOldVo> exitOrderInfo = storeOrderInfoService.getOrderListByOrderId(exitOrder.getId());
|
||||||
List<YlyPrintRequestGoods> goods = new ArrayList<>();
|
List<YlyPrintRequestGoods> goods = new ArrayList<>();
|
||||||
for (StoreOrderInfoOldVo storeOrderInfo : exitOrderInfo) {
|
for (StoreOrderInfoOldVo storeOrderInfo : exitOrderInfo) {
|
||||||
goods.add(new YlyPrintRequestGoods(storeOrderInfo.getInfo().getProductName()
|
goods.add(new YlyPrintRequestGoods(storeOrderInfo.getInfo().getProductName()
|
||||||
,storeOrderInfo.getInfo().getPrice().toString(),
|
, storeOrderInfo.getInfo().getPrice().toString(),
|
||||||
storeOrderInfo.getInfo().getPayNum()+"",
|
storeOrderInfo.getInfo().getPayNum() + "",
|
||||||
exitOrder.getPayPrice().toString()));
|
exitOrder.getPayPrice().toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,18 +21,9 @@ import java.net.URLEncoder;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
/** 易联云 工具类
|
* 易联云 工具类
|
||||||
* +----------------------------------------------------------------------
|
*/
|
||||||
* * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
||||||
* * +----------------------------------------------------------------------
|
|
||||||
* * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
|
||||||
* * +----------------------------------------------------------------------
|
|
||||||
* * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
||||||
* * +----------------------------------------------------------------------
|
|
||||||
* * | Author: CRMEB Team <admin@crmeb.com>
|
|
||||||
* * +----------------------------------------------------------------------
|
|
||||||
**/
|
|
||||||
@Component
|
@Component
|
||||||
public class YlyUtil {
|
public class YlyUtil {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(YlyUtil.class);
|
private static final Logger logger = LoggerFactory.getLogger(YlyUtil.class);
|
||||||
@ -117,8 +108,8 @@ public class YlyUtil {
|
|||||||
instant();
|
instant();
|
||||||
RequestMethod.getInstance().printerSetVoice(
|
RequestMethod.getInstance().printerSetVoice(
|
||||||
ylyAccessTokenResponse.getBody().getAccess_token(),
|
ylyAccessTokenResponse.getBody().getAccess_token(),
|
||||||
machine_code,"[\"CRMEB 来新单了\",9,0]","false",
|
machine_code,"[\"FOOD 来新单了\",9,0]","false",
|
||||||
"0","ORDER xxx");
|
"0","FOOD xxx");
|
||||||
logger.info("设置语音成功");
|
logger.info("设置语音成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
<?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.zbkj.service.dao.PlaceRegisterDao">
|
|
||||||
|
|
||||||
<!-- 根据包名 模块名 以及类名 生成Mapper XML 配置文件 -->
|
|
||||||
<resultMap type="com.zbkj.common.model.place.PlaceRegister" id="ebPlaceRegisterMap">
|
|
||||||
<result property="id" column="id"/>
|
|
||||||
<result property="uid" column="uid"/>
|
|
||||||
<result property="userName" column="user_name"/>
|
|
||||||
<result property="cellPhone" column="cell_phone"/>
|
|
||||||
<result property="subscribeDate" column="subscribe_date"/>
|
|
||||||
<result property="attendNum" column="attend_num"/>
|
|
||||||
<result property="status" column="status"/>
|
|
||||||
<result property="cancelData" column="cancel_data"/>
|
|
||||||
<result property="cancelReason" column="cancel_reason"/>
|
|
||||||
<result property="createDate" column="create_date"/>
|
|
||||||
<result property="changedDate" column="changed_date"/>
|
|
||||||
<result property="remark" column="remark"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<select id="myRegisterList" resultType="com.zbkj.common.response.PlaceRegisterResponse">
|
|
||||||
select
|
|
||||||
id placeActivityId,
|
|
||||||
user_name userName,
|
|
||||||
cell_phone cellPhone,
|
|
||||||
subscribe_date subscribeDate,
|
|
||||||
attend_num attendNum,
|
|
||||||
status,
|
|
||||||
cancel_data cancelData,
|
|
||||||
cancel_reason cancelReason,
|
|
||||||
remark
|
|
||||||
from eb_place_register where uid = #{userId} and is_show = 0 order by id desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
@ -2,6 +2,19 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.zbkj.service.dao.StoreOrderDao">
|
<mapper namespace="com.zbkj.service.dao.StoreOrderDao">
|
||||||
|
|
||||||
|
<select id="canApplyOrderList" resultType="com.zbkj.common.response.CanApplyOrderResponse">
|
||||||
|
SELECT o.id, o.order_id orderId, o.create_time createTime, o.pay_price payPrice
|
||||||
|
FROM eb_store_order o
|
||||||
|
INNER JOIN eb_store_order_status os on o.id = os.oid and os.change_type = 'user_take_delivery' and DATE_ADD(os.create_time, INTERVAL 2 DAY) > now()
|
||||||
|
WHERE o.paid = 1
|
||||||
|
AND o.`status` = 2
|
||||||
|
AND o.refund_status = 0
|
||||||
|
AND o.is_del = 0
|
||||||
|
AND o.is_system_del = 0
|
||||||
|
AND o.uid = #{id}
|
||||||
|
ORDER BY o.id DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectOrderReplyList" resultType="com.zbkj.common.response.OrderReplyListResponse">
|
<select id="selectOrderReplyList" resultType="com.zbkj.common.response.OrderReplyListResponse">
|
||||||
SELECT
|
SELECT
|
||||||
o.id, o.order_id orderNo, o.create_time createTime,
|
o.id, o.order_id orderNo, o.create_time createTime,
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
<?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.zbkj.service.dao.StoreOrderReturnInfoDao">
|
||||||
|
|
||||||
|
<select id="selectByReturnId" resultType="com.zbkj.common.model.order.StoreOrderReturnInfo">
|
||||||
|
SELECT
|
||||||
|
oi.product_id productId,
|
||||||
|
oi.product_name storeName,
|
||||||
|
oi.image,
|
||||||
|
oi.attr_value_id attrValueId,
|
||||||
|
ri.return_num returnNum
|
||||||
|
FROM eb_store_order_info oi
|
||||||
|
INNER JOIN eb_store_order_return_info ri ON oi.order_id = ri.order_id AND oi.attr_value_id = ri.attr_value_id
|
||||||
|
where ri.return_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,15 @@
|
|||||||
|
<?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.zbkj.service.dao.StoreOrderReturnDao">
|
||||||
|
|
||||||
|
<select id="applyRecordsList" resultType="com.zbkj.common.response.ApplyRecordsResponse">
|
||||||
|
SELECT r.id, r.code, r.order_id orderId, r.return_state returnState,
|
||||||
|
r.return_amount returnAmount, r.create_time createTime, return_verify_date returnVerifyDate,
|
||||||
|
r.return_reason returnReason, r.return_image returnImage, refund_verify_fail_reason refundVerifyFailReason
|
||||||
|
FROM eb_store_order_return r
|
||||||
|
WHERE r.uid = #{uid}
|
||||||
|
<if test="returnId != null"> and r.id = #{returnId} </if>
|
||||||
|
ORDER BY id DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user