用户钱包明细流水
This commit is contained in:
parent
ee4fa62ef5
commit
d482faae0a
|
@ -1,6 +1,9 @@
|
||||||
package com.sqx.modules.app.dao;
|
package com.sqx.modules.app.dao;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.sqx.modules.app.entity.UserMoneyDetails;
|
import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||||
|
import com.sqx.modules.bl.collect.entity.CollectMassage;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@ -14,4 +17,6 @@ public interface UserMoneyDetailsDao extends BaseMapper<UserMoneyDetails> {
|
||||||
BigDecimal selectSumRefund(Long userId,String startTime,String endTime);
|
BigDecimal selectSumRefund(Long userId,String startTime,String endTime);
|
||||||
|
|
||||||
int insert(UserMoneyDetails userMoneyDetails);
|
int insert(UserMoneyDetails userMoneyDetails);
|
||||||
|
|
||||||
|
IPage<UserMoneyDetails> findUserMontyDetailPage(Page<UserMoneyDetails> page, @Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,4 +99,11 @@ public class UserMoneyDetails implements Serializable {
|
||||||
|
|
||||||
private Integer blFlag;
|
private Integer blFlag;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.sqx.modules.app.service.*;
|
||||||
import com.sqx.modules.artificer.entity.Artificer;
|
import com.sqx.modules.artificer.entity.Artificer;
|
||||||
import com.sqx.modules.artificer.entity.Period;
|
import com.sqx.modules.artificer.entity.Period;
|
||||||
import com.sqx.modules.artificer.service.ArtificerService;
|
import com.sqx.modules.artificer.service.ArtificerService;
|
||||||
|
import com.sqx.modules.bl.collect.entity.CollectMassage;
|
||||||
import com.sqx.modules.message.entity.MessageInfo;
|
import com.sqx.modules.message.entity.MessageInfo;
|
||||||
import com.sqx.modules.message.service.MessageService;
|
import com.sqx.modules.message.service.MessageService;
|
||||||
import com.sqx.modules.utils.PeriodUtil;
|
import com.sqx.modules.utils.PeriodUtil;
|
||||||
|
@ -143,11 +144,10 @@ public class UserMoneyServiceImpl extends ServiceImpl<UserMoneyDao, UserMoney> i
|
||||||
return userMoneyDetailsDao.selectMyProfit(userId);
|
return userMoneyDetailsDao.selectMyProfit(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils balanceDetailed(Long userId, Page<UserMoneyDetails> pages) {
|
public PageUtils balanceDetailed(Long userId, Page<UserMoneyDetails> pages) {
|
||||||
return new PageUtils(userMoneyDetailsDao.selectPage(pages,new QueryWrapper<UserMoneyDetails>().eq("user_id",userId).orderByDesc("create_time ")));
|
// return new PageUtils(userMoneyDetailsDao.selectPage(pages,new QueryWrapper<UserMoneyDetails>().eq("user_id",userId).orderByDesc("create_time ")));
|
||||||
|
return new PageUtils(userMoneyDetailsDao.findUserMontyDetailPage(pages,userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -195,10 +195,10 @@ public class ArtificerController {
|
||||||
String endTime,Integer isAdd,String ordersNo,String artificerName,
|
String endTime,Integer isAdd,String ordersNo,String artificerName,
|
||||||
String oneUserName,String oneArtificerUserName,
|
String oneUserName,String oneArtificerUserName,
|
||||||
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,
|
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,
|
||||||
String shopName,Integer warning,String title,String classifyId){
|
String shopName,Integer warning,String title,String classifyId, Long userPackageId){
|
||||||
return ordersService.selectOrdersList(userId, page, limit, status, city, name, phone,
|
return ordersService.selectOrdersList(userId, page, limit, status, city, name, phone,
|
||||||
artificerId, parentId, startTime, endTime, isAdd, ordersNo, artificerName,
|
artificerId, parentId, startTime, endTime, isAdd, ordersNo, artificerName,
|
||||||
oneUserName, oneArtificerUserName, startServeTime, endServeTime,overTimeOrders,shopId,shopName,warning,title,classifyId);
|
oneUserName, oneArtificerUserName, startServeTime, endServeTime,overTimeOrders,shopId,shopName,warning,title,classifyId, userPackageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/excelOrdersList")
|
@GetMapping("/excelOrdersList")
|
||||||
|
|
|
@ -19,6 +19,8 @@ import com.sqx.modules.artificer.dao.ArtificerDao;
|
||||||
import com.sqx.modules.artificer.dao.UserRechargeDao;
|
import com.sqx.modules.artificer.dao.UserRechargeDao;
|
||||||
import com.sqx.modules.artificer.entity.*;
|
import com.sqx.modules.artificer.entity.*;
|
||||||
import com.sqx.modules.artificer.service.*;
|
import com.sqx.modules.artificer.service.*;
|
||||||
|
import com.sqx.modules.bl.collect.entity.CollectMassage;
|
||||||
|
import com.sqx.modules.bl.collect.service.CollectMassageService;
|
||||||
import com.sqx.modules.common.dao.CommonInfoDao;
|
import com.sqx.modules.common.dao.CommonInfoDao;
|
||||||
import com.sqx.modules.common.entity.CommonInfo;
|
import com.sqx.modules.common.entity.CommonInfo;
|
||||||
import com.sqx.modules.common.service.CommonInfoService;
|
import com.sqx.modules.common.service.CommonInfoService;
|
||||||
|
@ -80,7 +82,8 @@ public class AppArtificerController {
|
||||||
private ArtificerDao artificerDao;
|
private ArtificerDao artificerDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserRechargeDao userRechargeDao;
|
private UserRechargeDao userRechargeDao;
|
||||||
|
@Autowired
|
||||||
|
private CollectMassageService collectMassageService;
|
||||||
|
|
||||||
@GetMapping("/selectMassageTypePage")
|
@GetMapping("/selectMassageTypePage")
|
||||||
@ApiOperation("查询按摩分类(分页)")
|
@ApiOperation("查询按摩分类(分页)")
|
||||||
|
@ -100,7 +103,16 @@ public class AppArtificerController {
|
||||||
|
|
||||||
@GetMapping("/selectMassageTypeById")
|
@GetMapping("/selectMassageTypeById")
|
||||||
@ApiOperation("查询详情")
|
@ApiOperation("查询详情")
|
||||||
public Result selectMassageTypeById(Long massageTypeId){
|
public Result selectMassageTypeById(Long massageTypeId,Long userId){
|
||||||
|
if(userId!=null){
|
||||||
|
//插入浏览历史
|
||||||
|
CollectMassage collectMassage=new CollectMassage();
|
||||||
|
collectMassage.setClassify(2);
|
||||||
|
collectMassage.setUserId(userId);
|
||||||
|
collectMassage.setProjectId(massageTypeId);
|
||||||
|
collectMassage.setFlag(1);
|
||||||
|
collectMassageService.insertCollect(collectMassage);
|
||||||
|
}
|
||||||
MassageType massageType = massageTypeService.getById(massageTypeId);
|
MassageType massageType = massageTypeService.getById(massageTypeId);
|
||||||
SysDictEntity sysDictEntity = sysDictService.getById(massageType.getClassifyId());
|
SysDictEntity sysDictEntity = sysDictService.getById(massageType.getClassifyId());
|
||||||
if(sysDictEntity!=null){
|
if(sysDictEntity!=null){
|
||||||
|
@ -194,10 +206,10 @@ public class AppArtificerController {
|
||||||
Integer isAdd,String ordersNo,String artificerName,
|
Integer isAdd,String ordersNo,String artificerName,
|
||||||
String oneUserName,String oneArtificerUserName,
|
String oneUserName,String oneArtificerUserName,
|
||||||
String startServeTime,String endServeTime,Integer overTimeOrders,
|
String startServeTime,String endServeTime,Integer overTimeOrders,
|
||||||
Long shopId,String shopName,Integer warning,String title,String classifyId){
|
Long shopId,String shopName,Integer warning,String title,String classifyId, Long userPackageId){
|
||||||
return ordersService.selectOrdersList(userId, page, limit, status, city, userName, phone, artificerId,
|
return ordersService.selectOrdersList(userId, page, limit, status, city, userName, phone, artificerId,
|
||||||
parentId, startTime, endTime, isAdd, ordersNo, artificerName, oneUserName, oneArtificerUserName,
|
parentId, startTime, endTime, isAdd, ordersNo, artificerName, oneUserName, oneArtificerUserName,
|
||||||
startServeTime, endServeTime,overTimeOrders,shopId,shopName,warning,title,classifyId);
|
startServeTime, endServeTime,overTimeOrders,shopId,shopName,warning,title,classifyId, userPackageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Login
|
@Login
|
||||||
|
@ -208,10 +220,10 @@ public class AppArtificerController {
|
||||||
Integer isAdd,String ordersNo,String artificerName,
|
Integer isAdd,String ordersNo,String artificerName,
|
||||||
String oneUserName,String oneArtificerUserName,
|
String oneUserName,String oneArtificerUserName,
|
||||||
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,
|
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,
|
||||||
String shopName,Integer warning,String title,String classifyId){
|
String shopName,Integer warning,String title,String classifyId, Long userPackageId){
|
||||||
return ordersService.selectOrdersList(userId, page, limit, status, city, userName, phone, artificerId,
|
return ordersService.selectOrdersList(userId, page, limit, status, city, userName, phone, artificerId,
|
||||||
parentId, startTime, endTime, isAdd, ordersNo, artificerName, oneUserName, oneArtificerUserName,
|
parentId, startTime, endTime, isAdd, ordersNo, artificerName, oneUserName, oneArtificerUserName,
|
||||||
startServeTime, endServeTime,overTimeOrders,shopId,shopName,warning,title,classifyId);
|
startServeTime, endServeTime,overTimeOrders,shopId,shopName,warning,title,classifyId, userPackageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Login
|
@Login
|
||||||
|
|
|
@ -26,7 +26,7 @@ public interface OrdersDao extends BaseMapper<Orders> {
|
||||||
@Param("endTime") String endTime,@Param("isAdd") Integer isAdd,String ordersNo,String artificerName,
|
@Param("endTime") String endTime,@Param("isAdd") Integer isAdd,String ordersNo,String artificerName,
|
||||||
String oneUserName,String oneArtificerUserName,
|
String oneUserName,String oneArtificerUserName,
|
||||||
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,String shopName,Integer warning,
|
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,String shopName,Integer warning,
|
||||||
String title,String classifyId);
|
String title,String classifyId,Long userPackageId);
|
||||||
|
|
||||||
List<Orders> excelOrdersList(@Param("userId") Long userId,@Param("status") Integer status,
|
List<Orders> excelOrdersList(@Param("userId") Long userId,@Param("status") Integer status,
|
||||||
@Param("city") String city,@Param("userName") String userName,@Param("phone") String phone,
|
@Param("city") String city,@Param("userName") String userName,@Param("phone") String phone,
|
||||||
|
|
|
@ -301,6 +301,10 @@ public class Orders implements Serializable {
|
||||||
* 用户服务包ID
|
* 用户服务包ID
|
||||||
*/
|
*/
|
||||||
private Long userPackageId;
|
private Long userPackageId;
|
||||||
|
/**
|
||||||
|
* 用户服务包明细ID
|
||||||
|
*/
|
||||||
|
private Long userPackageDetailId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目名称
|
* 项目名称
|
||||||
|
|
|
@ -31,7 +31,7 @@ public interface OrdersService extends IService<Orders> {
|
||||||
String endTime,Integer isAdd,String ordersNo,String artificerName,
|
String endTime,Integer isAdd,String ordersNo,String artificerName,
|
||||||
String oneUserName,String oneArtificerUserName,
|
String oneUserName,String oneArtificerUserName,
|
||||||
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,
|
String startServeTime,String endServeTime,Integer overTimeOrders,Long shopId,
|
||||||
String shopName,Integer warning,String title,String classifyId);
|
String shopName,Integer warning,String title,String classifyId, Long userPackageId);
|
||||||
|
|
||||||
ExcelData excelOrdersList(Long userId,Integer status,String city,
|
ExcelData excelOrdersList(Long userId,Integer status,String city,
|
||||||
String name,String phone,Long artificerId,Long parentId,String startTime,
|
String name,String phone,Long artificerId,Long parentId,String startTime,
|
||||||
|
|
|
@ -1203,11 +1203,11 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
String endTime, Integer isAdd, String ordersNo, String artificerName,
|
String endTime, Integer isAdd, String ordersNo, String artificerName,
|
||||||
String oneUserName, String oneArtificerUserName,
|
String oneUserName, String oneArtificerUserName,
|
||||||
String startServeTime, String endServeTime, Integer overTimeOrders,
|
String startServeTime, String endServeTime, Integer overTimeOrders,
|
||||||
Long shopId, String shopName, Integer warning, String title, String classifyId) {
|
Long shopId, String shopName, Integer warning, String title, String classifyId, Long userPackageId) {
|
||||||
Page<Orders> pages = new Page<>(page, limit);
|
Page<Orders> pages = new Page<>(page, limit);
|
||||||
IPage<Orders> ordersIPage = baseMapper.selectOrdersList(pages, userId, status,
|
IPage<Orders> ordersIPage = baseMapper.selectOrdersList(pages, userId, status,
|
||||||
city, name, phone, artificerId, parentId, startTime, endTime, isAdd, ordersNo,
|
city, name, phone, artificerId, parentId, startTime, endTime, isAdd, ordersNo,
|
||||||
artificerName, oneUserName, oneArtificerUserName, startServeTime, endServeTime, overTimeOrders, shopId, shopName, warning, title, classifyId);
|
artificerName, oneUserName, oneArtificerUserName, startServeTime, endServeTime, overTimeOrders, shopId, shopName, warning, title, classifyId, userPackageId);
|
||||||
List<Orders> records = ordersIPage.getRecords();
|
List<Orders> records = ordersIPage.getRecords();
|
||||||
for (Orders orders : records) {
|
for (Orders orders : records) {
|
||||||
List<OrdersMassage> ordersMassageList = ordersMassageService.list(new QueryWrapper<OrdersMassage>().eq("orders_id", orders.getOrdersId()));
|
List<OrdersMassage> ordersMassageList = ordersMassageService.list(new QueryWrapper<OrdersMassage>().eq("orders_id", orders.getOrdersId()));
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 浏览记录
|
* 浏览记录
|
||||||
|
@ -25,7 +26,7 @@ public class CollectMassage implements Serializable {
|
||||||
private long collectId;
|
private long collectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 技师id
|
* 服务或项目id
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
@ -59,4 +60,18 @@ public class CollectMassage implements Serializable {
|
||||||
private Integer limit;
|
private Integer limit;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String title;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String massageImg;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal oldPrice;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal price;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String content;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String type;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String remarks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,11 +20,18 @@ public class AppMassagePackageDetailController {
|
||||||
private MassagePackageDetailService service;
|
private MassagePackageDetailService service;
|
||||||
|
|
||||||
@Login
|
@Login
|
||||||
@GetMapping("/findPage")
|
@GetMapping("/findAppPage")
|
||||||
@ApiOperation("查询按服务包详情(分页)")
|
@ApiOperation("查询按服务包详情(分页)")
|
||||||
public Result findPage(MassagePackageDetail massagePackageDetail){
|
public Result findAppPage(MassagePackageDetail massagePackageDetail){
|
||||||
massagePackageDetail.setStatus(1);
|
massagePackageDetail.setStatus(1);
|
||||||
return service.findPage(massagePackageDetail);
|
return service.findAppPage(massagePackageDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Login
|
||||||
|
@GetMapping("/getAppPackageDetail")
|
||||||
|
@ApiOperation("查询服务包详情")
|
||||||
|
public Result getAppPackageDetail(MassagePackageDetail massagePackageDetail){
|
||||||
|
return service.getAppPackageDetail(massagePackageDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,4 +22,5 @@ public interface MassagePackageDetailDao extends BaseMapper<MassagePackageDetail
|
||||||
IPage<MassagePackageDetail> findMassagePage(Page<MassagePackageDetail> page, @Param("params") MassagePackageDetail massagePackageDetail);
|
IPage<MassagePackageDetail> findMassagePage(Page<MassagePackageDetail> page, @Param("params") MassagePackageDetail massagePackageDetail);
|
||||||
int delete(MassagePackageDetail massagePackageDetail);
|
int delete(MassagePackageDetail massagePackageDetail);
|
||||||
MassagePackage findPackagePrice(MassagePackageDetail massagePackageDetail);
|
MassagePackage findPackagePrice(MassagePackageDetail massagePackageDetail);
|
||||||
|
MassagePackageDetail getAppPackageDetail(Long id);
|
||||||
}
|
}
|
|
@ -16,4 +16,5 @@ public interface MassagePackageDetailService extends IService<MassagePackageDeta
|
||||||
void delete(MassagePackageDetail massagePackageDetail);
|
void delete(MassagePackageDetail massagePackageDetail);
|
||||||
|
|
||||||
Result findAppPage(MassagePackageDetail massagePackageDetail);
|
Result findAppPage(MassagePackageDetail massagePackageDetail);
|
||||||
|
Result getAppPackageDetail(MassagePackageDetail massagePackageDetail);
|
||||||
}
|
}
|
|
@ -114,4 +114,10 @@ public class MassagePackageServiceDetailImpl extends ServiceImpl<MassagePackageD
|
||||||
return Result.success(map);
|
return Result.success(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result getAppPackageDetail(MassagePackageDetail massagePackageDetail){
|
||||||
|
massagePackageDetail = baseMapper.getAppPackageDetail(massagePackageDetail.getId());
|
||||||
|
return Result.success().put("data",massagePackageDetail);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -47,7 +47,6 @@ public class UserPackageDetailServiceImpl extends ServiceImpl<UserPackageDetailD
|
||||||
public Result findAppUsedQuantity(UserPackageDetail userPackageDetail){
|
public Result findAppUsedQuantity(UserPackageDetail userPackageDetail){
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
UserPackage userPackage = userPackageService.getMyPackageById(userPackageDetail.getMainId());
|
UserPackage userPackage = userPackageService.getMyPackageById(userPackageDetail.getMainId());
|
||||||
map.put("mainData",userPackage);
|
|
||||||
int type = userPackage.getType();
|
int type = userPackage.getType();
|
||||||
List<UserPackageDetail> list = Lists.newArrayList();
|
List<UserPackageDetail> list = Lists.newArrayList();
|
||||||
if(type == 104){
|
if(type == 104){
|
||||||
|
@ -57,6 +56,7 @@ public class UserPackageDetailServiceImpl extends ServiceImpl<UserPackageDetailD
|
||||||
}else if(type == 106){
|
}else if(type == 106){
|
||||||
list = baseMapper.findLcDetailUsedQuantity(userPackageDetail);
|
list = baseMapper.findLcDetailUsedQuantity(userPackageDetail);
|
||||||
}
|
}
|
||||||
|
map.put("mainData",userPackage);
|
||||||
map.put("detailData",list);
|
map.put("detailData",list);
|
||||||
return Result.success().put("data",map);
|
return Result.success().put("data",map);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class Coupon implements Serializable {
|
||||||
private BigDecimal money;
|
private BigDecimal money;
|
||||||
|
|
||||||
@ApiModelProperty("优惠券类型")
|
@ApiModelProperty("优惠券类型")
|
||||||
private BigDecimal couType;
|
private Integer couType;
|
||||||
|
|
||||||
public Coupon() {}
|
public Coupon() {}
|
||||||
}
|
}
|
|
@ -98,12 +98,12 @@ public class CouponUserServiceImpl extends ServiceImpl<CouponUserDao, CouponUser
|
||||||
@Override
|
@Override
|
||||||
public Result insertNewUserCoupon(UserEntity userEntity){
|
public Result insertNewUserCoupon(UserEntity userEntity){
|
||||||
if(userEntity.getIsCoupon()!=null && userEntity.getIsCoupon()==1){
|
if(userEntity.getIsCoupon()!=null && userEntity.getIsCoupon()==1){
|
||||||
return Result.error("您已经领取过新人优惠券了!");
|
return Result.error("您已经领取!");
|
||||||
}
|
}
|
||||||
Long userId=userEntity.getUserId();
|
Long userId=userEntity.getUserId();
|
||||||
UserEntity user = userService.getById(userId);
|
UserEntity user = userService.getById(userId);
|
||||||
if(user.getIsCoupon()!=null && user.getIsCoupon()==1){
|
if(user.getIsCoupon()!=null && user.getIsCoupon()==1){
|
||||||
return Result.error("您已经领取过新人优惠券了!");
|
return Result.error("您已经领取!");
|
||||||
}
|
}
|
||||||
//当前时间
|
//当前时间
|
||||||
String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||||
|
@ -111,12 +111,12 @@ public class CouponUserServiceImpl extends ServiceImpl<CouponUserDao, CouponUser
|
||||||
String userTime = user.getCreateTime();
|
String userTime = user.getCreateTime();
|
||||||
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
LocalDate date1 = LocalDate.parse(nowTime, formatter);
|
LocalDate date1 = LocalDate.parse(nowTime.substring(0,10), formatter);
|
||||||
LocalDate date2 = LocalDate.parse(userTime, formatter);
|
LocalDate date2 = LocalDate.parse(userTime.substring(0,10), formatter);
|
||||||
// 计算两个日期之间相差的天数 data1小于date2
|
// 计算两个日期之间相差的天数 data1小于date2
|
||||||
long daysBetween = ChronoUnit.DAYS.between(date1, date2);
|
long daysBetween = ChronoUnit.DAYS.between(date2, date1);
|
||||||
if(daysBetween>7){
|
if(daysBetween>7){
|
||||||
return Result.error("您已经过了新人优惠期");
|
return Result.error("已过新人优惠期");
|
||||||
}
|
}
|
||||||
//获取所有新人优惠卷
|
//获取所有新人优惠卷
|
||||||
|
|
||||||
|
|
|
@ -678,6 +678,7 @@ public class AliPayController {
|
||||||
userPackage.setContentImg(massagePackage.getContentImg());
|
userPackage.setContentImg(massagePackage.getContentImg());
|
||||||
userPackage.setLabels(massagePackage.getLabels());
|
userPackage.setLabels(massagePackage.getLabels());
|
||||||
userPackage.setCity(massagePackage.getCity());
|
userPackage.setCity(massagePackage.getCity());
|
||||||
|
userPackage.setClassifyId(massagePackage.getClassifyId());
|
||||||
userPackageService.insert(userPackage);
|
userPackageService.insert(userPackage);
|
||||||
Long mainId = userPackage.getId();
|
Long mainId = userPackage.getId();
|
||||||
//拆分插入用户服务器项目详情
|
//拆分插入用户服务器项目详情
|
||||||
|
|
|
@ -1151,6 +1151,7 @@ public class WxServiceImpl implements WxService {
|
||||||
userPackage.setContentImg(massagePackage.getContentImg());
|
userPackage.setContentImg(massagePackage.getContentImg());
|
||||||
userPackage.setLabels(massagePackage.getLabels());
|
userPackage.setLabels(massagePackage.getLabels());
|
||||||
userPackage.setCity(massagePackage.getCity());
|
userPackage.setCity(massagePackage.getCity());
|
||||||
|
userPackage.setClassifyId(massagePackage.getClassifyId());
|
||||||
userPackageService.insert(userPackage);
|
userPackageService.insert(userPackage);
|
||||||
Long mainId = userPackage.getId();
|
Long mainId = userPackage.getId();
|
||||||
//拆分插入用户服务器项目详情
|
//拆分插入用户服务器项目详情
|
||||||
|
|
|
@ -111,4 +111,19 @@
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="findUserMontyDetailPage" resultType="com.sqx.modules.app.entity.UserMoneyDetails">
|
||||||
|
select
|
||||||
|
title,
|
||||||
|
content,
|
||||||
|
create_time,
|
||||||
|
type,
|
||||||
|
money,
|
||||||
|
bl_flag
|
||||||
|
from user_money_details
|
||||||
|
where user_id=#{userId}
|
||||||
|
and bl_role = 1
|
||||||
|
and state = 2
|
||||||
|
order by create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -284,6 +284,9 @@
|
||||||
left join tb_user u on u.user_id=o.user_id
|
left join tb_user u on u.user_id=o.user_id
|
||||||
left join consortia c on c.consortia_id=o.consortia_id
|
left join consortia c on c.consortia_id=o.consortia_id
|
||||||
where 1=1
|
where 1=1
|
||||||
|
<if test="userPackageId!=null">
|
||||||
|
and o.user_package_id = #{userPackageId}
|
||||||
|
</if>
|
||||||
<if test="classifyId!=null and classifyId!=''">
|
<if test="classifyId!=null and classifyId!=''">
|
||||||
and o.orders_id in (select orders_id from orders_massage where massage_id in (select massage_type_id from massage_type where classify_id=#{classifyId} ))
|
and o.orders_id in (select orders_id from orders_massage where massage_id in (select massage_type_id from massage_type where classify_id=#{classifyId} ))
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -4,19 +4,33 @@
|
||||||
<mapper namespace="com.sqx.modules.bl.collect.dao.CollectMassageDao">
|
<mapper namespace="com.sqx.modules.bl.collect.dao.CollectMassageDao">
|
||||||
|
|
||||||
<select id="findPage" resultType="com.sqx.modules.bl.collect.entity.CollectMassage">
|
<select id="findPage" resultType="com.sqx.modules.bl.collect.entity.CollectMassage">
|
||||||
select *
|
select
|
||||||
from bl_collect_massage
|
a.flag,
|
||||||
|
a.project_id,
|
||||||
|
(case when a.flag = 1 then b.title else c.title end) as title,
|
||||||
|
(case when a.flag = 1 then b.massage_img else c.package_img end) as massage_img,
|
||||||
|
(case when a.flag = 1 then b.old_price else c.old_price end) as old_price,
|
||||||
|
(case when a.flag = 1 then b.price else c.price end) as price,
|
||||||
|
(case when a.flag = 1 then b.jianjie else c.content end) as content,
|
||||||
|
(case when a.flag = 1 then '项目' else substr(d.value,3) end) as type,
|
||||||
|
(case when a.flag = 1 then concat(duration,'分钟|',replace(b.labels,',',' '))
|
||||||
|
else replace(c.labels,',',' ')
|
||||||
|
end) as remarks
|
||||||
|
from bl_collect_massage a
|
||||||
|
left join massage_type b on a.project_id = b.massage_type_id
|
||||||
|
left join bl_massage_package c on a.project_id = c.id
|
||||||
|
left join sys_dict d on c.type = d.id
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="params.userId!=null">
|
<if test="params.userId!=null">
|
||||||
and user_id=#{params.userId}
|
and a.user_id=#{params.userId}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.flag!=null">
|
<if test="params.flag!=null">
|
||||||
and flag=#{params.flag}
|
and a.flag=#{params.flag}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.classify!=null">
|
<if test="params.classify!=null">
|
||||||
and classify=#{params.classify}
|
and a.classify=#{params.classify}
|
||||||
</if>
|
</if>
|
||||||
order by collect_id
|
order by a.collect_id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insert" parameterType="com.sqx.modules.bl.collect.entity.CollectMassage">
|
<insert id="insert" parameterType="com.sqx.modules.bl.collect.entity.CollectMassage">
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="findPackageAndMassagePage" resultType="com.sqx.modules.bl.massage.entity.MassagePackage">
|
<select id="findPackageAndMassagePage" resultType="com.sqx.modules.bl.massage.entity.MassagePackage">
|
||||||
select a.id as massage_type_id,title,a.type,b.value as type_name,old_price,price,package_img,content,content_img,add_num,sales,labels,'套餐' as flag,
|
select a.id,title,a.type,b.value as type_name,old_price,price,package_img,content,content_img,add_num,sales,labels,'套餐' as flag
|
||||||
from bl_massage_package a
|
from bl_massage_package a
|
||||||
left join sys_dict b on a.type = b.id
|
left join sys_dict b on a.type = b.id
|
||||||
where a.status = 1
|
where a.status = 1
|
||||||
|
@ -62,14 +62,14 @@
|
||||||
and (a.city like concat('%',#{params.city},'%') or a.city='不限')
|
and (a.city like concat('%',#{params.city},'%') or a.city='不限')
|
||||||
</if>
|
</if>
|
||||||
union all
|
union all
|
||||||
select massage_type_id,title,classify_id as type,b.value as type_name,old_price,price,massage_img,jianjie,content_img,add_num,sales,labels,'项目' as flag,
|
select massage_type_id as id,title,classify_id as type,b.value as type_name,old_price,price,massage_img,jianjie,content_img,add_num,sales,labels,'项目' as flag
|
||||||
from massage_type a
|
from massage_type a
|
||||||
left join sys_dict b on a.classify_id = b.id
|
left join sys_dict b on a.classify_id = b.id
|
||||||
where a.status = 1
|
where a.status = 1
|
||||||
<if test="params.city!=null and params.city!=''">
|
<if test="params.city!=null and params.city!=''">
|
||||||
and (a.city like concat('%',#{params.city},'%') or a.city='不限')
|
and (a.city like concat('%',#{params.city},'%') or a.city='不限')
|
||||||
</if>
|
</if>
|
||||||
order by sales desc,massage_type_id asc
|
order by sales desc,id asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -186,4 +186,33 @@
|
||||||
group by a.main_id
|
group by a.main_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getAppPackageDetail" resultType="com.sqx.modules.bl.massage.entity.MassagePackageDetail">
|
||||||
|
select
|
||||||
|
a.id,
|
||||||
|
a.main_id,
|
||||||
|
a.massage_type_id,
|
||||||
|
a.package_price,
|
||||||
|
a.service_count,
|
||||||
|
a.interval_days,
|
||||||
|
m.status,
|
||||||
|
m.create_time,
|
||||||
|
m.title,
|
||||||
|
m.massage_img,
|
||||||
|
m.content,
|
||||||
|
m.old_price,
|
||||||
|
m.price,
|
||||||
|
m.duration,
|
||||||
|
m.is_sex,
|
||||||
|
m.city,
|
||||||
|
m.content_img,
|
||||||
|
m.labels,
|
||||||
|
m.parent_id,
|
||||||
|
m.classify_id as type,
|
||||||
|
m.apply_people,
|
||||||
|
m.jianjie,
|
||||||
|
m.sales
|
||||||
|
from bl_massage_package_detail a left join massage_type m on a.massage_type_id = m.massage_type_id
|
||||||
|
where a.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -36,13 +36,14 @@
|
||||||
a.massage_type_id,
|
a.massage_type_id,
|
||||||
a.title,
|
a.title,
|
||||||
a.massage_img,
|
a.massage_img,
|
||||||
|
a.content_img,
|
||||||
round(avg(a.package_price),2) as package_price,
|
round(avg(a.package_price),2) as package_price,
|
||||||
round(avg(a.price),2) as price,
|
round(avg(a.price),2) as price,
|
||||||
sum(case a.status when 1 then 1 else 0 end) as usedQuantity,
|
sum(case a.status when 1 then 1 else 0 end) as usedQuantity,
|
||||||
sum(case a.status when 0 then 1 else 0 end) as unUsedQuantity
|
sum(case a.status when 0 then 1 else 0 end) as unUsedQuantity
|
||||||
from bl_user_package_detail a
|
from bl_user_package_detail a
|
||||||
where a.main_id = #{mainId}
|
where a.main_id = #{mainId}
|
||||||
group by a.massage_type_id,a.title,a.massage_img
|
group by a.massage_type_id,a.title,a.massage_img,a.content_img
|
||||||
order by a.massage_type_id
|
order by a.massage_type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -51,6 +52,7 @@
|
||||||
a.massage_type_id,
|
a.massage_type_id,
|
||||||
a.title,
|
a.title,
|
||||||
a.massage_img,
|
a.massage_img,
|
||||||
|
a.content_img,
|
||||||
round(avg(a.package_price),2) as package_price,
|
round(avg(a.package_price),2) as package_price,
|
||||||
round(avg(a.price),2) as price,
|
round(avg(a.price),2) as price,
|
||||||
sum(case a.status when 1 then 1 else 0 end) as usedQuantity,
|
sum(case a.status when 1 then 1 else 0 end) as usedQuantity,
|
||||||
|
@ -60,7 +62,7 @@
|
||||||
from bl_user_package_detail a
|
from bl_user_package_detail a
|
||||||
inner join bl_user_package b on a.main_id = b.id
|
inner join bl_user_package b on a.main_id = b.id
|
||||||
where a.main_id = #{mainId}
|
where a.main_id = #{mainId}
|
||||||
group by a.massage_type_id,a.title,a.massage_img
|
group by a.massage_type_id,a.title,a.massage_img,a.content_img
|
||||||
order by a.massage_type_id
|
order by a.massage_type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue