Merge branch 'ww' into test
This commit is contained in:
@@ -11,8 +11,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.Map;
|
||||
|
||||
@CrossOrigin(origins = "*")
|
||||
@@ -42,19 +40,6 @@ public class OrderController {
|
||||
// return orderService.createOrder(shopTable.getTableId(),shopTable.getShopId(),shopTable.getUserId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单回显
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
// @GetMapping ("/orderInfo")
|
||||
private Result orderInfo(@RequestParam(required = false) Integer orderId){
|
||||
if (orderId==null) {
|
||||
return Result.fail("请返回首页订单列表查看");
|
||||
}
|
||||
return orderService.orderInfo(orderId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
@@ -81,56 +66,4 @@ public class OrderController {
|
||||
}
|
||||
return orderService.rmOrder(Integer.valueOf(map.get("orderId").toString()));
|
||||
}
|
||||
|
||||
@GetMapping("/tradeIntegral")
|
||||
private Result tradeIntegral(@RequestParam("userId") String userId, @RequestParam("id") String id) throws IOException, ParseException {
|
||||
return orderService.tradeIntegral(userId,id);
|
||||
}
|
||||
// @GetMapping("/我的积分")
|
||||
// private Result mineYhq(@RequestParam("userId") String userId) throws IOException {
|
||||
// return orderService.mineYhq(userId);
|
||||
// }
|
||||
@GetMapping("/mineCoupons")
|
||||
private Result mineCoupons(@RequestHeader String token,
|
||||
@RequestParam("userId") String userId,
|
||||
@RequestParam("status") String status,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size,
|
||||
@RequestParam("orderId") String orderId
|
||||
) throws IOException {
|
||||
return orderService.mineCoupons(userId,orderId,status,page,size);
|
||||
}
|
||||
@GetMapping("/findCoupons")
|
||||
private Result findCoupons(@RequestHeader String token,String type,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size) throws IOException {
|
||||
return orderService.findCoupons(type,page,size);
|
||||
}
|
||||
|
||||
@GetMapping("/findWiningUser")
|
||||
private Result findWiningUser(){
|
||||
return orderService.findWiningUser();
|
||||
}
|
||||
@GetMapping("/mineWinner")
|
||||
private Result mineWinner(@RequestHeader String token,@RequestParam Integer userId,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size){
|
||||
return orderService.mineWinner(userId,page,size);
|
||||
}
|
||||
@GetMapping("/getYhqPara")
|
||||
private Result getYhqPara(){
|
||||
return orderService.getYhqPara();
|
||||
}
|
||||
@GetMapping("/getYhqDouble")
|
||||
private Result getYhqDouble(@RequestParam Integer orderId){
|
||||
return orderService.getYhqDouble(orderId);
|
||||
}
|
||||
@PostMapping("/yhqDouble")
|
||||
private Result yhqDouble(@RequestParam Integer conponsId){
|
||||
return orderService.yhqDouble(conponsId);
|
||||
}
|
||||
@GetMapping("/kc")
|
||||
private Result kc(){
|
||||
return orderService.kc();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,6 @@ public class PayController {
|
||||
|
||||
@RequestMapping("getActive")
|
||||
public Result getActive(
|
||||
@RequestHeader("token") String token,
|
||||
@RequestParam("shopId") String shopId,
|
||||
@RequestParam("page") int page,
|
||||
@RequestParam("pageSize") int pageSize) {
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.CouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbShopCouponService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表控制层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 15:37:26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon")
|
||||
public class TbShopCouponController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private TbShopCouponService tbShopCouponService;
|
||||
|
||||
/**
|
||||
* 根据优惠券DTO查询优惠券
|
||||
* @param param 优惠券DTO
|
||||
* @return 查询结果
|
||||
*/
|
||||
@RequestMapping("find")
|
||||
public Result find(@RequestBody CouponDto param) {
|
||||
return tbShopCouponService.find(param);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.UserCouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbUserCouponsService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("userConpons")
|
||||
public class TbUserCouponsController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private TbUserCouponsService tbUserCouponsService;
|
||||
|
||||
/**
|
||||
* 查询优惠卷
|
||||
* @param conponDto
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("find")
|
||||
public Result queryByPage(@RequestBody UserCouponDto conponDto) {
|
||||
return tbUserCouponsService.queryByPage(conponDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,26 +3,21 @@ package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopUserMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralFlowVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.OpenMemberVo;
|
||||
import com.chaozhanggui.system.cashierservice.service.UserService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.TokenUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@CrossOrigin(origins = "*")
|
||||
@@ -42,27 +37,6 @@ public class UserContoller {
|
||||
@Autowired
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
|
||||
// @GetMapping("/userInfo")
|
||||
// public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
|
||||
// TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// if (Objects.isNull(shopUser)){
|
||||
// jsonObject.put("status","fail");
|
||||
// jsonObject.put("msg","用户不存在");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// String userSign = UUID.randomUUID().toString().replaceAll("-","");
|
||||
// String token = TokenUtil.generateJfToken(openId,userSign);
|
||||
// JSONObject object = new JSONObject();
|
||||
// object.put("token",token);
|
||||
// object.put("userSign",userSign);
|
||||
// object.put("num",shopUser.getTotalScore());
|
||||
// jsonObject.put("status","success");
|
||||
// jsonObject.put("msg","成功");
|
||||
// jsonObject.put("data",object);
|
||||
// return jsonObject;
|
||||
// }
|
||||
|
||||
@PostMapping("/openMember")
|
||||
public Result openMember(@RequestBody OpenMemberVo memberVo){
|
||||
if(StringUtils.isBlank(memberVo.getTelephone())){
|
||||
@@ -138,41 +112,6 @@ public class UserContoller {
|
||||
return Result.success(CodeEnum.SUCCESS, shopUser);
|
||||
}
|
||||
|
||||
@GetMapping("/userCoupon")
|
||||
public Result userCoupon(@RequestParam("userId") String userId, @RequestParam("orderNum") BigDecimal orderNum) throws Exception {
|
||||
int num = userService.userCoupon(userId, orderNum);
|
||||
return Result.success(CodeEnum.SUCCESS, num);
|
||||
}
|
||||
|
||||
@PostMapping("/modityIntegral")
|
||||
public JSONObject modityIntegral(@RequestHeader String token, @RequestBody IntegralVo integralVo) throws Exception {
|
||||
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
String userSign = jsonObject.getString("userSign");
|
||||
return userService.modityIntegral(integralVo, userSign);
|
||||
}
|
||||
|
||||
@PostMapping("/userIntegral")
|
||||
public JSONObject userIntegral(@RequestHeader String token, @RequestBody IntegralFlowVo integralFlowVo) throws Exception {
|
||||
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
String userSign = jsonObject.getString("userSign");
|
||||
return userService.userIntegral(integralFlowVo, userSign);
|
||||
}
|
||||
|
||||
@PostMapping("/userAllIntegral")
|
||||
public JSONObject userAllIntegral(@RequestBody IntegralFlowVo integralFlowVo) throws Exception {
|
||||
// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
// String userSign = jsonObject.getString("userSign");
|
||||
return userService.userAllIntegral(integralFlowVo, "userSign");
|
||||
}
|
||||
|
||||
@PostMapping("/userAll")
|
||||
public JSONObject userAll(@RequestBody IntegralFlowVo integralFlowVo) throws Exception {
|
||||
// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
// String userSign = jsonObject.getString("userSign");
|
||||
return userService.userAll(integralFlowVo, "userSign");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取订阅当前用户店库存预警消息的二维码
|
||||
*
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateInRecord;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbProduct;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserCoupons;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.UserCouponVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -32,10 +30,11 @@ public interface TbActivateInRecordMapper {
|
||||
*/
|
||||
List<TbActivateInRecord> queryAll(TbActivateInRecord tbActivateInRecord);
|
||||
|
||||
List<TbProduct> queryByVipIdAndShopId(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId);
|
||||
List<UserCouponVo> queryVipPro(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId,@Param("shopName")String shopName);
|
||||
int queryByVipIdAndShopIdAndProId(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId,@Param("productId") Integer productId);
|
||||
List<TbActivateInRecord> queryAllByVipIdAndShopIdAndProId(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId,@Param("productId") Integer productId);
|
||||
//未使用券
|
||||
List<TbUserCouponVo> queryByVipIdAndShopId(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId);
|
||||
List<TbActivateInRecord> queryByVipIdAndShopIdIn(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId);
|
||||
//过期券
|
||||
List<TbUserCouponVo> queryByVipIdAndShopIdExpire(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId);
|
||||
|
||||
int countCouponNum(@Param("userId") Integer userId);
|
||||
|
||||
@@ -64,8 +63,6 @@ public interface TbActivateInRecordMapper {
|
||||
*/
|
||||
int update(TbActivateInRecord tbActivateInRecord);
|
||||
|
||||
int updateOverNumById(@Param("id")Integer id,@Param("overNum")Integer overNum);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
|
||||
@@ -1,29 +1,72 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivate;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
/**
|
||||
* (TbActivate)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 14:19:53
|
||||
*/
|
||||
public interface TbActivateMapper {
|
||||
// int deleteByPrimaryKey(Integer id);
|
||||
|
||||
// int insert(TbActivate record);
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivate queryById(Integer id);
|
||||
|
||||
// int insertSelective(TbActivate record);
|
||||
/**
|
||||
* 查询数据
|
||||
*
|
||||
* @param tbActivate 查询条件
|
||||
* @param pageable 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<TbActivate> queryAll(TbActivate tbActivate, @Param("pageable") Pageable pageable);
|
||||
|
||||
TbActivate selectByPrimaryKey(Integer id);
|
||||
|
||||
// int updateByPrimaryKeySelective(TbActivate record);
|
||||
|
||||
// int updateByPrimaryKey(TbActivate record);
|
||||
List<TbActivate> selectByShopId(String shopId);
|
||||
|
||||
TbActivate selectByAmount(@Param("shopId") String shopId,@Param("amount") BigDecimal amount);
|
||||
|
||||
List<TbActivate> selectByShopId(String shopId);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbActivate 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(TbActivate tbActivate);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<TbActivate> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<TbActivate> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbActivate 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(TbActivate tbActivate);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateOutRecord;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.UserCouponVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -10,7 +11,7 @@ import java.util.List;
|
||||
* 活动赠送商品使用记录表(TbActivateOutRecord)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 11:21:56
|
||||
* @since 2024-10-23 14:55:22
|
||||
*/
|
||||
public interface TbActivateOutRecordMapper {
|
||||
|
||||
@@ -26,12 +27,12 @@ public interface TbActivateOutRecordMapper {
|
||||
* 查询数据
|
||||
*
|
||||
* @param tbActivateOutRecord 查询条件
|
||||
* @param pageable 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<TbActivateOutRecord> queryAll(TbActivateOutRecord tbActivateOutRecord);
|
||||
|
||||
List<UserCouponVo> queryVipPro(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId, @Param("shopName") String shopName);
|
||||
List<TbActivateOutRecord> queryAll(TbActivateOutRecord tbActivateOutRecord, @Param("pageable") Pageable pageable);
|
||||
|
||||
List<TbUserCouponVo> queryByVipIdAndShopId(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
@@ -57,14 +58,6 @@ public interface TbActivateOutRecordMapper {
|
||||
*/
|
||||
int update(TbActivateOutRecord tbActivateOutRecord);
|
||||
|
||||
/**
|
||||
* 根据订单id 将数据状态变为
|
||||
* @param orderId 订单Id
|
||||
* @param status 状态
|
||||
* @return
|
||||
*/
|
||||
int updateByOrderIdAndStatus(@Param("orderId")Integer orderId,@Param("status")String status);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateProduct;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 15:14:55
|
||||
*/
|
||||
public interface TbActivateProductMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivateProduct queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询数据
|
||||
*
|
||||
* @param tbActivateProduct 查询条件
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<TbActivateProduct> queryAll(TbActivateProduct tbActivateProduct);
|
||||
|
||||
List<TbActivateProduct> queryAllByActivateId(Integer activateId);
|
||||
List<String> queryProsByActivateId(Integer activateId);
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbActivateProduct 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(TbActivateProduct tbActivateProduct);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<TbActivateProduct> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<TbActivateProduct> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbActivateProduct 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(TbActivateProduct tbActivateProduct);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbCouponProduct;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbCouponProduct)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 14:35:49
|
||||
*/
|
||||
public interface TbCouponProductMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbCouponProduct queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询数据
|
||||
*
|
||||
* @param tbCouponProduct 查询条件
|
||||
* @param pageable 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<TbCouponProduct> queryAll(TbCouponProduct tbCouponProduct, @Param("pageable") Pageable pageable);
|
||||
|
||||
|
||||
List<TbCouponProduct> queryAllByCouponId(Integer couponId);
|
||||
List<String> queryProsByActivateId(@Param("couponId")Integer couponId,@Param("num")Integer num);
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbCouponProduct 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(TbCouponProduct tbCouponProduct);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<TbCouponProduct> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<TbCouponProduct> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbCouponProduct 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(TbCouponProduct tbCouponProduct);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo;
|
||||
|
||||
public interface TbDeviceOperateInfoMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbDeviceOperateInfo record);
|
||||
|
||||
int insertSelective(TbDeviceOperateInfo record);
|
||||
|
||||
TbDeviceOperateInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbDeviceOperateInfo record);
|
||||
|
||||
int updateByPrimaryKey(TbDeviceOperateInfo record);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbDeviceStock;
|
||||
|
||||
public interface TbDeviceStockMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbDeviceStock record);
|
||||
|
||||
int insertSelective(TbDeviceStock record);
|
||||
|
||||
TbDeviceStock selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbDeviceStock record);
|
||||
|
||||
int updateByPrimaryKey(TbDeviceStock record);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow;
|
||||
|
||||
public interface TbIntegralFlowMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbIntegralFlow record);
|
||||
|
||||
int insertSelective(TbIntegralFlow record);
|
||||
|
||||
TbIntegralFlow selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbIntegralFlow record);
|
||||
|
||||
int updateByPrimaryKey(TbIntegralFlow record);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbIntegral;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public interface TbIntegralMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbIntegral record);
|
||||
|
||||
int insertSelective(TbIntegral record);
|
||||
|
||||
TbIntegral selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbIntegral record);
|
||||
|
||||
int updateByPrimaryKey(TbIntegral record);
|
||||
|
||||
List<TbIntegral> selectAllByUserId(String userId);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbMerchantCoupon;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 优惠券(TbMerchantCoupon)表数据库访问层
|
||||
*
|
||||
* @author lyf
|
||||
* @since 2024-04-02 09:24:16
|
||||
*/
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbMerchantCouponMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbMerchantCoupon queryById(Integer id);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbParams;
|
||||
|
||||
public interface TbParamsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbParams record);
|
||||
|
||||
int insertSelective(TbParams record);
|
||||
|
||||
TbParams selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbParams record);
|
||||
|
||||
int updateByPrimaryKey(TbParams record);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods;
|
||||
|
||||
public interface TbPlussDeviceGoodsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbPlussDeviceGoods record);
|
||||
|
||||
int insertSelective(TbPlussDeviceGoods record);
|
||||
|
||||
TbPlussDeviceGoods selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbPlussDeviceGoods record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TbPlussDeviceGoods record);
|
||||
|
||||
int updateByPrimaryKey(TbPlussDeviceGoods record);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbReceiptSales;
|
||||
|
||||
public interface TbReceiptSalesMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbReceiptSales record);
|
||||
|
||||
int insertSelective(TbReceiptSales record);
|
||||
|
||||
TbReceiptSales selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbReceiptSales record);
|
||||
|
||||
int updateByPrimaryKey(TbReceiptSales record);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbReleaseFlowMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbReleaseFlow record);
|
||||
|
||||
int insertSelective(TbReleaseFlow record);
|
||||
|
||||
TbReleaseFlow selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbReleaseFlow record);
|
||||
|
||||
int updateByPrimaryKey(TbReleaseFlow record);
|
||||
|
||||
List<TbReleaseFlow> selectByUserId(@Param("userId") String userId);
|
||||
|
||||
List<TbReleaseFlow> selectAll();
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog;
|
||||
|
||||
public interface TbRenewalsPayLogMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbRenewalsPayLog record);
|
||||
|
||||
int insertSelective(TbRenewalsPayLog record);
|
||||
|
||||
TbRenewalsPayLog selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbRenewalsPayLog record);
|
||||
|
||||
int updateByPrimaryKey(TbRenewalsPayLog record);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs;
|
||||
|
||||
public interface TbShopCashSpreadMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbShopCashSpreadWithBLOBs record);
|
||||
|
||||
int insertSelective(TbShopCashSpreadWithBLOBs record);
|
||||
|
||||
TbShopCashSpreadWithBLOBs selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbShopCashSpreadWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TbShopCashSpreadWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(TbShopCashSpread record);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCoupon;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 14:25:13
|
||||
*/
|
||||
public interface TbShopCouponMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbShopCoupon queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询数据
|
||||
*
|
||||
* @param tbShopCoupon 查询条件
|
||||
* @param pageable 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<TbShopCoupon> queryAll(TbShopCoupon tbShopCoupon, @Param("pageable") Pageable pageable);
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbShopCoupon 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(TbShopCoupon tbShopCoupon);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<TbShopCoupon> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<TbShopCoupon> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbShopCoupon 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(TbShopCoupon tbShopCoupon);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCurrency;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs;
|
||||
|
||||
public interface TbShopCurrencyMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbShopCurrencyWithBLOBs record);
|
||||
|
||||
int insertSelective(TbShopCurrencyWithBLOBs record);
|
||||
|
||||
TbShopCurrencyWithBLOBs selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbShopCurrencyWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TbShopCurrencyWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(TbShopCurrency record);
|
||||
}
|
||||
@@ -13,11 +13,6 @@ import java.util.List;
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbShopInfoMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbShopInfo record);
|
||||
|
||||
int insertSelective(TbShopInfo record);
|
||||
|
||||
List<SubShopVo> selShopInfoByGps(@Param("rightTopLng") Double rightTopLng, @Param("rightTopLat") Double rightTopLat,
|
||||
@Param("leftBottomLng") Double leftBottomLng, @Param("leftBottomLat") Double leftBottomLat,
|
||||
@@ -30,12 +25,6 @@ public interface TbShopInfoMapper {
|
||||
|
||||
List<TbShopInfo> selectByIds(@Param("list") List<String> ids);
|
||||
|
||||
int updateByPrimaryKeySelective(TbShopInfo record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TbShopInfo record);
|
||||
|
||||
int updateByPrimaryKey(TbShopInfo record);
|
||||
|
||||
TbShopInfo selectByQrCode(String qrcode);
|
||||
|
||||
TbShopInfo selectByPhone(String phone);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbParams;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -9,7 +8,6 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
@@ -40,6 +38,4 @@ public interface TbShopUserMapper {
|
||||
List<ShopUserListVo> selectByUserId(@Param("userId") String userId, @Param("shopId") String shopId);
|
||||
|
||||
TbShopUser selectByOpenId(@Param("openId") String openId);
|
||||
|
||||
TbParams selectParams();
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts;
|
||||
|
||||
public interface TbSplitAccountsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbSplitAccounts record);
|
||||
|
||||
int insertSelective(TbSplitAccounts record);
|
||||
|
||||
TbSplitAccounts selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbSplitAccounts record);
|
||||
|
||||
int updateByPrimaryKey(TbSplitAccounts record);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public interface TbSystemCouponsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbSystemCoupons record);
|
||||
|
||||
int insertSelective(TbSystemCoupons record);
|
||||
|
||||
TbSystemCoupons selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbSystemCoupons record);
|
||||
|
||||
int updateByPrimaryKey(TbSystemCoupons record);
|
||||
|
||||
List<TbSystemCoupons> selectAll(@Param("type") String type);
|
||||
|
||||
int selectByAmount(@Param("orderNum") BigDecimal orderNum);
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserCoupons;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.UserCouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.UserCouponVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbUserCouponsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbUserCoupons record);
|
||||
|
||||
int insertSelective(TbUserCoupons record);
|
||||
|
||||
TbUserCoupons selectByPrimaryKey(Integer id);
|
||||
List<UserCouponVo> queryAllSelective(UserCouponDto record);
|
||||
|
||||
int updateByPrimaryKeySelective(TbUserCoupons record);
|
||||
|
||||
int updateByPrimaryKey(TbUserCoupons record);
|
||||
|
||||
List<TbUserCoupons> selectByUserId(@Param("userId") String userId,@Param("status") String status,@Param("amount") BigDecimal amount);
|
||||
|
||||
TbUserCoupons selectByOrderId(@Param("orderId") Integer orderId);
|
||||
|
||||
int selectByUserIdAndAmount(@Param("userId") String userId, @Param("orderNum") BigDecimal orderNum);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbWiningParams;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbWiningParamsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbWiningParams record);
|
||||
|
||||
int insertSelective(TbWiningParams record);
|
||||
|
||||
TbWiningParams selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbWiningParams record);
|
||||
|
||||
int updateByPrimaryKey(TbWiningParams record);
|
||||
|
||||
List<TbWiningParams> selectAll();
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbWiningUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbWiningUserMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbWiningUser record);
|
||||
|
||||
int insertSelective(TbWiningUser record);
|
||||
|
||||
TbWiningUser selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbWiningUser record);
|
||||
|
||||
int updateByPrimaryKey(TbWiningUser record);
|
||||
|
||||
List<TbWiningUser> selectAllByTrade(@Param("day") String day);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbYhqParams;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbYhqParamsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbYhqParams record);
|
||||
|
||||
int insertSelective(TbYhqParams record);
|
||||
|
||||
TbYhqParams selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbYhqParams record);
|
||||
|
||||
int updateByPrimaryKey(TbYhqParams record);
|
||||
|
||||
List<TbYhqParams> selectAll();
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.ViewOrder;
|
||||
|
||||
public interface ViewOrderMapper {
|
||||
int insert(ViewOrder record);
|
||||
|
||||
int insertSelective(ViewOrder record);
|
||||
}
|
||||
@@ -1,33 +1,49 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (TbActivate)实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 14:16:33
|
||||
*/
|
||||
public class TbActivate implements Serializable {
|
||||
private static final long serialVersionUID = 216340931948517603L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer shopId;
|
||||
/**
|
||||
* 充值金额
|
||||
*/
|
||||
private Integer amount;
|
||||
/**
|
||||
* 赠送金额
|
||||
*/
|
||||
private Integer giftAmount;
|
||||
/**
|
||||
* 是否使用优惠卷 0否 1是
|
||||
*/
|
||||
private Integer isUseCoupon;
|
||||
/**
|
||||
* 优惠卷id
|
||||
*/
|
||||
private Integer couponId;
|
||||
/**
|
||||
* 优惠卷数量
|
||||
*/
|
||||
private Integer num;
|
||||
|
||||
private Integer minNum;
|
||||
private Date createTime = new Date();
|
||||
|
||||
private Integer maxNum;
|
||||
private Date updateTime = new Date();
|
||||
|
||||
private BigDecimal handselNum;
|
||||
|
||||
private String handselType;
|
||||
|
||||
private String isDel;
|
||||
|
||||
//是否赠送商品 0否 1是
|
||||
private Integer isGiftPro;
|
||||
private String couponDesc;
|
||||
private List<String> gives;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -44,52 +60,69 @@ public class TbActivate implements Serializable {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public Integer getMinNum() {
|
||||
return minNum;
|
||||
public Integer getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setMinNum(Integer minNum) {
|
||||
this.minNum = minNum;
|
||||
public void setAmount(Integer amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Integer getMaxNum() {
|
||||
return maxNum;
|
||||
public Integer getGiftAmount() {
|
||||
return giftAmount;
|
||||
}
|
||||
|
||||
public void setMaxNum(Integer maxNum) {
|
||||
this.maxNum = maxNum;
|
||||
public void setGiftAmount(Integer giftAmount) {
|
||||
this.giftAmount = giftAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getHandselNum() {
|
||||
return handselNum;
|
||||
public Integer getIsUseCoupon() {
|
||||
return isUseCoupon;
|
||||
}
|
||||
|
||||
public void setHandselNum(BigDecimal handselNum) {
|
||||
this.handselNum = handselNum;
|
||||
public void setIsUseCoupon(Integer isUseCoupon) {
|
||||
this.isUseCoupon = isUseCoupon;
|
||||
}
|
||||
|
||||
public String getHandselType() {
|
||||
return handselType;
|
||||
public Integer getCouponId() {
|
||||
return couponId;
|
||||
}
|
||||
|
||||
public void setHandselType(String handselType) {
|
||||
this.handselType = handselType == null ? null : handselType.trim();
|
||||
public void setCouponId(Integer couponId) {
|
||||
this.couponId = couponId;
|
||||
}
|
||||
|
||||
public String getIsDel() {
|
||||
return isDel;
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setIsDel(String isDel) {
|
||||
this.isDel = isDel == null ? null : isDel.trim();
|
||||
public void setNum(Integer num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public Integer getIsGiftPro() {
|
||||
return isGiftPro;
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setIsGiftPro(Integer isGiftPro) {
|
||||
this.isGiftPro = isGiftPro;
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
|
||||
public String getCouponDesc() {
|
||||
return couponDesc;
|
||||
}
|
||||
|
||||
public void setCouponDesc(String couponDesc) {
|
||||
this.couponDesc = couponDesc;
|
||||
}
|
||||
|
||||
public List<String> getGives() {
|
||||
@@ -97,10 +130,7 @@ public class TbActivate implements Serializable {
|
||||
}
|
||||
|
||||
public void setGives(List<String> gives) {
|
||||
if(CollectionUtils.isEmpty(gives)){
|
||||
this.gives = new ArrayList<>();
|
||||
}else {
|
||||
this.gives = gives;
|
||||
}
|
||||
this.gives = gives;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,56 +4,75 @@ import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 活动商品赠送表(TbActivateInRecord)实体类
|
||||
* 活动商品赠送记录表(TbActivateInRecord)实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 11:13:40
|
||||
* @since 2024-10-23 16:43:02
|
||||
*/
|
||||
public class TbActivateInRecord implements Serializable {
|
||||
private static final long serialVersionUID = -35515830201618782L;
|
||||
private static final long serialVersionUID = -31673077202067433L;
|
||||
|
||||
private Integer id;
|
||||
/**
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private Integer vipUserId;
|
||||
/**
|
||||
/**
|
||||
* 卷Id (校验是否可用)
|
||||
*/
|
||||
private Integer couponId;
|
||||
/**
|
||||
* 卷描述 满10减2/商品卷
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 1-满减 2-商品
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Integer proId;
|
||||
/**
|
||||
/**
|
||||
* 满多少金额
|
||||
*/
|
||||
private Integer fullAmount;
|
||||
/**
|
||||
* 减多少金额
|
||||
*/
|
||||
private Integer discountAmount;
|
||||
/**
|
||||
* 赠送数量
|
||||
*/
|
||||
private Integer num;
|
||||
/**
|
||||
/**
|
||||
* 未使用数量
|
||||
*/
|
||||
private Integer overNum;
|
||||
/**
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer shopId;
|
||||
/**
|
||||
/**
|
||||
* 来源活动id
|
||||
*/
|
||||
private Integer sourceActId;
|
||||
|
||||
private Integer sourceFlowId;
|
||||
/**
|
||||
* 可用开始时间
|
||||
*/
|
||||
private Date useStartTime;
|
||||
/**
|
||||
* 可用结束时间
|
||||
*/
|
||||
private Date useEndTime;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
public TbActivateInRecord(Integer vipUserId, Integer proId, Integer num, Integer shopId, Integer sourceActId,Integer sourceFlowId) {
|
||||
this.vipUserId = vipUserId;
|
||||
this.proId = proId;
|
||||
this.num = num;
|
||||
this.overNum = num;
|
||||
this.shopId = shopId;
|
||||
this.sourceActId = sourceActId;
|
||||
this.sourceFlowId = sourceFlowId;
|
||||
this.createTime=new Date();
|
||||
}
|
||||
private String couponJson;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
@@ -72,6 +91,30 @@ public class TbActivateInRecord implements Serializable {
|
||||
this.vipUserId = vipUserId;
|
||||
}
|
||||
|
||||
public Integer getCouponId() {
|
||||
return couponId;
|
||||
}
|
||||
|
||||
public void setCouponId(Integer couponId) {
|
||||
this.couponId = couponId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getProId() {
|
||||
return proId;
|
||||
}
|
||||
@@ -80,6 +123,22 @@ public class TbActivateInRecord implements Serializable {
|
||||
this.proId = proId;
|
||||
}
|
||||
|
||||
public Integer getFullAmount() {
|
||||
return fullAmount;
|
||||
}
|
||||
|
||||
public void setFullAmount(Integer fullAmount) {
|
||||
this.fullAmount = fullAmount;
|
||||
}
|
||||
|
||||
public Integer getDiscountAmount() {
|
||||
return discountAmount;
|
||||
}
|
||||
|
||||
public void setDiscountAmount(Integer discountAmount) {
|
||||
this.discountAmount = discountAmount;
|
||||
}
|
||||
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
@@ -120,6 +179,22 @@ public class TbActivateInRecord implements Serializable {
|
||||
this.sourceFlowId = sourceFlowId;
|
||||
}
|
||||
|
||||
public Date getUseStartTime() {
|
||||
return useStartTime;
|
||||
}
|
||||
|
||||
public void setUseStartTime(Date useStartTime) {
|
||||
this.useStartTime = useStartTime;
|
||||
}
|
||||
|
||||
public Date getUseEndTime() {
|
||||
return useEndTime;
|
||||
}
|
||||
|
||||
public void setUseEndTime(Date useEndTime) {
|
||||
this.useEndTime = useEndTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
@@ -136,5 +211,13 @@ public class TbActivateInRecord implements Serializable {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getCouponJson() {
|
||||
return couponJson;
|
||||
}
|
||||
|
||||
public void setCouponJson(String couponJson) {
|
||||
this.couponJson = couponJson;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,20 +7,30 @@ import java.io.Serializable;
|
||||
* 活动赠送商品使用记录表(TbActivateOutRecord)实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 11:21:56
|
||||
* @since 2024-10-23 14:55:22
|
||||
*/
|
||||
public class TbActivateOutRecord implements Serializable {
|
||||
private static final long serialVersionUID = -54399746948905097L;
|
||||
private static final long serialVersionUID = -34082928893064380L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer shopId;
|
||||
/**
|
||||
* 商品赠送Id
|
||||
* 订单id
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 商品赠送Id tb_activate_in_record的id
|
||||
*/
|
||||
private Integer giveId;
|
||||
/**
|
||||
* 商品id
|
||||
* 会员id
|
||||
*/
|
||||
private Integer proId;
|
||||
private Integer vipUserId;
|
||||
/**
|
||||
* 1-满减 2-商品
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 使用数量
|
||||
*/
|
||||
@@ -30,24 +40,14 @@ public class TbActivateOutRecord implements Serializable {
|
||||
*/
|
||||
private Integer refNum;
|
||||
/**
|
||||
* 订单id
|
||||
* 新建: create, 完成: closed, 取消:cancel,
|
||||
*/
|
||||
private String orderId;
|
||||
//新建: create, 完成: closed, 取消:cancel,
|
||||
private String status;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
public TbActivateOutRecord(Integer giveId, Integer proId, Integer useNum, String orderId, String status) {
|
||||
this.giveId = giveId;
|
||||
this.proId = proId;
|
||||
this.useNum = useNum;
|
||||
this.orderId = orderId;
|
||||
this.status = status;
|
||||
this.createTime = new Date();
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
@@ -57,6 +57,22 @@ public class TbActivateOutRecord implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(Integer shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Integer getGiveId() {
|
||||
return giveId;
|
||||
}
|
||||
@@ -65,12 +81,20 @@ public class TbActivateOutRecord implements Serializable {
|
||||
this.giveId = giveId;
|
||||
}
|
||||
|
||||
public Integer getProId() {
|
||||
return proId;
|
||||
public Integer getVipUserId() {
|
||||
return vipUserId;
|
||||
}
|
||||
|
||||
public void setProId(Integer proId) {
|
||||
this.proId = proId;
|
||||
public void setVipUserId(Integer vipUserId) {
|
||||
this.vipUserId = vipUserId;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getUseNum() {
|
||||
@@ -97,14 +121,6 @@ public class TbActivateOutRecord implements Serializable {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@@ -4,24 +4,24 @@ import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)实体类
|
||||
* 活动赠送商品表(TbCouponProduct)实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 15:15:01
|
||||
* @since 2024-10-23 14:35:49
|
||||
*/
|
||||
public class TbActivateProduct implements Serializable {
|
||||
private static final long serialVersionUID = 592370528166603965L;
|
||||
public class TbCouponProduct implements Serializable {
|
||||
private static final long serialVersionUID = 619724621133545616L;
|
||||
|
||||
private Integer id;
|
||||
/**
|
||||
/**
|
||||
* 活动Id
|
||||
*/
|
||||
private Integer activateId;
|
||||
/**
|
||||
private Integer couponId;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer num;
|
||||
@@ -39,12 +39,12 @@ public class TbActivateProduct implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getActivateId() {
|
||||
return activateId;
|
||||
public Integer getCouponId() {
|
||||
return couponId;
|
||||
}
|
||||
|
||||
public void setActivateId(Integer activateId) {
|
||||
this.activateId = activateId;
|
||||
public void setCouponId(Integer couponId) {
|
||||
this.couponId = couponId;
|
||||
}
|
||||
|
||||
public Integer getProductId() {
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class TbDeviceOperateInfo implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String deviceno;
|
||||
|
||||
private String type;
|
||||
|
||||
private String shopId;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private String remark;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeviceno() {
|
||||
return deviceno;
|
||||
}
|
||||
|
||||
public void setDeviceno(String deviceno) {
|
||||
this.deviceno = deviceno == null ? null : deviceno.trim();
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type == null ? null : type.trim();
|
||||
}
|
||||
|
||||
public String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId == null ? null : shopId.trim();
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim();
|
||||
}
|
||||
}
|
||||
@@ -1,249 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class TbDeviceStock implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String code;
|
||||
|
||||
private String snno;
|
||||
|
||||
private String orderno;
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
private String type;
|
||||
|
||||
private String groupno;
|
||||
|
||||
private String buymercname;
|
||||
|
||||
private String buymercid;
|
||||
|
||||
private String actmercname;
|
||||
|
||||
private String actmercid;
|
||||
|
||||
private String status;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private String createby;
|
||||
|
||||
private String delflag;
|
||||
|
||||
private String remarks;
|
||||
|
||||
private Date updatetime;
|
||||
|
||||
private String deviceno;
|
||||
|
||||
private Integer belonguserid;
|
||||
|
||||
private Integer extractuserid;
|
||||
|
||||
private String rolecode;
|
||||
|
||||
private Date instocktime;
|
||||
|
||||
private String transferstatus;
|
||||
|
||||
private Date bindtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code == null ? null : code.trim();
|
||||
}
|
||||
|
||||
public String getSnno() {
|
||||
return snno;
|
||||
}
|
||||
|
||||
public void setSnno(String snno) {
|
||||
this.snno = snno == null ? null : snno.trim();
|
||||
}
|
||||
|
||||
public String getOrderno() {
|
||||
return orderno;
|
||||
}
|
||||
|
||||
public void setOrderno(String orderno) {
|
||||
this.orderno = orderno == null ? null : orderno.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type == null ? null : type.trim();
|
||||
}
|
||||
|
||||
public String getGroupno() {
|
||||
return groupno;
|
||||
}
|
||||
|
||||
public void setGroupno(String groupno) {
|
||||
this.groupno = groupno == null ? null : groupno.trim();
|
||||
}
|
||||
|
||||
public String getBuymercname() {
|
||||
return buymercname;
|
||||
}
|
||||
|
||||
public void setBuymercname(String buymercname) {
|
||||
this.buymercname = buymercname == null ? null : buymercname.trim();
|
||||
}
|
||||
|
||||
public String getBuymercid() {
|
||||
return buymercid;
|
||||
}
|
||||
|
||||
public void setBuymercid(String buymercid) {
|
||||
this.buymercid = buymercid == null ? null : buymercid.trim();
|
||||
}
|
||||
|
||||
public String getActmercname() {
|
||||
return actmercname;
|
||||
}
|
||||
|
||||
public void setActmercname(String actmercname) {
|
||||
this.actmercname = actmercname == null ? null : actmercname.trim();
|
||||
}
|
||||
|
||||
public String getActmercid() {
|
||||
return actmercid;
|
||||
}
|
||||
|
||||
public void setActmercid(String actmercid) {
|
||||
this.actmercid = actmercid == null ? null : actmercid.trim();
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status == null ? null : status.trim();
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public String getCreateby() {
|
||||
return createby;
|
||||
}
|
||||
|
||||
public void setCreateby(String createby) {
|
||||
this.createby = createby == null ? null : createby.trim();
|
||||
}
|
||||
|
||||
public String getDelflag() {
|
||||
return delflag;
|
||||
}
|
||||
|
||||
public void setDelflag(String delflag) {
|
||||
this.delflag = delflag == null ? null : delflag.trim();
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks == null ? null : remarks.trim();
|
||||
}
|
||||
|
||||
public Date getUpdatetime() {
|
||||
return updatetime;
|
||||
}
|
||||
|
||||
public void setUpdatetime(Date updatetime) {
|
||||
this.updatetime = updatetime;
|
||||
}
|
||||
|
||||
public String getDeviceno() {
|
||||
return deviceno;
|
||||
}
|
||||
|
||||
public void setDeviceno(String deviceno) {
|
||||
this.deviceno = deviceno == null ? null : deviceno.trim();
|
||||
}
|
||||
|
||||
public Integer getBelonguserid() {
|
||||
return belonguserid;
|
||||
}
|
||||
|
||||
public void setBelonguserid(Integer belonguserid) {
|
||||
this.belonguserid = belonguserid;
|
||||
}
|
||||
|
||||
public Integer getExtractuserid() {
|
||||
return extractuserid;
|
||||
}
|
||||
|
||||
public void setExtractuserid(Integer extractuserid) {
|
||||
this.extractuserid = extractuserid;
|
||||
}
|
||||
|
||||
public String getRolecode() {
|
||||
return rolecode;
|
||||
}
|
||||
|
||||
public void setRolecode(String rolecode) {
|
||||
this.rolecode = rolecode == null ? null : rolecode.trim();
|
||||
}
|
||||
|
||||
public Date getInstocktime() {
|
||||
return instocktime;
|
||||
}
|
||||
|
||||
public void setInstocktime(Date instocktime) {
|
||||
this.instocktime = instocktime;
|
||||
}
|
||||
|
||||
public String getTransferstatus() {
|
||||
return transferstatus;
|
||||
}
|
||||
|
||||
public void setTransferstatus(String transferstatus) {
|
||||
this.transferstatus = transferstatus == null ? null : transferstatus.trim();
|
||||
}
|
||||
|
||||
public Date getBindtime() {
|
||||
return bindtime;
|
||||
}
|
||||
|
||||
public void setBindtime(Date bindtime) {
|
||||
this.bindtime = bindtime;
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class TbIntegral implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String userId;
|
||||
|
||||
private BigDecimal num;
|
||||
|
||||
private String status;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId == null ? null : userId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(BigDecimal num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status == null ? null : status.trim();
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class TbIntegralFlow implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String userId;
|
||||
|
||||
private BigDecimal num;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId == null ? null : userId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(BigDecimal num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
@@ -1,420 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 优惠券(TbMerchantCoupon)实体类
|
||||
*
|
||||
* @author lyf
|
||||
* @since 2024-04-02 09:22:41
|
||||
*/
|
||||
public class TbMerchantCoupon implements Serializable {
|
||||
private static final long serialVersionUID = 391103766508753856L;
|
||||
/**
|
||||
* 自增
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 状态0-关闭 1 正常
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 优惠券名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
private String templateId;
|
||||
|
||||
private String shopId;
|
||||
|
||||
private String shopSnap;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date fromTime;
|
||||
/**
|
||||
* 到期时间
|
||||
*/
|
||||
private Date toTime;
|
||||
/**
|
||||
* 限领数量
|
||||
*/
|
||||
private String limitNumber;
|
||||
private String useNumber;
|
||||
/**
|
||||
* 发放数量
|
||||
*/
|
||||
private Integer number;
|
||||
/**
|
||||
* 剩余数量
|
||||
*/
|
||||
private String leftNumber;
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private Double amount;
|
||||
/**
|
||||
* 订单满赠金额
|
||||
*/
|
||||
private Double limitAmount;
|
||||
/**
|
||||
* 是否显示0-不显示 1显示
|
||||
*/
|
||||
private Integer isShow;
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String pic;
|
||||
/**
|
||||
* 0-满减 1-折扣
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 折扣 ,一位小数
|
||||
*/
|
||||
private Float ratio;
|
||||
/**
|
||||
* 最大折扣金额
|
||||
*/
|
||||
private Double maxRatioAmount;
|
||||
/**
|
||||
* 优惠券途径,首充|分销
|
||||
*/
|
||||
private String track;
|
||||
/**
|
||||
* 品类product 商品券 ---cateogry 品类券common -通 用券
|
||||
*/
|
||||
private String classType;
|
||||
/**
|
||||
* 有效期类型:0-toTime有效 1-effectDays有效
|
||||
*/
|
||||
private Integer effectType;
|
||||
/**
|
||||
* 领取之日有效天数
|
||||
*/
|
||||
private Integer effectDays;
|
||||
/**
|
||||
* 关联商品Id
|
||||
*/
|
||||
private String relationIds;
|
||||
|
||||
private String relationList;
|
||||
/**
|
||||
* 发放人
|
||||
*/
|
||||
private String editor;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String note;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Long updatedAt;
|
||||
/**
|
||||
* 支持堂食
|
||||
*/
|
||||
private Integer furnishMeal;
|
||||
/**
|
||||
* 支持配送
|
||||
*/
|
||||
private Integer furnishExpress;
|
||||
/**
|
||||
* 支持自提
|
||||
*/
|
||||
private Integer furnishDraw;
|
||||
/**
|
||||
* 支持虚拟
|
||||
*/
|
||||
private Integer furnishVir;
|
||||
|
||||
private Integer disableDistribute;
|
||||
/**
|
||||
* 商户Id
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
|
||||
public String getUseNumber() {
|
||||
return useNumber;
|
||||
}
|
||||
|
||||
public void setUseNumber(String useNumber) {
|
||||
this.useNumber = useNumber;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public String getShopSnap() {
|
||||
return shopSnap;
|
||||
}
|
||||
|
||||
public void setShopSnap(String shopSnap) {
|
||||
this.shopSnap = shopSnap;
|
||||
}
|
||||
|
||||
public Date getFromTime() {
|
||||
return fromTime;
|
||||
}
|
||||
|
||||
public void setFromTime(Date fromTime) {
|
||||
this.fromTime = fromTime;
|
||||
}
|
||||
|
||||
public Date getToTime() {
|
||||
return toTime;
|
||||
}
|
||||
|
||||
public void setToTime(Date toTime) {
|
||||
this.toTime = toTime;
|
||||
}
|
||||
|
||||
public String getLimitNumber() {
|
||||
return limitNumber;
|
||||
}
|
||||
|
||||
public void setLimitNumber(String limitNumber) {
|
||||
this.limitNumber = limitNumber;
|
||||
}
|
||||
|
||||
public Integer getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(Integer number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getLeftNumber() {
|
||||
return leftNumber;
|
||||
}
|
||||
|
||||
public void setLeftNumber(String leftNumber) {
|
||||
this.leftNumber = leftNumber;
|
||||
}
|
||||
|
||||
public Double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(Double amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Double getLimitAmount() {
|
||||
return limitAmount;
|
||||
}
|
||||
|
||||
public void setLimitAmount(Double limitAmount) {
|
||||
this.limitAmount = limitAmount;
|
||||
}
|
||||
|
||||
public Integer getIsShow() {
|
||||
return isShow;
|
||||
}
|
||||
|
||||
public void setIsShow(Integer isShow) {
|
||||
this.isShow = isShow;
|
||||
}
|
||||
|
||||
public String getPic() {
|
||||
return pic;
|
||||
}
|
||||
|
||||
public void setPic(String pic) {
|
||||
this.pic = pic;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Float getRatio() {
|
||||
return ratio;
|
||||
}
|
||||
|
||||
public void setRatio(Float ratio) {
|
||||
this.ratio = ratio;
|
||||
}
|
||||
|
||||
public Double getMaxRatioAmount() {
|
||||
return maxRatioAmount;
|
||||
}
|
||||
|
||||
public void setMaxRatioAmount(Double maxRatioAmount) {
|
||||
this.maxRatioAmount = maxRatioAmount;
|
||||
}
|
||||
|
||||
public String getTrack() {
|
||||
return track;
|
||||
}
|
||||
|
||||
public void setTrack(String track) {
|
||||
this.track = track;
|
||||
}
|
||||
|
||||
public String getClassType() {
|
||||
return classType;
|
||||
}
|
||||
|
||||
public void setClassType(String classType) {
|
||||
this.classType = classType;
|
||||
}
|
||||
|
||||
public Integer getEffectType() {
|
||||
return effectType;
|
||||
}
|
||||
|
||||
public void setEffectType(Integer effectType) {
|
||||
this.effectType = effectType;
|
||||
}
|
||||
|
||||
public Integer getEffectDays() {
|
||||
return effectDays;
|
||||
}
|
||||
|
||||
public void setEffectDays(Integer effectDays) {
|
||||
this.effectDays = effectDays;
|
||||
}
|
||||
|
||||
public String getRelationIds() {
|
||||
return relationIds;
|
||||
}
|
||||
|
||||
public void setRelationIds(String relationIds) {
|
||||
this.relationIds = relationIds;
|
||||
}
|
||||
|
||||
public String getRelationList() {
|
||||
return relationList;
|
||||
}
|
||||
|
||||
public void setRelationList(String relationList) {
|
||||
this.relationList = relationList;
|
||||
}
|
||||
|
||||
public String getEditor() {
|
||||
return editor;
|
||||
}
|
||||
|
||||
public void setEditor(String editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Long updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Integer getFurnishMeal() {
|
||||
return furnishMeal;
|
||||
}
|
||||
|
||||
public void setFurnishMeal(Integer furnishMeal) {
|
||||
this.furnishMeal = furnishMeal;
|
||||
}
|
||||
|
||||
public Integer getFurnishExpress() {
|
||||
return furnishExpress;
|
||||
}
|
||||
|
||||
public void setFurnishExpress(Integer furnishExpress) {
|
||||
this.furnishExpress = furnishExpress;
|
||||
}
|
||||
|
||||
public Integer getFurnishDraw() {
|
||||
return furnishDraw;
|
||||
}
|
||||
|
||||
public void setFurnishDraw(Integer furnishDraw) {
|
||||
this.furnishDraw = furnishDraw;
|
||||
}
|
||||
|
||||
public Integer getFurnishVir() {
|
||||
return furnishVir;
|
||||
}
|
||||
|
||||
public void setFurnishVir(Integer furnishVir) {
|
||||
this.furnishVir = furnishVir;
|
||||
}
|
||||
|
||||
public Integer getDisableDistribute() {
|
||||
return disableDistribute;
|
||||
}
|
||||
|
||||
public void setDisableDistribute(Integer disableDistribute) {
|
||||
this.disableDistribute = disableDistribute;
|
||||
}
|
||||
|
||||
public String getMerchantId() {
|
||||
return merchantId;
|
||||
}
|
||||
|
||||
public void setMerchantId(String merchantId) {
|
||||
this.merchantId = merchantId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
@Data
|
||||
public class TbParams implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private BigDecimal integralRatio;
|
||||
private BigDecimal twoRatio;
|
||||
|
||||
private BigDecimal tradeRatio;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class TbPlussDeviceGoods implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String devicelogo;
|
||||
|
||||
private String introdesc;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer tagid;
|
||||
|
||||
private String depositflag;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private Date updatetime;
|
||||
|
||||
private String detail;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code == null ? null : code.trim();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public String getDevicelogo() {
|
||||
return devicelogo;
|
||||
}
|
||||
|
||||
public void setDevicelogo(String devicelogo) {
|
||||
this.devicelogo = devicelogo == null ? null : devicelogo.trim();
|
||||
}
|
||||
|
||||
public String getIntrodesc() {
|
||||
return introdesc;
|
||||
}
|
||||
|
||||
public void setIntrodesc(String introdesc) {
|
||||
this.introdesc = introdesc == null ? null : introdesc.trim();
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getTagid() {
|
||||
return tagid;
|
||||
}
|
||||
|
||||
public void setTagid(Integer tagid) {
|
||||
this.tagid = tagid;
|
||||
}
|
||||
|
||||
public String getDepositflag() {
|
||||
return depositflag;
|
||||
}
|
||||
|
||||
public void setDepositflag(String depositflag) {
|
||||
this.depositflag = depositflag == null ? null : depositflag.trim();
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public Date getUpdatetime() {
|
||||
return updatetime;
|
||||
}
|
||||
|
||||
public void setUpdatetime(Date updatetime) {
|
||||
this.updatetime = updatetime;
|
||||
}
|
||||
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public void setDetail(String detail) {
|
||||
this.detail = detail == null ? null : detail.trim();
|
||||
}
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TbReceiptSales implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
private String logo;
|
||||
|
||||
private Boolean showContactInfo;
|
||||
|
||||
private Boolean showMember;
|
||||
|
||||
private Boolean showMemberCode;
|
||||
|
||||
private Boolean showMemberScore;
|
||||
|
||||
private Boolean showMemberWallet;
|
||||
|
||||
private String footerRemark;
|
||||
|
||||
private Boolean showCashCharge;
|
||||
|
||||
private Boolean showSerialNo;
|
||||
|
||||
private Boolean bigSerialNo;
|
||||
|
||||
private String headerText;
|
||||
|
||||
private String headerTextAlign;
|
||||
|
||||
private String footerText;
|
||||
|
||||
private String footerTextAlign;
|
||||
|
||||
private String footerImage;
|
||||
|
||||
private String prePrint;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title == null ? null : title.trim();
|
||||
}
|
||||
|
||||
public String getLogo() {
|
||||
return logo;
|
||||
}
|
||||
|
||||
public void setLogo(String logo) {
|
||||
this.logo = logo == null ? null : logo.trim();
|
||||
}
|
||||
|
||||
public Boolean getShowContactInfo() {
|
||||
return showContactInfo;
|
||||
}
|
||||
|
||||
public void setShowContactInfo(Boolean showContactInfo) {
|
||||
this.showContactInfo = showContactInfo;
|
||||
}
|
||||
|
||||
public Boolean getShowMember() {
|
||||
return showMember;
|
||||
}
|
||||
|
||||
public void setShowMember(Boolean showMember) {
|
||||
this.showMember = showMember;
|
||||
}
|
||||
|
||||
public Boolean getShowMemberCode() {
|
||||
return showMemberCode;
|
||||
}
|
||||
|
||||
public void setShowMemberCode(Boolean showMemberCode) {
|
||||
this.showMemberCode = showMemberCode;
|
||||
}
|
||||
|
||||
public Boolean getShowMemberScore() {
|
||||
return showMemberScore;
|
||||
}
|
||||
|
||||
public void setShowMemberScore(Boolean showMemberScore) {
|
||||
this.showMemberScore = showMemberScore;
|
||||
}
|
||||
|
||||
public Boolean getShowMemberWallet() {
|
||||
return showMemberWallet;
|
||||
}
|
||||
|
||||
public void setShowMemberWallet(Boolean showMemberWallet) {
|
||||
this.showMemberWallet = showMemberWallet;
|
||||
}
|
||||
|
||||
public String getFooterRemark() {
|
||||
return footerRemark;
|
||||
}
|
||||
|
||||
public void setFooterRemark(String footerRemark) {
|
||||
this.footerRemark = footerRemark == null ? null : footerRemark.trim();
|
||||
}
|
||||
|
||||
public Boolean getShowCashCharge() {
|
||||
return showCashCharge;
|
||||
}
|
||||
|
||||
public void setShowCashCharge(Boolean showCashCharge) {
|
||||
this.showCashCharge = showCashCharge;
|
||||
}
|
||||
|
||||
public Boolean getShowSerialNo() {
|
||||
return showSerialNo;
|
||||
}
|
||||
|
||||
public void setShowSerialNo(Boolean showSerialNo) {
|
||||
this.showSerialNo = showSerialNo;
|
||||
}
|
||||
|
||||
public Boolean getBigSerialNo() {
|
||||
return bigSerialNo;
|
||||
}
|
||||
|
||||
public void setBigSerialNo(Boolean bigSerialNo) {
|
||||
this.bigSerialNo = bigSerialNo;
|
||||
}
|
||||
|
||||
public String getHeaderText() {
|
||||
return headerText;
|
||||
}
|
||||
|
||||
public void setHeaderText(String headerText) {
|
||||
this.headerText = headerText == null ? null : headerText.trim();
|
||||
}
|
||||
|
||||
public String getHeaderTextAlign() {
|
||||
return headerTextAlign;
|
||||
}
|
||||
|
||||
public void setHeaderTextAlign(String headerTextAlign) {
|
||||
this.headerTextAlign = headerTextAlign == null ? null : headerTextAlign.trim();
|
||||
}
|
||||
|
||||
public String getFooterText() {
|
||||
return footerText;
|
||||
}
|
||||
|
||||
public void setFooterText(String footerText) {
|
||||
this.footerText = footerText == null ? null : footerText.trim();
|
||||
}
|
||||
|
||||
public String getFooterTextAlign() {
|
||||
return footerTextAlign;
|
||||
}
|
||||
|
||||
public void setFooterTextAlign(String footerTextAlign) {
|
||||
this.footerTextAlign = footerTextAlign == null ? null : footerTextAlign.trim();
|
||||
}
|
||||
|
||||
public String getFooterImage() {
|
||||
return footerImage;
|
||||
}
|
||||
|
||||
public void setFooterImage(String footerImage) {
|
||||
this.footerImage = footerImage == null ? null : footerImage.trim();
|
||||
}
|
||||
|
||||
public String getPrePrint() {
|
||||
return prePrint;
|
||||
}
|
||||
|
||||
public void setPrePrint(String prePrint) {
|
||||
this.prePrint = prePrint == null ? null : prePrint.trim();
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Long updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TbReleaseFlow implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String userId;
|
||||
|
||||
private BigDecimal num;
|
||||
|
||||
private String type;
|
||||
private String operationType;
|
||||
|
||||
private String remark;
|
||||
private String nickName;
|
||||
|
||||
private String fromSource;
|
||||
|
||||
private Date createTime;
|
||||
private String createTr;
|
||||
private String openId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class TbRenewalsPayLog implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String payType;
|
||||
|
||||
private String shopId;
|
||||
|
||||
private String orderId;
|
||||
|
||||
private String openId;
|
||||
|
||||
private String userId;
|
||||
|
||||
private String transactionId;
|
||||
|
||||
private BigDecimal amount;
|
||||
|
||||
private Byte status;
|
||||
|
||||
private String remark;
|
||||
|
||||
private String attach;
|
||||
|
||||
private Long expiredAt;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPayType() {
|
||||
return payType;
|
||||
}
|
||||
|
||||
public void setPayType(String payType) {
|
||||
this.payType = payType == null ? null : payType.trim();
|
||||
}
|
||||
|
||||
public String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId == null ? null : shopId.trim();
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId == null ? null : orderId.trim();
|
||||
}
|
||||
|
||||
public String getOpenId() {
|
||||
return openId;
|
||||
}
|
||||
|
||||
public void setOpenId(String openId) {
|
||||
this.openId = openId == null ? null : openId.trim();
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId == null ? null : userId.trim();
|
||||
}
|
||||
|
||||
public String getTransactionId() {
|
||||
return transactionId;
|
||||
}
|
||||
|
||||
public void setTransactionId(String transactionId) {
|
||||
this.transactionId = transactionId == null ? null : transactionId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Byte getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Byte status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim();
|
||||
}
|
||||
|
||||
public String getAttach() {
|
||||
return attach;
|
||||
}
|
||||
|
||||
public void setAttach(String attach) {
|
||||
this.attach = attach == null ? null : attach.trim();
|
||||
}
|
||||
|
||||
public Long getExpiredAt() {
|
||||
return expiredAt;
|
||||
}
|
||||
|
||||
public void setExpiredAt(Long expiredAt) {
|
||||
this.expiredAt = expiredAt;
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Long updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TbShopCashSpread implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Long updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TbShopCashSpreadWithBLOBs extends TbShopCashSpread implements Serializable {
|
||||
private String saleReceipt;
|
||||
|
||||
private String triplicateReceipt;
|
||||
|
||||
private String screenConfig;
|
||||
|
||||
private String tagConfig;
|
||||
|
||||
private String scaleConfig;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getSaleReceipt() {
|
||||
return saleReceipt;
|
||||
}
|
||||
|
||||
public void setSaleReceipt(String saleReceipt) {
|
||||
this.saleReceipt = saleReceipt == null ? null : saleReceipt.trim();
|
||||
}
|
||||
|
||||
public String getTriplicateReceipt() {
|
||||
return triplicateReceipt;
|
||||
}
|
||||
|
||||
public void setTriplicateReceipt(String triplicateReceipt) {
|
||||
this.triplicateReceipt = triplicateReceipt == null ? null : triplicateReceipt.trim();
|
||||
}
|
||||
|
||||
public String getScreenConfig() {
|
||||
return screenConfig;
|
||||
}
|
||||
|
||||
public void setScreenConfig(String screenConfig) {
|
||||
this.screenConfig = screenConfig == null ? null : screenConfig.trim();
|
||||
}
|
||||
|
||||
public String getTagConfig() {
|
||||
return tagConfig;
|
||||
}
|
||||
|
||||
public void setTagConfig(String tagConfig) {
|
||||
this.tagConfig = tagConfig == null ? null : tagConfig.trim();
|
||||
}
|
||||
|
||||
public String getScaleConfig() {
|
||||
return scaleConfig;
|
||||
}
|
||||
|
||||
public void setScaleConfig(String scaleConfig) {
|
||||
this.scaleConfig = scaleConfig == null ? null : scaleConfig.trim();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-24 10:40:00
|
||||
*/
|
||||
public class TbShopCoupon implements Serializable {
|
||||
private static final long serialVersionUID = 382961088281627909L;
|
||||
/**
|
||||
* 自增
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
private String shopId;
|
||||
/**
|
||||
* 名称(无意义)
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 1-满减 2-商品
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 满多少金额
|
||||
*/
|
||||
private Integer fullAmount;
|
||||
/**
|
||||
* 减多少金额
|
||||
*/
|
||||
private Integer discountAmount;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 发放数量
|
||||
*/
|
||||
private Integer number;
|
||||
/**
|
||||
* 剩余数量
|
||||
*/
|
||||
private Integer leftNumber;
|
||||
/**
|
||||
* 有效期类型,可选值为 fixed(固定时间)/custom(自定义时间)
|
||||
*/
|
||||
private String validityType;
|
||||
/**
|
||||
* 有效天数
|
||||
*/
|
||||
private Integer validDays;
|
||||
/**
|
||||
* 隔多少天生效
|
||||
*/
|
||||
private Integer daysToTakeEffect;
|
||||
/**
|
||||
* 有效开始时间
|
||||
*/
|
||||
private Date validStartTime;
|
||||
/**
|
||||
* 有效结束时间
|
||||
*/
|
||||
private Date validEndTime;
|
||||
/**
|
||||
* 周 数组["周一","周二"]
|
||||
*/
|
||||
private String userDays;
|
||||
/**
|
||||
* all-全时段 custom-指定时段
|
||||
*/
|
||||
private String useTimeType;
|
||||
/**
|
||||
* 可用开始时间
|
||||
*/
|
||||
private LocalTime useStartTime;
|
||||
/**
|
||||
* 可用结束时间
|
||||
*/
|
||||
private LocalTime useEndTime;
|
||||
/**
|
||||
* 已使用数量
|
||||
*/
|
||||
private Integer useNumber;
|
||||
/**
|
||||
* 发放人
|
||||
*/
|
||||
private String editor;
|
||||
/**
|
||||
* 状态0-关闭 1 正常
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getFullAmount() {
|
||||
return fullAmount;
|
||||
}
|
||||
|
||||
public void setFullAmount(Integer fullAmount) {
|
||||
this.fullAmount = fullAmount;
|
||||
}
|
||||
|
||||
public Integer getDiscountAmount() {
|
||||
return discountAmount;
|
||||
}
|
||||
|
||||
public void setDiscountAmount(Integer discountAmount) {
|
||||
this.discountAmount = discountAmount;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Integer getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(Integer number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Integer getLeftNumber() {
|
||||
return leftNumber;
|
||||
}
|
||||
|
||||
public void setLeftNumber(Integer leftNumber) {
|
||||
this.leftNumber = leftNumber;
|
||||
}
|
||||
|
||||
public String getValidityType() {
|
||||
return validityType;
|
||||
}
|
||||
|
||||
public void setValidityType(String validityType) {
|
||||
this.validityType = validityType;
|
||||
}
|
||||
|
||||
public Integer getValidDays() {
|
||||
return validDays;
|
||||
}
|
||||
|
||||
public void setValidDays(Integer validDays) {
|
||||
this.validDays = validDays;
|
||||
}
|
||||
|
||||
public Integer getDaysToTakeEffect() {
|
||||
return daysToTakeEffect;
|
||||
}
|
||||
|
||||
public void setDaysToTakeEffect(Integer daysToTakeEffect) {
|
||||
this.daysToTakeEffect = daysToTakeEffect;
|
||||
}
|
||||
|
||||
public Date getValidStartTime() {
|
||||
return validStartTime;
|
||||
}
|
||||
|
||||
public void setValidStartTime(Date validStartTime) {
|
||||
this.validStartTime = validStartTime;
|
||||
}
|
||||
|
||||
public Date getValidEndTime() {
|
||||
return validEndTime;
|
||||
}
|
||||
|
||||
public void setValidEndTime(Date validEndTime) {
|
||||
this.validEndTime = validEndTime;
|
||||
}
|
||||
|
||||
public String getUserDays() {
|
||||
return userDays;
|
||||
}
|
||||
|
||||
public void setUserDays(String userDays) {
|
||||
this.userDays = userDays;
|
||||
}
|
||||
|
||||
public String getUseTimeType() {
|
||||
return useTimeType;
|
||||
}
|
||||
|
||||
public void setUseTimeType(String useTimeType) {
|
||||
this.useTimeType = useTimeType;
|
||||
}
|
||||
|
||||
public LocalTime getUseStartTime() {
|
||||
return useStartTime;
|
||||
}
|
||||
|
||||
public void setUseStartTime(LocalTime useStartTime) {
|
||||
this.useStartTime = useStartTime;
|
||||
}
|
||||
|
||||
public LocalTime getUseEndTime() {
|
||||
return useEndTime;
|
||||
}
|
||||
|
||||
public void setUseEndTime(LocalTime useEndTime) {
|
||||
this.useEndTime = useEndTime;
|
||||
}
|
||||
|
||||
public Integer getUseNumber() {
|
||||
return useNumber;
|
||||
}
|
||||
|
||||
public void setUseNumber(Integer useNumber) {
|
||||
this.useNumber = useNumber;
|
||||
}
|
||||
|
||||
public String getEditor() {
|
||||
return editor;
|
||||
}
|
||||
|
||||
public void setEditor(String editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class TbShopCurrency implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String shopId;
|
||||
|
||||
private BigDecimal prepareAmount;
|
||||
|
||||
private String currency;
|
||||
|
||||
private Byte decimalsDigits;
|
||||
|
||||
private String discountRound;
|
||||
|
||||
private String merchantId;
|
||||
|
||||
private Byte smallChange;
|
||||
|
||||
private Byte enableCustomDiscount;
|
||||
|
||||
private BigDecimal maxDiscount;
|
||||
|
||||
private Double maxPercent;
|
||||
|
||||
private String bizDuration;
|
||||
|
||||
private Byte allowWebPay;
|
||||
|
||||
private Byte isAutoToZero;
|
||||
|
||||
private Byte isIncludeTaxPrice;
|
||||
|
||||
private String taxNumber;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private Byte autoLockScreen;
|
||||
|
||||
private Byte voiceNotification;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId == null ? null : shopId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getPrepareAmount() {
|
||||
return prepareAmount;
|
||||
}
|
||||
|
||||
public void setPrepareAmount(BigDecimal prepareAmount) {
|
||||
this.prepareAmount = prepareAmount;
|
||||
}
|
||||
|
||||
public String getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
public void setCurrency(String currency) {
|
||||
this.currency = currency == null ? null : currency.trim();
|
||||
}
|
||||
|
||||
public Byte getDecimalsDigits() {
|
||||
return decimalsDigits;
|
||||
}
|
||||
|
||||
public void setDecimalsDigits(Byte decimalsDigits) {
|
||||
this.decimalsDigits = decimalsDigits;
|
||||
}
|
||||
|
||||
public String getDiscountRound() {
|
||||
return discountRound;
|
||||
}
|
||||
|
||||
public void setDiscountRound(String discountRound) {
|
||||
this.discountRound = discountRound == null ? null : discountRound.trim();
|
||||
}
|
||||
|
||||
public String getMerchantId() {
|
||||
return merchantId;
|
||||
}
|
||||
|
||||
public void setMerchantId(String merchantId) {
|
||||
this.merchantId = merchantId == null ? null : merchantId.trim();
|
||||
}
|
||||
|
||||
public Byte getSmallChange() {
|
||||
return smallChange;
|
||||
}
|
||||
|
||||
public void setSmallChange(Byte smallChange) {
|
||||
this.smallChange = smallChange;
|
||||
}
|
||||
|
||||
public Byte getEnableCustomDiscount() {
|
||||
return enableCustomDiscount;
|
||||
}
|
||||
|
||||
public void setEnableCustomDiscount(Byte enableCustomDiscount) {
|
||||
this.enableCustomDiscount = enableCustomDiscount;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxDiscount() {
|
||||
return maxDiscount;
|
||||
}
|
||||
|
||||
public void setMaxDiscount(BigDecimal maxDiscount) {
|
||||
this.maxDiscount = maxDiscount;
|
||||
}
|
||||
|
||||
public Double getMaxPercent() {
|
||||
return maxPercent;
|
||||
}
|
||||
|
||||
public void setMaxPercent(Double maxPercent) {
|
||||
this.maxPercent = maxPercent;
|
||||
}
|
||||
|
||||
public String getBizDuration() {
|
||||
return bizDuration;
|
||||
}
|
||||
|
||||
public void setBizDuration(String bizDuration) {
|
||||
this.bizDuration = bizDuration == null ? null : bizDuration.trim();
|
||||
}
|
||||
|
||||
public Byte getAllowWebPay() {
|
||||
return allowWebPay;
|
||||
}
|
||||
|
||||
public void setAllowWebPay(Byte allowWebPay) {
|
||||
this.allowWebPay = allowWebPay;
|
||||
}
|
||||
|
||||
public Byte getIsAutoToZero() {
|
||||
return isAutoToZero;
|
||||
}
|
||||
|
||||
public void setIsAutoToZero(Byte isAutoToZero) {
|
||||
this.isAutoToZero = isAutoToZero;
|
||||
}
|
||||
|
||||
public Byte getIsIncludeTaxPrice() {
|
||||
return isIncludeTaxPrice;
|
||||
}
|
||||
|
||||
public void setIsIncludeTaxPrice(Byte isIncludeTaxPrice) {
|
||||
this.isIncludeTaxPrice = isIncludeTaxPrice;
|
||||
}
|
||||
|
||||
public String getTaxNumber() {
|
||||
return taxNumber;
|
||||
}
|
||||
|
||||
public void setTaxNumber(String taxNumber) {
|
||||
this.taxNumber = taxNumber == null ? null : taxNumber.trim();
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Long updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Byte getAutoLockScreen() {
|
||||
return autoLockScreen;
|
||||
}
|
||||
|
||||
public void setAutoLockScreen(Byte autoLockScreen) {
|
||||
this.autoLockScreen = autoLockScreen;
|
||||
}
|
||||
|
||||
public Byte getVoiceNotification() {
|
||||
return voiceNotification;
|
||||
}
|
||||
|
||||
public void setVoiceNotification(Byte voiceNotification) {
|
||||
this.voiceNotification = voiceNotification;
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TbShopCurrencyWithBLOBs extends TbShopCurrency implements Serializable {
|
||||
private String discountConfigs;
|
||||
|
||||
private String serviceCharge;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getDiscountConfigs() {
|
||||
return discountConfigs;
|
||||
}
|
||||
|
||||
public void setDiscountConfigs(String discountConfigs) {
|
||||
this.discountConfigs = discountConfigs == null ? null : discountConfigs.trim();
|
||||
}
|
||||
|
||||
public String getServiceCharge() {
|
||||
return serviceCharge;
|
||||
}
|
||||
|
||||
public void setServiceCharge(String serviceCharge) {
|
||||
this.serviceCharge = serviceCharge == null ? null : serviceCharge.trim();
|
||||
}
|
||||
}
|
||||
@@ -1,128 +1,785 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Data
|
||||
/**
|
||||
* (TbShopInfo)实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 15:03:55
|
||||
*/
|
||||
public class TbShopInfo implements Serializable {
|
||||
private static final long serialVersionUID = -75915575260078554L;
|
||||
/**
|
||||
* 自增id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 店铺帐号
|
||||
*/
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 店铺代号,策略方式为city +店铺号(8位)
|
||||
*/
|
||||
private String shopCode;
|
||||
|
||||
/**
|
||||
* 店铺口号
|
||||
*/
|
||||
private String subTitle;
|
||||
|
||||
/**
|
||||
* 商户Id
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 连锁店扩展店名
|
||||
*/
|
||||
private String chainName;
|
||||
|
||||
/**
|
||||
* 背景图
|
||||
*/
|
||||
private String backImg;
|
||||
|
||||
/**
|
||||
* 门头照
|
||||
*/
|
||||
private String frontImg;
|
||||
|
||||
/**
|
||||
* 联系人姓名
|
||||
*/
|
||||
private String contactName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 店铺log0
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
private Byte isDeposit;
|
||||
|
||||
private Byte isSupply;
|
||||
|
||||
/**
|
||||
* 是否参与代收 0--不参与 1参与
|
||||
*/
|
||||
private Integer isDeposit;
|
||||
/**
|
||||
* 是否为供应商
|
||||
*/
|
||||
private Integer isSupply;
|
||||
/**
|
||||
* 封面图
|
||||
*/
|
||||
private String coverImg;
|
||||
|
||||
/**
|
||||
* 店铺分享图
|
||||
*/
|
||||
private String shareImg;
|
||||
|
||||
/**
|
||||
* 轮播图
|
||||
*/
|
||||
private String view;
|
||||
/**
|
||||
* 店铺简介
|
||||
*/
|
||||
private String detail;
|
||||
|
||||
/**
|
||||
* 经纬度
|
||||
*/
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 经纬度
|
||||
*/
|
||||
private String lng;
|
||||
|
||||
/**
|
||||
* 未用
|
||||
*/
|
||||
private String mchId;
|
||||
|
||||
private String registerType;
|
||||
|
||||
private Byte isWxMaIndependent;
|
||||
|
||||
/**
|
||||
* 是否独立的微信小程序
|
||||
*/
|
||||
private Integer isWxMaIndependent;
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 类似于这种规则51.51.570
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 店铺类型 超市--MARKET---其它店SHOP
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 行业
|
||||
*/
|
||||
private String industry;
|
||||
|
||||
/**
|
||||
* 行业名称
|
||||
*/
|
||||
private String industryName;
|
||||
|
||||
/**
|
||||
* 营业时间(周开始)
|
||||
*/
|
||||
private String businessStartDay;
|
||||
/**
|
||||
* 营业时间(周结束)
|
||||
*/
|
||||
private String businessEndDay;
|
||||
/**
|
||||
* 营业时间
|
||||
*/
|
||||
private String businessTime;
|
||||
|
||||
/**
|
||||
* 配送时间
|
||||
*/
|
||||
private String postTime;
|
||||
|
||||
private BigDecimal postAmountLine;
|
||||
|
||||
private Byte onSale;
|
||||
|
||||
private Byte settleType;
|
||||
|
||||
/**
|
||||
* 0停业1,正常营业,网上售卖
|
||||
*/
|
||||
private Integer onSale;
|
||||
/**
|
||||
* 0今日,1次日
|
||||
*/
|
||||
private Integer settleType;
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
private String settleTime;
|
||||
|
||||
/**
|
||||
* 入驻时间
|
||||
*/
|
||||
private Integer enterAt;
|
||||
|
||||
/**
|
||||
* 到期时间
|
||||
*/
|
||||
private Long expireAt;
|
||||
|
||||
private Byte status;
|
||||
|
||||
private Float average;
|
||||
|
||||
/**
|
||||
* -1 平台禁用 0-过期,1正式营业,
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 人均消费
|
||||
*/
|
||||
private BigDecimal average;
|
||||
/**
|
||||
* 订单等待时间
|
||||
*/
|
||||
private Integer orderWaitPayMinute;
|
||||
|
||||
/**
|
||||
* 支持登陆设备个数
|
||||
*/
|
||||
private Integer supportDeviceNumber;
|
||||
|
||||
private Byte distributeLevel;
|
||||
/**
|
||||
* 分销层级(1-下级分销 2-两下级分销)
|
||||
*/
|
||||
private Integer distributeLevel;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private String proxyId;
|
||||
|
||||
private String view;
|
||||
/**
|
||||
* trial试用版,release正式
|
||||
*/
|
||||
private String profiles;
|
||||
/**
|
||||
* 商家二维码
|
||||
*/
|
||||
private String shopQrcode;
|
||||
private String isOpenYhq;
|
||||
private Byte isUseVip;
|
||||
/**
|
||||
* 商户标签
|
||||
* 商家标签
|
||||
*/
|
||||
private String tag;
|
||||
private String provinces;
|
||||
private String cities;
|
||||
private String districts;
|
||||
|
||||
private String isOpenYhq;
|
||||
/**
|
||||
* 0否1是
|
||||
*/
|
||||
private Integer isUseVip;
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String provinces;
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
private String cities;
|
||||
/**
|
||||
* 区/县
|
||||
*/
|
||||
private String districts;
|
||||
/**
|
||||
* 是否允许会员自定义金额 1 允许 0 不允许
|
||||
*/
|
||||
private String isCustom;
|
||||
//是否开启桌位费 0否1是
|
||||
/**
|
||||
* 是否开启退款密码 1 启用 0 禁用
|
||||
*/
|
||||
private String isReturn;
|
||||
/**
|
||||
* 是否开启会员充值密码 1 启用 0 禁用
|
||||
*/
|
||||
private String isMemberIn;
|
||||
/**
|
||||
* 是否开启会员退款密码 1 启用 0 禁用
|
||||
*/
|
||||
private String isMemberReturn;
|
||||
/**
|
||||
* 是否免除桌位费 0否1是
|
||||
*/
|
||||
private Integer isTableFee;
|
||||
//桌位费
|
||||
/**
|
||||
* 是否启用会员价 0否1是
|
||||
*/
|
||||
private Integer isMemberPrice;
|
||||
/**
|
||||
* 积分群体 all-所有 vip-仅针对会员
|
||||
*/
|
||||
private String consumeColony;
|
||||
/**
|
||||
* 桌位费
|
||||
*/
|
||||
private BigDecimal tableFee;
|
||||
//就餐模式 堂食 dine-in 外带 take-out
|
||||
/**
|
||||
* 就餐模式 堂食 dine-in 外带 take-out
|
||||
*/
|
||||
private String eatModel;
|
||||
//程序码(零点八零首页)
|
||||
/**
|
||||
* 小程序码(零点八零首页)
|
||||
*/
|
||||
private String smallQrcode;
|
||||
//店铺收款码
|
||||
/**
|
||||
* 店铺收款码
|
||||
*/
|
||||
private String paymentQrcode;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getShopCode() {
|
||||
return shopCode;
|
||||
}
|
||||
|
||||
public void setShopCode(String shopCode) {
|
||||
this.shopCode = shopCode;
|
||||
}
|
||||
|
||||
public String getSubTitle() {
|
||||
return subTitle;
|
||||
}
|
||||
|
||||
public void setSubTitle(String subTitle) {
|
||||
this.subTitle = subTitle;
|
||||
}
|
||||
|
||||
public String getMerchantId() {
|
||||
return merchantId;
|
||||
}
|
||||
|
||||
public void setMerchantId(String merchantId) {
|
||||
this.merchantId = merchantId;
|
||||
}
|
||||
|
||||
public String getShopName() {
|
||||
return shopName;
|
||||
}
|
||||
|
||||
public void setShopName(String shopName) {
|
||||
this.shopName = shopName;
|
||||
}
|
||||
|
||||
public String getChainName() {
|
||||
return chainName;
|
||||
}
|
||||
|
||||
public void setChainName(String chainName) {
|
||||
this.chainName = chainName;
|
||||
}
|
||||
|
||||
public String getBackImg() {
|
||||
return backImg;
|
||||
}
|
||||
|
||||
public void setBackImg(String backImg) {
|
||||
this.backImg = backImg;
|
||||
}
|
||||
|
||||
public String getFrontImg() {
|
||||
return frontImg;
|
||||
}
|
||||
|
||||
public void setFrontImg(String frontImg) {
|
||||
this.frontImg = frontImg;
|
||||
}
|
||||
|
||||
public String getContactName() {
|
||||
return contactName;
|
||||
}
|
||||
|
||||
public void setContactName(String contactName) {
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getLogo() {
|
||||
return logo;
|
||||
}
|
||||
|
||||
public void setLogo(String logo) {
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
public Integer getIsDeposit() {
|
||||
return isDeposit;
|
||||
}
|
||||
|
||||
public void setIsDeposit(Integer isDeposit) {
|
||||
this.isDeposit = isDeposit;
|
||||
}
|
||||
|
||||
public Integer getIsSupply() {
|
||||
return isSupply;
|
||||
}
|
||||
|
||||
public void setIsSupply(Integer isSupply) {
|
||||
this.isSupply = isSupply;
|
||||
}
|
||||
|
||||
public String getCoverImg() {
|
||||
return coverImg;
|
||||
}
|
||||
|
||||
public void setCoverImg(String coverImg) {
|
||||
this.coverImg = coverImg;
|
||||
}
|
||||
|
||||
public String getShareImg() {
|
||||
return shareImg;
|
||||
}
|
||||
|
||||
public void setShareImg(String shareImg) {
|
||||
this.shareImg = shareImg;
|
||||
}
|
||||
|
||||
public String getView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
public void setView(String view) {
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public void setDetail(String detail) {
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(String lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public String getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLng(String lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
public String getMchId() {
|
||||
return mchId;
|
||||
}
|
||||
|
||||
public void setMchId(String mchId) {
|
||||
this.mchId = mchId;
|
||||
}
|
||||
|
||||
public String getRegisterType() {
|
||||
return registerType;
|
||||
}
|
||||
|
||||
public void setRegisterType(String registerType) {
|
||||
this.registerType = registerType;
|
||||
}
|
||||
|
||||
public Integer getIsWxMaIndependent() {
|
||||
return isWxMaIndependent;
|
||||
}
|
||||
|
||||
public void setIsWxMaIndependent(Integer isWxMaIndependent) {
|
||||
this.isWxMaIndependent = isWxMaIndependent;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getIndustry() {
|
||||
return industry;
|
||||
}
|
||||
|
||||
public void setIndustry(String industry) {
|
||||
this.industry = industry;
|
||||
}
|
||||
|
||||
public String getIndustryName() {
|
||||
return industryName;
|
||||
}
|
||||
|
||||
public void setIndustryName(String industryName) {
|
||||
this.industryName = industryName;
|
||||
}
|
||||
|
||||
public String getBusinessStartDay() {
|
||||
return businessStartDay;
|
||||
}
|
||||
|
||||
public void setBusinessStartDay(String businessStartDay) {
|
||||
this.businessStartDay = businessStartDay;
|
||||
}
|
||||
|
||||
public String getBusinessEndDay() {
|
||||
return businessEndDay;
|
||||
}
|
||||
|
||||
public void setBusinessEndDay(String businessEndDay) {
|
||||
this.businessEndDay = businessEndDay;
|
||||
}
|
||||
|
||||
public String getBusinessTime() {
|
||||
return businessTime;
|
||||
}
|
||||
|
||||
public void setBusinessTime(String businessTime) {
|
||||
this.businessTime = businessTime;
|
||||
}
|
||||
|
||||
public String getPostTime() {
|
||||
return postTime;
|
||||
}
|
||||
|
||||
public void setPostTime(String postTime) {
|
||||
this.postTime = postTime;
|
||||
}
|
||||
|
||||
public BigDecimal getPostAmountLine() {
|
||||
return postAmountLine;
|
||||
}
|
||||
|
||||
public void setPostAmountLine(BigDecimal postAmountLine) {
|
||||
this.postAmountLine = postAmountLine;
|
||||
}
|
||||
|
||||
public Integer getOnSale() {
|
||||
return onSale;
|
||||
}
|
||||
|
||||
public void setOnSale(Integer onSale) {
|
||||
this.onSale = onSale;
|
||||
}
|
||||
|
||||
public Integer getSettleType() {
|
||||
return settleType;
|
||||
}
|
||||
|
||||
public void setSettleType(Integer settleType) {
|
||||
this.settleType = settleType;
|
||||
}
|
||||
|
||||
public String getSettleTime() {
|
||||
return settleTime;
|
||||
}
|
||||
|
||||
public void setSettleTime(String settleTime) {
|
||||
this.settleTime = settleTime;
|
||||
}
|
||||
|
||||
public Integer getEnterAt() {
|
||||
return enterAt;
|
||||
}
|
||||
|
||||
public void setEnterAt(Integer enterAt) {
|
||||
this.enterAt = enterAt;
|
||||
}
|
||||
|
||||
public Long getExpireAt() {
|
||||
return expireAt;
|
||||
}
|
||||
|
||||
public void setExpireAt(Long expireAt) {
|
||||
this.expireAt = expireAt;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public BigDecimal getAverage() {
|
||||
return average;
|
||||
}
|
||||
|
||||
public void setAverage(BigDecimal average) {
|
||||
this.average = average;
|
||||
}
|
||||
|
||||
public Integer getOrderWaitPayMinute() {
|
||||
return orderWaitPayMinute;
|
||||
}
|
||||
|
||||
public void setOrderWaitPayMinute(Integer orderWaitPayMinute) {
|
||||
this.orderWaitPayMinute = orderWaitPayMinute;
|
||||
}
|
||||
|
||||
public Integer getSupportDeviceNumber() {
|
||||
return supportDeviceNumber;
|
||||
}
|
||||
|
||||
public void setSupportDeviceNumber(Integer supportDeviceNumber) {
|
||||
this.supportDeviceNumber = supportDeviceNumber;
|
||||
}
|
||||
|
||||
public Integer getDistributeLevel() {
|
||||
return distributeLevel;
|
||||
}
|
||||
|
||||
public void setDistributeLevel(Integer distributeLevel) {
|
||||
this.distributeLevel = distributeLevel;
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Long updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public String getProxyId() {
|
||||
return proxyId;
|
||||
}
|
||||
|
||||
public void setProxyId(String proxyId) {
|
||||
this.proxyId = proxyId;
|
||||
}
|
||||
|
||||
public String getProfiles() {
|
||||
return profiles;
|
||||
}
|
||||
|
||||
public void setProfiles(String profiles) {
|
||||
this.profiles = profiles;
|
||||
}
|
||||
|
||||
public String getShopQrcode() {
|
||||
return shopQrcode;
|
||||
}
|
||||
|
||||
public void setShopQrcode(String shopQrcode) {
|
||||
this.shopQrcode = shopQrcode;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public String getIsOpenYhq() {
|
||||
return isOpenYhq;
|
||||
}
|
||||
|
||||
public void setIsOpenYhq(String isOpenYhq) {
|
||||
this.isOpenYhq = isOpenYhq;
|
||||
}
|
||||
|
||||
public Integer getIsUseVip() {
|
||||
return isUseVip;
|
||||
}
|
||||
|
||||
public void setIsUseVip(Integer isUseVip) {
|
||||
this.isUseVip = isUseVip;
|
||||
}
|
||||
|
||||
public String getProvinces() {
|
||||
return provinces;
|
||||
}
|
||||
|
||||
public void setProvinces(String provinces) {
|
||||
this.provinces = provinces;
|
||||
}
|
||||
|
||||
public String getCities() {
|
||||
return cities;
|
||||
}
|
||||
|
||||
public void setCities(String cities) {
|
||||
this.cities = cities;
|
||||
}
|
||||
|
||||
public String getDistricts() {
|
||||
return districts;
|
||||
}
|
||||
|
||||
public void setDistricts(String districts) {
|
||||
this.districts = districts;
|
||||
}
|
||||
|
||||
public String getIsCustom() {
|
||||
return isCustom;
|
||||
}
|
||||
|
||||
public void setIsCustom(String isCustom) {
|
||||
this.isCustom = isCustom;
|
||||
}
|
||||
|
||||
public String getIsReturn() {
|
||||
return isReturn;
|
||||
}
|
||||
|
||||
public void setIsReturn(String isReturn) {
|
||||
this.isReturn = isReturn;
|
||||
}
|
||||
|
||||
public String getIsMemberIn() {
|
||||
return isMemberIn;
|
||||
}
|
||||
|
||||
public void setIsMemberIn(String isMemberIn) {
|
||||
this.isMemberIn = isMemberIn;
|
||||
}
|
||||
|
||||
public String getIsMemberReturn() {
|
||||
return isMemberReturn;
|
||||
}
|
||||
|
||||
public void setIsMemberReturn(String isMemberReturn) {
|
||||
this.isMemberReturn = isMemberReturn;
|
||||
}
|
||||
|
||||
public Integer getIsTableFee() {
|
||||
return isTableFee;
|
||||
}
|
||||
|
||||
public void setIsTableFee(Integer isTableFee) {
|
||||
this.isTableFee = isTableFee;
|
||||
}
|
||||
|
||||
public Integer getIsMemberPrice() {
|
||||
return isMemberPrice;
|
||||
}
|
||||
|
||||
public void setIsMemberPrice(Integer isMemberPrice) {
|
||||
this.isMemberPrice = isMemberPrice;
|
||||
}
|
||||
|
||||
public String getConsumeColony() {
|
||||
return consumeColony;
|
||||
}
|
||||
|
||||
public void setConsumeColony(String consumeColony) {
|
||||
this.consumeColony = consumeColony;
|
||||
}
|
||||
|
||||
public BigDecimal getTableFee() {
|
||||
return tableFee;
|
||||
}
|
||||
|
||||
public void setTableFee(BigDecimal tableFee) {
|
||||
this.tableFee = tableFee;
|
||||
}
|
||||
|
||||
public String getEatModel() {
|
||||
return eatModel;
|
||||
}
|
||||
|
||||
public void setEatModel(String eatModel) {
|
||||
this.eatModel = eatModel;
|
||||
}
|
||||
|
||||
public String getSmallQrcode() {
|
||||
return smallQrcode;
|
||||
}
|
||||
|
||||
public void setSmallQrcode(String smallQrcode) {
|
||||
this.smallQrcode = smallQrcode;
|
||||
}
|
||||
|
||||
public String getPaymentQrcode() {
|
||||
return paymentQrcode;
|
||||
}
|
||||
|
||||
public void setPaymentQrcode(String paymentQrcode) {
|
||||
this.paymentQrcode = paymentQrcode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
//分配金额
|
||||
public class TbSplitAccounts implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer merchantId;//商户ID
|
||||
|
||||
private Integer shopId;//店铺ID
|
||||
|
||||
private BigDecimal couponsPrice;//优惠券价值
|
||||
|
||||
private BigDecimal conponsAmount;//优惠券面额
|
||||
private BigDecimal originAmount;//
|
||||
|
||||
private String isSplit;
|
||||
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date splitTime;
|
||||
|
||||
private String tradeDay;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TbUserCoupons implements Serializable{
|
||||
private Integer id;
|
||||
|
||||
private String userId;
|
||||
private String detail;
|
||||
private Integer orderId;
|
||||
|
||||
private BigDecimal couponsPrice;
|
||||
|
||||
private BigDecimal couponsAmount;
|
||||
private TbOrderInfo orderInfo;
|
||||
|
||||
private String status;
|
||||
private String isDouble;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private Date endTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class TbWiningParams implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private BigDecimal minPrice;
|
||||
|
||||
private BigDecimal maxPrice;
|
||||
|
||||
private Integer winingNum;
|
||||
|
||||
private Integer winingUserNum;
|
||||
private String status;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TbWiningUser implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String orderNo;
|
||||
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
private String isUser;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String isRefund;
|
||||
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
private String refundNo;
|
||||
|
||||
private String refundPayType;
|
||||
|
||||
private String tradeDay;
|
||||
|
||||
private Date refundTime;
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
public TbWiningUser(){
|
||||
super();
|
||||
}
|
||||
public TbWiningUser(String userName,String orderNo,BigDecimal orderAmount,
|
||||
String isUser,String tradeDay){
|
||||
this.createTime = new Date();
|
||||
this.userName = userName;
|
||||
this.orderNo = orderNo;
|
||||
this.orderAmount = orderAmount;
|
||||
this.isUser = isUser;
|
||||
this.tradeDay = tradeDay;
|
||||
this.isRefund = "true";
|
||||
this.refundAmount = BigDecimal.ZERO;
|
||||
this.refundPayType = "WX";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class TbYhqParams implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private BigDecimal minPrice;
|
||||
|
||||
private BigDecimal maxPrice;
|
||||
|
||||
private String status;
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,378 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ViewOrder implements Serializable {
|
||||
private BigDecimal aliPaidAmount;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private BigDecimal amount;
|
||||
|
||||
private BigDecimal bankPaidAmount;
|
||||
|
||||
private String billingId;
|
||||
|
||||
private BigDecimal cashPaidAmount;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Integer deductScore;
|
||||
|
||||
private BigDecimal depositPaidAmount;
|
||||
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
private BigDecimal freightAmount;
|
||||
|
||||
private Byte isMaster;
|
||||
|
||||
private Byte isVip;
|
||||
|
||||
private String masterId;
|
||||
|
||||
private String memberId;
|
||||
|
||||
private String orderNo;
|
||||
|
||||
private String orderType;
|
||||
|
||||
private BigDecimal otherPaidAmount;
|
||||
|
||||
private Long paidTime;
|
||||
|
||||
private BigDecimal payAmount;
|
||||
|
||||
private Integer productScore;
|
||||
|
||||
private String productType;
|
||||
|
||||
private String refOrderId;
|
||||
|
||||
private Byte refundAble;
|
||||
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
private String sendType;
|
||||
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
private String shopId;
|
||||
|
||||
private BigDecimal smallChange;
|
||||
|
||||
private String status;
|
||||
|
||||
private String tableId;
|
||||
|
||||
private String tableParty;
|
||||
|
||||
private String terminalSnap;
|
||||
|
||||
private String userId;
|
||||
|
||||
private BigDecimal virtualPaidAmount;
|
||||
|
||||
private BigDecimal wxPaidAmount;
|
||||
|
||||
private String cartList;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public BigDecimal getAliPaidAmount() {
|
||||
return aliPaidAmount;
|
||||
}
|
||||
|
||||
public void setAliPaidAmount(BigDecimal aliPaidAmount) {
|
||||
this.aliPaidAmount = aliPaidAmount;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getBankPaidAmount() {
|
||||
return bankPaidAmount;
|
||||
}
|
||||
|
||||
public void setBankPaidAmount(BigDecimal bankPaidAmount) {
|
||||
this.bankPaidAmount = bankPaidAmount;
|
||||
}
|
||||
|
||||
public String getBillingId() {
|
||||
return billingId;
|
||||
}
|
||||
|
||||
public void setBillingId(String billingId) {
|
||||
this.billingId = billingId == null ? null : billingId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getCashPaidAmount() {
|
||||
return cashPaidAmount;
|
||||
}
|
||||
|
||||
public void setCashPaidAmount(BigDecimal cashPaidAmount) {
|
||||
this.cashPaidAmount = cashPaidAmount;
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Integer getDeductScore() {
|
||||
return deductScore;
|
||||
}
|
||||
|
||||
public void setDeductScore(Integer deductScore) {
|
||||
this.deductScore = deductScore;
|
||||
}
|
||||
|
||||
public BigDecimal getDepositPaidAmount() {
|
||||
return depositPaidAmount;
|
||||
}
|
||||
|
||||
public void setDepositPaidAmount(BigDecimal depositPaidAmount) {
|
||||
this.depositPaidAmount = depositPaidAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getDiscountAmount() {
|
||||
return discountAmount;
|
||||
}
|
||||
|
||||
public void setDiscountAmount(BigDecimal discountAmount) {
|
||||
this.discountAmount = discountAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getFreightAmount() {
|
||||
return freightAmount;
|
||||
}
|
||||
|
||||
public void setFreightAmount(BigDecimal freightAmount) {
|
||||
this.freightAmount = freightAmount;
|
||||
}
|
||||
|
||||
public Byte getIsMaster() {
|
||||
return isMaster;
|
||||
}
|
||||
|
||||
public void setIsMaster(Byte isMaster) {
|
||||
this.isMaster = isMaster;
|
||||
}
|
||||
|
||||
public Byte getIsVip() {
|
||||
return isVip;
|
||||
}
|
||||
|
||||
public void setIsVip(Byte isVip) {
|
||||
this.isVip = isVip;
|
||||
}
|
||||
|
||||
public String getMasterId() {
|
||||
return masterId;
|
||||
}
|
||||
|
||||
public void setMasterId(String masterId) {
|
||||
this.masterId = masterId == null ? null : masterId.trim();
|
||||
}
|
||||
|
||||
public String getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
|
||||
public void setMemberId(String memberId) {
|
||||
this.memberId = memberId == null ? null : memberId.trim();
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo == null ? null : orderNo.trim();
|
||||
}
|
||||
|
||||
public String getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(String orderType) {
|
||||
this.orderType = orderType == null ? null : orderType.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getOtherPaidAmount() {
|
||||
return otherPaidAmount;
|
||||
}
|
||||
|
||||
public void setOtherPaidAmount(BigDecimal otherPaidAmount) {
|
||||
this.otherPaidAmount = otherPaidAmount;
|
||||
}
|
||||
|
||||
public Long getPaidTime() {
|
||||
return paidTime;
|
||||
}
|
||||
|
||||
public void setPaidTime(Long paidTime) {
|
||||
this.paidTime = paidTime;
|
||||
}
|
||||
|
||||
public BigDecimal getPayAmount() {
|
||||
return payAmount;
|
||||
}
|
||||
|
||||
public void setPayAmount(BigDecimal payAmount) {
|
||||
this.payAmount = payAmount;
|
||||
}
|
||||
|
||||
public Integer getProductScore() {
|
||||
return productScore;
|
||||
}
|
||||
|
||||
public void setProductScore(Integer productScore) {
|
||||
this.productScore = productScore;
|
||||
}
|
||||
|
||||
public String getProductType() {
|
||||
return productType;
|
||||
}
|
||||
|
||||
public void setProductType(String productType) {
|
||||
this.productType = productType == null ? null : productType.trim();
|
||||
}
|
||||
|
||||
public String getRefOrderId() {
|
||||
return refOrderId;
|
||||
}
|
||||
|
||||
public void setRefOrderId(String refOrderId) {
|
||||
this.refOrderId = refOrderId == null ? null : refOrderId.trim();
|
||||
}
|
||||
|
||||
public Byte getRefundAble() {
|
||||
return refundAble;
|
||||
}
|
||||
|
||||
public void setRefundAble(Byte refundAble) {
|
||||
this.refundAble = refundAble;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundAmount() {
|
||||
return refundAmount;
|
||||
}
|
||||
|
||||
public void setRefundAmount(BigDecimal refundAmount) {
|
||||
this.refundAmount = refundAmount;
|
||||
}
|
||||
|
||||
public String getSendType() {
|
||||
return sendType;
|
||||
}
|
||||
|
||||
public void setSendType(String sendType) {
|
||||
this.sendType = sendType == null ? null : sendType.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getSettlementAmount() {
|
||||
return settlementAmount;
|
||||
}
|
||||
|
||||
public void setSettlementAmount(BigDecimal settlementAmount) {
|
||||
this.settlementAmount = settlementAmount;
|
||||
}
|
||||
|
||||
public String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId == null ? null : shopId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getSmallChange() {
|
||||
return smallChange;
|
||||
}
|
||||
|
||||
public void setSmallChange(BigDecimal smallChange) {
|
||||
this.smallChange = smallChange;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status == null ? null : status.trim();
|
||||
}
|
||||
|
||||
public String getTableId() {
|
||||
return tableId;
|
||||
}
|
||||
|
||||
public void setTableId(String tableId) {
|
||||
this.tableId = tableId == null ? null : tableId.trim();
|
||||
}
|
||||
|
||||
public String getTableParty() {
|
||||
return tableParty;
|
||||
}
|
||||
|
||||
public void setTableParty(String tableParty) {
|
||||
this.tableParty = tableParty == null ? null : tableParty.trim();
|
||||
}
|
||||
|
||||
public String getTerminalSnap() {
|
||||
return terminalSnap;
|
||||
}
|
||||
|
||||
public void setTerminalSnap(String terminalSnap) {
|
||||
this.terminalSnap = terminalSnap == null ? null : terminalSnap.trim();
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId == null ? null : userId.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getVirtualPaidAmount() {
|
||||
return virtualPaidAmount;
|
||||
}
|
||||
|
||||
public void setVirtualPaidAmount(BigDecimal virtualPaidAmount) {
|
||||
this.virtualPaidAmount = virtualPaidAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getWxPaidAmount() {
|
||||
return wxPaidAmount;
|
||||
}
|
||||
|
||||
public void setWxPaidAmount(BigDecimal wxPaidAmount) {
|
||||
this.wxPaidAmount = wxPaidAmount;
|
||||
}
|
||||
|
||||
public String getCartList() {
|
||||
return cartList;
|
||||
}
|
||||
|
||||
public void setCartList(String cartList) {
|
||||
this.cartList = cartList == null ? null : cartList.trim();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.dto;
|
||||
|
||||
import lombok.Data;
|
||||
@Data
|
||||
public class CouponDto {
|
||||
private Integer shopId;
|
||||
private Integer userId;
|
||||
//-1已过期 1未使用 2已使用
|
||||
private Integer status;
|
||||
private Integer orderId;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class GroupOrderDetailsVo {
|
||||
* 商家名称
|
||||
*/
|
||||
private String shopName;
|
||||
private Byte isUseVip;
|
||||
private Integer isUseVip;
|
||||
/**
|
||||
* 商家电话
|
||||
*/
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Data
|
||||
public class IntegralFlowVo {
|
||||
private String openId;
|
||||
private Integer page;
|
||||
private Integer pageSize;
|
||||
private String sign;
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Data
|
||||
public class IntegralVo {
|
||||
//openId
|
||||
private String openId;
|
||||
//数量
|
||||
private BigDecimal num;
|
||||
//类型
|
||||
private String type;
|
||||
//签名
|
||||
private String sign;
|
||||
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
|
||||
public class OrderConfirmVo {
|
||||
private String proId;
|
||||
private String shopId;
|
||||
private Byte isUseVip;
|
||||
private Integer isUseVip;
|
||||
/**
|
||||
* 商品图片
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TbUserCouponVo {
|
||||
private Integer couponId;
|
||||
private Integer proId;
|
||||
//优惠券名称
|
||||
private String name;
|
||||
//优惠券类型 1 满减 2 商品券
|
||||
private Integer type;
|
||||
//数量
|
||||
private Integer num;
|
||||
//到期时间
|
||||
private Date endTime;
|
||||
private Long expireTime;
|
||||
private String useRestrictions;
|
||||
private boolean isUse = false;
|
||||
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
if(endTime!=null){
|
||||
expireTime=endTime.getTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class UserCouponVo {
|
||||
/**
|
||||
* 2 会员商品卷
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 卷描述
|
||||
*/
|
||||
private String detail;
|
||||
private String shopId;
|
||||
private String shopName;
|
||||
private String orderId;
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private BigDecimal couponsPrice = BigDecimal.ZERO;
|
||||
/**
|
||||
* 多少可用
|
||||
*/
|
||||
private BigDecimal couponsAmount = BigDecimal.ZERO;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer num;
|
||||
/**
|
||||
* 卷状态 0 未使用
|
||||
*/
|
||||
private String status;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.vo;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbProduct;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VipProductsLimits extends TbProduct {
|
||||
|
||||
private Integer vipLimitNumber;
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.rabbit;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
|
||||
import com.chaozhanggui.system.cashierservice.service.IntegralService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RabbitListener(queues = {RabbitConstants.INTEGRAL_QUEUE_PUT})
|
||||
@Service
|
||||
public class IntegralConsumer {
|
||||
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
private IntegralService integralService;
|
||||
@RabbitHandler
|
||||
public void listener(String message) {
|
||||
try {
|
||||
JSONObject jsonObject = JSON.parseObject(message);
|
||||
integralService.integralAdd(jsonObject);
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -76,10 +76,6 @@ public class CartService {
|
||||
private TbOrderDetailMapper orderDetailMapper;
|
||||
@Autowired
|
||||
private TbShopTableMapper shopTableMapper;
|
||||
@Autowired
|
||||
private TbUserCouponsMapper userCouponsMapper;
|
||||
@Autowired
|
||||
private TbSystemCouponsMapper systemCouponsMapper;
|
||||
private final TbUserShopMsgMapper tbUserShopMsgMapper;
|
||||
private final WechatUtil wechatUtil;
|
||||
|
||||
@@ -843,27 +839,6 @@ public class CartService {
|
||||
cart.setPackFee(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
if (cart.getIsVip().equals((byte) 1)) {
|
||||
if (isVip) {
|
||||
int i1 = activateInRecordService.queryByVipIdAndShopIdAndProId(
|
||||
Integer.valueOf(tbShopUser.getId()), Integer.valueOf(shopId), Integer.valueOf(cart.getProductId()));
|
||||
if (i1 < cart.getTotalNumber()) {
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("status", "fail");
|
||||
jsonObject1.put("msg", "会员商品[" + cart.getName() + "],可下单数量为" + i1);
|
||||
jsonObject1.put("data", new ArrayList<>());
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("status", "fail");
|
||||
jsonObject1.put("msg", "非会员用户不可下单会员商品");
|
||||
jsonObject1.put("data", new ArrayList<>());
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
TbProductSkuWithBLOBs tbProduct;
|
||||
if (!"-999".equals(cart.getProductId())) {
|
||||
tbProduct = productSkuMapper.selectByPrimaryKey(Integer.valueOf(cart.getSkuId()));
|
||||
@@ -966,63 +941,6 @@ public class CartService {
|
||||
//生成订单
|
||||
TbOrderInfo orderInfo = orderInfoMapper.selectByPrimaryKey(orderId);
|
||||
|
||||
//优惠卷
|
||||
String isBuyYhq = "false";
|
||||
String isuseYhq = "false";
|
||||
if (jsonObject.containsKey("isYhq") && jsonObject.getString("isYhq").equals("1")) {
|
||||
couponId = jsonObject.getString("couponsId");
|
||||
//1:购买优惠券,0:自己持有优惠券
|
||||
Integer couponsId = jsonObject.getInteger("couponsId");
|
||||
if (jsonObject.getString("isBuyYhq").equals("1")) {
|
||||
TbSystemCoupons systemCoupons = systemCouponsMapper.selectByPrimaryKey(couponsId);
|
||||
if (Objects.isNull(systemCoupons) || !systemCoupons.getStatus().equals("0")) {
|
||||
log.info("开始处理订单");
|
||||
responseData.put("status", "fail");
|
||||
responseData.put("msg", "优惠券已售空");
|
||||
responseData.put("type", jsonObject.getString("type"));
|
||||
responseData.put("data", "");
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(responseData.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
log.info("消息推送");
|
||||
return Result.fail("优惠券已售空");
|
||||
}
|
||||
if (N.gt(systemCoupons.getCouponsAmount(), totalAmount)) {
|
||||
log.info("开始处理订单");
|
||||
responseData.put("status", "fail");
|
||||
responseData.put("msg", "订单金额小于优惠价金额");
|
||||
responseData.put("type", jsonObject.getString("type"));
|
||||
responseData.put("data", "");
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(responseData.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
log.info("消息推送");
|
||||
return Result.fail("订单金额小于优惠价金额");
|
||||
}
|
||||
totalAmount = totalAmount.add(systemCoupons.getCouponsPrice()).subtract(systemCoupons.getCouponsAmount());
|
||||
originAmount = originAmount.add(systemCoupons.getCouponsPrice());
|
||||
couponAmount = systemCoupons.getCouponsAmount();
|
||||
systemCoupons.setStatus("1");
|
||||
systemCouponsMapper.updateByPrimaryKeySelective(systemCoupons);
|
||||
TbUserCoupons userCoupons = new TbUserCoupons();
|
||||
userCoupons.setEndTime(DateUtils.getNewDate(new Date(), 3, systemCoupons.getDayNum()));
|
||||
userCoupons.setCouponsAmount(systemCoupons.getCouponsAmount());
|
||||
userCoupons.setCouponsPrice(systemCoupons.getCouponsPrice());
|
||||
userCoupons.setStatus("1");
|
||||
userCoupons.setUserId(userId);
|
||||
userCoupons.setCreateTime(new Date());
|
||||
userCouponsMapper.insert(userCoupons);
|
||||
couponId = userCoupons.getId() + "";
|
||||
couponAmount = userCoupons.getCouponsAmount();
|
||||
} else {
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByPrimaryKey(couponsId);
|
||||
|
||||
totalAmount = totalAmount.subtract(userCoupons.getCouponsAmount());
|
||||
userCoupons.setStatus("1");
|
||||
userCoupons.setEndTime(DateUtils.getNewDate(new Date(), 5, 30));
|
||||
userCouponsMapper.updateByPrimaryKeySelective(userCoupons);
|
||||
couponAmount = userCoupons.getCouponsAmount();
|
||||
}
|
||||
isuseYhq = "true";
|
||||
|
||||
}
|
||||
|
||||
if (orderInfo != null) {
|
||||
log.info("订单状态:" + orderInfo.getStatus());
|
||||
if (!"unpaid".equals(orderInfo.getStatus())) {
|
||||
@@ -1044,8 +962,6 @@ public class CartService {
|
||||
orderInfo.setOrderAmount(totalAmount.add(packAMount));
|
||||
orderInfo.setFreightAmount(BigDecimal.ZERO);
|
||||
orderInfo.setProductAmount(saleAmount);
|
||||
orderInfo.setIsBuyCoupon(isBuyYhq);
|
||||
orderInfo.setIsUseCoupon(isuseYhq);
|
||||
orderInfo.setRemark(remark);
|
||||
orderInfo.setUserId(userId);
|
||||
if (hasNewInfo) {
|
||||
@@ -1061,8 +977,6 @@ public class CartService {
|
||||
orderInfo.setMerchantId(String.valueOf(tbMerchantAccount.getId()));
|
||||
orderInfo.setUserCouponId(couponId);
|
||||
orderInfo.setOriginAmount(originAmount);
|
||||
orderInfo.setIsBuyCoupon(isBuyYhq);
|
||||
orderInfo.setIsUseCoupon(isuseYhq);
|
||||
orderInfo.setUserCouponAmount(couponAmount);
|
||||
orderInfo.setRemark(remark);
|
||||
orderInfo.setUserId(userId);
|
||||
@@ -1104,29 +1018,7 @@ public class CartService {
|
||||
}
|
||||
|
||||
// 去除餐位费信息
|
||||
|
||||
List<TbActivateOutRecord> outRecords = new ArrayList<>();
|
||||
for (TbCashierCart cashierCart : cashierCartList) {
|
||||
if (!cashierCart.getProductId().equals("-999") && cashierCart.getIsVip().equals((byte) 1)) {
|
||||
List<TbActivateInRecord> actInRecords = activateInRecordService.queryAllByVipIdAndShopIdAndProId(
|
||||
Integer.valueOf(tbShopUser.getId()), Integer.valueOf(orderInfo.getShopId()), Integer.valueOf(cashierCart.getProductId()));
|
||||
Integer totalNumber = cashierCart.getTotalNumber();
|
||||
for (TbActivateInRecord actInRecord : actInRecords) {
|
||||
if (totalNumber > 0) {
|
||||
if (actInRecord.getOverNum() > totalNumber) {
|
||||
TbActivateOutRecord outRecord = new TbActivateOutRecord(actInRecord.getId(), actInRecord.getProId(), totalNumber, orderInfo.getId().toString(), "create");
|
||||
outRecords.add(outRecord);
|
||||
activateInRecordService.updateOverNumById(actInRecord.getId(), actInRecord.getOverNum() - totalNumber);
|
||||
break;
|
||||
} else {
|
||||
TbActivateOutRecord outRecord = new TbActivateOutRecord(actInRecord.getId(), actInRecord.getProId(), actInRecord.getOverNum(), orderInfo.getId().toString(), "create");
|
||||
outRecords.add(outRecord);
|
||||
activateInRecordService.updateOverNumById(actInRecord.getId(), 0);
|
||||
totalNumber = totalNumber - actInRecord.getOverNum();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cashierCart.setUpdatedAt(System.currentTimeMillis());
|
||||
cashierCart.setOrderId(orderId + "");
|
||||
if ((!TableConstant.CART_SEAT_ID.equals(cashierCart.getProductId()) && !shopEatTypeInfoDTO.isDineInAfter())
|
||||
@@ -1145,7 +1037,6 @@ public class CartService {
|
||||
// cashierCartMapper.deleteByPrimaryKey(seatCartInfo.getId());
|
||||
// }
|
||||
|
||||
if (!CollectionUtils.isEmpty(outRecords)) outRecordMapper.insertBatch(outRecords);
|
||||
|
||||
// 打印票据
|
||||
if (!addOrderDetail.isEmpty() && shopEatTypeInfoDTO.isDineInAfter()) {
|
||||
@@ -1354,84 +1245,6 @@ public class CartService {
|
||||
TbShopTable shopTable = shopTableMapper.selectQRcode(jsonObject.getString("tableId"));
|
||||
//生成订单
|
||||
TbOrderInfo orderInfo = orderInfoMapper.selectByPrimaryKey(orderId);
|
||||
String isBuyYhq = "false";
|
||||
String isuseYhq = "false";
|
||||
if (jsonObject.containsKey("isYhq") && jsonObject.getString("isYhq").equals("1")) {
|
||||
couponId = jsonObject.getString("couponsId");
|
||||
//1:购买优惠券,0:自己持有优惠券
|
||||
Integer couponsId = jsonObject.getInteger("couponsId");
|
||||
if (jsonObject.getString("isBuyYhq").equals("1")) {
|
||||
TbSystemCoupons systemCoupons = systemCouponsMapper.selectByPrimaryKey(couponsId);
|
||||
if (Objects.isNull(systemCoupons) || !systemCoupons.getStatus().equals("0")) {
|
||||
log.info("开始处理订单");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("status", "fail");
|
||||
jsonObject1.put("msg", "优惠券已售空");
|
||||
jsonObject1.put("type", jsonObject.getString("type"));
|
||||
jsonObject1.put("data", "");
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
log.info("消息推送");
|
||||
return;
|
||||
}
|
||||
if (N.gt(systemCoupons.getCouponsAmount(), totalAmount)) {
|
||||
log.info("开始处理订单");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("status", "fail");
|
||||
jsonObject1.put("msg", "订单金额小于优惠价金额");
|
||||
jsonObject1.put("type", jsonObject.getString("type"));
|
||||
jsonObject1.put("data", "");
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
log.info("消息推送");
|
||||
return;
|
||||
}
|
||||
totalAmount = totalAmount.add(systemCoupons.getCouponsPrice()).subtract(systemCoupons.getCouponsAmount());
|
||||
originAmount = originAmount.add(systemCoupons.getCouponsPrice());
|
||||
couponAmount = systemCoupons.getCouponsAmount();
|
||||
systemCoupons.setStatus("1");
|
||||
systemCouponsMapper.updateByPrimaryKeySelective(systemCoupons);
|
||||
TbUserCoupons userCoupons = new TbUserCoupons();
|
||||
userCoupons.setEndTime(DateUtils.getNewDate(new Date(), 3, systemCoupons.getDayNum()));
|
||||
userCoupons.setCouponsAmount(systemCoupons.getCouponsAmount());
|
||||
userCoupons.setCouponsPrice(systemCoupons.getCouponsPrice());
|
||||
userCoupons.setStatus("1");
|
||||
userCoupons.setUserId(userId);
|
||||
userCoupons.setCreateTime(new Date());
|
||||
userCouponsMapper.insert(userCoupons);
|
||||
couponId = userCoupons.getId() + "";
|
||||
couponAmount = userCoupons.getCouponsAmount();
|
||||
} else {
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByPrimaryKey(couponsId);
|
||||
if (Objects.isNull(userCoupons) || !userCoupons.getStatus().equals("0")) {
|
||||
log.info("开始处理订单");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("status", "fail");
|
||||
jsonObject1.put("msg", "优惠券已使用");
|
||||
jsonObject1.put("type", jsonObject.getString("type"));
|
||||
jsonObject1.put("data", "");
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
log.info("消息推送");
|
||||
return;
|
||||
}
|
||||
if (N.gt(userCoupons.getCouponsAmount(), totalAmount)) {
|
||||
log.info("开始处理订单");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("status", "fail");
|
||||
jsonObject1.put("msg", "订单金额小于优惠价金额");
|
||||
jsonObject1.put("type", jsonObject.getString("type"));
|
||||
jsonObject1.put("data", "");
|
||||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), tableCartKey, jsonObject.getString("userId"), true);
|
||||
log.info("消息推送");
|
||||
return;
|
||||
}
|
||||
totalAmount = totalAmount.subtract(userCoupons.getCouponsAmount());
|
||||
userCoupons.setStatus("1");
|
||||
userCoupons.setEndTime(DateUtils.getNewDate(new Date(), 5, 30));
|
||||
userCouponsMapper.updateByPrimaryKeySelective(userCoupons);
|
||||
couponAmount = userCoupons.getCouponsAmount();
|
||||
}
|
||||
isuseYhq = "true";
|
||||
|
||||
}
|
||||
if (Objects.nonNull(orderInfo)) {
|
||||
log.info("订单状态:" + orderInfo.getStatus());
|
||||
if (!"unpaid".equals(orderInfo.getStatus())) {
|
||||
@@ -1456,16 +1269,12 @@ public class CartService {
|
||||
orderInfo.setOrderAmount(totalAmount.add(packAMount));
|
||||
orderInfo.setFreightAmount(BigDecimal.ZERO);
|
||||
orderInfo.setProductAmount(saleAmount);
|
||||
orderInfo.setIsBuyCoupon(isBuyYhq);
|
||||
orderInfo.setIsUseCoupon(isuseYhq);
|
||||
orderInfoMapper.updateByPrimaryKeySelective(orderInfo);
|
||||
} else {
|
||||
orderInfo = getOrder(totalAmount, packAMount, shopTable, tbMerchantAccount.getId().toString(), jsonObject, originAmount);
|
||||
orderInfo.setMerchantId(String.valueOf(tbMerchantAccount.getId()));
|
||||
orderInfo.setUserCouponId(couponId);
|
||||
orderInfo.setOriginAmount(originAmount);
|
||||
orderInfo.setIsBuyCoupon(isBuyYhq);
|
||||
orderInfo.setIsUseCoupon(isuseYhq);
|
||||
orderInfo.setUserCouponAmount(couponAmount);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
//package com.chaozhanggui.system.cashierservice.service;
|
||||
//
|
||||
//import com.chaozhanggui.system.cashierservice.dao.TbCashierCartMapper;
|
||||
//import com.chaozhanggui.system.cashierservice.dao.TbProductMapper;
|
||||
//import com.chaozhanggui.system.cashierservice.dao.TbProductSkuMapper;
|
||||
//import com.chaozhanggui.system.cashierservice.entity.TbCashierCart;
|
||||
//import com.chaozhanggui.system.cashierservice.entity.TbProduct;
|
||||
//import com.chaozhanggui.system.cashierservice.entity.TbProductSku;
|
||||
//import com.chaozhanggui.system.cashierservice.entity.dto.ProductCartDto;
|
||||
//import com.chaozhanggui.system.cashierservice.entity.vo.CashierCarVo;
|
||||
//import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
||||
//import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
//import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.BeanUtils;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//
|
||||
//import javax.annotation.Resource;
|
||||
//import java.math.BigDecimal;
|
||||
//import java.time.Instant;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @author lyf
|
||||
// */
|
||||
//@Service
|
||||
//@Slf4j
|
||||
//public class CashierCartService {
|
||||
// @Resource
|
||||
// private TbCashierCartMapper cashierCartMapper;
|
||||
// @Resource
|
||||
// private TbProductMapper productMapper;
|
||||
// @Resource
|
||||
// private TbProductSkuMapper productSkuMapper;
|
||||
//
|
||||
// /**
|
||||
// * 增加购物车
|
||||
// * @param productCartDto
|
||||
// * @return
|
||||
// */
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Result batchAdd(ProductCartDto productCartDto){
|
||||
// //首先确认金额
|
||||
// TbProduct tbProduct = productMapper.selectById(Integer.valueOf(productCartDto.getProductId()));
|
||||
// if (tbProduct == null){
|
||||
// return Result.fail("商品信息不存在");
|
||||
// }
|
||||
//
|
||||
// TbCashierCart cashierCart = cashierCartMapper.selectByProduct(productCartDto.getProductId(), productCartDto.getTableId());
|
||||
// if (cashierCart != null){
|
||||
// if ("add".equals(productCartDto.getType())){
|
||||
// TbCashierCart cashierCartNow = new TbCashierCart();
|
||||
// cashierCartNow.setNumber(cashierCart.getNumber()+1F);
|
||||
// cashierCartNow.setId(cashierCart.getId());
|
||||
// cashierCartMapper.updateByPrimaryKeySelective(cashierCartNow);
|
||||
// return Result.success(CodeEnum.ENCRYPT);
|
||||
// }else if ("minus".equals(productCartDto.getType())){
|
||||
// TbCashierCart cashierCartNow = new TbCashierCart();
|
||||
// cashierCartNow.setNumber(cashierCart.getNumber()-1F);
|
||||
// cashierCartNow.setId(cashierCart.getId());
|
||||
// if (cashierCartNow.getNumber() == 0F){
|
||||
// cashierCartNow.setStatus("clear");
|
||||
// cashierCartMapper.updateByPrimaryKeySelective(cashierCartNow);
|
||||
// return Result.success(CodeEnum.ENCRYPT);
|
||||
// }
|
||||
// cashierCartMapper.updateByPrimaryKeySelective(cashierCartNow);
|
||||
// return Result.success(CodeEnum.ENCRYPT);
|
||||
// }else {
|
||||
// throw new MsgException("添加购物车失败");
|
||||
// }
|
||||
// }
|
||||
// //增加新的购物车
|
||||
// TbCashierCart tbCashierCart = new TbCashierCart();
|
||||
// BeanUtils.copyProperties(productCartDto,tbCashierCart);
|
||||
// tbCashierCart.setSalePrice(tbProduct.getLowPrice());
|
||||
// tbCashierCart.setCreatedAt(Instant.now().toEpochMilli());
|
||||
// tbCashierCart.setUpdatedAt(Instant.now().toEpochMilli());
|
||||
// tbCashierCart.setTotalNumber(0.00F);
|
||||
// tbCashierCart.setRefundNumber(0.00F);
|
||||
// tbCashierCart.setType((byte) 0);
|
||||
// tbCashierCart.setSkuId(productCartDto.getSkuInfo());
|
||||
// //购物车状态打开
|
||||
// tbCashierCart.setStatus("open");
|
||||
//
|
||||
// int insert = cashierCartMapper.insertSelective(tbCashierCart);
|
||||
// if (insert>0){
|
||||
// return Result.success(CodeEnum.SUCCESS);
|
||||
// }
|
||||
// throw new MsgException("添加购物车失败");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public Result cartList(Integer tableId){
|
||||
// HashMap<String, Object> map = new HashMap<>();
|
||||
// List<TbCashierCart> tbCashierCarts = cashierCartMapper.selectByTableId(tableId);
|
||||
// BigDecimal total = new BigDecimal("0.00");
|
||||
// for (TbCashierCart date :tbCashierCarts) {
|
||||
// Float number = date.getNumber();
|
||||
// BigDecimal bigDecimalValue = new BigDecimal(number.toString());
|
||||
// total=total.add(bigDecimalValue.multiply(date.getSalePrice()));
|
||||
// }
|
||||
//
|
||||
// map.put("cartList",tbCashierCarts);
|
||||
// map.put("total",total);
|
||||
//
|
||||
// return Result.success(CodeEnum.ENCRYPT,map);
|
||||
//
|
||||
// }
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Result updateNumber(Integer tableId,String type){
|
||||
// TbCashierCart cashierCart = cashierCartMapper.selectByPrimaryKey(tableId);
|
||||
// if (cashierCart == null){
|
||||
// return Result.fail("商品不存在");
|
||||
// }
|
||||
// if ("add".equals(type)){
|
||||
// TbCashierCart cashierCartNow = new TbCashierCart();
|
||||
// cashierCartNow.setNumber(cashierCart.getNumber()+1F);
|
||||
// cashierCartNow.setId(cashierCart.getId());
|
||||
// cashierCartMapper.updateByPrimaryKeySelective(cashierCartNow);
|
||||
// return Result.success(CodeEnum.ENCRYPT);
|
||||
// }else if ("minus".equals(type)){
|
||||
// TbCashierCart cashierCartNow = new TbCashierCart();
|
||||
// cashierCartNow.setNumber(cashierCart.getNumber()-1F);
|
||||
// cashierCartNow.setId(cashierCart.getId());
|
||||
// if (cashierCartNow.getNumber() == 0F){
|
||||
// cashierCartNow.setStatus("clear");
|
||||
// cashierCartMapper.updateByPrimaryKeySelective(cashierCartNow);
|
||||
// return Result.success(CodeEnum.ENCRYPT);
|
||||
// }
|
||||
// cashierCartMapper.updateByPrimaryKeySelective(cashierCartNow);
|
||||
// return Result.success(CodeEnum.ENCRYPT);
|
||||
// }else {
|
||||
// throw new MsgException("更改商品失败");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Result clearCart(Integer tableId){
|
||||
// List<CashierCarVo> cashierCarVos = cashierCartMapper.selectByTableIdOpen(tableId);
|
||||
// if (cashierCarVos.isEmpty()){
|
||||
// return Result.fail("购物车内无商品");
|
||||
// }
|
||||
// List<Integer> ids = new ArrayList<>();
|
||||
// for (CashierCarVo date :cashierCarVos) {
|
||||
// ids.add(date.getId());
|
||||
// }
|
||||
// int i = cashierCartMapper.updateByIdsStatus(ids, Instant.now().toEpochMilli());
|
||||
// if (i != ids.size()){
|
||||
// throw new MsgException("清空购物车失败");
|
||||
// }
|
||||
// return Result.success(CodeEnum.ENCRYPT);
|
||||
// }
|
||||
//}
|
||||
@@ -1,117 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
||||
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
|
||||
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class IntegralService {
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
private TbOrderInfoMapper orderInfoMapper;
|
||||
@Autowired
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
@Autowired
|
||||
private TbProductMapper productMapper;
|
||||
@Autowired
|
||||
private TbProductSkuMapper productSkuMapper;
|
||||
@Autowired
|
||||
private TbShopInfoMapper shopInfoMapper;
|
||||
@Autowired
|
||||
private TbShopUserMapper tbShopUserMapper;
|
||||
@Resource
|
||||
private TbReleaseFlowMapper integralFlowMapper;
|
||||
@Autowired
|
||||
private TbUserCouponsMapper userCouponsMapper;
|
||||
@Autowired
|
||||
private TbSplitAccountsMapper splitAccountsMapper;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void integralAdd(JSONObject jsonObject) throws ParseException {
|
||||
String type = jsonObject.getString("type");
|
||||
if (type.equals("trade")){
|
||||
//优惠券兑换积分
|
||||
Integer integralId = jsonObject.getInteger("integralId");
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByPrimaryKey(integralId);
|
||||
if (Objects.isNull(userCoupons) || !"0".equals(userCoupons.getStatus())){
|
||||
throw new MsgException("优惠券已被使用");
|
||||
}
|
||||
userCoupons.setStatus("trade");
|
||||
userCoupons.setUpdateTime(new Date());
|
||||
userCouponsMapper.updateByPrimaryKeySelective(userCoupons);
|
||||
TbParams params = tbShopUserMapper.selectParams();
|
||||
TbReleaseFlow integralFlow = new TbReleaseFlow();
|
||||
integralFlow.setNum(userCoupons.getCouponsAmount().multiply(params.getTradeRatio()));
|
||||
integralFlow.setCreateTime(new Date());
|
||||
integralFlow.setFromSource(userCoupons.getId()+"");
|
||||
integralFlow.setType("TRADEADD");
|
||||
integralFlow.setUserId(userCoupons.getUserId());
|
||||
integralFlowMapper.insert(integralFlow);
|
||||
TbUserInfo userInfo = userInfoMapper.selectByPrimaryKey(Integer.valueOf(userCoupons.getUserId()));
|
||||
if (Objects.nonNull(userInfo)){
|
||||
userInfo.setTotalScore(userInfo.getTotalScore() + integralFlow.getNum().intValue());
|
||||
userInfoMapper.updateByPrimaryKeySelective(userInfo);
|
||||
}
|
||||
}else {
|
||||
Integer orderId = jsonObject.getInteger("orderId");
|
||||
TbOrderInfo orderInfo = orderInfoMapper.selectByPrimaryKey(orderId);
|
||||
if (StringUtils.isNotBlank(orderInfo.getUserCouponId())){
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getUserCouponId()));
|
||||
if (Objects.nonNull(userCoupons)){
|
||||
TbShopInfo shopInfo = shopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
|
||||
TbSplitAccounts splitAccounts = new TbSplitAccounts();
|
||||
splitAccounts.setConponsAmount(userCoupons.getCouponsAmount());
|
||||
splitAccounts.setCreateTime(new Date());
|
||||
splitAccounts.setIsSplit("false");
|
||||
splitAccounts.setMerchantId(Integer.valueOf(shopInfo.getMerchantId()));
|
||||
splitAccounts.setShopId(shopInfo.getId());
|
||||
splitAccounts.setOrderAmount(orderInfo.getPayAmount());
|
||||
splitAccounts.setTradeDay(DateUtils.getDay());
|
||||
splitAccounts.setOriginAmount(orderInfo.getOriginAmount());
|
||||
splitAccountsMapper.insert(splitAccounts);
|
||||
}
|
||||
}
|
||||
if (Objects.isNull(orderInfo)) {
|
||||
log.error("该订单不存在");
|
||||
return;
|
||||
}
|
||||
TbShopInfo shopInfo = shopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
|
||||
if (Objects.isNull(shopInfo) || !"true".equals(shopInfo.getIsOpenYhq())){
|
||||
log.error("该店铺未开启优惠券功能");
|
||||
return;
|
||||
}
|
||||
|
||||
TbParams params = tbShopUserMapper.selectParams();
|
||||
TbUserCoupons userCoupons = new TbUserCoupons();
|
||||
userCoupons.setUserId(orderInfo.getUserId());
|
||||
userCoupons.setCouponsAmount(orderInfo.getOrderAmount().subtract(orderInfo.getUserCouponAmount()).multiply(params.getIntegralRatio()));
|
||||
userCoupons.setStatus("0");
|
||||
userCoupons.setOrderId(orderId);
|
||||
userCoupons.setCouponsPrice(userCoupons.getCouponsAmount().multiply(new BigDecimal("0.5")));
|
||||
userCoupons.setCreateTime(new Date());
|
||||
userCoupons.setEndTime(DateUtils.getNewDate(new Date(),3,30));
|
||||
//执行插入方法
|
||||
userCouponsMapper.insert(userCoupons);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,40 +3,35 @@ package com.chaozhanggui.system.cashierservice.service;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chaozhanggui.system.cashierservice.constant.TableConstant;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.ShopEatTypeInfoDTO;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbOrderDetailMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbOrderInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopTableMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.OrderVo;
|
||||
import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
||||
import com.chaozhanggui.system.cashierservice.mapper.MpCashierCartMapper;
|
||||
import com.chaozhanggui.system.cashierservice.mapper.MpOrderDetailMapper;
|
||||
import com.chaozhanggui.system.cashierservice.mapper.MpOrderInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.mapper.MpShopInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.rabbit.RabbitProducer;
|
||||
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
|
||||
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
||||
import com.chaozhanggui.system.cashierservice.util.N;
|
||||
import com.chaozhanggui.system.cashierservice.util.RedisUtils;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -46,8 +41,6 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class OrderService {
|
||||
|
||||
@Resource
|
||||
private RabbitProducer producer;
|
||||
|
||||
@Resource
|
||||
private TbOrderInfoMapper orderInfoMapper;
|
||||
@@ -57,36 +50,10 @@ public class OrderService {
|
||||
|
||||
@Resource
|
||||
private TbShopTableMapper shopTableMapper;
|
||||
@Resource
|
||||
private TbProductSkuMapper productSkuMapper;
|
||||
|
||||
@Resource
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
@Autowired
|
||||
private TbWiningUserMapper tbWiningUserMapper;
|
||||
|
||||
@Resource
|
||||
private TbOrderDetailMapper tbOrderDetailMapper;
|
||||
@Autowired
|
||||
private TbReleaseFlowMapper releaseFlowMapper;
|
||||
@Resource
|
||||
private TbParamsMapper paramsMapper;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
@Resource
|
||||
private RedisUtils redisUtils;
|
||||
@Resource
|
||||
private TbUserCouponsMapper userCouponsMapper;
|
||||
@Resource
|
||||
private TbSystemCouponsMapper systemCouponsMapper;
|
||||
@Autowired
|
||||
private TbYhqParamsMapper yhqParamsMapper;
|
||||
@Autowired
|
||||
private TbShopUserMapper shopUserMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private TbOrderInfoMapper tbOrderInfoMapper;
|
||||
@Autowired
|
||||
private MpCashierCartMapper mpCashierCartMapper;
|
||||
@Autowired
|
||||
@@ -280,181 +247,6 @@ public class OrderService {
|
||||
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result tradeIntegral(String userId, String id) throws ParseException {
|
||||
updateIntegral(userId, id);
|
||||
return Result.success(CodeEnum.ENCRYPT);
|
||||
}
|
||||
|
||||
private void updateIntegral(String userId, String id) throws ParseException {
|
||||
|
||||
boolean lock_coin = redisUtils.lock(RedisCst.INTEGRAL_COIN_KEY + userId, 5000, TimeUnit.MILLISECONDS);
|
||||
if (lock_coin) {
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByPrimaryKey(Integer.valueOf(id));
|
||||
if (Objects.isNull(userCoupons) || !userCoupons.getStatus().equals("0")) {
|
||||
throw new MsgException("该优惠券已被使用");
|
||||
}
|
||||
TbParams params = paramsMapper.selectByPrimaryKey(1);
|
||||
BigDecimal jfAmount = params.getTradeRatio().multiply(userCoupons.getCouponsAmount());
|
||||
TbUserInfo tbShopUser = userInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
||||
tbShopUser.setTotalScore(tbShopUser.getTotalScore()+jfAmount.intValue());
|
||||
userInfoMapper.updateByPrimaryKeySelective(tbShopUser);
|
||||
userCoupons.setStatus("2");
|
||||
userCoupons.setUpdateTime(new Date());
|
||||
userCouponsMapper.updateByPrimaryKeySelective(userCoupons);
|
||||
TbSystemCoupons systemCoupons = new TbSystemCoupons();
|
||||
systemCoupons.setEndTime(DateUtils.getNewDate(new Date(),3,30));
|
||||
systemCoupons.setCouponsAmount(userCoupons.getCouponsAmount());
|
||||
systemCoupons.setCouponsPrice(userCoupons.getCouponsPrice());
|
||||
systemCoupons.setStatus("0");
|
||||
systemCoupons.setName(userCoupons.getCouponsAmount()+"无门槛优惠券");
|
||||
systemCoupons.setCreateTime(new Date());
|
||||
String typeName = findName(userCoupons.getCouponsAmount());
|
||||
systemCoupons.setTypeName(typeName);
|
||||
systemCouponsMapper.insert(systemCoupons);
|
||||
TbReleaseFlow releaseFlow = new TbReleaseFlow();
|
||||
releaseFlow.setNum(jfAmount);
|
||||
releaseFlow.setCreateTime(new Date());
|
||||
releaseFlow.setFromSource("OWER");
|
||||
releaseFlow.setUserId(userId);
|
||||
releaseFlow.setOperationType("ADD");
|
||||
releaseFlow.setType("EXCHANGEADD");
|
||||
releaseFlow.setRemark("兑换增加");
|
||||
releaseFlowMapper.insert(releaseFlow);
|
||||
redisUtils.releaseLock(RedisCst.INTEGRAL_COIN_KEY + userId);
|
||||
} else {
|
||||
updateIntegral(userId, id);
|
||||
}
|
||||
}
|
||||
|
||||
private String findName(BigDecimal amount) {
|
||||
List<TbYhqParams> list = yhqParamsMapper.selectAll();
|
||||
String typeName = "";
|
||||
for (TbYhqParams yhqParams:list){
|
||||
if (N.egt(amount,yhqParams.getMinPrice()) && N.gt(yhqParams.getMaxPrice(),amount)){
|
||||
typeName = yhqParams.getName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return typeName;
|
||||
}
|
||||
|
||||
|
||||
public Result mineCoupons(String userId, String orderId,String status, Integer page, Integer size) {
|
||||
BigDecimal amount=null;
|
||||
if(ObjectUtil.isNotNull(orderId)&&ObjectUtil.isNotEmpty(orderId)){
|
||||
TbOrderInfo orderInfo= tbOrderInfoMapper.selectByPrimaryKey(Integer.valueOf(orderId));
|
||||
amount=orderInfo.getOriginAmount();
|
||||
}
|
||||
|
||||
|
||||
PageHelper.startPage(page, size);
|
||||
List<TbUserCoupons> list = userCouponsMapper.selectByUserId(userId,status,amount);
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
||||
}
|
||||
|
||||
public Result findCoupons(String type, Integer page, Integer size) {
|
||||
PageHelper.startPage(page, size);
|
||||
List<TbSystemCoupons> list = systemCouponsMapper.selectAll(type);
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
||||
}
|
||||
|
||||
public Result findWiningUser() {
|
||||
String day = DateUtils.getDay();
|
||||
List<TbWiningUser> list = tbWiningUserMapper.selectAllByTrade(day);
|
||||
return Result.success(CodeEnum.SUCCESS, list);
|
||||
}
|
||||
|
||||
public Result getYhqPara() {
|
||||
List<TbYhqParams> list = yhqParamsMapper.selectAll();
|
||||
return Result.success(CodeEnum.SUCCESS, list);
|
||||
}
|
||||
|
||||
public Result testPay(Integer orderId) {
|
||||
TbOrderInfo orderInfo = orderInfoMapper.selectByPrimaryKey(orderId);
|
||||
orderInfo.setStatus("closed");
|
||||
orderInfo.setPayType("wx_lite");
|
||||
orderInfo.setPayOrderNo("test");
|
||||
orderInfo.setPayAmount(orderInfo.getOrderAmount());
|
||||
orderInfoMapper.updateByPrimaryKeySelective(orderInfo);
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("token",0);
|
||||
jsonObject.put("type","wxcreate");
|
||||
jsonObject.put("orderId",orderId.toString());
|
||||
producer.putOrderCollect(jsonObject.toJSONString());
|
||||
JSONObject coupons = new JSONObject();
|
||||
coupons.put("type","buy");
|
||||
coupons.put("orderId",orderId);
|
||||
producer.printCoupons(coupons.toJSONString());
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
public Result getYhqDouble(Integer orderId) {
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByOrderId(orderId);
|
||||
if (Objects.nonNull(userCoupons)){
|
||||
TbOrderInfo orderInfo = orderInfoMapper.selectByPrimaryKey(orderId);
|
||||
userCoupons.setOrderInfo(orderInfo);
|
||||
}
|
||||
return Result.success(CodeEnum.SUCCESS,userCoupons);
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result yhqDouble(Integer conponsId) {
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByPrimaryKey(conponsId);
|
||||
if (Objects.isNull(userCoupons) || userCoupons.getIsDouble().equals("true")){
|
||||
throw new MsgException("该优惠券翻倍已领取");
|
||||
}
|
||||
modityDouble(conponsId);
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
private void modityDouble(Integer conponsId) {
|
||||
|
||||
boolean lock_coin = redisUtils.lock(RedisCst.COUPONS_COIN_KEY + conponsId, 5000, TimeUnit.MILLISECONDS);
|
||||
if (lock_coin) {
|
||||
TbUserCoupons userCoupons = userCouponsMapper.selectByPrimaryKey(conponsId);
|
||||
if (Objects.isNull(userCoupons) || !userCoupons.getStatus().equals("0") || userCoupons.getIsDouble().equals("true")) {
|
||||
throw new MsgException("该优惠券已翻倍");
|
||||
}
|
||||
TbParams params = shopUserMapper.selectParams();
|
||||
userCoupons.setIsDouble("true");
|
||||
userCoupons.setCouponsAmount(userCoupons.getCouponsAmount().multiply(params.getTwoRatio()));
|
||||
userCoupons.setCouponsPrice(userCoupons.getCouponsPrice().multiply(params.getTwoRatio()));
|
||||
userCoupons.setUpdateTime(new Date());
|
||||
userCouponsMapper.updateByPrimaryKeySelective(userCoupons);
|
||||
redisUtils.releaseLock(RedisCst.COUPONS_COIN_KEY + conponsId);
|
||||
} else {
|
||||
modityDouble(conponsId);
|
||||
}
|
||||
}
|
||||
|
||||
public Result mineWinner(Integer userId, Integer page, Integer size) {
|
||||
PageHelper.startPage(page, size);
|
||||
List<TbOrderInfo> list = orderInfoMapper.selectWinnerByUserId(userId);
|
||||
for (TbOrderInfo tbOrderInfo:list){
|
||||
if (StringUtils.isNotEmpty(tbOrderInfo.getWinnnerNo())){
|
||||
tbOrderInfo.setIsWinner("true");
|
||||
}else {
|
||||
tbOrderInfo.setIsWinner("false");
|
||||
}
|
||||
}
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
if (page > pageInfo.getPages()) {
|
||||
pageInfo.setList(Collections.emptyList());
|
||||
}
|
||||
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
||||
}
|
||||
|
||||
public Result kc() {
|
||||
List<TbProductSku> list = productSkuMapper.selectAll();
|
||||
for (TbProductSku productSku:list){
|
||||
redisUtil.saveMessage(RedisCst.PRODUCT + productSku.getShopId() + ":" +productSku.getId(),"10000");
|
||||
}
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
public Object orderDetail(Integer orderId) {
|
||||
|
||||
TbOrderInfo orderInfo = mpOrderInfoMapper.selectOne(new LambdaQueryWrapper<TbOrderInfo>()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -82,7 +83,9 @@ public class PayService {
|
||||
@Autowired
|
||||
TbShopPayTypeMapper tbShopPayTypeMapper;
|
||||
@Autowired
|
||||
private TbActivateProductMapper actProductMapper;
|
||||
private TbCouponProductMapper couProductMapper;
|
||||
@Autowired
|
||||
private TbShopCouponMapper couponMapper;
|
||||
@Resource
|
||||
private TbActivateInRecordMapper activateInRecordMapper;
|
||||
|
||||
@@ -475,7 +478,6 @@ public class PayService {
|
||||
.eq(TbOrderDetail::getStatus, "unpaid")
|
||||
.set(TbOrderDetail::getStatus, "closed"));
|
||||
|
||||
outRecordMapper.updateByOrderIdAndStatus(orderInfo.getId(), "closed");
|
||||
log.info("更新购物车:{}", cartCount);
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
@@ -1013,7 +1015,6 @@ public class PayService {
|
||||
|
||||
//更新子单状态
|
||||
tbOrderDetailMapper.updateStatusByOrderIdAndStatus(orderInfo.getId(), "closed");
|
||||
outRecordMapper.updateByOrderIdAndStatus(orderInfo.getId(), "closed");
|
||||
//修改主单状态
|
||||
orderInfo.setStatus("closed");
|
||||
orderInfo.setPayType("wx_lite");
|
||||
@@ -1098,7 +1099,6 @@ public class PayService {
|
||||
orderInfo.setPayAmount(orderInfo.getOrderAmount());
|
||||
orderInfo.setPaidTime(System.currentTimeMillis());
|
||||
tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo);
|
||||
outRecordMapper.updateByOrderIdAndStatus(orderInfo.getId(), "closed");
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("token", 0);
|
||||
@@ -1176,8 +1176,18 @@ public class PayService {
|
||||
PageHelper.startPage(page, pageSize);
|
||||
List<TbActivate> list = tbActivateMapper.selectByShopId(shopId);
|
||||
for (TbActivate tbActivate : list) {
|
||||
if (tbActivate.getIsGiftPro() == 1) {
|
||||
tbActivate.setGives(actProductMapper.queryProsByActivateId(tbActivate.getId()));
|
||||
if (tbActivate.getIsUseCoupon() == 1) {
|
||||
TbShopCoupon coupon = couponMapper.queryById(tbActivate.getCouponId());
|
||||
if(coupon!=null){
|
||||
if(coupon.getType()==1){
|
||||
//满减
|
||||
tbActivate.setCouponDesc("满"+coupon.getFullAmount() + "减" + coupon.getDiscountAmount()+" * "+tbActivate.getNum()+"张");
|
||||
} else if (coupon.getType() == 2) {
|
||||
//商品
|
||||
tbActivate.setCouponDesc("商品券");
|
||||
tbActivate.setGives(couProductMapper.queryProsByActivateId(coupon.getId(),tbActivate.getNum()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
@@ -1292,25 +1302,68 @@ public class PayService {
|
||||
public BigDecimal giveActivate(TbShopUser tbShopUser, BigDecimal memAmount, Integer flowId) {
|
||||
TbActivate activate = tbActivateMapper.selectByAmount(tbShopUser.getShopId(), memAmount);
|
||||
if (ObjectUtil.isNotEmpty(activate) && ObjectUtil.isNotNull(activate)) {
|
||||
if (activate.getIsGiftPro() != null && activate.getIsGiftPro() == 1) {
|
||||
List<TbActivateProduct> tbActivateProducts = actProductMapper.queryAllByActivateId(activate.getId());
|
||||
List<TbActivateInRecord> actGiveRecords = new ArrayList<>();
|
||||
for (TbActivateProduct actPro : tbActivateProducts) {
|
||||
TbActivateInRecord record = new TbActivateInRecord(Integer.valueOf(tbShopUser.getId()), actPro.getProductId(), actPro.getNum(), Integer.valueOf(tbShopUser.getShopId()), activate.getId(), flowId);
|
||||
actGiveRecords.add(record);
|
||||
if (activate.getIsUseCoupon() == 1) {
|
||||
TbShopCoupon tbShopCoupon = couponMapper.queryById(activate.getCouponId());
|
||||
Date start = new Date();
|
||||
Date end = new Date();
|
||||
if ("fixed".equals(tbShopCoupon.getValidityType())) {
|
||||
//固定时间
|
||||
end = DateUtil.offsetDay(new Date(),tbShopCoupon.getValidDays());
|
||||
} else if ("custom".equals(tbShopCoupon.getValidityType())) {
|
||||
//自定义时间
|
||||
start = tbShopCoupon.getValidStartTime();
|
||||
end = tbShopCoupon.getValidEndTime();
|
||||
}
|
||||
if (tbShopCoupon != null) {
|
||||
List<TbActivateInRecord> actGiveRecords = new ArrayList<>();
|
||||
if(tbShopCoupon.getType() == 1) {
|
||||
//满减
|
||||
TbActivateInRecord record = new TbActivateInRecord();
|
||||
record.setVipUserId(Integer.valueOf(tbShopUser.getId()));
|
||||
record.setCouponId(tbShopCoupon.getId());
|
||||
record.setName("满" + tbShopCoupon.getFullAmount() + "减" + tbShopCoupon.getDiscountAmount());
|
||||
record.setFullAmount(tbShopCoupon.getFullAmount());
|
||||
record.setDiscountAmount(tbShopCoupon.getDiscountAmount());
|
||||
record.setType(1);
|
||||
record.setNum(activate.getNum());
|
||||
record.setOverNum(activate.getNum());
|
||||
record.setShopId(Integer.valueOf(tbShopUser.getShopId()));
|
||||
record.setSourceActId(activate.getId());
|
||||
record.setSourceFlowId(flowId);
|
||||
record.setUseStartTime(start);
|
||||
record.setUseEndTime(end);
|
||||
record.setCouponJson(activateInRecordService.getCouponJson(activate,tbShopCoupon,null));
|
||||
actGiveRecords.add(record);
|
||||
} else if (tbShopCoupon.getType() == 2) {
|
||||
//商品卷
|
||||
List<TbCouponProduct> tbCouponProducts = couProductMapper.queryAllByCouponId(tbShopCoupon.getId());
|
||||
for (TbCouponProduct actPro : tbCouponProducts) {
|
||||
TbActivateInRecord record = new TbActivateInRecord();
|
||||
record.setVipUserId(Integer.valueOf(tbShopUser.getId()));
|
||||
record.setCouponId(tbShopCoupon.getId());
|
||||
record.setName("商品卷");
|
||||
record.setType(2);
|
||||
record.setProId(actPro.getProductId());
|
||||
record.setNum(actPro.getNum()*tbShopCoupon.getNumber());
|
||||
record.setOverNum(actPro.getNum()*tbShopCoupon.getNumber());
|
||||
record.setShopId(Integer.valueOf(tbShopUser.getShopId()));
|
||||
record.setSourceActId(activate.getId());
|
||||
record.setSourceFlowId(flowId);
|
||||
record.setUseStartTime(start);
|
||||
record.setUseEndTime(end);
|
||||
record.setCouponJson(activateInRecordService.getCouponJson(activate,tbShopCoupon,actPro));
|
||||
actGiveRecords.add(record);
|
||||
}
|
||||
}
|
||||
activateInRecordMapper.insertBatch(actGiveRecords);
|
||||
tbShopCoupon.setLeftNumber(tbShopCoupon.getLeftNumber()-activate.getNum());
|
||||
couponMapper.update(tbShopCoupon);
|
||||
}
|
||||
activateInRecordMapper.insertBatch(actGiveRecords);
|
||||
}
|
||||
BigDecimal amount = BigDecimal.ZERO;
|
||||
switch (activate.getHandselType()) {
|
||||
case "GD":
|
||||
amount = activate.getHandselNum();
|
||||
break;
|
||||
case "RATIO":
|
||||
amount = memAmount.multiply(activate.getHandselNum());
|
||||
break;
|
||||
}
|
||||
|
||||
BigDecimal amount = activate.getGiftAmount() == null ?
|
||||
BigDecimal.ZERO : new BigDecimal(activate.getGiftAmount());
|
||||
|
||||
tbShopUser.setAmount(tbShopUser.getAmount().add(amount));
|
||||
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
||||
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
|
||||
|
||||
@@ -234,16 +234,6 @@ public class ProductService {
|
||||
}
|
||||
});
|
||||
groupList.sort(Comparator.comparingInt(TbProductGroup::getIsSale).reversed());
|
||||
TbShopUser tbShopUser = tbShopUserMapper.selectByUserIdAndShopId(userId, shopId);
|
||||
if (tbShopUser != null) {
|
||||
TbProductGroup vipProGroup = new TbProductGroup();
|
||||
vipProGroup.setName("会员商品");
|
||||
List<TbProduct> vipPros = activateInRecordService.queryByVipIdAndShopId(Integer.valueOf(tbShopUser.getId()), Integer.valueOf(shopId));
|
||||
if(!CollectionUtils.isEmpty(vipPros)){
|
||||
vipProGroup.setProducts(handleDate(vipPros, true, 1, true));
|
||||
groupList.add(0, vipProGroup);
|
||||
}
|
||||
}
|
||||
groupList.add(0, hot);
|
||||
concurrentMap.put("productInfo", groupList);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateInRecord;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbProduct;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
import java.util.List;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivate;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbCouponProduct;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCoupon;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 活动商品赠送表(TbActivateInRecord)表服务接口
|
||||
@@ -13,44 +12,14 @@ import java.util.List;
|
||||
* @author ww
|
||||
* @since 2024-08-22 11:13:40
|
||||
*/
|
||||
public interface TbActivateInRecordService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivateInRecord queryById(Integer id);
|
||||
|
||||
List<TbProduct> queryByVipIdAndShopId(Integer vipUserId, Integer shopId);
|
||||
int queryByVipIdAndShopIdAndProId(Integer vipUserId, Integer shopId,Integer productId);
|
||||
List<TbActivateInRecord> queryAllByVipIdAndShopIdAndProId(Integer vipUserId, Integer shopId,Integer productId);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbActivateInRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivateInRecord insert(TbActivateInRecord tbActivateInRecord);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbActivateInRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivateInRecord update(TbActivateInRecord tbActivateInRecord);
|
||||
|
||||
int updateOverNumById(Integer id,Integer overNum);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
@Service
|
||||
public class TbActivateInRecordService {
|
||||
|
||||
public String getCouponJson(TbActivate activate, TbShopCoupon tbShopCoupon, TbCouponProduct couProduct){
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("activate",JSONObject.toJSON(activate));
|
||||
result.put("coupon",JSONObject.toJSON(tbShopCoupon));
|
||||
result.put("couProduct",JSONObject.toJSON(couProduct));
|
||||
return result.toJSONString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateOutRecord;
|
||||
|
||||
/**
|
||||
* 活动赠送商品使用记录表(TbActivateOutRecord)表服务接口
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 11:21:56
|
||||
*/
|
||||
public interface TbActivateOutRecordService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivateOutRecord queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbActivateOutRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivateOutRecord insert(TbActivateOutRecord tbActivateOutRecord);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbActivateOutRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbActivateOutRecord update(TbActivateOutRecord tbActivateOutRecord);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.CouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表服务接口
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 15:37:37
|
||||
*/
|
||||
public interface TbShopCouponService {
|
||||
Result find(CouponDto param);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.UserCouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
|
||||
/**
|
||||
* (TbUserCoupons)表服务接口
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-09-02 13:38:20
|
||||
*/
|
||||
public interface TbUserCouponsService {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param tbUserCoupons 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
Result queryByPage(UserCouponDto tbUserCoupons);
|
||||
|
||||
}
|
||||
@@ -4,23 +4,18 @@ import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import cn.hutool.extra.qrcode.QrConfig;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopUserMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralFlowVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.OpenMemberVo;
|
||||
import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
||||
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.*;
|
||||
import com.chaozhanggui.system.cashierservice.util.RedisUtils;
|
||||
import com.chaozhanggui.system.cashierservice.wxUtil.WxAccountUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -35,8 +30,6 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Service
|
||||
public class UserService {
|
||||
@@ -45,14 +38,8 @@ public class UserService {
|
||||
@Autowired
|
||||
private TbShopUserMapper shopUserMapper;
|
||||
@Autowired
|
||||
private TbReleaseFlowMapper releaseFlowMapper;
|
||||
@Autowired
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
@Autowired
|
||||
private TbUserCouponsMapper userCouponsMapper;
|
||||
@Autowired
|
||||
private TbSystemCouponsMapper systemCouponsMapper;
|
||||
@Autowired
|
||||
RedisUtils redisUtils;
|
||||
@Qualifier("tbShopInfoMapper")
|
||||
@Autowired
|
||||
@@ -69,192 +56,8 @@ public class UserService {
|
||||
this.resourceLoader = resourceLoader;
|
||||
}
|
||||
|
||||
public JSONObject modityIntegral(IntegralVo integralVo, String userSign) {
|
||||
JSONObject object = (JSONObject) JSONObject.toJSON(integralVo);
|
||||
if (N.gt(BigDecimal.ZERO, integralVo.getNum())) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "fail");
|
||||
result.put("msg", "积分数量不允许小于0");
|
||||
result.put("data", "");
|
||||
return result;
|
||||
}
|
||||
object.put("userSign", userSign);
|
||||
|
||||
JSONObject jsonObject = JSONUtil.sortJSONObject(object, CacheMap.map);
|
||||
System.out.println(jsonObject.toJSONString());
|
||||
String sign = MD5Util.encrypt(jsonObject.toJSONString());
|
||||
if (!sign.equals(integralVo.getSign())) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "fail");
|
||||
result.put("msg", "签名验证失败");
|
||||
result.put("data", "");
|
||||
return result;
|
||||
}
|
||||
TbShopUser shopUser = shopUserMapper.selectByOpenId(integralVo.getOpenId());
|
||||
if (Objects.isNull(shopUser)) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "fail");
|
||||
result.put("msg", "用户不存在");
|
||||
result.put("data", "");
|
||||
return result;
|
||||
}
|
||||
boolean falg = updateIntegral(shopUser.getUserId(), integralVo.getNum(), integralVo.getType());
|
||||
if (!falg) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "fail");
|
||||
result.put("msg", "余额不足");
|
||||
result.put("data", "");
|
||||
return result;
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "success");
|
||||
result.put("msg", "操作成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
IntegralVo integralVo = new IntegralVo();
|
||||
integralVo.setNum(new BigDecimal("5254"));
|
||||
integralVo.setOpenId("or1l864NBOoJZhC5x_yeziZ26j6c");
|
||||
integralVo.setType("sub");
|
||||
JSONObject object = (JSONObject) JSONObject.toJSON(integralVo);
|
||||
object.put("userSign", "02c03d79c36b4c01b217ffb1baef9009");
|
||||
JSONObject jsonObject = JSONUtil.sortJSONObject(object, CacheMap.map);
|
||||
System.out.println("加密前字符串:" + jsonObject.toJSONString());
|
||||
String sign = MD5Util.encrypt(jsonObject.toJSONString());
|
||||
System.out.println("加密后签名:" + sign);
|
||||
}
|
||||
|
||||
private Boolean updateIntegral(String userId, BigDecimal num, String type) {
|
||||
|
||||
boolean lock_coin = redisUtils.lock(RedisCst.INTEGRAL_COIN_KEY + userId, 5000, TimeUnit.MILLISECONDS);
|
||||
if (lock_coin) {
|
||||
TbUserInfo tbShopUser = userInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
||||
boolean flag = true;
|
||||
if (type.equals("sub")) {
|
||||
if (num.intValue() < tbShopUser.getTotalScore()) {
|
||||
flag = false;
|
||||
} else {
|
||||
tbShopUser.setTotalScore(tbShopUser.getTotalScore() - num.intValue());
|
||||
}
|
||||
} else if (type.equals("add")) {
|
||||
tbShopUser.setTotalScore(tbShopUser.getTotalScore() + num.intValue());
|
||||
}
|
||||
if (flag) {
|
||||
TbReleaseFlow releaseFlow = new TbReleaseFlow();
|
||||
releaseFlow.setNum(num);
|
||||
releaseFlow.setCreateTime(new Date());
|
||||
releaseFlow.setFromSource("OWER");
|
||||
releaseFlow.setUserId(userId);
|
||||
if (type.equals("sub")) {
|
||||
releaseFlow.setType("BUYSUB");
|
||||
releaseFlow.setOperationType("SUB");
|
||||
releaseFlow.setRemark("购买商品扣除");
|
||||
} else if (type.equals("sub")) {
|
||||
releaseFlow.setType("THREEADD");
|
||||
releaseFlow.setOperationType("ADD");
|
||||
releaseFlow.setRemark("退货增加");
|
||||
}
|
||||
releaseFlowMapper.insert(releaseFlow);
|
||||
userInfoMapper.updateByPrimaryKeySelective(tbShopUser);
|
||||
}
|
||||
redisUtils.releaseLock(RedisCst.INTEGRAL_COIN_KEY + userId);
|
||||
return flag;
|
||||
} else {
|
||||
return updateIntegral(userId, num, type);
|
||||
}
|
||||
}
|
||||
|
||||
public JSONObject userIntegral(IntegralFlowVo integralFlowVo, String userSign) {
|
||||
JSONObject object = (JSONObject) JSONObject.toJSON(integralFlowVo);
|
||||
object.put("userSign", userSign);
|
||||
JSONObject jsonObject = JSONUtil.sortJSONObject(object, CacheMap.map);
|
||||
System.out.println(jsonObject.toJSONString());
|
||||
String sign = MD5Util.encrypt(jsonObject.toJSONString());
|
||||
if (!sign.equals(integralFlowVo.getSign())) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "fail");
|
||||
result.put("msg", "签名验证失败");
|
||||
result.put("data", "");
|
||||
return result;
|
||||
}
|
||||
TbUserInfo shopUser = userInfoMapper.selectByOpenId(integralFlowVo.getOpenId());
|
||||
if (Objects.isNull(shopUser)) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "fail");
|
||||
result.put("msg", "用户不存在");
|
||||
result.put("data", "");
|
||||
return result;
|
||||
}
|
||||
PageHelper.startPage(integralFlowVo.getPage(), integralFlowVo.getPageSize());
|
||||
PageHelper.orderBy("id DESC");
|
||||
List<TbReleaseFlow> list = releaseFlowMapper.selectByUserId(shopUser.getId().toString());
|
||||
for (TbReleaseFlow tbReleaseFlow:list){
|
||||
tbReleaseFlow.setCreateTr(DateUtils.getStrTime(tbReleaseFlow.getCreateTime()));
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "success");
|
||||
result.put("msg", "成功");
|
||||
result.put("data", list);
|
||||
return result;
|
||||
}
|
||||
|
||||
public JSONObject userAllIntegral(IntegralFlowVo integralFlowVo, String userSign) {
|
||||
// JSONObject object = (JSONObject) JSONObject.toJSON(integralFlowVo);
|
||||
// object.put("userSign", userSign);
|
||||
// JSONObject jsonObject = JSONUtil.sortJSONObject(object, CacheMap.notOpenMap);
|
||||
// System.out.println(jsonObject.toJSONString());
|
||||
// String sign = MD5Util.encrypt(jsonObject.toJSONString());
|
||||
// if (!sign.equals(integralFlowVo.getSign())) {
|
||||
// JSONObject result = new JSONObject();
|
||||
// result.put("status", "fail");
|
||||
// result.put("msg", "签名验证失败");
|
||||
// result.put("data", "");
|
||||
// return result;
|
||||
// }
|
||||
PageHelper.startPage(integralFlowVo.getPage(), integralFlowVo.getPageSize());
|
||||
PageHelper.orderBy("id DESC");
|
||||
List<TbReleaseFlow> list = releaseFlowMapper.selectAll();
|
||||
for (TbReleaseFlow tbReleaseFlow:list){
|
||||
tbReleaseFlow.setCreateTr(DateUtils.getStrTime(tbReleaseFlow.getCreateTime()));
|
||||
}
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "success");
|
||||
result.put("msg", "成功");
|
||||
result.put("data", pageInfo);
|
||||
return result;
|
||||
}
|
||||
|
||||
public JSONObject userAll(IntegralFlowVo integralFlowVo, String userSign) {
|
||||
// JSONObject object = (JSONObject) JSONObject.toJSON(integralFlowVo);
|
||||
// object.put("userSign", userSign);
|
||||
// JSONObject jsonObject = JSONUtil.sortJSONObject(object, CacheMap.notOpenMap);
|
||||
// System.out.println(jsonObject.toJSONString());
|
||||
// String sign = MD5Util.encrypt(jsonObject.toJSONString());
|
||||
// if (!sign.equals(integralFlowVo.getSign())) {
|
||||
// JSONObject result = new JSONObject();
|
||||
// result.put("status", "fail");
|
||||
// result.put("msg", "签名验证失败");
|
||||
// result.put("data", "");
|
||||
// return result;
|
||||
// }
|
||||
PageHelper.startPage(integralFlowVo.getPage(), integralFlowVo.getPageSize());
|
||||
PageHelper.orderBy("id DESC");
|
||||
List<TbUserInfo> list = userInfoMapper.selectAll();
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", "success");
|
||||
result.put("msg", "成功");
|
||||
result.put("data", pageInfo);
|
||||
return result;
|
||||
}
|
||||
|
||||
public int userCoupon(String userId, BigDecimal orderNum) {
|
||||
int userNum = userCouponsMapper.selectByUserIdAndAmount(userId,orderNum);
|
||||
int sysNum = systemCouponsMapper.selectByAmount(orderNum);
|
||||
return userNum+sysNum;
|
||||
}
|
||||
|
||||
public String getSubQrCode(String shopId) throws Exception {
|
||||
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId));
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.service.impl;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbActivateInRecordMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateInRecord;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbProduct;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbActivateInRecordService;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动商品赠送表(TbActivateInRecord)表服务实现类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 11:13:40
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbActivateInRecordServiceImpl implements TbActivateInRecordService {
|
||||
@Resource
|
||||
private TbActivateInRecordMapper tbActivateInRecordMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateInRecord queryById(Integer id) {
|
||||
return this.tbActivateInRecordMapper.queryById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbProduct> queryByVipIdAndShopId(Integer vipUserId, Integer shopId) {
|
||||
return tbActivateInRecordMapper.queryByVipIdAndShopId(vipUserId, shopId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryByVipIdAndShopIdAndProId(Integer vipUserId, Integer shopId,Integer productId){
|
||||
return tbActivateInRecordMapper.queryByVipIdAndShopIdAndProId(vipUserId,shopId,productId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbActivateInRecord> queryAllByVipIdAndShopIdAndProId(Integer vipUserId, Integer shopId,Integer productId){
|
||||
return tbActivateInRecordMapper.queryAllByVipIdAndShopIdAndProId(vipUserId,shopId,productId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbActivateInRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateInRecord insert(TbActivateInRecord tbActivateInRecord) {
|
||||
this.tbActivateInRecordMapper.insert(tbActivateInRecord);
|
||||
return tbActivateInRecord;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbActivateInRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateInRecord update(TbActivateInRecord tbActivateInRecord) {
|
||||
this.tbActivateInRecordMapper.update(tbActivateInRecord);
|
||||
return this.queryById(tbActivateInRecord.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateOverNumById(Integer id,Integer overNum){
|
||||
return tbActivateInRecordMapper.updateOverNumById(id,overNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.tbActivateInRecordMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.service.impl;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateOutRecord;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbActivateOutRecordMapper;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbActivateOutRecordService;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 活动赠送商品使用记录表(TbActivateOutRecord)表服务实现类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 11:21:56
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbActivateOutRecordServiceImpl implements TbActivateOutRecordService {
|
||||
@Resource
|
||||
private TbActivateOutRecordMapper tbActivateOutRecordMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateOutRecord queryById(Integer id) {
|
||||
return this.tbActivateOutRecordMapper.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbActivateOutRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateOutRecord insert(TbActivateOutRecord tbActivateOutRecord) {
|
||||
this.tbActivateOutRecordMapper.insert(tbActivateOutRecord);
|
||||
return tbActivateOutRecord;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbActivateOutRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateOutRecord update(TbActivateOutRecord tbActivateOutRecord) {
|
||||
this.tbActivateOutRecordMapper.update(tbActivateOutRecord);
|
||||
return this.queryById(tbActivateOutRecord.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.tbActivateOutRecordMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.service.impl;
|
||||
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbActivateProductMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbActivateProduct;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbActivateProductService;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)表服务实现类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 15:15:02
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class TbActivateProductServiceImpl implements TbActivateProductService {
|
||||
@Resource
|
||||
private TbActivateProductMapper tbActivateProductMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateProduct queryById(Integer id) {
|
||||
return this.tbActivateProductMapper.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbActivateProduct 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateProduct insert(TbActivateProduct tbActivateProduct) {
|
||||
this.tbActivateProductMapper.insert(tbActivateProduct);
|
||||
return tbActivateProduct;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tbActivateProduct 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public TbActivateProduct update(TbActivateProduct tbActivateProduct) {
|
||||
this.tbActivateProductMapper.update(tbActivateProduct);
|
||||
return this.queryById(tbActivateProduct.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.tbActivateProductMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.chaozhanggui.system.cashierservice.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.CouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbShopCouponService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.google.gson.JsonObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表服务实现类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-23 15:37:37
|
||||
*/
|
||||
@Primary
|
||||
@Service
|
||||
public class TbShopCouponServiceImpl implements TbShopCouponService {
|
||||
@Resource
|
||||
private TbOrderDetailMapper orderDetailMapper;
|
||||
@Resource
|
||||
private TbShopUserMapper shopUserMapper;
|
||||
@Resource
|
||||
private TbShopCouponMapper couponMapper;
|
||||
@Resource
|
||||
private TbOrderInfoMapper orderInfoMapper;
|
||||
@Resource
|
||||
private TbActivateInRecordMapper inRecordMapper;
|
||||
@Resource
|
||||
private TbActivateOutRecordMapper outRecordMapper;
|
||||
|
||||
@Override
|
||||
public Result find(CouponDto param) {
|
||||
TbShopUser tbShopUser = shopUserMapper.selectByUserIdAndShopId(param.getUserId().toString(), param.getShopId().toString());
|
||||
if (param.getOrderId() != null) {
|
||||
TbOrderInfo tbOrderInfo = orderInfoMapper.selectByPrimaryKey(param.getOrderId());
|
||||
List<TbOrderDetail> tbOrderDetails = orderDetailMapper.selectAllByOrderId(param.getOrderId());
|
||||
Set<Integer> pros = tbOrderDetails.stream().map(TbOrderDetail::getProductId).collect(Collectors.toSet());
|
||||
if (CollectionUtil.isNotEmpty(tbOrderDetails)) {
|
||||
List<TbUserCouponVo> tbUserCouponVos = inRecordMapper.queryByVipIdAndShopId(Integer.valueOf(tbShopUser.getId()), param.getShopId());
|
||||
if (CollectionUtil.isNotEmpty(tbUserCouponVos)) {
|
||||
String week = DateUtil.dayOfWeekEnum(new Date()).toChinese("周");
|
||||
LocalTime now = LocalTime.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
|
||||
|
||||
//券id 券使用描述
|
||||
Map<Integer, JsonObject> coupons = new HashMap<>();
|
||||
for (TbUserCouponVo tbUserCouponVo : tbUserCouponVos) {
|
||||
if (!coupons.containsKey(tbUserCouponVo.getCouponId())) {
|
||||
JsonObject json=new JsonObject();
|
||||
boolean isUse = true;
|
||||
TbShopCoupon tbShopCoupon = couponMapper.queryById(tbUserCouponVo.getCouponId());
|
||||
StringBuilder useRestrictions = new StringBuilder("每天 ");
|
||||
if(tbShopCoupon.getType().equals(1)){
|
||||
if(tbOrderInfo.getOrderAmount().compareTo(new BigDecimal(tbShopCoupon.getFullAmount()))<0){
|
||||
isUse=false;
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(tbShopCoupon.getUserDays())){
|
||||
String[] split = tbShopCoupon.getUserDays().split(",");
|
||||
if (split.length != 7) {
|
||||
useRestrictions = new StringBuilder(tbShopCoupon.getUserDays() + " ");
|
||||
}
|
||||
if(!tbShopCoupon.getUserDays().contains(week)){
|
||||
isUse=false;
|
||||
}
|
||||
}
|
||||
if (tbShopCoupon.getUseTimeType().equals("custom")) {
|
||||
if(now.isBefore(tbShopCoupon.getUseStartTime()) || now.isAfter(tbShopCoupon.getUseEndTime())){
|
||||
isUse=false;
|
||||
}
|
||||
useRestrictions.append(
|
||||
tbShopCoupon.getUseStartTime().format(formatter)
|
||||
+ "-"
|
||||
+ tbShopCoupon.getUseEndTime().format(formatter));
|
||||
} else {
|
||||
useRestrictions.append("全时段");
|
||||
}
|
||||
useRestrictions.append(" 可用");
|
||||
json.addProperty("isUse",isUse);
|
||||
json.addProperty("useRestrictions",useRestrictions.toString());
|
||||
|
||||
coupons.put(tbUserCouponVo.getCouponId(), json);
|
||||
}
|
||||
JsonObject couponJson = coupons.get(tbUserCouponVo.getCouponId());
|
||||
tbUserCouponVo.setUseRestrictions(couponJson.get("useRestrictions").toString());
|
||||
if(tbUserCouponVo.getType().equals(1)){
|
||||
tbUserCouponVo.setUse(couponJson.get("isUse").getAsBoolean());
|
||||
} else if (tbUserCouponVo.getType().equals(2) && couponJson.get("isUse").getAsBoolean()) {
|
||||
if(!pros.contains(tbUserCouponVo.getProId())){
|
||||
tbUserCouponVo.setUse(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
tbUserCouponVos.sort(Comparator.comparing(TbUserCouponVo::isUse).reversed().thenComparing(TbUserCouponVo::getExpireTime));
|
||||
return new Result(CodeEnum.SUCCESS, tbUserCouponVos);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (param.getStatus().equals(1)) {
|
||||
return new Result(CodeEnum.SUCCESS, inRecordMapper.queryByVipIdAndShopId(Integer.valueOf(tbShopUser.getId()), param.getShopId()));
|
||||
} else if (param.getStatus().equals(-1)) {
|
||||
return new Result(CodeEnum.SUCCESS, inRecordMapper.queryByVipIdAndShopIdExpire(Integer.valueOf(tbShopUser.getId()), param.getShopId()));
|
||||
} else if (param.getStatus().equals(2)) {
|
||||
return new Result(CodeEnum.SUCCESS, outRecordMapper.queryByVipIdAndShopId(Integer.valueOf(tbShopUser.getId()), param.getShopId()));
|
||||
}
|
||||
}
|
||||
return new Result(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.service.impl;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.UserCouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.UserCouponVo;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbUserCouponsService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (TbUserCoupons)表服务实现类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-09-02 13:38:20
|
||||
*/
|
||||
@Primary
|
||||
@Service
|
||||
public class TbUserCouponsServiceImpl implements TbUserCouponsService {
|
||||
@Resource
|
||||
private TbUserCouponsMapper tbUserCouponsMapper;
|
||||
@Resource
|
||||
private TbActivateInRecordMapper inRecordMapper;
|
||||
@Resource
|
||||
private TbActivateOutRecordMapper outRecordMapper;
|
||||
@Autowired
|
||||
private TbShopUserMapper tbShopUserMapper;
|
||||
@Autowired
|
||||
private TbShopInfoMapper tbShopInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public Result queryByPage(UserCouponDto couponDto) {
|
||||
// PageHelper.startPage(couponDto.getPage(), couponDto.getSize());
|
||||
// List<TbUserCoupons> result = tbUserCouponsMapper.queryAllSelective(couponDto);
|
||||
// return new Result(CodeEnum.SUCCESS, new PageInfo<>(result));
|
||||
// List<UserCouponVo> result = tbUserCouponsMapper.queryAllSelective(couponDto);
|
||||
List<UserCouponVo> result = new ArrayList<>();
|
||||
List<ShopUserListVo> tbShopUsers = tbShopUserMapper.selectByUserId(couponDto.getUserId().toString(), couponDto.getShopId()==null?null:couponDto.getShopId().toString());
|
||||
if (!CollectionUtils.isEmpty(tbShopUsers)) {
|
||||
tbShopUsers.forEach(s -> {
|
||||
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(s.getShopId().intValue());
|
||||
if (couponDto.getStatus()==null || (couponDto.getStatus() != null && couponDto.getStatus() == 0)) {
|
||||
List<UserCouponVo> unuseCoupon = inRecordMapper.queryVipPro(s.getMemberId().intValue(), s.getShopId().intValue(),shopInfo.getShopName());
|
||||
result.addAll(unuseCoupon);
|
||||
}
|
||||
if (couponDto.getStatus()==null || (couponDto.getStatus() != null && couponDto.getStatus() == 1)) {
|
||||
List<UserCouponVo> useCoupon = outRecordMapper.queryVipPro(s.getMemberId().intValue(), s.getShopId().intValue(),shopInfo.getShopName());
|
||||
result.addAll(useCoupon);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return new Result(CodeEnum.SUCCESS, result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,178 +1,22 @@
|
||||
package com.chaozhanggui.system.cashierservice.task;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbShopSongOrderService;
|
||||
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
||||
import com.chaozhanggui.system.cashierservice.util.NicknameGenerator;
|
||||
import com.chaozhanggui.system.cashierservice.util.RandomUtil;
|
||||
import lombok.SneakyThrows;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
@Component
|
||||
public class TaskScheduler {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(TaskScheduler.class);
|
||||
@Autowired
|
||||
private TbWiningUserMapper tbWiningUserMapper;
|
||||
@Autowired
|
||||
private TbOrderInfoMapper orderInfoMapper;
|
||||
@Autowired
|
||||
private TbWiningParamsMapper winingParamsMapper;
|
||||
@Autowired
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
@Autowired
|
||||
private TbReleaseFlowMapper releaseFlowMapper;
|
||||
@Autowired
|
||||
private TbUserCouponsMapper userCouponsMapper;
|
||||
|
||||
private final TbShopSongOrderService shopSongOrderService;
|
||||
|
||||
public TaskScheduler(@Qualifier("tbShopSongOrderServiceImpl") TbShopSongOrderService shopSongOrderService) {
|
||||
this.shopSongOrderService = shopSongOrderService;
|
||||
}
|
||||
|
||||
//更新订单状态
|
||||
// @Scheduled(fixedRate = 1000000)
|
||||
public void orderStatus() throws InterruptedException {
|
||||
for (int i = 0;i<10;i++){
|
||||
TbReleaseFlow releaseFlow = new TbReleaseFlow();
|
||||
BigDecimal orderAmount = RandomUtil.getRandomBigDecimal(BigDecimal.ONE, new BigDecimal("100"));
|
||||
releaseFlow.setNum(orderAmount);
|
||||
releaseFlow.setCreateTime(new Date());
|
||||
releaseFlow.setFromSource("OWER");
|
||||
releaseFlow.setUserId("15");
|
||||
releaseFlow.setOperationType("ADD");
|
||||
releaseFlow.setType("EXCHANGEADD");
|
||||
releaseFlow.setRemark("兑换增加");
|
||||
releaseFlowMapper.insert(releaseFlow);
|
||||
}
|
||||
for (int i = 0;i<10;i++){
|
||||
TbReleaseFlow releaseFlow = new TbReleaseFlow();
|
||||
BigDecimal orderAmount = RandomUtil.getRandomBigDecimal(BigDecimal.ONE, new BigDecimal("100"));
|
||||
releaseFlow.setNum(orderAmount);
|
||||
releaseFlow.setCreateTime(new Date());
|
||||
releaseFlow.setFromSource("OWER");
|
||||
releaseFlow.setUserId("15");
|
||||
releaseFlow.setOperationType("SUB");
|
||||
releaseFlow.setType("BUYSUB");
|
||||
releaseFlow.setRemark("购买商品扣除");
|
||||
releaseFlowMapper.insert(releaseFlow);
|
||||
}
|
||||
for (int i = 0;i<10;i++){
|
||||
TbReleaseFlow releaseFlow = new TbReleaseFlow();
|
||||
BigDecimal orderAmount = RandomUtil.getRandomBigDecimal(BigDecimal.ONE, new BigDecimal("100"));
|
||||
releaseFlow.setNum(orderAmount);
|
||||
releaseFlow.setCreateTime(new Date());
|
||||
releaseFlow.setFromSource("OWER");
|
||||
releaseFlow.setOperationType("ADD");
|
||||
releaseFlow.setUserId("15");
|
||||
releaseFlow.setType("THREEADD");
|
||||
releaseFlow.setRemark("退货增加");
|
||||
releaseFlowMapper.insert(releaseFlow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Scheduled(cron = "0 1 0 * * ?")
|
||||
public void winningUser() {
|
||||
String day = DateUtils.getDay();
|
||||
List<TbWiningParams> list = winingParamsMapper.selectAll();
|
||||
ThreadPoolExecutor es = new ThreadPoolExecutor(5, 10, 60L, TimeUnit.SECONDS,
|
||||
new LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
Thread t = new Thread(r);
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
});
|
||||
for (TbWiningParams winingParams : list) {
|
||||
es.submit(new winingUser(winingParams, day));
|
||||
}
|
||||
es.shutdown();
|
||||
|
||||
}
|
||||
|
||||
class winingUser implements Runnable {
|
||||
private TbWiningParams winingParams;
|
||||
private String day;
|
||||
|
||||
public winingUser(TbWiningParams winingParams, String day) {
|
||||
this.winingParams = winingParams;
|
||||
this.day = day;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
List<TbOrderInfo> list = orderInfoMapper.selectByTradeDay(day, winingParams.getMinPrice(), winingParams.getMaxPrice());
|
||||
int num = winingParams.getWiningUserNum();
|
||||
List<TbOrderInfo> newList = new ArrayList<>();
|
||||
Map<Integer, Integer> map = new HashMap<>();
|
||||
int noUserNum = winingParams.getWiningNum() - num;
|
||||
if (list.size() < num) {
|
||||
noUserNum = winingParams.getWiningNum();
|
||||
} else {
|
||||
for (int i = 0; i < num; i++) {
|
||||
TbOrderInfo orderInfo = RandomUtil.selectWinner(list, map);
|
||||
newList.add(orderInfo);
|
||||
map.put(orderInfo.getId(), 1);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < noUserNum; i++) {
|
||||
long endDate = DateUtils.convertDate1(day + " 00:00:00").getTime();
|
||||
long startDate = DateUtils.convertDate1(DateUtils.getSdfDayTimes(DateUtils.getNewDate(new Date(), 3, -1))+" 00:00:00").getTime();
|
||||
String orderNo = generateOrderNumber(startDate, endDate);
|
||||
String userName = NicknameGenerator.generateRandomWeChatNickname();
|
||||
BigDecimal orderAmount = RandomUtil.getRandomBigDecimal(winingParams.getMinPrice(), winingParams.getMaxPrice());
|
||||
TbWiningUser winingUser = new TbWiningUser(userName, orderNo, orderAmount, "false", day);
|
||||
tbWiningUserMapper.insert(winingUser);
|
||||
}
|
||||
for (TbOrderInfo orderInfo:newList){
|
||||
TbUserInfo userInfo = userInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getUserId()));
|
||||
TbWiningUser winingUser = new TbWiningUser(userInfo.getNickName(), orderInfo.getOrderNo(), orderInfo.getPayAmount(), "true", day);
|
||||
tbWiningUserMapper.insert(winingUser);
|
||||
TbUserCoupons userCoupons = new TbUserCoupons();
|
||||
userCoupons.setUserId(orderInfo.getUserId());
|
||||
userCoupons.setCouponsAmount(orderInfo.getOrderAmount().subtract(orderInfo.getUserCouponAmount()));
|
||||
userCoupons.setStatus("0");
|
||||
userCoupons.setOrderId(orderInfo.getId());
|
||||
userCoupons.setCouponsPrice(userCoupons.getCouponsAmount().multiply(new BigDecimal("0.5")));
|
||||
userCoupons.setCreateTime(new Date());
|
||||
userCoupons.setEndTime(DateUtils.getNewDate(new Date(),3,30));
|
||||
//执行插入方法
|
||||
userCouponsMapper.insert(userCoupons);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String generateOrderNumber(long startTimestamp, long endTimestamp) {
|
||||
long date = getRandomTimestamp(startTimestamp, endTimestamp);
|
||||
Random random = new Random();
|
||||
int randomNum = random.nextInt(900) + 100;
|
||||
return "WX" + date + randomNum;
|
||||
}
|
||||
|
||||
public static long getRandomTimestamp(long startTimestamp, long endTimestamp) {
|
||||
long randomMilliseconds = ThreadLocalRandom.current().nextLong(startTimestamp, endTimestamp);
|
||||
return randomMilliseconds;
|
||||
}
|
||||
|
||||
@Scheduled(fixedRate = 60000 * 60)
|
||||
public void clearSongOrder() {
|
||||
log.info("定时任务执行,清楚过期歌曲订单");
|
||||
|
||||
@@ -5,29 +5,97 @@
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbActivateInRecord" id="TbActivateInRecordMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="vipUserId" column="vip_user_id" jdbcType="INTEGER"/>
|
||||
<result property="couponId" column="coupon_id" jdbcType="INTEGER"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="proId" column="pro_id" jdbcType="INTEGER"/>
|
||||
<result property="fullAmount" column="full_amount" jdbcType="INTEGER"/>
|
||||
<result property="discountAmount" column="discount_amount" jdbcType="INTEGER"/>
|
||||
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||
<result property="overNum" column="over_num" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="sourceActId" column="source_act_id" jdbcType="INTEGER"/>
|
||||
<result property="sourceFlowId" column="source_flow_id" jdbcType="INTEGER"/>
|
||||
<result property="useStartTime" column="use_start_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="useEndTime" column="use_end_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="couponJson" column="coupon_json" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, vip_user_id, pro_id, num, over_num, shop_id, source_act_id, source_flow_id, create_time, update_time </sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, vip_user_id, coupon_id, name, type, pro_id, full_amount, discount_amount, num, over_num, shop_id, source_act_id, source_flow_id, use_start_time, use_end_time, create_time, update_time, coupon_json </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbActivateInRecordMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate_in_record
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryByVipIdAndShopId" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo">
|
||||
SELECT
|
||||
inRecord.coupon_id as couponId,
|
||||
pro.id as proId,
|
||||
CASE
|
||||
WHEN inRecord.type = 1 THEN inRecord.NAME
|
||||
WHEN inRecord.type = 2 THEN pro.NAME
|
||||
END AS `name`,
|
||||
inRecord.type,
|
||||
inRecord.over_num as num,
|
||||
inRecord.use_end_time as endTime
|
||||
FROM
|
||||
tb_activate_in_record inRecord
|
||||
LEFT JOIN tb_product pro ON inRecord.pro_id = pro.id and pro.shop_id = #{shopId}
|
||||
WHERE
|
||||
inRecord.vip_user_id = #{vipUserId}
|
||||
and inRecord.shop_id = #{shopId}
|
||||
and inRecord.over_num != 0
|
||||
and inRecord.use_start_time < now()
|
||||
and inRecord.use_end_time > now()
|
||||
order by inRecord.use_end_time asc
|
||||
</select>
|
||||
|
||||
<select id="queryByVipIdAndShopIdExpire" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN inRecord.type = 1 THEN inRecord.NAME
|
||||
WHEN inRecord.type = 2 THEN pro.NAME
|
||||
END AS `name`,
|
||||
inRecord.type,
|
||||
inRecord.over_num as num,
|
||||
inRecord.use_end_time as endTime
|
||||
FROM
|
||||
tb_activate_in_record inRecord
|
||||
LEFT JOIN tb_product pro ON inRecord.pro_id = pro.id and pro.shop_id = #{shopId}
|
||||
WHERE
|
||||
inRecord.vip_user_id = #{vipUserId}
|
||||
and inRecord.shop_id = #{shopId}
|
||||
and inRecord.over_num != 0
|
||||
and inRecord.use_end_time < now()
|
||||
order by inRecord.use_end_time asc
|
||||
</select>
|
||||
|
||||
<select id="queryByVipIdAndShopIdIn" resultMap="TbActivateInRecordMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>,
|
||||
CASE
|
||||
WHEN inRecord.type = 1 THEN inRecord.NAME
|
||||
WHEN inRecord.type = 2 THEN pro.NAME
|
||||
END AS `name`
|
||||
FROM
|
||||
tb_activate_in_record inRecord
|
||||
LEFT JOIN tb_product pro ON inRecord.pro_id = pro.id and pro.shop_id = #{shopId}
|
||||
WHERE
|
||||
inRecord.vip_user_id = #{vipUserId}
|
||||
and inRecord.shop_id = #{shopId}
|
||||
and inRecord.over_num != 0
|
||||
and inRecord.use_end_time < now()
|
||||
order by inRecord.use_end_time asc
|
||||
</select>
|
||||
|
||||
<!--查询剩余商品优惠卷数量-->
|
||||
<select id="countCouponNum" resultType="INTEGER">
|
||||
SELECT
|
||||
@@ -37,60 +105,10 @@
|
||||
INNER JOIN tb_shop_user vip ON record.vip_user_id = vip.id AND vip.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="queryByVipIdAndShopId" resultType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
||||
SELECT
|
||||
tb_product.*, sum(tb_activate_in_record.over_num) as limitNumber
|
||||
FROM
|
||||
tb_activate_in_record
|
||||
LEFT JOIN tb_product ON tb_activate_in_record.pro_id = tb_product.id
|
||||
WHERE
|
||||
vip_user_id = #{vipUserId} and tb_activate_in_record.shop_id = #{shopId}
|
||||
group by tb_activate_in_record.pro_id
|
||||
</select>
|
||||
|
||||
<select id="queryVipPro" resultType="com.chaozhanggui.system.cashierservice.entity.vo.UserCouponVo">
|
||||
SELECT tb_product.name as detail,
|
||||
0 as status,
|
||||
sum(tb_activate_in_record.over_num) as num,
|
||||
tb_activate_in_record.shop_id as shopId,
|
||||
<choose>
|
||||
<when test="shopName != null and shopName != ''">#{shopName}</when>
|
||||
<otherwise>''</otherwise>
|
||||
</choose> AS shopName,
|
||||
2 as type
|
||||
FROM tb_activate_in_record
|
||||
LEFT JOIN tb_product ON tb_activate_in_record.pro_id = tb_product.id
|
||||
WHERE vip_user_id = #{vipUserId}
|
||||
and tb_activate_in_record.shop_id = #{shopId}
|
||||
and tb_activate_in_record.over_num!=0
|
||||
group by tb_activate_in_record.pro_id
|
||||
</select>
|
||||
|
||||
<select id="queryByVipIdAndShopIdAndProId" resultType="INTEGER">
|
||||
SELECT
|
||||
sum(tb_activate_in_record.num)
|
||||
FROM
|
||||
tb_activate_in_record
|
||||
WHERE
|
||||
vip_user_id = #{vipUserId} and shop_id = #{shopId} and pro_id = #{productId}
|
||||
</select>
|
||||
|
||||
<select id="queryAllByVipIdAndShopIdAndProId" resultMap="TbActivateInRecordMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from tb_activate_in_record
|
||||
WHERE
|
||||
vip_user_id = #{vipUserId}
|
||||
and shop_id = #{shopId}
|
||||
and pro_id = #{productId}
|
||||
and over_num > 0
|
||||
order by create_time
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAll" resultMap="TbActivateInRecordMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate_in_record
|
||||
<where>
|
||||
@@ -100,9 +118,24 @@
|
||||
<if test="vipUserId != null">
|
||||
and vip_user_id = #{vipUserId}
|
||||
</if>
|
||||
<if test="couponId != null">
|
||||
and coupon_id = #{couponId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name = #{name}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
and pro_id = #{proId}
|
||||
</if>
|
||||
<if test="fullAmount != null">
|
||||
and full_amount = #{fullAmount}
|
||||
</if>
|
||||
<if test="discountAmount != null">
|
||||
and discount_amount = #{discountAmount}
|
||||
</if>
|
||||
<if test="num != null">
|
||||
and num = #{num}
|
||||
</if>
|
||||
@@ -118,31 +151,36 @@
|
||||
<if test="sourceFlowId != null">
|
||||
and source_flow_id = #{sourceFlowId}
|
||||
</if>
|
||||
<if test="useStartTime != null">
|
||||
and use_start_time = #{useStartTime}
|
||||
</if>
|
||||
<if test="useEndTime != null">
|
||||
and use_end_time = #{useEndTime}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="couponJson != null and couponJson != ''">
|
||||
and coupon_json = #{couponJson}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_in_record(vip_user_id, pro_id, num, over_num, shop_id, source_act_id, source_flow_id,
|
||||
create_time, update_time)
|
||||
values (#{vipUserId}, #{proId}, #{num}, #{overNum}, #{shopId}, #{sourceActId}, #{sourceFlowId}, #{createTime},
|
||||
#{updateTime})
|
||||
insert into tb_activate_in_record(vip_user_id, coupon_id, name, type, pro_id, full_amount, discount_amount, num, over_num, shop_id, source_act_id, source_flow_id, use_start_time, use_end_time, create_time, update_time, coupon_json)
|
||||
values (#{vipUserId}, #{couponId}, #{name}, #{type}, #{proId}, #{fullAmount}, #{discountAmount}, #{num}, #{overNum}, #{shopId}, #{sourceActId}, #{sourceFlowId}, #{useStartTime}, #{useEndTime}, #{createTime}, #{updateTime}, #{couponJson})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_in_record(vip_user_id, pro_id, num, over_num, shop_id, source_act_id, source_flow_id,
|
||||
create_time, update_time)
|
||||
insert into tb_activate_in_record(vip_user_id, coupon_id, name, type, pro_id, full_amount, discount_amount, num, over_num, shop_id, source_act_id, source_flow_id, use_start_time, use_end_time, create_time, update_time, coupon_json)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.vipUserId}, #{entity.proId}, #{entity.num}, #{entity.overNum}, #{entity.shopId},
|
||||
#{entity.sourceActId}, #{entity.sourceFlowId}, #{entity.createTime}, #{entity.updateTime})
|
||||
(#{entity.vipUserId}, #{entity.couponId}, #{entity.name}, #{entity.type}, #{entity.proId}, #{entity.fullAmount}, #{entity.discountAmount}, #{entity.num}, #{entity.overNum}, #{entity.shopId}, #{entity.sourceActId}, #{entity.sourceFlowId}, #{entity.useStartTime}, #{entity.useEndTime}, #{entity.createTime}, #{entity.updateTime}, #{entity.couponJson})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -153,9 +191,24 @@
|
||||
<if test="vipUserId != null">
|
||||
vip_user_id = #{vipUserId},
|
||||
</if>
|
||||
<if test="couponId != null">
|
||||
coupon_id = #{couponId},
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
pro_id = #{proId},
|
||||
</if>
|
||||
<if test="fullAmount != null">
|
||||
full_amount = #{fullAmount},
|
||||
</if>
|
||||
<if test="discountAmount != null">
|
||||
discount_amount = #{discountAmount},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num},
|
||||
</if>
|
||||
@@ -171,28 +224,28 @@
|
||||
<if test="sourceFlowId != null">
|
||||
source_flow_id = #{sourceFlowId},
|
||||
</if>
|
||||
<if test="useStartTime != null">
|
||||
use_start_time = #{useStartTime},
|
||||
</if>
|
||||
<if test="useEndTime != null">
|
||||
use_end_time = #{useEndTime},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="couponJson != null and couponJson != ''">
|
||||
coupon_json = #{couponJson},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateOverNumById">
|
||||
update tb_activate_in_record
|
||||
set
|
||||
over_num = #{overNum}
|
||||
where id = #{id};
|
||||
</update>
|
||||
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_activate_in_record
|
||||
where id = #{id}
|
||||
delete from tb_activate_in_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,132 +1,143 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.TbActivateMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbActivate">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
|
||||
<result column="min_num" jdbcType="INTEGER" property="minNum" />
|
||||
<result column="max_num" jdbcType="INTEGER" property="maxNum" />
|
||||
<result column="handsel_num" jdbcType="DECIMAL" property="handselNum" />
|
||||
<result column="handsel_type" jdbcType="VARCHAR" property="handselType" />
|
||||
<result column="is_del" jdbcType="VARCHAR" property="isDel" />
|
||||
<result column="is_gift_pro" jdbcType="INTEGER" property="isGiftPro" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, shop_id, min_num, max_num, handsel_num, handsel_type, is_del,is_gift_pro
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_activate
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_activate
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
|
||||
insert into tb_activate (id, shop_id, min_num,
|
||||
max_num, handsel_num, handsel_type,
|
||||
is_del)
|
||||
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{minNum,jdbcType=INTEGER},
|
||||
#{maxNum,jdbcType=INTEGER}, #{handselNum,jdbcType=DECIMAL}, #{handselType,jdbcType=VARCHAR},
|
||||
#{isDel,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
|
||||
insert into tb_activate
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="minNum != null">
|
||||
min_num,
|
||||
</if>
|
||||
<if test="maxNum != null">
|
||||
max_num,
|
||||
</if>
|
||||
<if test="handselNum != null">
|
||||
handsel_num,
|
||||
</if>
|
||||
<if test="handselType != null">
|
||||
handsel_type,
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
is_del,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="minNum != null">
|
||||
#{minNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="maxNum != null">
|
||||
#{maxNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="handselNum != null">
|
||||
#{handselNum,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="handselType != null">
|
||||
#{handselType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
#{isDel,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
|
||||
update tb_activate
|
||||
<set>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="minNum != null">
|
||||
min_num = #{minNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="maxNum != null">
|
||||
max_num = #{maxNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="handselNum != null">
|
||||
handsel_num = #{handselNum,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="handselType != null">
|
||||
handsel_type = #{handselType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
is_del = #{isDel,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
|
||||
update tb_activate
|
||||
set shop_id = #{shopId,jdbcType=INTEGER},
|
||||
min_num = #{minNum,jdbcType=INTEGER},
|
||||
max_num = #{maxNum,jdbcType=INTEGER},
|
||||
handsel_num = #{handselNum,jdbcType=DECIMAL},
|
||||
handsel_type = #{handselType,jdbcType=VARCHAR},
|
||||
is_del = #{isDel,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectByAmount" resultMap="BaseResultMap">
|
||||
select *
|
||||
from tb_activate
|
||||
where shop_id = #{shopId}
|
||||
and is_del = 0
|
||||
and min_num <= #{amount}
|
||||
and max_num >= #{amount}
|
||||
order by max_num desc limit 1
|
||||
</select>
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbActivate" id="TbActivateMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="amount" column="amount" jdbcType="INTEGER"/>
|
||||
<result property="giftAmount" column="gift_amount" jdbcType="INTEGER"/>
|
||||
<result property="isUseCoupon" column="is_use_coupon" jdbcType="INTEGER"/>
|
||||
<result property="couponId" column="coupon_id" jdbcType="INTEGER"/>
|
||||
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, shop_id, amount, gift_amount, is_use_coupon, coupon_id, num, create_time, update_time </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="selectByShopId" resultMap="TbActivateMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate
|
||||
where shop_id = #{shopId}
|
||||
</select>
|
||||
|
||||
<select id="queryById" resultMap="TbActivateMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByAmount" resultMap="TbActivateMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate
|
||||
where shop_id = #{shop_id}
|
||||
and amount = #{amount}
|
||||
order by id desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAll" resultMap="TbActivateMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
and shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
and amount = #{amount}
|
||||
</if>
|
||||
<if test="giftAmount != null">
|
||||
and gift_amount = #{giftAmount}
|
||||
</if>
|
||||
<if test="isUseCoupon != null">
|
||||
and is_use_coupon = #{isUseCoupon}
|
||||
</if>
|
||||
<if test="couponId != null">
|
||||
and coupon_id = #{couponId}
|
||||
</if>
|
||||
<if test="num != null">
|
||||
and num = #{num}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate(shop_id, amount, gift_amount, is_use_coupon, coupon_id, num, create_time, update_time)
|
||||
values (#{shopId}, #{amount}, #{giftAmount}, #{isUseCoupon}, #{couponId}, #{num}, #{createTime}, #{updateTime})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate(shop_id, amount, gift_amount, is_use_coupon, coupon_id, num, create_time, update_time)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.shopId}, #{entity.amount}, #{entity.giftAmount}, #{entity.isUseCoupon}, #{entity.couponId},
|
||||
#{entity.num}, #{entity.createTime}, #{entity.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update tb_activate
|
||||
<set>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount = #{amount},
|
||||
</if>
|
||||
<if test="giftAmount != null">
|
||||
gift_amount = #{giftAmount},
|
||||
</if>
|
||||
<if test="isUseCoupon != null">
|
||||
is_use_coupon = #{isUseCoupon},
|
||||
</if>
|
||||
<if test="couponId != null">
|
||||
coupon_id = #{couponId},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_activate
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||
select * from tb_activate where shop_id=#{shopId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -4,11 +4,13 @@
|
||||
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbActivateOutRecord" id="TbActivateOutRecordMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
|
||||
<result property="giveId" column="give_id" jdbcType="INTEGER"/>
|
||||
<result property="proId" column="pro_id" jdbcType="INTEGER"/>
|
||||
<result property="vipUserId" column="vip_user_id" jdbcType="INTEGER"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="useNum" column="use_num" jdbcType="INTEGER"/>
|
||||
<result property="refNum" column="ref_num" jdbcType="INTEGER"/>
|
||||
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
@@ -16,7 +18,7 @@
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, give_id, pro_id, use_num, ref_num, order_id,status, create_time, update_time </sql>
|
||||
, shop_id, order_id, give_id, vip_user_id, type, use_num, ref_num, status, create_time, update_time </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbActivateOutRecordMap">
|
||||
@@ -27,24 +29,28 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryVipPro" resultType="com.chaozhanggui.system.cashierservice.entity.vo.UserCouponVo">
|
||||
SELECT tb_product.NAME AS detail,
|
||||
tb_activate_out_record.order_id as orderId,
|
||||
1 AS status,
|
||||
tb_activate_out_record.use_num AS num,
|
||||
<choose>
|
||||
<when test="shopName != null and shopName != ''">#{shopName}</when>
|
||||
<otherwise>''</otherwise>
|
||||
</choose>
|
||||
AS shopName,
|
||||
2 AS type
|
||||
FROM tb_activate_out_record
|
||||
LEFT JOIN tb_product ON tb_activate_out_record.pro_id = tb_product.id
|
||||
LEFT JOIN tb_activate_in_record ON tb_activate_in_record.id = tb_activate_out_record.give_id
|
||||
WHERE vip_user_id = #{vipUserId}
|
||||
AND tb_activate_in_record.shop_id = #{shopId}
|
||||
AND tb_activate_out_record.STATUS = 'closed'
|
||||
<select id="queryByVipIdAndShopId" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN outRecord.type = 1 THEN inRecord.name
|
||||
WHEN outRecord.type = 2 THEN pro.NAME
|
||||
END AS `name`,
|
||||
outRecord.type,
|
||||
outRecord.use_num-outRecord.ref_num as num
|
||||
FROM
|
||||
tb_activate_out_record outRecord
|
||||
INNER JOIN tb_activate_in_record inRecord
|
||||
on outRecord.give_id = inRecord.id
|
||||
and inRecord.shop_id = #{shopId}
|
||||
and inRecord.vip_user_id = #{vipUserId}
|
||||
LEFT JOIN tb_product pro
|
||||
ON inRecord.pro_id = pro.id and pro.shop_id = #{shopId}
|
||||
WHERE
|
||||
outRecord.vip_user_id = #{vipUserId}
|
||||
and outRecord.shop_id = #{shopId}
|
||||
and outRecord.status = 'closed'
|
||||
and outRecord.use_num-outRecord.ref_num >0
|
||||
order by outRecord.create_time desc
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
@@ -57,11 +63,20 @@
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
and shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="orderId != null and orderId != ''">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="giveId != null">
|
||||
and give_id = #{giveId}
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
and pro_id = #{proId}
|
||||
<if test="vipUserId != null">
|
||||
and vip_user_id = #{vipUserId}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="useNum != null">
|
||||
and use_num = #{useNum}
|
||||
@@ -69,9 +84,6 @@
|
||||
<if test="refNum != null">
|
||||
and ref_num = #{refNum}
|
||||
</if>
|
||||
<if test="orderId != null and orderId != ''">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
@@ -87,16 +99,19 @@
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_out_record(give_id, pro_id, use_num, ref_num, order_id, status, create_time, update_time)
|
||||
values (#{giveId}, #{proId}, #{useNum}, #{refNum}, #{orderId}, #{status} #{createTime}, #{updateTime})
|
||||
insert into tb_activate_out_record(shop_id, order_id, give_id, vip_user_id, type, use_num, ref_num, status,
|
||||
create_time, update_time)
|
||||
values (#{shopId}, #{orderId}, #{giveId}, #{vipUserId}, #{type}, #{useNum}, #{refNum}, #{status}, #{createTime},
|
||||
#{updateTime})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_out_record(give_id, pro_id, use_num, ref_num, order_id, status, create_time, update_time)
|
||||
insert into tb_activate_out_record(shop_id, order_id, give_id, vip_user_id, type, use_num, ref_num, status,
|
||||
create_time, update_time)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.giveId}, #{entity.proId}, #{entity.useNum}, #{entity.refNum}, #{entity.orderId},
|
||||
#{entity.status}, #{entity.createTime}, #{entity.updateTime})
|
||||
(#{entity.shopId}, #{entity.orderId}, #{entity.giveId}, #{entity.vipUserId}, #{entity.type},
|
||||
#{entity.useNum}, #{entity.refNum}, #{entity.status}, #{entity.createTime}, #{entity.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -104,11 +119,20 @@
|
||||
<update id="update">
|
||||
update tb_activate_out_record
|
||||
<set>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId},
|
||||
</if>
|
||||
<if test="orderId != null and orderId != ''">
|
||||
order_id = #{orderId},
|
||||
</if>
|
||||
<if test="giveId != null">
|
||||
give_id = #{giveId},
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
pro_id = #{proId},
|
||||
<if test="vipUserId != null">
|
||||
vip_user_id = #{vipUserId},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="useNum != null">
|
||||
use_num = #{useNum},
|
||||
@@ -116,9 +140,6 @@
|
||||
<if test="refNum != null">
|
||||
ref_num = #{refNum},
|
||||
</if>
|
||||
<if test="orderId != null and orderId != ''">
|
||||
order_id = #{orderId},
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
status = #{status},
|
||||
</if>
|
||||
@@ -131,13 +152,6 @@
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateByOrderIdAndStatus">
|
||||
update tb_activate_out_record
|
||||
set
|
||||
status = 'closed'
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
|
||||
@@ -1,39 +1,41 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.TbActivateProductMapper">
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbActivateProduct" id="TbActivateProductMap">
|
||||
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbCouponProductMapper">
|
||||
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbCouponProduct" id="TbCouponProductMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="activateId" column="activate_id" jdbcType="INTEGER"/>
|
||||
<result property="couponId" column="coupon_id" jdbcType="INTEGER"/>
|
||||
<result property="productId" column="product_id" jdbcType="INTEGER"/>
|
||||
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, activate_id, product_id, num, create_time, update_time </sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, coupon_id, product_id, num, create_time, update_time </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbActivateProductMap">
|
||||
<select id="queryById" resultMap="TbCouponProductMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate_product
|
||||
from tb_coupon_product
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAll" resultMap="TbActivateProductMap">
|
||||
<select id="queryAll" resultMap="TbCouponProductMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_activate_product
|
||||
from tb_coupon_product
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="activateId != null">
|
||||
and activate_id = #{activateId}
|
||||
<if test="couponId != null">
|
||||
and coupon_id = #{couponId}
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
and product_id = #{productId}
|
||||
@@ -50,43 +52,42 @@ id, activate_id, product_id, num, create_time, update_time </sql>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryAllByActivateId" resultMap="TbActivateProductMap">
|
||||
<select id="queryAllByCouponId" resultMap="TbCouponProductMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from tb_activate_product
|
||||
from tb_coupon_product
|
||||
where
|
||||
activate_id = #{activateId}
|
||||
coupon_id = #{couponId}
|
||||
</select>
|
||||
|
||||
<select id="queryProsByActivateId" resultType="java.lang.String">
|
||||
select CONCAT(tb_product.name, '*', SUM(tb_activate_product.num))
|
||||
from tb_activate_product
|
||||
LEFT JOIN tb_product ON tb_activate_product.product_id = tb_product.id
|
||||
where activate_id = #{activateId}
|
||||
group by tb_activate_product.product_id
|
||||
select CONCAT(tb_product.name, '*', SUM(tb_coupon_product.num)*#{num})
|
||||
from tb_coupon_product
|
||||
LEFT JOIN tb_product ON tb_coupon_product.product_id = tb_product.id
|
||||
where coupon_id = #{couponId}
|
||||
group by tb_coupon_product.product_id
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_product(activate_id, product_id, num, create_time, update_time)
|
||||
values (#{activateId}, #{productId}, #{num}, #{createTime}, #{updateTime})
|
||||
insert into tb_coupon_product(coupon_id, product_id, num, create_time, update_time)
|
||||
values (#{couponId}, #{productId}, #{num}, #{createTime}, #{updateTime})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_product(activate_id, product_id, num, create_time, update_time)
|
||||
insert into tb_coupon_product(coupon_id, product_id, num, create_time, update_time)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.activateId}, #{entity.productId}, #{entity.num}, #{entity.createTime}, #{entity.updateTime})
|
||||
(#{entity.couponId}, #{entity.productId}, #{entity.num}, #{entity.createTime}, #{entity.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update tb_activate_product
|
||||
update tb_coupon_product
|
||||
<set>
|
||||
<if test="activateId != null">
|
||||
activate_id = #{activateId},
|
||||
<if test="couponId != null">
|
||||
coupon_id = #{couponId},
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
product_id = #{productId},
|
||||
@@ -106,7 +107,9 @@ id, activate_id, product_id, num, create_time, update_time </sql>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from tb_activate_product where id = #{id}
|
||||
delete
|
||||
from tb_coupon_product
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -1,106 +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.chaozhanggui.system.cashierservice.dao.TbDeviceOperateInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="deviceNo" jdbcType="VARCHAR" property="deviceno" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, deviceNo, type, shop_id, createTime, remark
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_device_operate_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_device_operate_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
|
||||
insert into tb_device_operate_info (id, deviceNo, type,
|
||||
shop_id, createTime, remark
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{deviceno,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{shopId,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
|
||||
insert into tb_device_operate_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="deviceno != null">
|
||||
deviceNo,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deviceno != null">
|
||||
#{deviceno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
|
||||
update tb_device_operate_info
|
||||
<set>
|
||||
<if test="deviceno != null">
|
||||
deviceNo = #{deviceno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
|
||||
update tb_device_operate_info
|
||||
set deviceNo = #{deviceno,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
remark = #{remark,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,318 +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.chaozhanggui.system.cashierservice.dao.TbDeviceStockMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="snNo" jdbcType="VARCHAR" property="snno" />
|
||||
<result column="orderNo" jdbcType="VARCHAR" property="orderno" />
|
||||
<result column="price" jdbcType="DECIMAL" property="price" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="groupNo" jdbcType="VARCHAR" property="groupno" />
|
||||
<result column="buyMercName" jdbcType="VARCHAR" property="buymercname" />
|
||||
<result column="buyMercId" jdbcType="VARCHAR" property="buymercid" />
|
||||
<result column="actMercName" jdbcType="VARCHAR" property="actmercname" />
|
||||
<result column="actMercId" jdbcType="VARCHAR" property="actmercid" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
<result column="createBy" jdbcType="VARCHAR" property="createby" />
|
||||
<result column="delFlag" jdbcType="VARCHAR" property="delflag" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
|
||||
<result column="deviceNo" jdbcType="VARCHAR" property="deviceno" />
|
||||
<result column="belongUserId" jdbcType="INTEGER" property="belonguserid" />
|
||||
<result column="extractUserId" jdbcType="INTEGER" property="extractuserid" />
|
||||
<result column="roleCode" jdbcType="VARCHAR" property="rolecode" />
|
||||
<result column="inStockTime" jdbcType="TIMESTAMP" property="instocktime" />
|
||||
<result column="transferStatus" jdbcType="VARCHAR" property="transferstatus" />
|
||||
<result column="bindTime" jdbcType="TIMESTAMP" property="bindtime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, code, snNo, orderNo, price, type, groupNo, buyMercName, buyMercId, actMercName,
|
||||
actMercId, status, createTime, createBy, delFlag, remarks, updateTime, deviceNo,
|
||||
belongUserId, extractUserId, roleCode, inStockTime, transferStatus, bindTime
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_device_stock
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_device_stock
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
|
||||
insert into tb_device_stock (id, code, snNo,
|
||||
orderNo, price, type,
|
||||
groupNo, buyMercName, buyMercId,
|
||||
actMercName, actMercId, status,
|
||||
createTime, createBy, delFlag,
|
||||
remarks, updateTime, deviceNo,
|
||||
belongUserId, extractUserId, roleCode,
|
||||
inStockTime, transferStatus, bindTime
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{snno,jdbcType=VARCHAR},
|
||||
#{orderno,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{type,jdbcType=VARCHAR},
|
||||
#{groupno,jdbcType=VARCHAR}, #{buymercname,jdbcType=VARCHAR}, #{buymercid,jdbcType=VARCHAR},
|
||||
#{actmercname,jdbcType=VARCHAR}, #{actmercid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{createtime,jdbcType=TIMESTAMP}, #{createby,jdbcType=VARCHAR}, #{delflag,jdbcType=VARCHAR},
|
||||
#{remarks,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, #{deviceno,jdbcType=VARCHAR},
|
||||
#{belonguserid,jdbcType=INTEGER}, #{extractuserid,jdbcType=INTEGER}, #{rolecode,jdbcType=VARCHAR},
|
||||
#{instocktime,jdbcType=TIMESTAMP}, #{transferstatus,jdbcType=VARCHAR}, #{bindtime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
|
||||
insert into tb_device_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="snno != null">
|
||||
snNo,
|
||||
</if>
|
||||
<if test="orderno != null">
|
||||
orderNo,
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="groupno != null">
|
||||
groupNo,
|
||||
</if>
|
||||
<if test="buymercname != null">
|
||||
buyMercName,
|
||||
</if>
|
||||
<if test="buymercid != null">
|
||||
buyMercId,
|
||||
</if>
|
||||
<if test="actmercname != null">
|
||||
actMercName,
|
||||
</if>
|
||||
<if test="actmercid != null">
|
||||
actMercId,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
<if test="createby != null">
|
||||
createBy,
|
||||
</if>
|
||||
<if test="delflag != null">
|
||||
delFlag,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
updateTime,
|
||||
</if>
|
||||
<if test="deviceno != null">
|
||||
deviceNo,
|
||||
</if>
|
||||
<if test="belonguserid != null">
|
||||
belongUserId,
|
||||
</if>
|
||||
<if test="extractuserid != null">
|
||||
extractUserId,
|
||||
</if>
|
||||
<if test="rolecode != null">
|
||||
roleCode,
|
||||
</if>
|
||||
<if test="instocktime != null">
|
||||
inStockTime,
|
||||
</if>
|
||||
<if test="transferstatus != null">
|
||||
transferStatus,
|
||||
</if>
|
||||
<if test="bindtime != null">
|
||||
bindTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="snno != null">
|
||||
#{snno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderno != null">
|
||||
#{orderno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
#{price,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="groupno != null">
|
||||
#{groupno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="buymercname != null">
|
||||
#{buymercname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="buymercid != null">
|
||||
#{buymercid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="actmercname != null">
|
||||
#{actmercname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="actmercid != null">
|
||||
#{actmercid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createby != null">
|
||||
#{createby,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="delflag != null">
|
||||
#{delflag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
#{updatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deviceno != null">
|
||||
#{deviceno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="belonguserid != null">
|
||||
#{belonguserid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="extractuserid != null">
|
||||
#{extractuserid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="rolecode != null">
|
||||
#{rolecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="instocktime != null">
|
||||
#{instocktime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="transferstatus != null">
|
||||
#{transferstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bindtime != null">
|
||||
#{bindtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
|
||||
update tb_device_stock
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="snno != null">
|
||||
snNo = #{snno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderno != null">
|
||||
orderNo = #{orderno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="groupno != null">
|
||||
groupNo = #{groupno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="buymercname != null">
|
||||
buyMercName = #{buymercname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="buymercid != null">
|
||||
buyMercId = #{buymercid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="actmercname != null">
|
||||
actMercName = #{actmercname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="actmercid != null">
|
||||
actMercId = #{actmercid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createby != null">
|
||||
createBy = #{createby,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="delflag != null">
|
||||
delFlag = #{delflag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deviceno != null">
|
||||
deviceNo = #{deviceno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="belonguserid != null">
|
||||
belongUserId = #{belonguserid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="extractuserid != null">
|
||||
extractUserId = #{extractuserid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="rolecode != null">
|
||||
roleCode = #{rolecode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="instocktime != null">
|
||||
inStockTime = #{instocktime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="transferstatus != null">
|
||||
transferStatus = #{transferstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bindtime != null">
|
||||
bindTime = #{bindtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
|
||||
update tb_device_stock
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
snNo = #{snno,jdbcType=VARCHAR},
|
||||
orderNo = #{orderno,jdbcType=VARCHAR},
|
||||
price = #{price,jdbcType=DECIMAL},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
groupNo = #{groupno,jdbcType=VARCHAR},
|
||||
buyMercName = #{buymercname,jdbcType=VARCHAR},
|
||||
buyMercId = #{buymercid,jdbcType=VARCHAR},
|
||||
actMercName = #{actmercname,jdbcType=VARCHAR},
|
||||
actMercId = #{actmercid,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
createBy = #{createby,jdbcType=VARCHAR},
|
||||
delFlag = #{delflag,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||
deviceNo = #{deviceno,jdbcType=VARCHAR},
|
||||
belongUserId = #{belonguserid,jdbcType=INTEGER},
|
||||
extractUserId = #{extractuserid,jdbcType=INTEGER},
|
||||
roleCode = #{rolecode,jdbcType=VARCHAR},
|
||||
inStockTime = #{instocktime,jdbcType=TIMESTAMP},
|
||||
transferStatus = #{transferstatus,jdbcType=VARCHAR},
|
||||
bindTime = #{bindtime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,93 +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.chaozhanggui.system.cashierservice.dao.TbIntegralFlowMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="num" jdbcType="DECIMAL" property="num" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, num, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_integral_flow
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_integral_flow
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
|
||||
insert into tb_integral_flow (id, user_id, num,
|
||||
create_time, update_time)
|
||||
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
|
||||
insert into tb_integral_flow
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
|
||||
update tb_integral_flow
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
|
||||
update tb_integral_flow
|
||||
set user_id = #{userId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=DECIMAL},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,109 +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.chaozhanggui.system.cashierservice.dao.TbIntegralMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="num" jdbcType="DECIMAL" property="num" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, num, status, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_integral
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAllByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
|
||||
select * from tb_integral where user_id = #{userId} and status = 'CREATE'
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_integral
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
|
||||
insert into tb_integral (id, user_id, num,
|
||||
status, create_time, update_time
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
|
||||
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
|
||||
insert into tb_integral
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
|
||||
update tb_integral
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
|
||||
update tb_integral
|
||||
set user_id = #{userId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=DECIMAL},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,54 +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.chaozhanggui.system.cashierservice.dao.TbMerchantCouponMapper">
|
||||
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbMerchantCoupon" id="TbMerchantCouponMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="templateId" column="template_id" jdbcType="VARCHAR"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="VARCHAR"/>
|
||||
<result property="shopSnap" column="shop_snap" jdbcType="VARCHAR"/>
|
||||
<result property="fromTime" column="from_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="toTime" column="to_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="limitNumber" column="limit_number" jdbcType="VARCHAR"/>
|
||||
<result property="useNumber" column="use_number" jdbcType="VARCHAR"/>
|
||||
<result property="number" column="number" jdbcType="INTEGER"/>
|
||||
<result property="leftNumber" column="left_number" jdbcType="VARCHAR"/>
|
||||
<result property="amount" column="amount" jdbcType="NUMERIC"/>
|
||||
<result property="limitAmount" column="limit_amount" jdbcType="NUMERIC"/>
|
||||
<result property="isShow" column="is_show" jdbcType="INTEGER"/>
|
||||
<result property="pic" column="pic" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="ratio" column="ratio" jdbcType="NUMERIC"/>
|
||||
<result property="maxRatioAmount" column="max_ratio_amount" jdbcType="NUMERIC"/>
|
||||
<result property="track" column="track" jdbcType="VARCHAR"/>
|
||||
<result property="classType" column="class_type" jdbcType="VARCHAR"/>
|
||||
<result property="effectType" column="effect_type" jdbcType="INTEGER"/>
|
||||
<result property="effectDays" column="effect_days" jdbcType="INTEGER"/>
|
||||
<result property="relationIds" column="relation_ids" jdbcType="VARCHAR"/>
|
||||
<result property="relationList" column="relation_list" jdbcType="VARCHAR"/>
|
||||
<result property="editor" column="editor" jdbcType="VARCHAR"/>
|
||||
<result property="note" column="note" jdbcType="VARCHAR"/>
|
||||
<result property="createdAt" column="created_at" jdbcType="INTEGER"/>
|
||||
<result property="updatedAt" column="updated_at" jdbcType="INTEGER"/>
|
||||
<result property="furnishMeal" column="furnish_meal" jdbcType="INTEGER"/>
|
||||
<result property="furnishExpress" column="furnish_express" jdbcType="INTEGER"/>
|
||||
<result property="furnishDraw" column="furnish_draw" jdbcType="INTEGER"/>
|
||||
<result property="furnishVir" column="furnish_vir" jdbcType="INTEGER"/>
|
||||
<result property="disableDistribute" column="disable_distribute" jdbcType="INTEGER"/>
|
||||
<result property="merchantId" column="merchant_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbMerchantCouponMap">
|
||||
select
|
||||
id, status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number,use_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id
|
||||
from tb_merchant_coupon
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,71 +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.chaozhanggui.system.cashierservice.dao.TbParamsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="integral_ratio" jdbcType="DECIMAL" property="integralRatio" />
|
||||
<result column="trade_ratio" jdbcType="DECIMAL" property="tradeRatio" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, integral_ratio, trade_ratio
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_params
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_params
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
insert into tb_params (id, integral_ratio, trade_ratio
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{integralRatio,jdbcType=DECIMAL}, #{tradeRatio,jdbcType=DECIMAL}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
insert into tb_params
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="integralRatio != null">
|
||||
integral_ratio,
|
||||
</if>
|
||||
<if test="tradeRatio != null">
|
||||
trade_ratio,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="integralRatio != null">
|
||||
#{integralRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="tradeRatio != null">
|
||||
#{tradeRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
update tb_params
|
||||
<set>
|
||||
<if test="integralRatio != null">
|
||||
integral_ratio = #{integralRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="tradeRatio != null">
|
||||
trade_ratio = #{tradeRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
update tb_params
|
||||
set integral_ratio = #{integralRatio,jdbcType=DECIMAL},
|
||||
trade_ratio = #{tradeRatio,jdbcType=DECIMAL}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,198 +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.chaozhanggui.system.cashierservice.dao.TbPlussDeviceGoodsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="deviceLogo" jdbcType="VARCHAR" property="devicelogo" />
|
||||
<result column="introDesc" jdbcType="VARCHAR" property="introdesc" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="tagId" jdbcType="INTEGER" property="tagid" />
|
||||
<result column="depositFlag" jdbcType="VARCHAR" property="depositflag" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
|
||||
<result column="detail" jdbcType="LONGVARCHAR" property="detail" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, code, name, deviceLogo, introDesc, sort, status, tagId, depositFlag, createTime,
|
||||
updateTime
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
detail
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from tb_pluss_device_goods
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_device_goods
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
|
||||
insert into tb_pluss_device_goods (id, code, name,
|
||||
deviceLogo, introDesc, sort,
|
||||
status, tagId, depositFlag,
|
||||
createTime, updateTime, detail
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{devicelogo,jdbcType=VARCHAR}, #{introdesc,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
|
||||
#{status,jdbcType=INTEGER}, #{tagid,jdbcType=INTEGER}, #{depositflag,jdbcType=VARCHAR},
|
||||
#{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, #{detail,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
|
||||
insert into tb_pluss_device_goods
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="devicelogo != null">
|
||||
deviceLogo,
|
||||
</if>
|
||||
<if test="introdesc != null">
|
||||
introDesc,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="tagid != null">
|
||||
tagId,
|
||||
</if>
|
||||
<if test="depositflag != null">
|
||||
depositFlag,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
updateTime,
|
||||
</if>
|
||||
<if test="detail != null">
|
||||
detail,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="devicelogo != null">
|
||||
#{devicelogo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="introdesc != null">
|
||||
#{introdesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tagid != null">
|
||||
#{tagid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="depositflag != null">
|
||||
#{depositflag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
#{updatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="detail != null">
|
||||
#{detail,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
|
||||
update tb_pluss_device_goods
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="devicelogo != null">
|
||||
deviceLogo = #{devicelogo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="introdesc != null">
|
||||
introDesc = #{introdesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tagid != null">
|
||||
tagId = #{tagid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="depositflag != null">
|
||||
depositFlag = #{depositflag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatetime != null">
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="detail != null">
|
||||
detail = #{detail,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
|
||||
update tb_pluss_device_goods
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
deviceLogo = #{devicelogo,jdbcType=VARCHAR},
|
||||
introDesc = #{introdesc,jdbcType=VARCHAR},
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
tagId = #{tagid,jdbcType=INTEGER},
|
||||
depositFlag = #{depositflag,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||
detail = #{detail,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
|
||||
update tb_pluss_device_goods
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
deviceLogo = #{devicelogo,jdbcType=VARCHAR},
|
||||
introDesc = #{introdesc,jdbcType=VARCHAR},
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
tagId = #{tagid,jdbcType=INTEGER},
|
||||
depositFlag = #{depositflag,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,271 +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.chaozhanggui.system.cashierservice.dao.TbReceiptSalesMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="logo" jdbcType="VARCHAR" property="logo" />
|
||||
<result column="show_contact_info" jdbcType="BIT" property="showContactInfo" />
|
||||
<result column="show_member" jdbcType="BIT" property="showMember" />
|
||||
<result column="show_member_code" jdbcType="BIT" property="showMemberCode" />
|
||||
<result column="show_member_score" jdbcType="BIT" property="showMemberScore" />
|
||||
<result column="show_member_wallet" jdbcType="BIT" property="showMemberWallet" />
|
||||
<result column="footer_remark" jdbcType="VARCHAR" property="footerRemark" />
|
||||
<result column="show_cash_charge" jdbcType="BIT" property="showCashCharge" />
|
||||
<result column="show_serial_no" jdbcType="BIT" property="showSerialNo" />
|
||||
<result column="big_serial_no" jdbcType="BIT" property="bigSerialNo" />
|
||||
<result column="header_text" jdbcType="VARCHAR" property="headerText" />
|
||||
<result column="header_text_align" jdbcType="VARCHAR" property="headerTextAlign" />
|
||||
<result column="footer_text" jdbcType="VARCHAR" property="footerText" />
|
||||
<result column="footer_text_align" jdbcType="VARCHAR" property="footerTextAlign" />
|
||||
<result column="footer_image" jdbcType="VARCHAR" property="footerImage" />
|
||||
<result column="pre_print" jdbcType="VARCHAR" property="prePrint" />
|
||||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, title, logo, show_contact_info, show_member, show_member_code, show_member_score,
|
||||
show_member_wallet, footer_remark, show_cash_charge, show_serial_no, big_serial_no,
|
||||
header_text, header_text_align, footer_text, footer_text_align, footer_image, pre_print,
|
||||
created_at, updated_at
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_receipt_sales
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_receipt_sales
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
|
||||
insert into tb_receipt_sales (id, title, logo,
|
||||
show_contact_info, show_member, show_member_code,
|
||||
show_member_score, show_member_wallet, footer_remark,
|
||||
show_cash_charge, show_serial_no, big_serial_no,
|
||||
header_text, header_text_align, footer_text,
|
||||
footer_text_align, footer_image, pre_print,
|
||||
created_at, updated_at)
|
||||
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
|
||||
#{showContactInfo,jdbcType=BIT}, #{showMember,jdbcType=BIT}, #{showMemberCode,jdbcType=BIT},
|
||||
#{showMemberScore,jdbcType=BIT}, #{showMemberWallet,jdbcType=BIT}, #{footerRemark,jdbcType=VARCHAR},
|
||||
#{showCashCharge,jdbcType=BIT}, #{showSerialNo,jdbcType=BIT}, #{bigSerialNo,jdbcType=BIT},
|
||||
#{headerText,jdbcType=VARCHAR}, #{headerTextAlign,jdbcType=VARCHAR}, #{footerText,jdbcType=VARCHAR},
|
||||
#{footerTextAlign,jdbcType=VARCHAR}, #{footerImage,jdbcType=VARCHAR}, #{prePrint,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
|
||||
insert into tb_receipt_sales
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="title != null">
|
||||
title,
|
||||
</if>
|
||||
<if test="logo != null">
|
||||
logo,
|
||||
</if>
|
||||
<if test="showContactInfo != null">
|
||||
show_contact_info,
|
||||
</if>
|
||||
<if test="showMember != null">
|
||||
show_member,
|
||||
</if>
|
||||
<if test="showMemberCode != null">
|
||||
show_member_code,
|
||||
</if>
|
||||
<if test="showMemberScore != null">
|
||||
show_member_score,
|
||||
</if>
|
||||
<if test="showMemberWallet != null">
|
||||
show_member_wallet,
|
||||
</if>
|
||||
<if test="footerRemark != null">
|
||||
footer_remark,
|
||||
</if>
|
||||
<if test="showCashCharge != null">
|
||||
show_cash_charge,
|
||||
</if>
|
||||
<if test="showSerialNo != null">
|
||||
show_serial_no,
|
||||
</if>
|
||||
<if test="bigSerialNo != null">
|
||||
big_serial_no,
|
||||
</if>
|
||||
<if test="headerText != null">
|
||||
header_text,
|
||||
</if>
|
||||
<if test="headerTextAlign != null">
|
||||
header_text_align,
|
||||
</if>
|
||||
<if test="footerText != null">
|
||||
footer_text,
|
||||
</if>
|
||||
<if test="footerTextAlign != null">
|
||||
footer_text_align,
|
||||
</if>
|
||||
<if test="footerImage != null">
|
||||
footer_image,
|
||||
</if>
|
||||
<if test="prePrint != null">
|
||||
pre_print,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="logo != null">
|
||||
#{logo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="showContactInfo != null">
|
||||
#{showContactInfo,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMember != null">
|
||||
#{showMember,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMemberCode != null">
|
||||
#{showMemberCode,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMemberScore != null">
|
||||
#{showMemberScore,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMemberWallet != null">
|
||||
#{showMemberWallet,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="footerRemark != null">
|
||||
#{footerRemark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="showCashCharge != null">
|
||||
#{showCashCharge,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showSerialNo != null">
|
||||
#{showSerialNo,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="bigSerialNo != null">
|
||||
#{bigSerialNo,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="headerText != null">
|
||||
#{headerText,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="headerTextAlign != null">
|
||||
#{headerTextAlign,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="footerText != null">
|
||||
#{footerText,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="footerTextAlign != null">
|
||||
#{footerTextAlign,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="footerImage != null">
|
||||
#{footerImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prePrint != null">
|
||||
#{prePrint,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
|
||||
update tb_receipt_sales
|
||||
<set>
|
||||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="logo != null">
|
||||
logo = #{logo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="showContactInfo != null">
|
||||
show_contact_info = #{showContactInfo,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMember != null">
|
||||
show_member = #{showMember,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMemberCode != null">
|
||||
show_member_code = #{showMemberCode,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMemberScore != null">
|
||||
show_member_score = #{showMemberScore,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showMemberWallet != null">
|
||||
show_member_wallet = #{showMemberWallet,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="footerRemark != null">
|
||||
footer_remark = #{footerRemark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="showCashCharge != null">
|
||||
show_cash_charge = #{showCashCharge,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="showSerialNo != null">
|
||||
show_serial_no = #{showSerialNo,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="bigSerialNo != null">
|
||||
big_serial_no = #{bigSerialNo,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="headerText != null">
|
||||
header_text = #{headerText,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="headerTextAlign != null">
|
||||
header_text_align = #{headerTextAlign,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="footerText != null">
|
||||
footer_text = #{footerText,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="footerTextAlign != null">
|
||||
footer_text_align = #{footerTextAlign,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="footerImage != null">
|
||||
footer_image = #{footerImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prePrint != null">
|
||||
pre_print = #{prePrint,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
|
||||
update tb_receipt_sales
|
||||
set title = #{title,jdbcType=VARCHAR},
|
||||
logo = #{logo,jdbcType=VARCHAR},
|
||||
show_contact_info = #{showContactInfo,jdbcType=BIT},
|
||||
show_member = #{showMember,jdbcType=BIT},
|
||||
show_member_code = #{showMemberCode,jdbcType=BIT},
|
||||
show_member_score = #{showMemberScore,jdbcType=BIT},
|
||||
show_member_wallet = #{showMemberWallet,jdbcType=BIT},
|
||||
footer_remark = #{footerRemark,jdbcType=VARCHAR},
|
||||
show_cash_charge = #{showCashCharge,jdbcType=BIT},
|
||||
show_serial_no = #{showSerialNo,jdbcType=BIT},
|
||||
big_serial_no = #{bigSerialNo,jdbcType=BIT},
|
||||
header_text = #{headerText,jdbcType=VARCHAR},
|
||||
header_text_align = #{headerTextAlign,jdbcType=VARCHAR},
|
||||
footer_text = #{footerText,jdbcType=VARCHAR},
|
||||
footer_text_align = #{footerTextAlign,jdbcType=VARCHAR},
|
||||
footer_image = #{footerImage,jdbcType=VARCHAR},
|
||||
pre_print = #{prePrint,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,125 +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.chaozhanggui.system.cashierservice.dao.TbReleaseFlowMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="num" jdbcType="DECIMAL" property="num" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="from_source" jdbcType="VARCHAR" property="fromSource" />
|
||||
<result column="operation_type" jdbcType="VARCHAR" property="operationType" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, num, type, remark, from_source, create_time,operation_type
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_release_flow
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow"
|
||||
parameterType="java.lang.String">
|
||||
select * from tb_release_flow where user_id = #{userId}
|
||||
</select>
|
||||
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
|
||||
select trf.*,tui.nick_name as nickName,tui.mini_app_open_id as openId from tb_release_flow trf left join tb_user_info tui on trf.user_id = tui.id
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_release_flow
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
|
||||
insert into tb_release_flow (id, user_id, num,
|
||||
type, remark, from_source,
|
||||
create_time,operation_type)
|
||||
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
|
||||
#{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{fromSource,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{operationType,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
|
||||
insert into tb_release_flow
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="fromSource != null">
|
||||
from_source,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fromSource != null">
|
||||
#{fromSource,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
|
||||
update tb_release_flow
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fromSource != null">
|
||||
from_source = #{fromSource,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
|
||||
update tb_release_flow
|
||||
set user_id = #{userId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=DECIMAL},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
from_source = #{fromSource,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,199 +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.chaozhanggui.system.cashierservice.dao.TbRenewalsPayLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="pay_type" jdbcType="VARCHAR" property="payType" />
|
||||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
|
||||
<result column="open_id" jdbcType="VARCHAR" property="openId" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="attach" jdbcType="VARCHAR" property="attach" />
|
||||
<result column="expired_at" jdbcType="BIGINT" property="expiredAt" />
|
||||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, pay_type, shop_id, order_id, open_id, user_id, transaction_id, amount, status,
|
||||
remark, attach, expired_at, created_at, updated_at
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_renewals_pay_log
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_renewals_pay_log
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
|
||||
insert into tb_renewals_pay_log (id, pay_type, shop_id,
|
||||
order_id, open_id, user_id,
|
||||
transaction_id, amount, status,
|
||||
remark, attach, expired_at,
|
||||
created_at, updated_at)
|
||||
values (#{id,jdbcType=INTEGER}, #{payType,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
|
||||
#{orderId,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
|
||||
#{transactionId,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT},
|
||||
#{remark,jdbcType=VARCHAR}, #{attach,jdbcType=VARCHAR}, #{expiredAt,jdbcType=BIGINT},
|
||||
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
|
||||
insert into tb_renewals_pay_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
pay_type,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
order_id,
|
||||
</if>
|
||||
<if test="openId != null">
|
||||
open_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="transactionId != null">
|
||||
transaction_id,
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="attach != null">
|
||||
attach,
|
||||
</if>
|
||||
<if test="expiredAt != null">
|
||||
expired_at,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
#{payType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
#{orderId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="openId != null">
|
||||
#{openId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="transactionId != null">
|
||||
#{transactionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
#{amount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attach != null">
|
||||
#{attach,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="expiredAt != null">
|
||||
#{expiredAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
|
||||
update tb_renewals_pay_log
|
||||
<set>
|
||||
<if test="payType != null">
|
||||
pay_type = #{payType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="openId != null">
|
||||
open_id = #{openId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="transactionId != null">
|
||||
transaction_id = #{transactionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount = #{amount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attach != null">
|
||||
attach = #{attach,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="expiredAt != null">
|
||||
expired_at = #{expiredAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
|
||||
update tb_renewals_pay_log
|
||||
set pay_type = #{payType,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
order_id = #{orderId,jdbcType=VARCHAR},
|
||||
open_id = #{openId,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
transaction_id = #{transactionId,jdbcType=VARCHAR},
|
||||
amount = #{amount,jdbcType=DECIMAL},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
attach = #{attach,jdbcType=VARCHAR},
|
||||
expired_at = #{expiredAt,jdbcType=BIGINT},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,143 +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.chaozhanggui.system.cashierservice.dao.TbShopCashSpreadMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
|
||||
<result column="sale_receipt" jdbcType="LONGVARCHAR" property="saleReceipt" />
|
||||
<result column="triplicate_receipt" jdbcType="LONGVARCHAR" property="triplicateReceipt" />
|
||||
<result column="screen_config" jdbcType="LONGVARCHAR" property="screenConfig" />
|
||||
<result column="tag_config" jdbcType="LONGVARCHAR" property="tagConfig" />
|
||||
<result column="scale_config" jdbcType="LONGVARCHAR" property="scaleConfig" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, created_at, updated_at
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
sale_receipt, triplicate_receipt, screen_config, tag_config, scale_config
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from tb_shop_cash_spread
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_shop_cash_spread
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
|
||||
insert into tb_shop_cash_spread (id, created_at, updated_at,
|
||||
sale_receipt, triplicate_receipt,
|
||||
screen_config, tag_config, scale_config
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
|
||||
#{saleReceipt,jdbcType=LONGVARCHAR}, #{triplicateReceipt,jdbcType=LONGVARCHAR},
|
||||
#{screenConfig,jdbcType=LONGVARCHAR}, #{tagConfig,jdbcType=LONGVARCHAR}, #{scaleConfig,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
|
||||
insert into tb_shop_cash_spread
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="saleReceipt != null">
|
||||
sale_receipt,
|
||||
</if>
|
||||
<if test="triplicateReceipt != null">
|
||||
triplicate_receipt,
|
||||
</if>
|
||||
<if test="screenConfig != null">
|
||||
screen_config,
|
||||
</if>
|
||||
<if test="tagConfig != null">
|
||||
tag_config,
|
||||
</if>
|
||||
<if test="scaleConfig != null">
|
||||
scale_config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="saleReceipt != null">
|
||||
#{saleReceipt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="triplicateReceipt != null">
|
||||
#{triplicateReceipt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="screenConfig != null">
|
||||
#{screenConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="tagConfig != null">
|
||||
#{tagConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scaleConfig != null">
|
||||
#{scaleConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
|
||||
update tb_shop_cash_spread
|
||||
<set>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="saleReceipt != null">
|
||||
sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="triplicateReceipt != null">
|
||||
triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="screenConfig != null">
|
||||
screen_config = #{screenConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="tagConfig != null">
|
||||
tag_config = #{tagConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scaleConfig != null">
|
||||
scale_config = #{scaleConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
|
||||
update tb_shop_cash_spread
|
||||
set created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR},
|
||||
triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR},
|
||||
screen_config = #{screenConfig,jdbcType=LONGVARCHAR},
|
||||
tag_config = #{tagConfig,jdbcType=LONGVARCHAR},
|
||||
scale_config = #{scaleConfig,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread">
|
||||
update tb_shop_cash_spread
|
||||
set created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
232
src/main/resources/mapper/TbShopCouponMapper.xml
Normal file
232
src/main/resources/mapper/TbShopCouponMapper.xml
Normal file
@@ -0,0 +1,232 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.TbShopCouponMapper">
|
||||
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbShopCoupon" id="TbShopCouponMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="VARCHAR"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="fullAmount" column="full_amount" jdbcType="INTEGER"/>
|
||||
<result property="discountAmount" column="discount_amount" jdbcType="INTEGER"/>
|
||||
<result property="description" column="description" jdbcType="VARCHAR"/>
|
||||
<result property="number" column="number" jdbcType="INTEGER"/>
|
||||
<result property="leftNumber" column="left_number" jdbcType="INTEGER"/>
|
||||
<result property="validityType" column="validity_type" jdbcType="VARCHAR"/>
|
||||
<result property="validDays" column="valid_days" jdbcType="INTEGER"/>
|
||||
<result property="daysToTakeEffect" column="days_to_take_effect" jdbcType="INTEGER"/>
|
||||
<result property="validStartTime" column="valid_start_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="validEndTime" column="valid_end_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="userDays" column="user_days" jdbcType="VARCHAR"/>
|
||||
<result property="useTimeType" column="use_time_type" jdbcType="VARCHAR"/>
|
||||
<result property="useStartTime" column="use_start_time" jdbcType="VARCHAR"/>
|
||||
<result property="useEndTime" column="use_end_time" jdbcType="VARCHAR"/>
|
||||
<result property="useNumber" column="use_number" jdbcType="INTEGER"/>
|
||||
<result property="editor" column="editor" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, shop_id, title, type, full_amount, discount_amount, description, number, left_number, validity_type, valid_days, days_to_take_effect, valid_start_time, valid_end_time, user_days, use_time_type, use_start_time, use_end_time, use_number, editor, status, create_time, update_time </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbShopCouponMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_shop_coupon
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAll" resultMap="TbShopCouponMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_shop_coupon
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="shopId != null and shopId != ''">
|
||||
and shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
and title = #{title}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="fullAmount != null">
|
||||
and full_amount = #{fullAmount}
|
||||
</if>
|
||||
<if test="discountAmount != null">
|
||||
and discount_amount = #{discountAmount}
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
and description = #{description}
|
||||
</if>
|
||||
<if test="number != null">
|
||||
and number = #{number}
|
||||
</if>
|
||||
<if test="leftNumber != null">
|
||||
and left_number = #{leftNumber}
|
||||
</if>
|
||||
<if test="validityType != null and validityType != ''">
|
||||
and validity_type = #{validityType}
|
||||
</if>
|
||||
<if test="validDays != null">
|
||||
and valid_days = #{validDays}
|
||||
</if>
|
||||
<if test="daysToTakeEffect != null">
|
||||
and days_to_take_effect = #{daysToTakeEffect}
|
||||
</if>
|
||||
<if test="validStartTime != null">
|
||||
and valid_start_time = #{validStartTime}
|
||||
</if>
|
||||
<if test="validEndTime != null">
|
||||
and valid_end_time = #{validEndTime}
|
||||
</if>
|
||||
<if test="userDays != null and userDays != ''">
|
||||
and user_days = #{userDays}
|
||||
</if>
|
||||
<if test="useTimeType != null and useTimeType != ''">
|
||||
and use_time_type = #{useTimeType}
|
||||
</if>
|
||||
<if test="useStartTime != null">
|
||||
and use_start_time = #{useStartTime}
|
||||
</if>
|
||||
<if test="useEndTime != null">
|
||||
and use_end_time = #{useEndTime}
|
||||
</if>
|
||||
<if test="useNumber != null">
|
||||
and use_number = #{useNumber}
|
||||
</if>
|
||||
<if test="editor != null and editor != ''">
|
||||
and editor = #{editor}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_shop_coupon(shop_id, title, type, full_amount, discount_amount, description, number, left_number,
|
||||
validity_type, valid_days, days_to_take_effect, valid_start_time, valid_end_time,
|
||||
user_days, use_time_type, use_start_time, use_end_time, use_number, editor, status,
|
||||
create_time, update_time)
|
||||
values (#{shopId}, #{title}, #{type}, #{fullAmount}, #{discountAmount}, #{description}, #{number},
|
||||
#{leftNumber}, #{validityType}, #{validDays}, #{daysToTakeEffect}, #{validStartTime}, #{validEndTime},
|
||||
#{userDays}, #{useTimeType}, #{useStartTime}, #{useEndTime}, #{useNumber}, #{editor}, #{status},
|
||||
#{createTime}, #{updateTime})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_shop_coupon(shop_id, title, type, full_amount, discount_amount, description, number, left_number,
|
||||
validity_type, valid_days, days_to_take_effect, valid_start_time, valid_end_time, user_days, use_time_type,
|
||||
use_start_time, use_end_time, use_number, editor, status, create_time, update_time)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.shopId}, #{entity.title}, #{entity.type}, #{entity.fullAmount}, #{entity.discountAmount},
|
||||
#{entity.description}, #{entity.number}, #{entity.leftNumber}, #{entity.validityType}, #{entity.validDays},
|
||||
#{entity.daysToTakeEffect}, #{entity.validStartTime}, #{entity.validEndTime}, #{entity.userDays},
|
||||
#{entity.useTimeType}, #{entity.useStartTime}, #{entity.useEndTime}, #{entity.useNumber}, #{entity.editor},
|
||||
#{entity.status}, #{entity.createTime}, #{entity.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update tb_shop_coupon
|
||||
<set>
|
||||
<if test="shopId != null and shopId != ''">
|
||||
shop_id = #{shopId},
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
title = #{title},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="fullAmount != null">
|
||||
full_amount = #{fullAmount},
|
||||
</if>
|
||||
<if test="discountAmount != null">
|
||||
discount_amount = #{discountAmount},
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
description = #{description},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
number = #{number},
|
||||
</if>
|
||||
<if test="leftNumber != null">
|
||||
left_number = #{leftNumber},
|
||||
</if>
|
||||
<if test="validityType != null and validityType != ''">
|
||||
validity_type = #{validityType},
|
||||
</if>
|
||||
<if test="validDays != null">
|
||||
valid_days = #{validDays},
|
||||
</if>
|
||||
<if test="daysToTakeEffect != null">
|
||||
days_to_take_effect = #{daysToTakeEffect},
|
||||
</if>
|
||||
<if test="validStartTime != null">
|
||||
valid_start_time = #{validStartTime},
|
||||
</if>
|
||||
<if test="validEndTime != null">
|
||||
valid_end_time = #{validEndTime},
|
||||
</if>
|
||||
<if test="userDays != null and userDays != ''">
|
||||
user_days = #{userDays},
|
||||
</if>
|
||||
<if test="useTimeType != null and useTimeType != ''">
|
||||
use_time_type = #{useTimeType},
|
||||
</if>
|
||||
<if test="useStartTime != null">
|
||||
use_start_time = #{useStartTime},
|
||||
</if>
|
||||
<if test="useEndTime != null">
|
||||
use_end_time = #{useEndTime},
|
||||
</if>
|
||||
<if test="useNumber != null">
|
||||
use_number = #{useNumber},
|
||||
</if>
|
||||
<if test="editor != null and editor != ''">
|
||||
editor = #{editor},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_shop_coupon
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user