mirror of
https://gitee.com/gz-yami/mall4j.git
synced 2026-03-22 09:17:16 +08:00
精简部分代码
This commit is contained in:
@@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.admin.controller;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.yami.shop.common.util.PageParam;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.yami.shop.service.PointsChangeService;
|
||||
import com.yami.shop.bean.model.PointsChange;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/pointsChange")
|
||||
public class PointsChangeController {
|
||||
|
||||
@Autowired
|
||||
private PointsChangeService pointsChangeService;
|
||||
|
||||
/**
|
||||
* 分页获取
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('admin:pointsChange:page')")
|
||||
public ResponseEntity<IPage<PointsChange>> page(PointsChange pointsChange,PageParam<PointsChange> page){
|
||||
IPage<PointsChange> list = pointsChangeService.page(page,new LambdaQueryWrapper<PointsChange>());
|
||||
return ResponseEntity.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*/
|
||||
@GetMapping("/info/{id}")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsChange:info')")
|
||||
public ResponseEntity<PointsChange> info(@PathVariable("id") Long id){
|
||||
PointsChange pointsChange = pointsChangeService.getById(id);
|
||||
return ResponseEntity.ok(pointsChange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('admin:pointsChange:save')")
|
||||
public ResponseEntity<Void> save(@RequestBody @Valid PointsChange pointsChange){
|
||||
pointsChangeService.save(pointsChange);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('admin:pointsChange:update')")
|
||||
public ResponseEntity<Void> update(@RequestBody @Valid PointsChange pointsChange){
|
||||
pointsChangeService.updateById(pointsChange);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsChange:delete')")
|
||||
public ResponseEntity<Void> delete(@PathVariable Long id){
|
||||
pointsChangeService.removeById(id);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.admin.controller;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.yami.shop.security.util.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.yami.shop.common.util.PageParam;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.yami.shop.service.PointsService;
|
||||
import com.yami.shop.bean.model.Points;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/points/points")
|
||||
public class PointsController {
|
||||
|
||||
@Autowired
|
||||
private PointsService pointsService;
|
||||
|
||||
/**
|
||||
* 分页获取
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('points:points:page')")
|
||||
public ResponseEntity<IPage<Points>> page(Points points,PageParam<Points> page){
|
||||
IPage<Points> list = pointsService.page(page,new LambdaQueryWrapper<Points>());
|
||||
return ResponseEntity.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页获取(携带user)
|
||||
*/
|
||||
@GetMapping("/page/anduser")
|
||||
@PreAuthorize("@pms.hasPermission('points:points:page')")
|
||||
public ResponseEntity<IPage<Points>> andUserPage( Points points ,PageParam< Points> page){
|
||||
points.setShopId(SecurityUtils.getSysUser().getShopId());
|
||||
IPage<Points> list = pointsService.getPointsAndSysUserPage(page,points);
|
||||
return ResponseEntity.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取(只取name和id)
|
||||
*/
|
||||
@GetMapping("/page/name")
|
||||
@PreAuthorize("@pms.hasPermission('points:points:page')")
|
||||
public ResponseEntity<List<Points>> nameAndIdPage(Points points){
|
||||
points.setShopId(SecurityUtils.getSysUser().getShopId());
|
||||
List<Points> list = pointsService.getNameAndId(points);
|
||||
return ResponseEntity.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*/
|
||||
@GetMapping("/info/{id}")
|
||||
@PreAuthorize("@pms.hasPermission('points:points:info')")
|
||||
public ResponseEntity<Points> info(@PathVariable("id") Long id){
|
||||
Points points = pointsService.getById(id);
|
||||
return ResponseEntity.ok(points);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('points:points:save')")
|
||||
public ResponseEntity<Void> save(@RequestBody @Valid Points points){
|
||||
points.setModifier(SecurityUtils.getSysUser().getUserId());
|
||||
points.setUpdateTime(new Date());
|
||||
points.setShopId(SecurityUtils.getSysUser().getShopId());
|
||||
pointsService.save(points);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('points:points:update')")
|
||||
public ResponseEntity<Void> update(@RequestBody @Valid Points points){
|
||||
points.setModifier(SecurityUtils.getSysUser().getUserId());
|
||||
points.setUpdateTime(new Date());
|
||||
pointsService.updateById(points);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('points:points:delete')")
|
||||
public ResponseEntity<Void> delete(@RequestBody List<Long> ids){
|
||||
pointsService.removeByIds(ids);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.admin.controller;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.yami.shop.common.util.PageParam;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.yami.shop.service.PointsProdService;
|
||||
import com.yami.shop.bean.model.PointsProd;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/pointsProd")
|
||||
public class PointsProdController {
|
||||
|
||||
@Autowired
|
||||
private PointsProdService pointsProdService;
|
||||
|
||||
/**
|
||||
* 分页获取
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsProd:page')")
|
||||
public ResponseEntity<IPage<PointsProd>> page(PointsProd pointsProd,PageParam<PointsProd> page){
|
||||
IPage<PointsProd> list = pointsProdService.page(page,new LambdaQueryWrapper<PointsProd>());
|
||||
return ResponseEntity.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*/
|
||||
@GetMapping("/info/{id}")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsProd:info')")
|
||||
public ResponseEntity<PointsProd> info(@PathVariable("id") Long id){
|
||||
PointsProd pointsProd = pointsProdService.getById(id);
|
||||
return ResponseEntity.ok(pointsProd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('admin:pointsProd:save')")
|
||||
public ResponseEntity<Void> save(@RequestBody @Valid PointsProd pointsProd){
|
||||
pointsProdService.save(pointsProd);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PutMapping
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsProd:update')")
|
||||
public ResponseEntity<Void> update(@RequestBody @Valid PointsProd pointsProd){
|
||||
pointsProdService.updateById(pointsProd);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsProd:delete')")
|
||||
public ResponseEntity<Void> delete(@PathVariable Long id){
|
||||
pointsProdService.removeById(id);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.admin.controller;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.yami.shop.common.util.PageParam;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
|
||||
|
||||
import com.yami.shop.service.PointsWalletService;
|
||||
import com.yami.shop.bean.model.PointsWallet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/pointsWallet")
|
||||
public class PointsWalletController {
|
||||
|
||||
@Autowired
|
||||
private PointsWalletService pointsWalletService;
|
||||
|
||||
/**
|
||||
* 分页获取
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsWallet:page')")
|
||||
public ResponseEntity<IPage<PointsWallet>> page(PointsWallet pointsWallet,PageParam<PointsWallet> page){
|
||||
IPage<PointsWallet> list = pointsWalletService.page(page,new LambdaQueryWrapper<PointsWallet>());
|
||||
return ResponseEntity.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*/
|
||||
@GetMapping("/info/{id}")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsWallet:info')")
|
||||
public ResponseEntity<PointsWallet> info(@PathVariable("id") Long id){
|
||||
PointsWallet pointsWallet = pointsWalletService.getById(id);
|
||||
return ResponseEntity.ok(pointsWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsWallet:save')")
|
||||
public ResponseEntity<Void> save(@RequestBody @Valid PointsWallet pointsWallet){
|
||||
pointsWalletService.save(pointsWallet);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PutMapping
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsWallet:update')")
|
||||
public ResponseEntity<Void> update(@RequestBody @Valid PointsWallet pointsWallet){
|
||||
pointsWalletService.updateById(pointsWallet);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
//@PreAuthorize("@pms.hasPermission('admin:pointsWallet:delete')")
|
||||
public ResponseEntity<Void> delete(@PathVariable Long id){
|
||||
pointsWalletService.removeById(id);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
}
|
||||
@@ -10,32 +10,30 @@
|
||||
|
||||
package com.yami.shop.api.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yami.shop.common.util.PageParam;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import com.yami.shop.bean.app.dto.SkuDto;
|
||||
import com.yami.shop.bean.app.dto.TagProductDto;
|
||||
import com.yami.shop.bean.model.Basket;
|
||||
import com.yami.shop.bean.model.Sku;
|
||||
import com.yami.shop.common.exception.YamiShopBindException;
|
||||
import com.yami.shop.security.service.YamiUser;
|
||||
import com.yami.shop.service.*;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.yami.shop.bean.app.dto.ProductDto;
|
||||
import com.yami.shop.bean.app.dto.TagProductDto;
|
||||
import com.yami.shop.bean.model.Product;
|
||||
import com.yami.shop.bean.model.Sku;
|
||||
import com.yami.shop.bean.model.Transport;
|
||||
|
||||
import com.yami.shop.common.util.PageParam;
|
||||
import com.yami.shop.service.ProductService;
|
||||
import com.yami.shop.service.SkuService;
|
||||
import com.yami.shop.service.TransportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import ma.glasnost.orika.MapperFacade;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/prod")
|
||||
@@ -106,15 +104,6 @@ public class ProdController {
|
||||
return ResponseEntity.ok(productDtoIPage);
|
||||
}
|
||||
|
||||
@GetMapping("/discountProdList")
|
||||
@ApiOperation(value = "限时特惠", notes = "获取限时特惠商品列表")
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
public ResponseEntity<IPage<ProductDto>> discountProdList(PageParam<ProductDto> page) {
|
||||
IPage<ProductDto> productDtoIPage = prodService.discountProdList(page);
|
||||
return ResponseEntity.ok(productDtoIPage);
|
||||
}
|
||||
|
||||
@GetMapping("/moreBuyProdList")
|
||||
@ApiOperation(value = "每日疯抢", notes = "获取销量最多的商品列表")
|
||||
@ApiImplicitParams({})
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.bean.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yami.shop.bean.vo.SysUserVO;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
@Data
|
||||
@TableName( "tz_points")
|
||||
public class Points {
|
||||
/**
|
||||
* 积分id
|
||||
*/
|
||||
@TableId
|
||||
|
||||
private Long pointsId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 积分名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 状态(0 禁用 1启用)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
private Long modifier;
|
||||
|
||||
/**
|
||||
* 关联操作人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private SysUserVO sysUser;
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.bean.model;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName( "tz_points_change")
|
||||
public class PointsChange {
|
||||
/**
|
||||
* 积分流动记录表
|
||||
*/
|
||||
|
||||
private Long pointsChangeId;
|
||||
|
||||
/**
|
||||
* 积分钱包id
|
||||
*/
|
||||
|
||||
private Long pointsWalletId;
|
||||
|
||||
/**
|
||||
* 增加或减少(增加 0 减少 1)
|
||||
*/
|
||||
|
||||
private Integer addOrReduce;
|
||||
|
||||
/**
|
||||
* 原因(订单,邀请,签到,兑换)
|
||||
*/
|
||||
private Integer reason;
|
||||
|
||||
/**
|
||||
* 积分状态(0:用户未收货待结算,1:已结算 2:用户退货退单)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 积分数额
|
||||
*/
|
||||
|
||||
private Double pointsNumber;
|
||||
|
||||
/**
|
||||
* 关联订单id
|
||||
*/
|
||||
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 商户订单id
|
||||
*/
|
||||
|
||||
private Long merchantOrderId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.bean.model;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName( "tz_points_prod")
|
||||
public class PointsProd {
|
||||
/**
|
||||
* 积分商品id
|
||||
*/
|
||||
|
||||
private Long pointsProdId;
|
||||
|
||||
/**
|
||||
* 所需积分id
|
||||
*/
|
||||
|
||||
private Long pointsId;
|
||||
|
||||
/**
|
||||
* 所需积分量
|
||||
*/
|
||||
|
||||
private Double pointsNumber;
|
||||
|
||||
/**
|
||||
* 所需金额
|
||||
*/
|
||||
private Double amount;
|
||||
|
||||
/**
|
||||
* 关联商品id
|
||||
*/
|
||||
|
||||
private Long prodId;
|
||||
|
||||
/**
|
||||
* 库存
|
||||
*/
|
||||
private Integer stocks;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 上架时间
|
||||
*/
|
||||
|
||||
private Date upperShelfTime;
|
||||
|
||||
/**
|
||||
* 下架时间
|
||||
*/
|
||||
|
||||
private Date lowerShelf;
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.bean.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName( "tz_points_wallet")
|
||||
public class PointsWallet {
|
||||
/**
|
||||
* 积分钱包id
|
||||
*/
|
||||
|
||||
private Long pointsWalletId;
|
||||
|
||||
/**
|
||||
* 积分Id
|
||||
*/
|
||||
|
||||
private Long pointsId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 待结算积分
|
||||
*/
|
||||
private Double unsettled;
|
||||
|
||||
/**
|
||||
* 已结算积分
|
||||
*/
|
||||
private Double settled;
|
||||
|
||||
/**
|
||||
* 积累收益积分
|
||||
*/
|
||||
private Double addup;
|
||||
|
||||
/**
|
||||
* 乐观锁
|
||||
*/
|
||||
@Version
|
||||
private Integer version;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.dao;
|
||||
|
||||
import com.yami.shop.bean.model.PointsChange;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface PointsChangeMapper extends BaseMapper<PointsChange> {
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yami.shop.bean.model.Points;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PointsMapper extends BaseMapper<Points> {
|
||||
IPage<Points> getPointsAndSysUserPage(Page page, @Param("points") Points points);
|
||||
|
||||
List<Points> getNameAndId(@Param("points") Points points);
|
||||
|
||||
void deleteByIds(@Param("ids") List<Long> ids);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.dao;
|
||||
|
||||
import com.yami.shop.bean.model.PointsProd;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface PointsProdMapper extends BaseMapper<PointsProd> {
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.dao;
|
||||
|
||||
import com.yami.shop.bean.model.PointsWallet;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface PointsWalletMapper extends BaseMapper<PointsWallet> {
|
||||
}
|
||||
@@ -14,14 +14,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yami.shop.bean.app.dto.ProdCommDataDto;
|
||||
import com.yami.shop.bean.app.dto.ProdCommDto;
|
||||
import com.yami.shop.bean.model.PointsWallet;
|
||||
import com.yami.shop.bean.model.ProdComm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProdCommMapper extends BaseMapper<ProdComm> {
|
||||
ProdCommDataDto getProdCommDataByProdId(@Param("prodId") Long prodId, @Param("userId") String userId);
|
||||
|
||||
|
||||
@@ -37,8 +37,6 @@ public interface ProductMapper extends BaseMapper<Product> {
|
||||
|
||||
IPage<ProductDto> pageByTagId(Page<ProductDto> page, @Param("tagId") Long tagId);
|
||||
|
||||
IPage<ProductDto> discountProdList(Page<ProductDto> page);
|
||||
|
||||
IPage<ProductDto> moreBuyProdList(Page<ProductDto> page);
|
||||
|
||||
IPage<ProductDto> pageByCategoryId(Page<ProductDto> page, @Param("categoryId") Long categoryId);
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yami.shop.bean.model.PointsChange;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
public interface PointsChangeService extends IService<PointsChange> {
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yami.shop.bean.model.PointsProd;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
public interface PointsProdService extends IService<PointsProd> {
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yami.shop.bean.model.Points;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
public interface PointsService extends IService<Points> {
|
||||
IPage<Points> getPointsAndSysUserPage(Page page ,Points points);
|
||||
|
||||
List<Points> getNameAndId(Points points);
|
||||
|
||||
void deleteByIds(List<Long> ids);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yami.shop.bean.model.PointsWallet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
public interface PointsWalletService extends IService<PointsWallet> {
|
||||
|
||||
}
|
||||
@@ -57,8 +57,6 @@ public interface ProductService extends IService<Product> {
|
||||
|
||||
IPage<ProductDto> pageByTagId(Page<ProductDto> page, Long tagId);
|
||||
|
||||
IPage<ProductDto> discountProdList(Page<ProductDto> page);
|
||||
|
||||
IPage<ProductDto> moreBuyProdList(Page<ProductDto> page);
|
||||
|
||||
IPage<ProductDto> pageByCategoryId(Page<ProductDto> page, Long categoryId);
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.yami.shop.bean.model.PointsChange;
|
||||
import com.yami.shop.dao.PointsChangeMapper;
|
||||
|
||||
import com.yami.shop.service.PointsChangeService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@Service
|
||||
public class PointsChangeServiceImpl extends ServiceImpl<PointsChangeMapper, PointsChange> implements PointsChangeService {
|
||||
|
||||
@Autowired
|
||||
private PointsChangeMapper pointsChangeMapper;
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.yami.shop.bean.model.PointsProd;
|
||||
import com.yami.shop.dao.PointsProdMapper;
|
||||
|
||||
import com.yami.shop.service.PointsProdService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@Service
|
||||
public class PointsProdServiceImpl extends ServiceImpl<PointsProdMapper, PointsProd> implements PointsProdService {
|
||||
|
||||
@Autowired
|
||||
private PointsProdMapper pointsProdMapper;
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.yami.shop.bean.model.Points;
|
||||
import com.yami.shop.dao.PointsMapper;
|
||||
|
||||
import com.yami.shop.service.PointsService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@Service
|
||||
public class PointsServiceImpl extends ServiceImpl<PointsMapper, Points> implements PointsService {
|
||||
|
||||
@Autowired
|
||||
private PointsMapper pointsMapper;
|
||||
|
||||
@Override
|
||||
public IPage<Points> getPointsAndSysUserPage(Page page,Points points) {
|
||||
return pointsMapper.getPointsAndSysUserPage(page,points);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Points> getNameAndId(Points points) {
|
||||
return pointsMapper.getNameAndId(points);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByIds(List<Long> ids) {
|
||||
pointsMapper.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
|
||||
*
|
||||
* https://www.gz-yami.com/
|
||||
*
|
||||
* 未经允许,不可做商业用途!
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.yami.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.yami.shop.bean.model.PointsWallet;
|
||||
import com.yami.shop.dao.PointsWalletMapper;
|
||||
|
||||
import com.yami.shop.service.PointsWalletService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lgh on 2019/04/10.
|
||||
*/
|
||||
@Service
|
||||
public class PointsWalletServiceImpl extends ServiceImpl<PointsWalletMapper, PointsWallet> implements PointsWalletService {
|
||||
|
||||
@Autowired
|
||||
private PointsWalletMapper pointsWalletMapper;
|
||||
|
||||
}
|
||||
@@ -169,11 +169,6 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
return productMapper.pageByTagId(page, tagId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ProductDto> discountProdList(Page<ProductDto> page) {
|
||||
return productMapper.discountProdList(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ProductDto> moreBuyProdList(Page<ProductDto> page) {
|
||||
return productMapper.moreBuyProdList(page);
|
||||
|
||||
@@ -1,16 +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.yami.shop.dao.PointsChangeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yami.shop.bean.model.PointsChange">
|
||||
<id column="points_change_id" jdbcType="BIGINT" property="pointsChangeId" />
|
||||
<result column="points_wallet_id" jdbcType="BIGINT" property="pointsWalletId" />
|
||||
<result column="add_or_reduce" jdbcType="TINYINT" property="addOrReduce" />
|
||||
<result column="reason" jdbcType="TINYINT" property="reason" />
|
||||
<result column="state" jdbcType="TINYINT" property="state" />
|
||||
<result column="points_number" jdbcType="DOUBLE" property="pointsNumber" />
|
||||
<result column="order_id" jdbcType="BIGINT" property="orderId" />
|
||||
<result column="merchant_order_id" jdbcType="BIGINT" property="merchantOrderId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -1,57 +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.yami.shop.dao.PointsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yami.shop.bean.model.Points">
|
||||
<id column="points_id" jdbcType="BIGINT" property="pointsId" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="state" jdbcType="TINYINT" property="state" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="modifier" jdbcType="BIGINT" property="modifier" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="Points_SysUser" type="com.yami.shop.bean.model.Points">
|
||||
<id column="points_id" jdbcType="BIGINT" property="pointsId" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="state" jdbcType="TINYINT" property="state" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="modifier" jdbcType="BIGINT" property="modifier" />
|
||||
<association property="sysUser" javaType="com.yami.shop.bean.vo.SysUserVO">
|
||||
<id column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="username" jdbcType="VARCHAR" property="username" />
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<select id="getPointsAndSysUserPage" resultMap="Points_SysUser">
|
||||
select
|
||||
p.*,
|
||||
su.username,su.user_id
|
||||
from
|
||||
tz_points p
|
||||
left join tz_sys_user su on su.user_id=p.modifier
|
||||
where p.shop_id = #{points.shopId}
|
||||
<if test="points.name!=null and points.name!=''">
|
||||
and name =#{points.name}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getNameAndId" resultMap="BaseResultMap" >
|
||||
select points_id,name from tz_points
|
||||
<where>
|
||||
<if test="points.shopId != null ">
|
||||
and shop_id = #{points.shopId}
|
||||
</if>
|
||||
<if test="points.state != null ">
|
||||
and state = #{points.state}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
delete from tz_points where points_id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -1,18 +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.yami.shop.dao.PointsProdMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yami.shop.bean.model.PointsProd">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<result column="points_prod_id" jdbcType="BIGINT" property="pointsProdId" />
|
||||
<result column="points_id" jdbcType="BIGINT" property="pointsId" />
|
||||
<result column="points_number" jdbcType="DOUBLE" property="pointsNumber" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="prod_id" jdbcType="BIGINT" property="prodId" />
|
||||
<result column="stocks" jdbcType="INTEGER" property="stocks" />
|
||||
<result column="state" jdbcType="TINYINT" property="state" />
|
||||
<result column="upper_shelf_time" jdbcType="TIMESTAMP" property="upperShelfTime" />
|
||||
<result column="lower_shelf" jdbcType="TIMESTAMP" property="lowerShelf" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -1,16 +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.yami.shop.dao.PointsWalletMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yami.shop.bean.model.PointsWallet">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<result column="points_wallet_id" jdbcType="BIGINT" property="pointsWalletId" />
|
||||
<result column="points_id" jdbcType="BIGINT" property="pointsId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="unsettled" jdbcType="DOUBLE" property="unsettled" />
|
||||
<result column="settled" jdbcType="DOUBLE" property="settled" />
|
||||
<result column="addup" jdbcType="DOUBLE" property="addup" />
|
||||
<result column="version" jdbcType="INTEGER" property="version" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -125,20 +125,6 @@
|
||||
ORDER BY putaway_time DESC
|
||||
</select>
|
||||
|
||||
<select id="discountProdList" resultType="com.yami.shop.bean.app.dto.ProductDto">
|
||||
SELECT
|
||||
<include refid="prodAndShopNameWithNoContent_SQL"/>
|
||||
FROM tz_discount_prod dp
|
||||
LEFT JOIN tz_prod p
|
||||
ON p.`prod_id` = dp.`prod_id`
|
||||
LEFT JOIN tz_discount d
|
||||
ON d.`discount_id` = dp.`discount_id`
|
||||
LEFT JOIN tz_shop_detail sd
|
||||
ON p.shop_id = sd.shop_id
|
||||
WHERE p.`status` = 1 AND d.`status` = 1 AND d.`start_time` <= NOW() AND d.`end_time` > NOW()
|
||||
ORDER BY d.`start_time` DESC
|
||||
</select>
|
||||
|
||||
<select id="moreBuyProdList" resultType="com.yami.shop.bean.app.dto.ProductDto">
|
||||
SELECT
|
||||
<include refid="prodAndShopNameWithNoContent_SQL"/>
|
||||
|
||||
Reference in New Issue
Block a user