Commit 790fd56b by 吕明尚

Merge branch 'refs/heads/dev' into test-lms

parents 9afbc973 28fbf923
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import share.common.annotation.Log;
import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.ConsumerSecondaryCard;
import share.system.domain.vo.ConsumerSecondaryCardVo;
import share.system.service.ConsumerSecondaryCardService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 用户次卡Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping("/system/consumerSecondaryCard")
public class ConsumerSecondaryCardController extends BaseController {
@Autowired
private ConsumerSecondaryCardService consumerSecondaryCardService;
/**
* 查询用户次卡列表
*/
@PreAuthorize("@ss.hasPermi('system:consumerSecondaryCard:list')")
@GetMapping("/list")
public TableDataInfo list(ConsumerSecondaryCardVo consumerSecondaryCard) {
startPage();
List<ConsumerSecondaryCardVo> list = consumerSecondaryCardService.selectConsumerSecondaryCardList(consumerSecondaryCard);
return getDataTable(list);
}
/**
* 导出用户次卡列表
*/
@PreAuthorize("@ss.hasPermi('system:consumerSecondaryCard:export')")
@Log(title = "用户次卡", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ConsumerSecondaryCardVo consumerSecondaryCard) {
List<ConsumerSecondaryCardVo> list = consumerSecondaryCardService.selectConsumerSecondaryCardList(consumerSecondaryCard);
ExcelUtil<ConsumerSecondaryCardVo> util = new ExcelUtil<ConsumerSecondaryCardVo>(ConsumerSecondaryCardVo.class);
util.exportExcel(response, list, "用户次卡数据");
}
/**
* 获取用户次卡详细信息
*/
@PreAuthorize("@ss.hasPermi('system:consumerSecondaryCard:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(consumerSecondaryCardService.selectConsumerSecondaryCardById(id));
}
/**
* 新增用户次卡
*/
@PreAuthorize("@ss.hasPermi('system:consumerSecondaryCard:add')")
@Log(title = "用户次卡", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ConsumerSecondaryCard consumerSecondaryCard) {
return toAjax(consumerSecondaryCardService.insertConsumerSecondaryCard(consumerSecondaryCard));
}
/**
* 修改用户次卡
*/
@PreAuthorize("@ss.hasPermi('system:consumerSecondaryCard:edit')")
@Log(title = "用户次卡", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ConsumerSecondaryCard consumerSecondaryCard) {
return toAjax(consumerSecondaryCardService.updateConsumerSecondaryCard(consumerSecondaryCard));
}
/**
* 删除用户次卡
*/
@PreAuthorize("@ss.hasPermi('system:consumerSecondaryCard:remove')")
@Log(title = "用户次卡", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(consumerSecondaryCardService.deleteConsumerSecondaryCardByIds(ids));
}
}
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import share.common.annotation.Log;
import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.SecondaryCardConf;
import share.system.domain.vo.SecondaryCardConfVo;
import share.system.service.SecondaryCardConfService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 次卡配置Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping("/system/secondaryCardConf")
public class SecondaryCardConfController extends BaseController {
@Autowired
private SecondaryCardConfService secondaryCardConfService;
/**
* 查询次卡配置列表
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardConf:list')")
@GetMapping("/list")
public TableDataInfo list(SecondaryCardConfVo secondaryCardConf) {
startPage();
List<SecondaryCardConfVo> list = secondaryCardConfService.selectSecondaryCardConfList(secondaryCardConf);
return getDataTable(list);
}
/**
* 导出次卡配置列表
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardConf:export')")
@Log(title = "次卡配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SecondaryCardConfVo secondaryCardConf) {
List<SecondaryCardConfVo> list = secondaryCardConfService.selectSecondaryCardConfList(secondaryCardConf);
ExcelUtil<SecondaryCardConfVo> util = new ExcelUtil<SecondaryCardConfVo>(SecondaryCardConfVo.class);
util.exportExcel(response, list, "次卡配置数据");
}
/**
* 获取次卡配置详细信息
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardConf:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(secondaryCardConfService.selectSecondaryCardConfById(id));
}
/**
* 新增次卡配置
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardConf:add')")
@Log(title = "次卡配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SecondaryCardConf secondaryCardConf) {
return toAjax(secondaryCardConfService.insertSecondaryCardConf(secondaryCardConf));
}
/**
* 修改次卡配置
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardConf:edit')")
@Log(title = "次卡配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SecondaryCardConf secondaryCardConf) {
return toAjax(secondaryCardConfService.updateSecondaryCardConf(secondaryCardConf));
}
/**
* 删除次卡配置
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardConf:remove')")
@Log(title = "次卡配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(secondaryCardConfService.deleteSecondaryCardConfByIds(ids));
}
}
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import share.common.annotation.Log;
import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.SecondaryCardLog;
import share.system.service.SecondaryCardLogService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 次卡使用记录Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping("/system/secondaryCardLog")
public class SecondaryCardLogController extends BaseController {
@Autowired
private SecondaryCardLogService secondaryCardLogService;
/**
* 查询次卡使用记录列表
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:list')")
@GetMapping("/list")
public TableDataInfo list(SecondaryCardLog secondaryCardLog) {
startPage();
List<SecondaryCardLog> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
return getDataTable(list);
}
/**
* 导出次卡使用记录列表
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:export')")
@Log(title = "次卡使用记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SecondaryCardLog secondaryCardLog) {
List<SecondaryCardLog> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
ExcelUtil<SecondaryCardLog> util = new ExcelUtil<SecondaryCardLog>(SecondaryCardLog.class);
util.exportExcel(response, list, "次卡使用记录数据");
}
/**
* 获取次卡使用记录详细信息
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(secondaryCardLogService.selectSecondaryCardLogById(id));
}
/**
* 新增次卡使用记录
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:add')")
@Log(title = "次卡使用记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SecondaryCardLog secondaryCardLog) {
return toAjax(secondaryCardLogService.insertSecondaryCardLog(secondaryCardLog));
}
/**
* 修改次卡使用记录
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:edit')")
@Log(title = "次卡使用记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SecondaryCardLog secondaryCardLog) {
return toAjax(secondaryCardLogService.updateSecondaryCardLog(secondaryCardLog));
}
/**
* 删除次卡使用记录
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:remove')")
@Log(title = "次卡使用记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(secondaryCardLogService.deleteSecondaryCardLogByIds(ids));
}
}
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import share.common.annotation.Log;
import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.SecondaryCardOrder;
import share.system.service.SecondaryCardOrderService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 次卡购买记录Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping("/system/secondaryCardOrder")
public class SecondaryCardOrderController extends BaseController {
@Autowired
private SecondaryCardOrderService secondaryCardOrderService;
/**
* 查询次卡购买记录列表
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:list')")
@GetMapping("/list")
public TableDataInfo list(SecondaryCardOrder secondaryCardOrder) {
startPage();
List<SecondaryCardOrder> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
return getDataTable(list);
}
/**
* 导出次卡购买记录列表
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:export')")
@Log(title = "次卡购买记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SecondaryCardOrder secondaryCardOrder) {
List<SecondaryCardOrder> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
ExcelUtil<SecondaryCardOrder> util = new ExcelUtil<SecondaryCardOrder>(SecondaryCardOrder.class);
util.exportExcel(response, list, "次卡购买记录数据");
}
/**
* 获取次卡购买记录详细信息
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(secondaryCardOrderService.selectSecondaryCardOrderById(id));
}
/**
* 新增次卡购买记录
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:add')")
@Log(title = "次卡购买记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SecondaryCardOrder secondaryCardOrder) {
return toAjax(secondaryCardOrderService.insertSecondaryCardOrder(secondaryCardOrder));
}
/**
* 修改次卡购买记录
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:edit')")
@Log(title = "次卡购买记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SecondaryCardOrder secondaryCardOrder) {
return toAjax(secondaryCardOrderService.updateSecondaryCardOrder(secondaryCardOrder));
}
/**
* 删除次卡购买记录
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:remove')")
@Log(title = "次卡购买记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(secondaryCardOrderService.deleteSecondaryCardOrderByIds(ids));
}
}
......@@ -10,7 +10,13 @@ public enum OrderTypeEnum {
RESERVER(1,"reserver","预定"),
RENEW(2,"renew","续费"),
RECHARGE(3, "recharge", "充值"),
RIGHTS(4, "rights", "权益");
RIGHTS(4, "rights", "权益"),
//次卡
SECONDARY_CARD(5, "secondary_card", "次卡"),
//月卡
MONTH_CARD(6, "month_card", "月卡"),
;
private Integer code;
private String value;
......
......@@ -4,6 +4,8 @@ public enum StoreStatusEnum {
// 0:停业 1:正常营业
STOP("0", "停业"),
NORMAL("1", "正常营业"),
//维修中
REPAIR("2", "维修中"),
;
private String index;
......
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import share.common.core.controller.BaseController;
import share.common.core.page.TableDataInfo;
import share.system.domain.vo.ConsumerSecondaryCardVo;
import share.system.service.ConsumerSecondaryCardService;
import java.util.List;
/**
* 用户次卡Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping("/consumerSecondaryCard")
public class ConsumerSecondaryCardController extends BaseController {
@Autowired
private ConsumerSecondaryCardService consumerSecondaryCardService;
/**
* 查询用户次卡列表
*/
@GetMapping("/list")
public TableDataInfo list(ConsumerSecondaryCardVo consumerSecondaryCard) {
startPage();
List<ConsumerSecondaryCardVo> list = consumerSecondaryCardService.selectConsumerSecondaryCardList(consumerSecondaryCard);
return getDataTable(list);
}
}
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import share.common.core.controller.BaseController;
import share.common.core.page.TableDataInfo;
import share.system.domain.vo.SecondaryCardConfVo;
import share.system.service.SecondaryCardConfService;
import java.util.List;
/**
* 次卡配置Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping("/secondaryCardConf")
public class SecondaryCardConfController extends BaseController {
@Autowired
private SecondaryCardConfService secondaryCardConfService;
/**
* 查询次卡配置列表
*/
@GetMapping("/list")
public TableDataInfo list(SecondaryCardConfVo secondaryCardConf) {
startPage();
List<SecondaryCardConfVo> list = secondaryCardConfService.selectSecondaryCardConfList(secondaryCardConf);
return getDataTable(list);
}
}
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import share.common.core.controller.BaseController;
import share.common.core.page.TableDataInfo;
import share.system.domain.SecondaryCardLog;
import share.system.service.SecondaryCardLogService;
import java.util.List;
/**
* 次卡使用记录Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping("/secondaryCardLog")
public class SecondaryCardLogController extends BaseController {
@Autowired
private SecondaryCardLogService secondaryCardLogService;
/**
* 查询次卡使用记录列表
*/
@GetMapping("/list")
public TableDataInfo list(SecondaryCardLog secondaryCardLog) {
startPage();
List<SecondaryCardLog> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
return getDataTable(list);
}
}
package share.web.controller.system;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import share.common.core.controller.BaseController;
import share.common.core.domain.R;
import share.common.core.page.TableDataInfo;
import share.common.core.redis.RedisUtil;
import share.common.utils.JsonConvertUtil;
import share.system.domain.SecondaryCardOrder;
import share.system.request.SecondaryCardOrderRequest;
import share.system.response.SecondaryCardOrderPayResultResponse;
import share.system.service.SecondaryCardOrderService;
import java.util.List;
/**
* 次卡购买记录Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@Slf4j
@RestController
@RequestMapping("/secondaryCardOrder")
public class SecondaryCardOrderController extends BaseController {
@Autowired
private SecondaryCardOrderService secondaryCardOrderService;
@Autowired
private RedisUtil redisUtil;
/**
* 查询次卡购买记录列表
*/
@GetMapping("/list")
public TableDataInfo list(SecondaryCardOrder secondaryCardOrder) {
startPage();
List<SecondaryCardOrder> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
return getDataTable(list);
}
@PostMapping("/createSecondaryCardOrder")
public R<SecondaryCardOrderPayResultResponse> createOrder(@RequestBody @Validated SecondaryCardOrderRequest request) {
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.debug("SecondaryCardOrderController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
}
SecondaryCardOrderPayResultResponse response = secondaryCardOrderService.createSecondaryCardOrder(request);
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.debug("SecondaryCardOrderController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
}
return R.ok(response);
}
}
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 用户次卡对象 s_consumer_secondary_card
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public class ConsumerSecondaryCard extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 次卡配置表id
*/
@Excel(name = "次卡配置表id")
private Long secondaryCardConfId;
/**
* 用户ID
*/
@Excel(name = "用户ID")
private Long consumerId;
/**
* 用户手机号
*/
@Excel(name = "用户手机号")
private String phone;
/**
* 套餐id
*/
@Excel(name = "套餐id")
private Long packId;
// /**
// * 次卡有效期
// */
// @Excel(name = "次卡有效期")
// private Long validityPeriod;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "次卡有效期", width = 30, dateFormat = "yyyy-MM-dd")
private Date expirationDate;
/**
* 次卡次数
*/
@Excel(name = "次卡次数")
private Integer number;
/**
* 删除标记:1-删除,0-正常
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField(select = false)
private Integer isDelete;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("secondaryCardConfId", getSecondaryCardConfId())
.append("consumerId", getConsumerId())
.append("phone", getPhone())
.append("packId", getPackId())
.append("expirationDate", getExpirationDate())
.append("number", getNumber())
.append("isDelete", getIsDelete())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
import java.math.BigDecimal;
/**
* 次卡配置对象 s_secondary_card_conf
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public class SecondaryCardConf extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 配置名称
*/
@Excel(name = "配置名称")
private String name;
/**
* 次卡金额
*/
@Excel(name = "次卡金额")
private BigDecimal secondaryCardAmount;
/**
* 套餐id
*/
@Excel(name = "套餐id")
private Long packId;
/**
* 次卡有效期
*/
@Excel(name = "次卡有效期")
private Integer validityPeriod;
/**
* 次卡次数
*/
@Excel(name = "次卡次数")
private Integer number;
/**
* 是否删除(0:否,1:是)
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField(select = false)
private Long isDelete;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("secondaryCardAmount", getSecondaryCardAmount())
.append("packId", getPackId())
.append("validityPeriod", getValidityPeriod())
.append("number", getNumber())
.append("isDelete", getIsDelete())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
/**
* 次卡使用记录对象 s_secondary_card_log
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public class SecondaryCardLog extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 用户次卡id
*/
@Excel(name = "用户次卡id")
private Long consumerSecondaryCardId;
/**
* 用户ID
*/
@Excel(name = "用户ID")
private Long consumerId;
/**
* 用户手机号
*/
@Excel(name = "用户手机号")
private String phone;
/**
* 套餐id
*/
@Excel(name = "套餐id")
private Long packId;
/**
* 使用次数
*/
@Excel(name = "使用次数")
private Long usageCount;
/**
* 剩余次数
*/
@Excel(name = "剩余次数")
private Long residueCount;
/**
* 删除标记:1-删除,0-正常
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField(select = false)
private Long isDelete;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("consumerSecondaryCardId", getConsumerSecondaryCardId())
.append("consumerId", getConsumerId())
.append("phone", getPhone())
.append("packId", getPackId())
.append("usageCount", getUsageCount())
.append("residueCount", getResidueCount())
.append("isDelete", getIsDelete())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
/**
* 次卡购买记录对象 s_secondary_card_order
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public class SecondaryCardOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 次卡购买记录编号
*/
@Excel(name = "次卡购买记录编号")
private String secondaryCardNo;
/**
* 扫呗平台唯一订单号
*/
@Excel(name = "扫呗平台唯一订单号")
private String outTradeNo;
/**
* 商户订单号
*/
@Excel(name = "商户订单号")
private String terminalTrace;
/**
* 次卡购买金额
*/
@Excel(name = "次卡购买金额")
private BigDecimal secondaryCardAmount;
/**
* 次卡配置表id
*/
@Excel(name = "次卡配置表id")
private Long secondaryCardConfId;
/**
* 次卡用户ID
*/
@Excel(name = "次卡用户ID")
private Long consumerId;
/**
* 次卡用户手机号
*/
@Excel(name = "次卡用户手机号")
private String phone;
/**
* 支付方式
*/
@Excel(name = "支付方式")
private Integer payType;
/**
* 状态:0-待支付,1-支付成功,2-退款中,3-退款完成
*/
@Excel(name = "状态:0-待支付,1-支付成功,2-退款中,3-退款完成")
private Integer payStatus;
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date payTime;
/**
* 删除标记:1-删除,0-正常
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField(select = false)
private Long isDelete;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("secondaryCardNo", getSecondaryCardNo())
.append("outTradeNo", getOutTradeNo())
.append("terminalTrace", getTerminalTrace())
.append("secondaryCardAmount", getSecondaryCardAmount())
.append("secondaryCardConfId", getSecondaryCardConfId())
.append("consumerId", getConsumerId())
.append("phone", getPhone())
.append("payType", getPayType())
.append("payStatus", getPayStatus())
.append("payTime", getPayTime())
.append("isDelete", getIsDelete())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.ConsumerSecondaryCard;
import java.math.BigDecimal;
@Data
public class ConsumerSecondaryCardVo extends ConsumerSecondaryCard {
//用户昵称
private String nickName;
//用户头像
private String avatar;
//套餐名称
private String packName;
//套餐金额
private BigDecimal packPrice;
//配置名称
private String confName;
//次卡金额
private BigDecimal confAmount;
}
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.SecondaryCardConf;
import java.math.BigDecimal;
@Data
public class SecondaryCardConfVo extends SecondaryCardConf {
//套餐名称
private String packName;
//套餐金额
private BigDecimal packPrice;
}
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.SecondaryCardLog;
import java.math.BigDecimal;
@Data
public class SecondaryCardLogVo extends SecondaryCardLog {
//用户昵称
private String nickName;
//用户头像
private String avatar;
//套餐名称
private String packName;
//套餐金额
private BigDecimal packPrice;
}
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.SecondaryCardOrder;
import java.math.BigDecimal;
@Data
public class SecondaryCardOrderVo extends SecondaryCardOrder {
//用户昵称
private String nickName;
//用户头像
private String avatar;
//套餐名称
private String packName;
//套餐金额
private BigDecimal packPrice;
//配置名称
private String confName;
//次卡金额
private BigDecimal confAmount;
}
package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.ConsumerSecondaryCard;
import share.system.domain.vo.ConsumerSecondaryCardVo;
import java.util.List;
/**
* 用户次卡Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface ConsumerSecondaryCardMapper extends BaseMapper<ConsumerSecondaryCard> {
/**
* 查询用户次卡
*
* @param id 用户次卡主键
* @return 用户次卡
*/
public ConsumerSecondaryCard selectConsumerSecondaryCardById(Long id);
/**
* 查询用户次卡列表
*
* @param consumerSecondaryCard 用户次卡
* @return 用户次卡集合
*/
public List<ConsumerSecondaryCardVo> selectConsumerSecondaryCardList(ConsumerSecondaryCardVo consumerSecondaryCard);
/**
* 新增用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public int insertConsumerSecondaryCard(ConsumerSecondaryCard consumerSecondaryCard);
/**
* 修改用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public int updateConsumerSecondaryCard(ConsumerSecondaryCard consumerSecondaryCard);
/**
* 删除用户次卡
*
* @param id 用户次卡主键
* @return 结果
*/
public int deleteConsumerSecondaryCardById(Long id);
/**
* 批量删除用户次卡
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteConsumerSecondaryCardByIds(Long[] ids);
}
package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SecondaryCardConf;
import share.system.domain.vo.SecondaryCardConfVo;
import java.util.List;
/**
* 次卡配置Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface SecondaryCardConfMapper extends BaseMapper<SecondaryCardConf> {
/**
* 查询次卡配置
*
* @param id 次卡配置主键
* @return 次卡配置
*/
public SecondaryCardConf selectSecondaryCardConfById(Long id);
/**
* 查询次卡配置列表
*
* @param secondaryCardConf 次卡配置
* @return 次卡配置集合
*/
public List<SecondaryCardConfVo> selectSecondaryCardConfList(SecondaryCardConfVo secondaryCardConf);
/**
* 新增次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public int insertSecondaryCardConf(SecondaryCardConf secondaryCardConf);
/**
* 修改次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public int updateSecondaryCardConf(SecondaryCardConf secondaryCardConf);
/**
* 删除次卡配置
*
* @param id 次卡配置主键
* @return 结果
*/
public int deleteSecondaryCardConfById(Long id);
/**
* 批量删除次卡配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSecondaryCardConfByIds(Long[] ids);
}
package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SecondaryCardLog;
import java.util.List;
/**
* 次卡使用记录Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface SecondaryCardLogMapper extends BaseMapper<SecondaryCardLog> {
/**
* 查询次卡使用记录
*
* @param id 次卡使用记录主键
* @return 次卡使用记录
*/
public SecondaryCardLog selectSecondaryCardLogById(Long id);
/**
* 查询次卡使用记录列表
*
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录集合
*/
public List<SecondaryCardLog> selectSecondaryCardLogList(SecondaryCardLog secondaryCardLog);
/**
* 新增次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public int insertSecondaryCardLog(SecondaryCardLog secondaryCardLog);
/**
* 修改次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public int updateSecondaryCardLog(SecondaryCardLog secondaryCardLog);
/**
* 删除次卡使用记录
*
* @param id 次卡使用记录主键
* @return 结果
*/
public int deleteSecondaryCardLogById(Long id);
/**
* 批量删除次卡使用记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSecondaryCardLogByIds(Long[] ids);
}
package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SecondaryCardOrder;
import java.util.List;
/**
* 次卡购买记录Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface SecondaryCardOrderMapper extends BaseMapper<SecondaryCardOrder> {
/**
* 查询次卡购买记录
*
* @param id 次卡购买记录主键
* @return 次卡购买记录
*/
public SecondaryCardOrder selectSecondaryCardOrderById(Long id);
/**
* 查询次卡购买记录列表
*
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录集合
*/
public List<SecondaryCardOrder> selectSecondaryCardOrderList(SecondaryCardOrder secondaryCardOrder);
/**
* 新增次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public int insertSecondaryCardOrder(SecondaryCardOrder secondaryCardOrder);
/**
* 修改次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public int updateSecondaryCardOrder(SecondaryCardOrder secondaryCardOrder);
/**
* 删除次卡购买记录
*
* @param id 次卡购买记录主键
* @return 结果
*/
public int deleteSecondaryCardOrderById(Long id);
/**
* 批量删除次卡购买记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSecondaryCardOrderByIds(Long[] ids);
SecondaryCardOrder getInfoByEntity(SecondaryCardOrder secondaryCardOrderParam);
}
package share.system.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SecondaryCardOrderRequest对象", description = "次卡下单请求对象")
public class SecondaryCardOrderRequest {
@ApiModelProperty(value = "支付类型(1:微信,2:支付宝)", required = true)
@NotNull(message = "支付类型不能为空")
private Integer payType;
@ApiModelProperty(value = "次卡配置表id")
@NotNull(message = "次卡配置表id")
private Long secondaryCardConfId;
}
package share.system.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import share.system.domain.vo.WxPayJsResultVo;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SecondaryCardOrderPayResultResponse对象", description = "订单支付结果响应对象")
public class SecondaryCardOrderPayResultResponse {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "支付状态")
private Boolean status;
@ApiModelProperty(value = "微信调起支付参数对象")
private WxPayJsResultVo jsConfig;
@ApiModelProperty(value = "支付类型")
private String payType;
@ApiModelProperty(value = "订单编号")
private String secondaryCardNo;
@ApiModelProperty(value = "微信支付回调的url")
private String notifyUrl;
}
package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.ConsumerSecondaryCard;
import share.system.domain.vo.ConsumerSecondaryCardVo;
import java.util.List;
/**
* 用户次卡Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface ConsumerSecondaryCardService extends IService<ConsumerSecondaryCard> {
/**
* 查询用户次卡
*
* @param id 用户次卡主键
* @return 用户次卡
*/
public ConsumerSecondaryCard selectConsumerSecondaryCardById(Long id);
/**
* 查询用户次卡列表
*
* @param consumerSecondaryCard 用户次卡
* @return 用户次卡集合
*/
public List<ConsumerSecondaryCardVo> selectConsumerSecondaryCardList(ConsumerSecondaryCardVo consumerSecondaryCard);
/**
* 新增用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public int insertConsumerSecondaryCard(ConsumerSecondaryCard consumerSecondaryCard);
/**
* 修改用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public int updateConsumerSecondaryCard(ConsumerSecondaryCard consumerSecondaryCard);
/**
* 批量删除用户次卡
*
* @param ids 需要删除的用户次卡主键集合
* @return 结果
*/
public int deleteConsumerSecondaryCardByIds(Long[] ids);
/**
* 删除用户次卡信息
*
* @param id 用户次卡主键
* @return 结果
*/
public int deleteConsumerSecondaryCardById(Long id);
}
......@@ -3,9 +3,11 @@ package share.system.service;
import share.system.domain.EquityMembersOrder;
import share.system.domain.Recharge;
import share.system.domain.SOrder;
import share.system.domain.SecondaryCardOrder;
import share.system.response.EquityMembersResultResponse;
import share.system.response.OrderPayResultResponse;
import share.system.response.RechargePayResultResponse;
import share.system.response.SecondaryCardOrderPayResultResponse;
/**
* @Author wwl
......@@ -36,4 +38,5 @@ public interface OrderPayService {
EquityMembersResultResponse saobeiEquityMembersOrderPayment(EquityMembersOrder equityMembersOrder);
SecondaryCardOrderPayResultResponse saobeiSecondaryCardOrderPayment(SecondaryCardOrder secondaryCardOrder);
}
package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.SecondaryCardConf;
import share.system.domain.vo.SecondaryCardConfVo;
import java.util.List;
/**
* 次卡配置Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface SecondaryCardConfService extends IService<SecondaryCardConf> {
/**
* 查询次卡配置
*
* @param id 次卡配置主键
* @return 次卡配置
*/
public SecondaryCardConf selectSecondaryCardConfById(Long id);
/**
* 查询次卡配置列表
*
* @param secondaryCardConf 次卡配置
* @return 次卡配置集合
*/
public List<SecondaryCardConfVo> selectSecondaryCardConfList(SecondaryCardConfVo secondaryCardConf);
/**
* 新增次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public int insertSecondaryCardConf(SecondaryCardConf secondaryCardConf);
/**
* 修改次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public int updateSecondaryCardConf(SecondaryCardConf secondaryCardConf);
/**
* 批量删除次卡配置
*
* @param ids 需要删除的次卡配置主键集合
* @return 结果
*/
public int deleteSecondaryCardConfByIds(Long[] ids);
/**
* 删除次卡配置信息
*
* @param id 次卡配置主键
* @return 结果
*/
public int deleteSecondaryCardConfById(Long id);
}
package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.SecondaryCardLog;
import java.util.List;
/**
* 次卡使用记录Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface SecondaryCardLogService extends IService<SecondaryCardLog> {
/**
* 查询次卡使用记录
*
* @param id 次卡使用记录主键
* @return 次卡使用记录
*/
public SecondaryCardLog selectSecondaryCardLogById(Long id);
/**
* 查询次卡使用记录列表
*
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录集合
*/
public List<SecondaryCardLog> selectSecondaryCardLogList(SecondaryCardLog secondaryCardLog);
/**
* 新增次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public int insertSecondaryCardLog(SecondaryCardLog secondaryCardLog);
/**
* 修改次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public int updateSecondaryCardLog(SecondaryCardLog secondaryCardLog);
/**
* 批量删除次卡使用记录
*
* @param ids 需要删除的次卡使用记录主键集合
* @return 结果
*/
public int deleteSecondaryCardLogByIds(Long[] ids);
/**
* 删除次卡使用记录信息
*
* @param id 次卡使用记录主键
* @return 结果
*/
public int deleteSecondaryCardLogById(Long id);
}
package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.SecondaryCardOrder;
import share.system.request.SecondaryCardOrderRequest;
import share.system.response.SecondaryCardOrderPayResultResponse;
import java.util.List;
/**
* 次卡购买记录Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public interface SecondaryCardOrderService extends IService<SecondaryCardOrder> {
/**
* 查询次卡购买记录
*
* @param id 次卡购买记录主键
* @return 次卡购买记录
*/
public SecondaryCardOrder selectSecondaryCardOrderById(Long id);
/**
* 查询次卡购买记录列表
*
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录集合
*/
public List<SecondaryCardOrder> selectSecondaryCardOrderList(SecondaryCardOrder secondaryCardOrder);
/**
* 新增次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public int insertSecondaryCardOrder(SecondaryCardOrder secondaryCardOrder);
/**
* 修改次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public int updateSecondaryCardOrder(SecondaryCardOrder secondaryCardOrder);
/**
* 批量删除次卡购买记录
*
* @param ids 需要删除的次卡购买记录主键集合
* @return 结果
*/
public int deleteSecondaryCardOrderByIds(Long[] ids);
/**
* 删除次卡购买记录信息
*
* @param id 次卡购买记录主键
* @return 结果
*/
public int deleteSecondaryCardOrderById(Long id);
SecondaryCardOrderPayResultResponse createSecondaryCardOrder(SecondaryCardOrderRequest request);
void paymentSuccessful(SecondaryCardOrder secondaryCardOrder);
SecondaryCardOrder getInfoByEntity(SecondaryCardOrder secondaryCardOrderParam);
}
......@@ -73,6 +73,9 @@ public class CallbackServiceImpl implements CallbackService {
@Autowired
private EquityMembersOrderService equityMembersOrderService;
@Autowired
private SecondaryCardOrderService secondaryCardOrderService;
/**
* 微信支付回调
*/
......@@ -537,6 +540,84 @@ public class CallbackServiceImpl implements CallbackService {
return responseVo;
}
break;
case SECONDARY_CARD:
logger.debug("开始次卡订单回调");
SecondaryCardOrder secondaryCardOrderParam = new SecondaryCardOrder();
secondaryCardOrderParam.setTerminalTrace(param.getTerminal_trace());
secondaryCardOrderParam.setConsumerId(attachVo.getUserId());
SecondaryCardOrder secondaryCardOrder = secondaryCardOrderService.getInfoByEntity(secondaryCardOrderParam);
if (ObjectUtil.isNull(secondaryCardOrder)) {
logger.error("saobei wechat pay error : 订单信息不存在==》" + param.getTerminal_trace());
responseVo.setReturn_code(SaobeiStatusEnum.FAIL.getCode());
responseVo.setReturn_msg("订单信息不存在!");
// 保存api日志
saobeiApiLog.setResponseParams(JSONUtil.toJsonStr(responseVo));
saobeiApiLog.setResult(responseVo.getReturn_code());
saobeiApiLog.setResultMsg(responseVo.getReturn_msg());
saobeiApiLog.setOutTradeNo(param.getOut_trade_no());
saobeiApiLogService.insertSaobeiApiLog(saobeiApiLog);
return responseVo;
}
if (YesNoEnum.yes.getIndex().equals(secondaryCardOrder.getPayStatus())) {
logger.error("saobei wechat pay error : 订单已处理==》" + param.getTerminal_trace());
responseVo.setReturn_code(SaobeiStatusEnum.SUCCESS.getCode());
responseVo.setReturn_msg("success");
// 保存api日志
saobeiApiLog.setResponseParams(JSONUtil.toJsonStr(responseVo));
saobeiApiLog.setResult(responseVo.getReturn_code());
saobeiApiLog.setResultMsg(responseVo.getReturn_msg());
saobeiApiLog.setOutTradeNo(param.getOut_trade_no());
saobeiApiLogService.insertSaobeiApiLog(saobeiApiLog);
return responseVo;
}
WechatPayInfo secondaryCardOrderPayInfo = wechatPayInfoService.getByNo(secondaryCardOrder.getTerminalTrace());
if (ObjectUtil.isNull(secondaryCardOrderPayInfo)) {
logger.error("saobei wechat pay error : 微信订单信息不存在==》" + param.getTerminal_trace());
responseVo.setReturn_code(SaobeiStatusEnum.FAIL.getCode());
responseVo.setReturn_msg("微信订单信息不存在!");
// 保存api日志
saobeiApiLog.setResponseParams(JSONUtil.toJsonStr(responseVo));
saobeiApiLog.setResult(responseVo.getReturn_code());
saobeiApiLog.setResultMsg(responseVo.getReturn_msg());
saobeiApiLog.setOutTradeNo(param.getOut_trade_no());
saobeiApiLogService.insertSaobeiApiLog(saobeiApiLog);
return responseVo;
}
// wechatPayInfo.setIsSubscribe(param.getIsSubscribe());
secondaryCardOrderPayInfo.setBankType(param.getBank_type());
secondaryCardOrderPayInfo.setCashFee(Integer.valueOf(param.getTotal_fee()));
// wechatPayInfo.setTransactionId(param.getOut_trade_no());
secondaryCardOrderPayInfo.setTimeEnd(param.getEnd_time());
secondaryCardOrderPayInfo.setTimeExpire(param.getEnd_time());
Boolean secondaryCardBoolean = Boolean.FALSE;
try {
secondaryCardOrder.setPayStatus(YesNoEnum.yes.getIndex());
secondaryCardOrder.setPayTime(DateUtils.getNowDate());
secondaryCardOrderService.paymentSuccessful(secondaryCardOrder);
secondaryCardOrderPayInfo.setTradeState("1");
secondaryCardOrderPayInfo.setTradeStateDesc("支付成功");
wechatPayInfoService.updateById(secondaryCardOrderPayInfo);
secondaryCardBoolean = Boolean.TRUE;
} catch (Exception e) {
logger.error("微信支付回调出错");
logger.error(e.toString());
}
logger.debug("结束权益会员订单回调");
if (!secondaryCardBoolean) {
logger.error("saobei wechat pay error : 订单更新失败==》" + param.getTerminal_trace());
responseVo.setReturn_code(SaobeiStatusEnum.FAIL.getCode());
responseVo.setReturn_msg("订单更新失败!");
// 保存api日志
saobeiApiLog.setResponseParams(JSONUtil.toJsonStr(responseVo));
saobeiApiLog.setResult(responseVo.getReturn_code());
saobeiApiLog.setResultMsg(responseVo.getReturn_msg());
saobeiApiLog.setOutTradeNo(param.getOut_trade_no());
saobeiApiLogService.insertSaobeiApiLog(saobeiApiLog);
return responseVo;
}
break;
default:
logger.error("wechat pay err : 未知的支付类型==》" + param.getTerminal_trace());
break;
......
package share.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.common.utils.DateUtils;
import share.system.domain.ConsumerSecondaryCard;
import share.system.domain.vo.ConsumerSecondaryCardVo;
import share.system.mapper.ConsumerSecondaryCardMapper;
import share.system.service.ConsumerSecondaryCardService;
import java.util.List;
/**
* 用户次卡Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecondaryCardMapper, ConsumerSecondaryCard> implements ConsumerSecondaryCardService {
@Autowired
private ConsumerSecondaryCardMapper consumerSecondaryCardMapper;
/**
* 查询用户次卡
*
* @param id 用户次卡主键
* @return 用户次卡
*/
@Override
public ConsumerSecondaryCard selectConsumerSecondaryCardById(Long id) {
return consumerSecondaryCardMapper.selectConsumerSecondaryCardById(id);
}
/**
* 查询用户次卡列表
*
* @param consumerSecondaryCard 用户次卡
* @return 用户次卡
*/
@Override
public List<ConsumerSecondaryCardVo> selectConsumerSecondaryCardList(ConsumerSecondaryCardVo consumerSecondaryCard) {
return consumerSecondaryCardMapper.selectConsumerSecondaryCardList(consumerSecondaryCard);
}
/**
* 新增用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
@Override
public int insertConsumerSecondaryCard(ConsumerSecondaryCard consumerSecondaryCard) {
consumerSecondaryCard.setCreateTime(DateUtils.getNowDate());
return consumerSecondaryCardMapper.insertConsumerSecondaryCard(consumerSecondaryCard);
}
/**
* 修改用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
@Override
public int updateConsumerSecondaryCard(ConsumerSecondaryCard consumerSecondaryCard) {
consumerSecondaryCard.setUpdateTime(DateUtils.getNowDate());
return consumerSecondaryCardMapper.updateConsumerSecondaryCard(consumerSecondaryCard);
}
/**
* 批量删除用户次卡
*
* @param ids 需要删除的用户次卡主键
* @return 结果
*/
@Override
public int deleteConsumerSecondaryCardByIds(Long[] ids) {
return consumerSecondaryCardMapper.deleteConsumerSecondaryCardByIds(ids);
}
/**
* 删除用户次卡信息
*
* @param id 用户次卡主键
* @return 结果
*/
@Override
public int deleteConsumerSecondaryCardById(Long id) {
return consumerSecondaryCardMapper.deleteConsumerSecondaryCardById(id);
}
}
......@@ -20,14 +20,12 @@ import share.common.exception.base.BaseException;
import share.common.utils.BaseUtil;
import share.common.utils.DateUtil;
import share.common.utils.JsonConvertUtil;
import share.system.domain.EquityMembersOrder;
import share.system.domain.Recharge;
import share.system.domain.SConsumerToken;
import share.system.domain.SOrder;
import share.system.domain.*;
import share.system.domain.vo.*;
import share.system.response.EquityMembersResultResponse;
import share.system.response.OrderPayResultResponse;
import share.system.response.RechargePayResultResponse;
import share.system.response.SecondaryCardOrderPayResultResponse;
import share.system.service.*;
import share.system.util.WxPayUtil;
......@@ -62,6 +60,10 @@ public class OrderPayServiceImpl implements OrderPayService {
private RechargeService rechargeService;
@Autowired
private EquityMembersOrderService equityMembersOrderService;
@Autowired
private SecondaryCardOrderService secondaryCardOrderService;
@Autowired
private SecondaryCardConfService secondaryCardConfService;
/**
* 获取域名
......@@ -405,4 +407,77 @@ public class OrderPayServiceImpl implements OrderPayService {
return vo;
}
@Override
public SecondaryCardOrderPayResultResponse saobeiSecondaryCardOrderPayment(SecondaryCardOrder secondaryCardOrder) {
SecondaryCardOrderPayResultResponse response = new SecondaryCardOrderPayResultResponse();
response.setSecondaryCardNo(secondaryCardOrder.getSecondaryCardNo());
response.setPayType(PayTypeEnum.getEnumByCode(secondaryCardOrder.getPayType()).getValue());
response.setStatus(YesNoEnum.no.getFlag());
// 扫呗支付
ConcurrentHashMap<String, String> unifiedorder = saobeiUnifiedSecondaryCardOrder(secondaryCardOrder);
WxPayJsResultVo vo = new WxPayJsResultVo();
vo.setAppId(unifiedorder.get("appId"));
vo.setNonceStr(unifiedorder.get("nonceStr"));
vo.setPackages(unifiedorder.get("package"));
vo.setSignType(unifiedorder.get("signType"));
vo.setTimeStamp(unifiedorder.get("timeStamp"));
vo.setPaySign(unifiedorder.get("paySign"));
// 更新商户订单号
secondaryCardOrder.setOutTradeNo(unifiedorder.get("outTradeNo"));
secondaryCardOrder.setTerminalTrace(unifiedorder.get("terminalTrace"));
secondaryCardOrderService.updateById(secondaryCardOrder);
response.setJsConfig(vo);
return response;
}
private ConcurrentHashMap<String, String> saobeiUnifiedSecondaryCardOrder(SecondaryCardOrder secondaryCardOrder) {
// 获取用户openId
SConsumerToken userToken = consumerTokenService.getTokenByUserId(secondaryCardOrder.getConsumerId());
if (ObjectUtil.isNull(userToken)) {
throw new BaseException("该用户没有openId");
}
// 获取appid、mch_id
// 微信签名key
String appId = weChatConfig.getAppId();
String mchId = weChatConfig.getMchId();
String signKey = weChatConfig.getSignKey();
// 获取扫呗微信预下单对象
SaobeiMiniPayRequestVo unifiedorderVo = getSaobeiUnifiedSecondaryCardOrderVo(secondaryCardOrder, userToken.getToken(), appId, mchId, signKey);
// 预下单(统一下单)
SaobeiMiniPayResponse response = saobeiService.wechatMinipay(unifiedorderVo);
logger.debug("SaobeiMiniPayResponse :", JsonConvertUtil.write2JsonStr(response));
// 组装前端预下单参数
ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
map.put("appId", response.getAppId());
map.put("nonceStr", response.getNonceStr());
map.put("package", response.getPackage_str());
map.put("signType", response.getSignType());
map.put("timeStamp", response.getTimeStamp());
map.put("paySign", response.getPaySign());
map.put("prepayTime", DateUtil.nowDateTimeStr());
map.put("outTradeNo", response.getOut_trade_no());
map.put("terminalTrace", unifiedorderVo.getTerminal_trace());
return map;
}
private SaobeiMiniPayRequestVo getSaobeiUnifiedSecondaryCardOrderVo(SecondaryCardOrder secondaryCardOrder, String openid, String appId, String mchId, String signKey) {
AttachVo attachVo = new AttachVo(OrderTypeEnum.SECONDARY_CARD.getValue(), secondaryCardOrder.getConsumerId());
SecondaryCardConf byId = secondaryCardConfService.getById(secondaryCardOrder.getSecondaryCardConfId());
SaobeiMiniPayRequestVo vo = new SaobeiMiniPayRequestVo();
vo.setSub_appid(appId);
vo.setMerchant_no(saobeiConfig.getMerchantNo());
vo.setTerminal_id(saobeiConfig.getTerminalId());
vo.setAttach(JSONObject.toJSONString(attachVo));
vo.setTerminal_trace(BaseUtil.getOrderNo("WXNO"));
vo.setTerminal_time(DateUtil.nowDate(Constants.DATE_TIME_FORMAT_NUM));
vo.setOrder_body(StrUtil.concat(true, "购买" + byId.getSecondaryCardAmount() + "元" + byId.getName() + "次卡"));
// 订单中使用的是BigDecimal,这里要转为Integer类型
vo.setTotal_fee(String.valueOf(secondaryCardOrder.getSecondaryCardAmount().multiply(BigDecimal.TEN).multiply(BigDecimal.TEN).intValue()));
vo.setNotify_url(apiDomain + PayConstants.SAOBEI_PAY_NOTIFY_API_URI);
vo.setTrade_type(PayConstants.WX_PAY_TRADE_TYPE_JS);
vo.setOpen_id(openid);
vo.setDevice_no("WEB");
return vo;
}
}
......@@ -198,7 +198,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
@Override
public int updateSStore(SStore sStore) {
sStore.setUpdateTime(DateUtils.getNowDate());
if (sStore.getStatus().equals(YesNoEnum.no.getIndex().toString())) {
if (sStore.getStatus().equals(StoreStatusEnum.STOP.getIndex())) {
//判断门店下是否有已支付.待使用,使用中订单
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SOrder::getStoreId, sStore.getId());
......@@ -278,10 +278,15 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
request.setStatus(YesNoEnum.yes.getIndex().toString());
}
listVoCheck(request);
SStore store = new SStore();
store.setStatus(request.getStatus());
store.setName(request.getName());
List<SStore> storeList = baseMapper.selectSStoreList(store);
// SStore store = new SStore();
// store.setStatus(request.getStatus());
// store.setName(request.getName());
LambdaQueryWrapper<SStore> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.ne(SStore::getStatus, StoreStatusEnum.STOP.getIndex());
if (StringUtils.isNotEmpty(request.getName())) {
queryWrapper.eq(SStore::getName, request.getName());
}
List<SStore> storeList = baseMapper.selectList(queryWrapper);
List<SStoreVo> voList = new ArrayList<>();
if (StringUtils.isNotBlank(request.getNowLongitude())) {
voList = convertDosToVosSortByDst(storeList, request);
......@@ -333,12 +338,19 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
}
vo.setOrderType(order.getOrderType());
} else {
vo.setOrderTimeType(2);
vo.setOrderTime(3L);
if (o.getStatus().equals(StoreStatusEnum.REPAIR.getIndex())) {
vo.setOrderTimeType(0);
vo.setOrderTime(0L);
} else {
vo.setOrderTimeType(2);
vo.setOrderTime(3L);
}
}
voList.add(vo);
});
return voList.stream().sorted(Comparator.comparing(storeVo -> Double.parseDouble(storeVo.getDistance()))).collect(Collectors.toList());
//排序条件 getStatus()从小到大并且getDistance()从小到大
voList.sort(Comparator.comparing(SStoreVo::getStatus).thenComparing(SStoreVo::getDistance));
// voList.stream().sorted(Comparator.comparing(storeVo -> Double.parseDouble(storeVo.getDistance()))).collect(Collectors.toList());
}
return voList;
}
......@@ -562,8 +574,9 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
List<SOrder> orderList = list.stream().filter(order ->
order.getRoomId().compareTo(room.getId()) == 0
&& order.getStatus().equals(OrderStatusEnum.UNUSED.getCode())
//预约开始时间是今天的
&& DateUtil.isSameDay(order.getPreStartDate(), DateUtil.date())
//预约开始时间是当前时间至之后的12小时内
&& order.getPreStartDate().compareTo(new Date()) >= 0
&& order.getPreStartDate().compareTo(DateUtils.addHours(new Date(), 12)) <= 0
).collect(Collectors.toList());
//按照预约开始时间排序
orderList.sort(Comparator.comparing(SOrder::getPreStartDate));
......
package share.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.common.utils.DateUtils;
import share.system.domain.SecondaryCardConf;
import share.system.domain.vo.SecondaryCardConfVo;
import share.system.mapper.SecondaryCardConfMapper;
import share.system.service.SecondaryCardConfService;
import java.util.List;
/**
* 次卡配置Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public class SecondaryCardConfServiceImpl extends ServiceImpl<SecondaryCardConfMapper, SecondaryCardConf> implements SecondaryCardConfService {
@Autowired
private SecondaryCardConfMapper secondaryCardConfMapper;
/**
* 查询次卡配置
*
* @param id 次卡配置主键
* @return 次卡配置
*/
@Override
public SecondaryCardConf selectSecondaryCardConfById(Long id) {
return secondaryCardConfMapper.selectSecondaryCardConfById(id);
}
/**
* 查询次卡配置列表
*
* @param secondaryCardConf 次卡配置
* @return 次卡配置
*/
@Override
public List<SecondaryCardConfVo> selectSecondaryCardConfList(SecondaryCardConfVo secondaryCardConf) {
return secondaryCardConfMapper.selectSecondaryCardConfList(secondaryCardConf);
}
/**
* 新增次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
@Override
public int insertSecondaryCardConf(SecondaryCardConf secondaryCardConf) {
secondaryCardConf.setCreateTime(DateUtils.getNowDate());
return secondaryCardConfMapper.insertSecondaryCardConf(secondaryCardConf);
}
/**
* 修改次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
@Override
public int updateSecondaryCardConf(SecondaryCardConf secondaryCardConf) {
secondaryCardConf.setUpdateTime(DateUtils.getNowDate());
return secondaryCardConfMapper.updateSecondaryCardConf(secondaryCardConf);
}
/**
* 批量删除次卡配置
*
* @param ids 需要删除的次卡配置主键
* @return 结果
*/
@Override
public int deleteSecondaryCardConfByIds(Long[] ids) {
return secondaryCardConfMapper.deleteSecondaryCardConfByIds(ids);
}
/**
* 删除次卡配置信息
*
* @param id 次卡配置主键
* @return 结果
*/
@Override
public int deleteSecondaryCardConfById(Long id) {
return secondaryCardConfMapper.deleteSecondaryCardConfById(id);
}
}
package share.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.common.utils.DateUtils;
import share.system.domain.SecondaryCardLog;
import share.system.mapper.SecondaryCardLogMapper;
import share.system.service.SecondaryCardLogService;
import java.util.List;
/**
* 次卡使用记录Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public class SecondaryCardLogServiceImpl extends ServiceImpl<SecondaryCardLogMapper, SecondaryCardLog> implements SecondaryCardLogService {
@Autowired
private SecondaryCardLogMapper secondaryCardLogMapper;
/**
* 查询次卡使用记录
*
* @param id 次卡使用记录主键
* @return 次卡使用记录
*/
@Override
public SecondaryCardLog selectSecondaryCardLogById(Long id) {
return secondaryCardLogMapper.selectSecondaryCardLogById(id);
}
/**
* 查询次卡使用记录列表
*
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录
*/
@Override
public List<SecondaryCardLog> selectSecondaryCardLogList(SecondaryCardLog secondaryCardLog) {
return secondaryCardLogMapper.selectSecondaryCardLogList(secondaryCardLog);
}
/**
* 新增次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
@Override
public int insertSecondaryCardLog(SecondaryCardLog secondaryCardLog) {
secondaryCardLog.setCreateTime(DateUtils.getNowDate());
return secondaryCardLogMapper.insertSecondaryCardLog(secondaryCardLog);
}
/**
* 修改次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
@Override
public int updateSecondaryCardLog(SecondaryCardLog secondaryCardLog) {
secondaryCardLog.setUpdateTime(DateUtils.getNowDate());
return secondaryCardLogMapper.updateSecondaryCardLog(secondaryCardLog);
}
/**
* 批量删除次卡使用记录
*
* @param ids 需要删除的次卡使用记录主键
* @return 结果
*/
@Override
public int deleteSecondaryCardLogByIds(Long[] ids) {
return secondaryCardLogMapper.deleteSecondaryCardLogByIds(ids);
}
/**
* 删除次卡使用记录信息
*
* @param id 次卡使用记录主键
* @return 结果
*/
@Override
public int deleteSecondaryCardLogById(Long id) {
return secondaryCardLogMapper.deleteSecondaryCardLogById(id);
}
}
package share.system.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.common.enums.YesNoEnum;
import share.common.exception.base.BaseException;
import share.common.utils.BaseUtil;
import share.common.utils.DateUtils;
import share.common.utils.bean.BeanUtils;
import share.system.domain.ConsumerSecondaryCard;
import share.system.domain.SConsumer;
import share.system.domain.SecondaryCardConf;
import share.system.domain.SecondaryCardOrder;
import share.system.domain.vo.FrontTokenComponent;
import share.system.mapper.SecondaryCardOrderMapper;
import share.system.request.SecondaryCardOrderRequest;
import share.system.response.SecondaryCardOrderPayResultResponse;
import share.system.service.*;
import java.util.Date;
import java.util.List;
/**
* 次卡购买记录Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrderMapper, SecondaryCardOrder> implements SecondaryCardOrderService {
@Autowired
private SecondaryCardOrderMapper secondaryCardOrderMapper;
@Autowired
private SConsumerService sConsumerService;
@Autowired
private OrderPayService orderPayService;
@Autowired
private SecondaryCardConfService secondaryCardConfService;
@Autowired
private ConsumerSecondaryCardService consumerSecondaryCardService;
/**
* 查询次卡购买记录
*
* @param id 次卡购买记录主键
* @return 次卡购买记录
*/
@Override
public SecondaryCardOrder selectSecondaryCardOrderById(Long id) {
return secondaryCardOrderMapper.selectSecondaryCardOrderById(id);
}
/**
* 查询次卡购买记录列表
*
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录
*/
@Override
public List<SecondaryCardOrder> selectSecondaryCardOrderList(SecondaryCardOrder secondaryCardOrder) {
return secondaryCardOrderMapper.selectSecondaryCardOrderList(secondaryCardOrder);
}
/**
* 新增次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
@Override
public int insertSecondaryCardOrder(SecondaryCardOrder secondaryCardOrder) {
secondaryCardOrder.setCreateTime(DateUtils.getNowDate());
return secondaryCardOrderMapper.insertSecondaryCardOrder(secondaryCardOrder);
}
/**
* 修改次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
@Override
public int updateSecondaryCardOrder(SecondaryCardOrder secondaryCardOrder) {
secondaryCardOrder.setUpdateTime(DateUtils.getNowDate());
return secondaryCardOrderMapper.updateSecondaryCardOrder(secondaryCardOrder);
}
/**
* 批量删除次卡购买记录
*
* @param ids 需要删除的次卡购买记录主键
* @return 结果
*/
@Override
public int deleteSecondaryCardOrderByIds(Long[] ids) {
return secondaryCardOrderMapper.deleteSecondaryCardOrderByIds(ids);
}
/**
* 删除次卡购买记录信息
*
* @param id 次卡购买记录主键
* @return 结果
*/
@Override
public int deleteSecondaryCardOrderById(Long id) {
return secondaryCardOrderMapper.deleteSecondaryCardOrderById(id);
}
@Override
public SecondaryCardOrderPayResultResponse createSecondaryCardOrder(SecondaryCardOrderRequest request) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
if (ObjectUtil.isNull(user)) {
throw new BaseException("您的登录已过期,请先登录");
}
if (StringUtils.isEmpty(user.getPhone())) {
user = sConsumerService.getById(user.getId());
if (StringUtils.isEmpty(user.getPhone())) {
throw new BaseException("请绑定手机号");
}
}
SecondaryCardOrder secondaryCardOrder = generatSecondaryCardOrder(request, user);
secondaryCardOrder.setCreateTime(new Date());
save(secondaryCardOrder);
SecondaryCardOrderPayResultResponse response = orderPayService.saobeiSecondaryCardOrderPayment(secondaryCardOrder);
return response;
}
private SecondaryCardOrder generatSecondaryCardOrder(SecondaryCardOrderRequest request, SConsumer user) {
SecondaryCardOrder secondaryCardOrder = new SecondaryCardOrder();
BeanUtils.copyProperties(request, secondaryCardOrder);
SecondaryCardConf byId = secondaryCardConfService.getById(request.getSecondaryCardConfId());
if (ObjectUtil.isEmpty(byId)) {
throw new BaseException("次卡配置异常");
}
secondaryCardOrder.setSecondaryCardNo(BaseUtil.getOrderNo("CK"));
secondaryCardOrder.setSecondaryCardAmount(byId.getSecondaryCardAmount());
secondaryCardOrder.setPayStatus(YesNoEnum.no.getIndex());
secondaryCardOrder.setConsumerId(user.getId());
secondaryCardOrder.setPhone(user.getPhone());
return secondaryCardOrder;
}
@Override
public void paymentSuccessful(SecondaryCardOrder secondaryCardOrder) {
ConsumerSecondaryCard consumerSecondaryCard = new ConsumerSecondaryCard();
SecondaryCardConf secondaryCardConf = secondaryCardConfService.getById(secondaryCardOrder.getSecondaryCardConfId());
consumerSecondaryCard.setSecondaryCardConfId(secondaryCardOrder.getSecondaryCardConfId());
consumerSecondaryCard.setConsumerId(secondaryCardOrder.getConsumerId());
consumerSecondaryCard.setPhone(secondaryCardOrder.getPhone());
consumerSecondaryCard.setPackId(secondaryCardConf.getPackId());
consumerSecondaryCard.setExpirationDate(DateUtils.addYears(new Date(), secondaryCardConf.getValidityPeriod()));
consumerSecondaryCard.setNumber(secondaryCardConf.getNumber());
consumerSecondaryCardService.save(consumerSecondaryCard);
}
@Override
public SecondaryCardOrder getInfoByEntity(SecondaryCardOrder secondaryCardOrderParam) {
return secondaryCardOrderMapper.getInfoByEntity(secondaryCardOrderParam);
}
}
<?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="share.system.mapper.ConsumerSecondaryCardMapper">
<resultMap type="ConsumerSecondaryCardVo" id="ConsumerSecondaryCardResult">
<result property="id" column="id"/>
<result property="secondaryCardConfId" column="secondary_card_conf_id"/>
<result property="confName" column="conf_name"/>
<result property="confAmount" column="conf_amount"/>
<result property="consumerId" column="consumer_id"/>
<result property="nickName" column="nick_name"/>
<result property="avatar" column="avatar"/>
<result property="phone" column="phone"/>
<result property="packId" column="pack_id"/>
<result property="packName" column="pack_name"/>
<result property="packPrice" column="pack_price"/>
<result property="expirationDate" column="expiration_date"/>
<result property="number" column="number"/>
<result property="isDelete" column="is_delete"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectConsumerSecondaryCardVo">
select id,
secondary_card_conf_id,
consumer_id,
phone,
pack_id,
expiration_date,
number,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_consumer_secondary_card
</sql>
<select id="selectConsumerSecondaryCardList" parameterType="ConsumerSecondaryCardVo"
resultMap="ConsumerSecondaryCardResult">
select c.id,
c.secondary_card_conf_id,
c.consumer_id,
c.phone,
m.nick_name,
m.avatar,
p.name as 'pack_name',
p.price as 'pack_price',
c2.name as 'conf_name',
c2.secondary_card_amount as 'conf_amount',
c. pack_id,
c.expiration_date,
c.number,
c.is_delete,
c.create_by,
c. create_time,
c. update_by,
c.update_time,
c. remark
from s_consumer_secondary_card c join s_consumer m on c.consumer_id = m.id
join s_pack p on c.pack_id = p.id join s_secondary_card_conf c2 on c.secondary_card_conf_id = c2.id
where
c.is_delete = 0
<if test="secondaryCardConfId != null ">and c.secondary_card_conf_id = #{secondaryCardConfId}</if>
<if test="consumerId != null ">and c.consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and c.phone = #{phone}</if>
<if test="packId != null ">and c.pack_id = #{packId}</if>
<if test="expirationDate != null ">and c.expiration_date = #{expirationDate}</if>
<if test="number != null ">and c.number = #{number}</if>
<if test="isDelete != null ">and c.is_delete = #{isDelete}</if>
</select>
<select id="selectConsumerSecondaryCardById" parameterType="Long" resultMap="ConsumerSecondaryCardResult">
<include refid="selectConsumerSecondaryCardVo"/>
where id = #{id}
</select>
<insert id="insertConsumerSecondaryCard" parameterType="ConsumerSecondaryCard" useGeneratedKeys="true"
keyProperty="id">
insert into s_consumer_secondary_card
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="secondaryCardConfId != null">secondary_card_conf_id,</if>
<if test="consumerId != null">consumer_id,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="packId != null">pack_id,</if>
<if test="expirationDate != null">expiration_date,</if>
<if test="number != null">number,</if>
<if test="isDelete != null">is_delete,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="secondaryCardConfId != null">#{secondaryCardConfId},</if>
<if test="consumerId != null">#{consumerId},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="packId != null">#{packId},</if>
<if test="expirationDate != null">#{expiration_date},</if>
<if test="number != null">#{number},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateConsumerSecondaryCard" parameterType="ConsumerSecondaryCard">
update s_consumer_secondary_card
<trim prefix="SET" suffixOverrides=",">
<if test="secondaryCardConfId != null">secondary_card_conf_id = #{secondaryCardConfId},</if>
<if test="consumerId != null">consumer_id = #{consumerId},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="packId != null">pack_id = #{packId},</if>
<if test="expirationDate != null">expiration_date = #{expirationDate},</if>
<if test="number != null">number = #{number},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteConsumerSecondaryCardById" parameterType="Long">
delete
from s_consumer_secondary_card
where id = #{id}
</delete>
<delete id="deleteConsumerSecondaryCardByIds" parameterType="String">
delete from s_consumer_secondary_card where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -166,7 +166,7 @@
and DATE_FORMAT(pre_start_date, '%Y-%m-%d') &gt;= DATE_FORMAT(#{preStartDate}, '%Y-%m-%d')
</if>
<if test="preEndDate != null">
and DATE_FORMAT(pre_end_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{preEndDate}, '%Y-%m-%d')
and DATE_FORMAT(pre_start_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{preEndDate}, '%Y-%m-%d')
</if>
<if test="startDate != null">
and DATE_FORMAT(create_time, '%Y-%m-%d') &gt;= DATE_FORMAT(#{startDate}, '%Y-%m-%d')
......
<?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="share.system.mapper.SecondaryCardConfMapper">
<resultMap type="SecondaryCardConfVo" id="SecondaryCardConfResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="secondaryCardAmount" column="secondary_card_amount"/>
<result property="packId" column="pack_id"/>
<result property="packName" column="pack_name"/>
<result property="packPrice" column="pack_price"/>
<result property="validityPeriod" column="validity_period"/>
<result property="number" column="number"/>
<result property="isDelete" column="is_delete"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectSecondaryCardConfVo">
select id,
name,
secondary_card_amount,
pack_id,
validity_period,
number,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_secondary_card_conf
</sql>
<select id="selectSecondaryCardConfList" parameterType="SecondaryCardConfVo" resultMap="SecondaryCardConfResult">
select c.id,
c.name,
c.secondary_card_amount,
c.pack_id,
p.name as pack_name,
p.price as pack_price,
c.validity_period,
c.number,
c.is_delete,
c.create_by,
c.create_time,
c.update_by,
c.update_time,
c.remark
from s_secondary_card_conf c join s_pack p on c.pack_id = p.id
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="secondaryCardAmount != null ">and secondary_card_amount = #{secondaryCardAmount}</if>
<if test="packId != null ">and pack_id = #{packId}</if>
<if test="validityPeriod != null ">and validity_period = #{validityPeriod}</if>
<if test="number != null ">and number = #{number}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectSecondaryCardConfById" parameterType="Long" resultMap="SecondaryCardConfResult">
<include refid="selectSecondaryCardConfVo"/>
where id = #{id}
</select>
<insert id="insertSecondaryCardConf" parameterType="SecondaryCardConf" useGeneratedKeys="true" keyProperty="id">
insert into s_secondary_card_conf
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="secondaryCardAmount != null">secondary_card_amount,</if>
<if test="packId != null">pack_id,</if>
<if test="validityPeriod != null">validity_period,</if>
<if test="number != null">number,</if>
<if test="isDelete != null">is_delete,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="secondaryCardAmount != null">#{secondaryCardAmount},</if>
<if test="packId != null">#{packId},</if>
<if test="validityPeriod != null">#{validityPeriod},</if>
<if test="number != null">#{number},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSecondaryCardConf" parameterType="SecondaryCardConf">
update s_secondary_card_conf
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="secondaryCardAmount != null">secondary_card_amount = #{secondaryCardAmount},</if>
<if test="packId != null">pack_id = #{packId},</if>
<if test="validityPeriod != null">validity_period = #{validityPeriod},</if>
<if test="number != null">number = #{number},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSecondaryCardConfById" parameterType="Long">
delete
from s_secondary_card_conf
where id = #{id}
</delete>
<delete id="deleteSecondaryCardConfByIds" parameterType="String">
delete from s_secondary_card_conf where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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="share.system.mapper.SecondaryCardLogMapper">
<resultMap type="SecondaryCardLogVo" id="SecondaryCardLogResult">
<result property="id" column="id"/>
<result property="consumerSecondaryCardId" column="consumer_secondary_card_id"/>
<result property="consumerId" column="consumer_id"/>
<result property="nickName" column="nick_name"/>
<result property="avatar" column="avatar"/>
<result property="phone" column="phone"/>
<result property="packId" column="pack_id"/>
<result property="packName" column="pack_name"/>
<result property="packPrice" column="pack_price"/>
<result property="usageCount" column="usage_count"/>
<result property="residueCount" column="residue_count"/>
<result property="isDelete" column="is_delete"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectSecondaryCardLogVo">
select id,
consumer_secondary_card_id,
consumer_id,
phone,
pack_id,
usage_count,
residue_count,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_secondary_card_log
</sql>
<select id="selectSecondaryCardLogList" parameterType="SecondaryCardLog" resultMap="SecondaryCardLogResult">
select l.id,
l.consumer_secondary_card_id,
l. consumer_id,
c.name as nick_name,
c.avatar,
l.phone,
l.pack_id,
p.name as pack_name,
p.price as pack_price,
l.usage_count,
l.residue_count,
l.is_delete,
l.create_by,
l.create_time,
l. update_by,
l.update_time,
l.remark
from s_secondary_card_log l join s_pack p on l.pack_id = p.id join s_consumer c on l.consumer_id = c.id
<where>
<if test="consumerSecondaryCardId != null ">and l.consumer_secondary_card_id = #{consumerSecondaryCardId}
</if>
<if test="consumerId != null ">and l.consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and l.phone = #{phone}</if>
<if test="packId != null ">and l.pack_id = #{packId}</if>
<if test="usageCount != null ">and l.usage_count = #{usageCount}</if>
<if test="residueCount != null ">and l.residue_count = #{residueCount}</if>
<if test="isDelete != null ">and l.is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectSecondaryCardLogById" parameterType="Long" resultMap="SecondaryCardLogResult">
<include refid="selectSecondaryCardLogVo"/>
where id = #{id}
</select>
<insert id="insertSecondaryCardLog" parameterType="SecondaryCardLog" useGeneratedKeys="true" keyProperty="id">
insert into s_secondary_card_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="consumerSecondaryCardId != null">consumer_secondary_card_id,</if>
<if test="consumerId != null">consumer_id,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="packId != null">pack_id,</if>
<if test="usageCount != null">usage_count,</if>
<if test="residueCount != null">residue_count,</if>
<if test="isDelete != null">is_delete,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="consumerSecondaryCardId != null">#{consumerSecondaryCardId},</if>
<if test="consumerId != null">#{consumerId},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="packId != null">#{packId},</if>
<if test="usageCount != null">#{usageCount},</if>
<if test="residueCount != null">#{residueCount},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSecondaryCardLog" parameterType="SecondaryCardLog">
update s_secondary_card_log
<trim prefix="SET" suffixOverrides=",">
<if test="consumerSecondaryCardId != null">consumer_secondary_card_id = #{consumerSecondaryCardId},</if>
<if test="consumerId != null">consumer_id = #{consumerId},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="packId != null">pack_id = #{packId},</if>
<if test="usageCount != null">usage_count = #{usageCount},</if>
<if test="residueCount != null">residue_count = #{residueCount},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSecondaryCardLogById" parameterType="Long">
delete
from s_secondary_card_log
where id = #{id}
</delete>
<delete id="deleteSecondaryCardLogByIds" parameterType="String">
delete from s_secondary_card_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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="share.system.mapper.SecondaryCardOrderMapper">
<resultMap type="SecondaryCardOrder" id="SecondaryCardOrderResult">
<result property="id" column="id"/>
<result property="secondaryCardNo" column="secondary_card_no"/>
<result property="outTradeNo" column="out_trade_no"/>
<result property="terminalTrace" column="terminal_trace"/>
<result property="secondaryCardAmount" column="secondary_card_amount"/>
<result property="secondaryCardConfId" column="secondary_card_conf_id"/>
<result property="consumerId" column="consumer_id"/>
<result property="phone" column="phone"/>
<result property="payType" column="pay_type"/>
<result property="payStatus" column="pay_status"/>
<result property="payTime" column="pay_time"/>
<result property="isDelete" column="is_delete"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectSecondaryCardOrderVo">
select id,
secondary_card_no,
out_trade_no,
terminal_trace,
secondary_card_amount,
secondary_card_conf_id,
consumer_id,
phone,
pay_type,
pay_status,
pay_time,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_secondary_card_order
</sql>
<select id="selectSecondaryCardOrderList" parameterType="SecondaryCardOrder" resultMap="SecondaryCardOrderResult">
<include refid="selectSecondaryCardOrderVo"/>
<where>
<if test="secondaryCardNo != null and secondaryCardNo != ''">and secondary_card_no = #{secondaryCardNo}
</if>
<if test="outTradeNo != null and outTradeNo != ''">and out_trade_no = #{outTradeNo}</if>
<if test="terminalTrace != null and terminalTrace != ''">and terminal_trace = #{terminalTrace}</if>
<if test="secondaryCardAmount != null ">and secondary_card_amount = #{secondaryCardAmount}</if>
<if test="secondaryCardConfId != null ">and secondary_card_conf_id = #{secondaryCardConfId}</if>
<if test="consumerId != null ">and consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="payType != null ">and pay_type = #{payType}</if>
<if test="payStatus != null ">and pay_status = #{payStatus}</if>
<if test="payTime != null ">and pay_time = #{payTime}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectSecondaryCardOrderById" parameterType="Long" resultMap="SecondaryCardOrderResult">
<include refid="selectSecondaryCardOrderVo"/>
where id = #{id}
</select>
<select id="getInfoByEntity" resultType="share.system.domain.SecondaryCardOrder">
<include refid="selectSecondaryCardOrderVo"/>
where terminal_trace=#{terminalTrace} and consumer_id=#{consumerId}
</select>
<insert id="insertSecondaryCardOrder" parameterType="SecondaryCardOrder" useGeneratedKeys="true" keyProperty="id">
insert into s_secondary_card_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="secondaryCardNo != null and secondaryCardNo != ''">secondary_card_no,</if>
<if test="outTradeNo != null">out_trade_no,</if>
<if test="terminalTrace != null">terminal_trace,</if>
<if test="secondaryCardAmount != null">secondary_card_amount,</if>
<if test="secondaryCardConfId != null">secondary_card_conf_id,</if>
<if test="consumerId != null">consumer_id,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="payType != null">pay_type,</if>
<if test="payStatus != null">pay_status,</if>
<if test="payTime != null">pay_time,</if>
<if test="isDelete != null">is_delete,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="secondaryCardNo != null and secondaryCardNo != ''">#{secondaryCardNo},</if>
<if test="outTradeNo != null">#{outTradeNo},</if>
<if test="terminalTrace != null">#{terminalTrace},</if>
<if test="secondaryCardAmount != null">#{secondaryCardAmount},</if>
<if test="secondaryCardConfId != null">#{secondaryCardConfId},</if>
<if test="consumerId != null">#{consumerId},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="payType != null">#{payType},</if>
<if test="payStatus != null">#{payStatus},</if>
<if test="payTime != null">#{payTime},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSecondaryCardOrder" parameterType="SecondaryCardOrder">
update s_secondary_card_order
<trim prefix="SET" suffixOverrides=",">
<if test="secondaryCardNo != null and secondaryCardNo != ''">secondary_card_no = #{secondaryCardNo},</if>
<if test="outTradeNo != null">out_trade_no = #{outTradeNo},</if>
<if test="terminalTrace != null">terminal_trace = #{terminalTrace},</if>
<if test="secondaryCardAmount != null">secondary_card_amount = #{secondaryCardAmount},</if>
<if test="secondaryCardConfId != null">secondary_card_conf_id = #{secondaryCardConfId},</if>
<if test="consumerId != null">consumer_id = #{consumerId},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="payType != null">pay_type = #{payType},</if>
<if test="payStatus != null">pay_status = #{payStatus},</if>
<if test="payTime != null">pay_time = #{payTime},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSecondaryCardOrderById" parameterType="Long">
delete
from s_secondary_card_order
where id = #{id}
</delete>
<delete id="deleteSecondaryCardOrderByIds" parameterType="String">
delete from s_secondary_card_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment