Commit e942d99d by 吕明尚

Merge branch 'refs/heads/dev' into test

# Conflicts:
#	share-system/src/main/java/share/system/service/impl/RoomStatusServiceImpl.java
#	share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
parents fc09c6ab cbd67306
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.ConsumerMonthlyCard;
import share.system.domain.vo.ConsumerMonthlyCardVo;
import share.system.service.ConsumerMonthlyCardService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 用户月卡Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@RestController
@RequestMapping("/system/consumerMonthlyCard")
public class ConsumerMonthlyCardController extends BaseController {
@Autowired
private ConsumerMonthlyCardService consumerMonthlyCardService;
/**
* 查询用户月卡列表
*/
@PreAuthorize("@ss.hasPermi('system:consumerMonthlyCard:list')")
@GetMapping("/list")
public TableDataInfo list(ConsumerMonthlyCardVo consumerMonthlyCard) {
startPage();
List<ConsumerMonthlyCardVo> list = consumerMonthlyCardService.selectConsumerMonthlyCardList(consumerMonthlyCard);
return getDataTable(list);
}
/**
* 导出用户月卡列表
*/
@PreAuthorize("@ss.hasPermi('system:consumerMonthlyCard:export')")
@Log(title = "用户月卡", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ConsumerMonthlyCardVo consumerMonthlyCard) {
List<ConsumerMonthlyCardVo> list = consumerMonthlyCardService.selectConsumerMonthlyCardList(consumerMonthlyCard);
ExcelUtil<ConsumerMonthlyCardVo> util = new ExcelUtil<ConsumerMonthlyCardVo>(ConsumerMonthlyCardVo.class);
util.exportExcel(response, list, "用户月卡数据");
}
/**
* 获取用户月卡详细信息
*/
@PreAuthorize("@ss.hasPermi('system:consumerMonthlyCard:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(consumerMonthlyCardService.selectConsumerMonthlyCardById(id));
}
/**
* 新增用户月卡
*/
@PreAuthorize("@ss.hasPermi('system:consumerMonthlyCard:add')")
@Log(title = "用户月卡", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ConsumerMonthlyCard consumerMonthlyCard) {
return toAjax(consumerMonthlyCardService.insertConsumerMonthlyCard(consumerMonthlyCard));
}
/**
* 修改用户月卡
*/
@PreAuthorize("@ss.hasPermi('system:consumerMonthlyCard:edit')")
@Log(title = "用户月卡", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ConsumerMonthlyCard consumerMonthlyCard) {
return toAjax(consumerMonthlyCardService.updateConsumerMonthlyCard(consumerMonthlyCard));
}
/**
* 删除用户月卡
*/
@PreAuthorize("@ss.hasPermi('system:consumerMonthlyCard:remove')")
@Log(title = "用户月卡", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(consumerMonthlyCardService.deleteConsumerMonthlyCardByIds(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.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));
}
}
...@@ -96,12 +96,25 @@ public class DeviceController extends BaseController ...@@ -96,12 +96,25 @@ public class DeviceController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:device:edit')") @PreAuthorize("@ss.hasPermi('system:device:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE) @Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PostMapping(value = "/updateDevicePassword")
public AjaxResult updateDevicePassword(@RequestBody Device device)
{
device.setDevPsw(device.getNewDevPsw());
return toAjax(deviceService.updateDevice(device));
}
/**
* 修改设备信息
*/
@PreAuthorize("@ss.hasPermi('system:device:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody Device device) public AjaxResult edit(@RequestBody Device device)
{ {
return toAjax(deviceService.updateDevice(device)); return toAjax(deviceService.updateDevice(device));
} }
/** /**
* 删除设备信息 * 删除设备信息
*/ */
......
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.MonthlyCardConf;
import share.system.service.MonthlyCardConfService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 月卡配置Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@RestController
@RequestMapping("/system/monthlyCardConf")
public class MonthlyCardConfController extends BaseController {
@Autowired
private MonthlyCardConfService monthlyCardConfService;
/**
* 查询月卡配置列表
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardConf:list')")
@GetMapping("/list")
public TableDataInfo list(MonthlyCardConf monthlyCardConf) {
startPage();
List<MonthlyCardConf> list = monthlyCardConfService.selectMonthlyCardConfList(monthlyCardConf);
return getDataTable(list);
}
/**
* 导出月卡配置列表
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardConf:export')")
@Log(title = "月卡配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MonthlyCardConf monthlyCardConf) {
List<MonthlyCardConf> list = monthlyCardConfService.selectMonthlyCardConfList(monthlyCardConf);
ExcelUtil<MonthlyCardConf> util = new ExcelUtil<MonthlyCardConf>(MonthlyCardConf.class);
util.exportExcel(response, list, "月卡配置数据");
}
/**
* 获取月卡配置详细信息
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardConf:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(monthlyCardConfService.selectMonthlyCardConfById(id));
}
/**
* 新增月卡配置
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardConf:add')")
@Log(title = "月卡配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MonthlyCardConf monthlyCardConf) {
return toAjax(monthlyCardConfService.insertMonthlyCardConf(monthlyCardConf));
}
/**
* 修改月卡配置
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardConf:edit')")
@Log(title = "月卡配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MonthlyCardConf monthlyCardConf) {
return toAjax(monthlyCardConfService.updateMonthlyCardConf(monthlyCardConf));
}
/**
* 删除月卡配置
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardConf:remove')")
@Log(title = "月卡配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(monthlyCardConfService.deleteMonthlyCardConfByIds(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.MonthlyCardLog;
import share.system.domain.vo.MonthlyCardLogVo;
import share.system.service.MonthlyCardLogService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 月卡使用记录Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@RestController
@RequestMapping("/system/monthlyCardLog")
public class MonthlyCardLogController extends BaseController {
@Autowired
private MonthlyCardLogService monthlyCardLogService;
/**
* 查询月卡使用记录列表
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardLog:list')")
@GetMapping("/list")
public TableDataInfo list(MonthlyCardLogVo monthlyCardLog) {
startPage();
List<MonthlyCardLogVo> list = monthlyCardLogService.selectMonthlyCardLogList(monthlyCardLog);
return getDataTable(list);
}
/**
* 导出月卡使用记录列表
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardLog:export')")
@Log(title = "月卡使用记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MonthlyCardLogVo monthlyCardLog) {
List<MonthlyCardLogVo> list = monthlyCardLogService.selectMonthlyCardLogList(monthlyCardLog);
ExcelUtil<MonthlyCardLogVo> util = new ExcelUtil<MonthlyCardLogVo>(MonthlyCardLogVo.class);
util.exportExcel(response, list, "月卡使用记录数据");
}
/**
* 获取月卡使用记录详细信息
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardLog:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(monthlyCardLogService.selectMonthlyCardLogById(id));
}
/**
* 新增月卡使用记录
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardLog:add')")
@Log(title = "月卡使用记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MonthlyCardLog monthlyCardLog) {
return toAjax(monthlyCardLogService.insertMonthlyCardLog(monthlyCardLog));
}
/**
* 修改月卡使用记录
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardLog:edit')")
@Log(title = "月卡使用记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MonthlyCardLog monthlyCardLog) {
return toAjax(monthlyCardLogService.updateMonthlyCardLog(monthlyCardLog));
}
/**
* 删除月卡使用记录
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardLog:remove')")
@Log(title = "月卡使用记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(monthlyCardLogService.deleteMonthlyCardLogByIds(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.MonthlyCardOrder;
import share.system.domain.vo.MonthlyCardOrderVo;
import share.system.service.MonthlyCardOrderService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 月卡订单Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@RestController
@RequestMapping("/system/monthlyCardOrder")
public class MonthlyCardOrderController extends BaseController {
@Autowired
private MonthlyCardOrderService monthlyCardOrderService;
/**
* 查询月卡订单列表
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardOrder:list')")
@GetMapping("/list")
public TableDataInfo list(MonthlyCardOrderVo monthlyCardOrder) {
startPage();
List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder);
return getDataTable(list);
}
/**
* 导出月卡订单列表
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardOrder:export')")
@Log(title = "月卡订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MonthlyCardOrderVo monthlyCardOrder) {
List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder);
ExcelUtil<MonthlyCardOrderVo> util = new ExcelUtil<MonthlyCardOrderVo>(MonthlyCardOrderVo.class);
util.exportExcel(response, list, "月卡订单数据");
}
/**
* 获取月卡订单详细信息
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardOrder:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(monthlyCardOrderService.selectMonthlyCardOrderById(id));
}
/**
* 新增月卡订单
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardOrder:add')")
@Log(title = "月卡订单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MonthlyCardOrder monthlyCardOrder) {
return toAjax(monthlyCardOrderService.insertMonthlyCardOrder(monthlyCardOrder));
}
/**
* 修改月卡订单
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardOrder:edit')")
@Log(title = "月卡订单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MonthlyCardOrder monthlyCardOrder) {
return toAjax(monthlyCardOrderService.updateMonthlyCardOrder(monthlyCardOrder));
}
/**
* 删除月卡订单
*/
@PreAuthorize("@ss.hasPermi('system:monthlyCardOrder:remove')")
@Log(title = "月卡订单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(monthlyCardOrderService.deleteMonthlyCardOrderByIds(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.domain.vo.SecondaryCardLogVo;
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(SecondaryCardLogVo secondaryCardLog) {
startPage();
List<SecondaryCardLogVo> 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, SecondaryCardLogVo secondaryCardLog) {
List<SecondaryCardLogVo> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
ExcelUtil<SecondaryCardLogVo> util = new ExcelUtil<SecondaryCardLogVo>(SecondaryCardLogVo.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.domain.vo.SecondaryCardOrderVo;
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(SecondaryCardOrderVo secondaryCardOrder) {
startPage();
List<SecondaryCardOrderVo> 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, SecondaryCardOrderVo secondaryCardOrder) {
List<SecondaryCardOrderVo> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
ExcelUtil<SecondaryCardOrderVo> util = new ExcelUtil<SecondaryCardOrderVo>(SecondaryCardOrderVo.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));
}
}
package share.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import share.common.annotation.Log;
import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.enums.BusinessType;
import share.system.domain.SharingActivities;
import share.system.service.SharingActivitiesService;
import share.common.utils.poi.ExcelUtil;
import share.common.core.page.TableDataInfo;
/**
* 分享活动绑定关系Controller
*
* @author wuwenlong
* @date 2024-09-02
*/
@RestController
@RequestMapping("/system/activities")
public class SharingActivitiesController extends BaseController
{
@Autowired
private SharingActivitiesService sharingActivitiesService;
/**
* 查询分享活动绑定关系列表
*/
@PreAuthorize("@ss.hasPermi('system:activities:list')")
@GetMapping("/list")
public TableDataInfo list(SharingActivities sharingActivities)
{
startPage();
List<SharingActivities> list = sharingActivitiesService.selectSharingActivitiesList(sharingActivities);
return getDataTable(list);
}
/**
* 导出分享活动绑定关系列表
*/
@PreAuthorize("@ss.hasPermi('system:activities:export')")
@Log(title = "分享活动绑定关系", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SharingActivities sharingActivities)
{
List<SharingActivities> list = sharingActivitiesService.selectSharingActivitiesList(sharingActivities);
ExcelUtil<SharingActivities> util = new ExcelUtil<SharingActivities>(SharingActivities.class);
util.exportExcel(response, list, "分享活动绑定关系数据");
}
/**
* 获取分享活动绑定关系详细信息
*/
@PreAuthorize("@ss.hasPermi('system:activities:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sharingActivitiesService.selectSharingActivitiesById(id));
}
/**
* 新增分享活动绑定关系
*/
@PreAuthorize("@ss.hasPermi('system:activities:add')")
@Log(title = "分享活动绑定关系", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SharingActivities sharingActivities)
{
return toAjax(sharingActivitiesService.insertSharingActivities(sharingActivities));
}
/**
* 修改分享活动绑定关系
*/
@PreAuthorize("@ss.hasPermi('system:activities:edit')")
@Log(title = "分享活动绑定关系", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SharingActivities sharingActivities)
{
return toAjax(sharingActivitiesService.updateSharingActivities(sharingActivities));
}
/**
* 删除分享活动绑定关系
*/
@PreAuthorize("@ss.hasPermi('system:activities:remove')")
@Log(title = "分享活动绑定关系", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sharingActivitiesService.deleteSharingActivitiesByIds(ids));
}
}
...@@ -47,4 +47,8 @@ public class PayConstants { ...@@ -47,4 +47,8 @@ public class PayConstants {
// 扫呗支付回调地址 // 扫呗支付回调地址
public static final String SAOBEI_PAY_NOTIFY_API_URI = "/prod-api/admin/payment/callback/saobei/wechat"; public static final String SAOBEI_PAY_NOTIFY_API_URI = "/prod-api/admin/payment/callback/saobei/wechat";
// 微信商家给用户转账到零钱-回调地址
public static final String WX_INITIATEBATCHTRANSFER_NOTIFY_API_URI = "/prod-api/admin/payment/callback/wechat/initiateBatchTransfer";
} }
...@@ -10,7 +10,13 @@ public enum OrderTypeEnum { ...@@ -10,7 +10,13 @@ public enum OrderTypeEnum {
RESERVER(1,"reserver","预定"), RESERVER(1,"reserver","预定"),
RENEW(2,"renew","续费"), RENEW(2,"renew","续费"),
RECHARGE(3, "recharge", "充值"), RECHARGE(3, "recharge", "充值"),
RIGHTS(4, "rights", "权益"); RIGHTS(4, "rights", "权益"),
//次卡
SECONDARY_CARD(5, "secondary_card", "次卡"),
//月卡
MONTH_CARD(6, "month_card", "月卡"),
;
private Integer code; private Integer code;
private String value; private String value;
......
...@@ -4,6 +4,8 @@ public enum StoreStatusEnum { ...@@ -4,6 +4,8 @@ public enum StoreStatusEnum {
// 0:停业 1:正常营业 // 0:停业 1:正常营业
STOP("0", "停业"), STOP("0", "停业"),
NORMAL("1", "正常营业"), NORMAL("1", "正常营业"),
//维修中
REPAIR("2", "维修中"),
; ;
private String index; 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.domain.AjaxResult;
import share.common.core.page.TableDataInfo;
import share.system.domain.vo.ConsumerMonthlyCardVo;
import share.system.service.ConsumerMonthlyCardService;
import java.util.List;
/**
* 用户月卡Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@RestController
@RequestMapping("/consumerMonthlyCard")
public class ConsumerMonthlyCardController extends BaseController {
@Autowired
private ConsumerMonthlyCardService consumerMonthlyCardService;
/**
* 查询用户月卡列表
*/
@GetMapping("/list")
public TableDataInfo list(ConsumerMonthlyCardVo consumerMonthlyCard) {
startPage();
List<ConsumerMonthlyCardVo> list = consumerMonthlyCardService.selectConsumerMonthlyCardList(consumerMonthlyCard);
return getDataTable(list);
}
@GetMapping("/query")
public AjaxResult selectByConsumerId() {
return success(consumerMonthlyCardService.selectByConsumerId());
}
}
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.domain.AjaxResult;
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);
}
@GetMapping("/query")
public AjaxResult selectByConsumerId() {
return success(consumerSecondaryCardService.selectByConsumerId());
}
}
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.domain.R;
import share.common.core.page.TableDataInfo;
import share.system.domain.MonthlyCardConf;
import share.system.service.MonthlyCardConfService;
import java.util.List;
/**
* 月卡配置Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@RestController
@RequestMapping("/monthlyCardConf")
public class MonthlyCardConfController extends BaseController {
@Autowired
private MonthlyCardConfService monthlyCardConfService;
/**
* 查询月卡配置列表
*/
@GetMapping("/list")
public TableDataInfo list(MonthlyCardConf monthlyCardConf) {
startPage();
List<MonthlyCardConf> list = monthlyCardConfService.selectMonthlyCardConfList(monthlyCardConf);
return getDataTable(list);
}
/**
* 查询月卡配置列表
*/
@GetMapping("/query")
public R<List<MonthlyCardConf>> query() {
return R.ok(monthlyCardConfService.selectMonthlyCardConfList(null));
}
}
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.domain.AjaxResult;
import share.common.core.page.TableDataInfo;
import share.system.domain.SConsumer;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.MonthlyCardLogVo;
import share.system.service.MonthlyCardLogService;
import java.util.List;
/**
* 月卡使用记录Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@RestController
@RequestMapping("/monthlyCardLog")
public class MonthlyCardLogController extends BaseController {
@Autowired
private MonthlyCardLogService monthlyCardLogService;
/**
* 查询月卡使用记录列表
*/
@GetMapping("/list")
public TableDataInfo list(MonthlyCardLogVo monthlyCardLog) {
startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
monthlyCardLog.setConsumerId(user.getId());
List<MonthlyCardLogVo> list = monthlyCardLogService.selectMonthlyCardLogList(monthlyCardLog);
return getDataTable(list);
}
@GetMapping("/query")
public AjaxResult query(MonthlyCardLogVo monthlyCardLog) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
monthlyCardLog.setConsumerId(user.getId());
return success(monthlyCardLogService.selectMonthlyCardLogList(monthlyCardLog));
}
}
package share.web.controller.system;
import io.swagger.annotations.ApiOperation;
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.AjaxResult;
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.SConsumer;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.MonthlyCardOrderVo;
import share.system.request.CreateMonthlyCardRequest;
import share.system.response.MonthlyyCardPayResultResponse;
import share.system.service.MonthlyCardOrderService;
import java.util.List;
/**
* 月卡订单Controller
*
* @author wuwenlong
* @date 2024-08-27
*/
@Slf4j
@RestController
@RequestMapping("/monthlyCardOrder")
public class MonthlyCardOrderController extends BaseController {
@Autowired
private MonthlyCardOrderService monthlyCardOrderService;
@Autowired
private RedisUtil redisUtil;
/**
* 查询月卡订单列表
*/
@GetMapping("/list")
public TableDataInfo list(MonthlyCardOrderVo monthlyCardOrder) {
startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
monthlyCardOrder.setConsumerId(user.getId());
List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder);
return getDataTable(list);
}
@GetMapping("/query")
public AjaxResult query(MonthlyCardOrderVo monthlyCardOrder) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
monthlyCardOrder.setConsumerId(user.getId());
List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder);
return success(list);
}
@PostMapping("/createMonthlyCard")
public R<MonthlyyCardPayResultResponse> createOrder(@RequestBody @Validated CreateMonthlyCardRequest request) {
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.debug("MonthlyCardOrderController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
}
MonthlyyCardPayResultResponse response = monthlyCardOrderService.createMonthlyCard(request);
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.debug("MonthlyCardOrderController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
}
return R.ok(response);
}
@ApiOperation(value = "通过订单编号查询订单")
@GetMapping(value = "/{monthlyCardNo}")
public R<MonthlyCardOrderVo> queryMonthlyCardInfoByNo(@PathVariable("monthlyCardNo") String monthlyCardNo) {
return R.ok(monthlyCardOrderService.queryMonthlyCardInfoByNo(monthlyCardNo));
}
}
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.vo.SecondaryCardLogVo;
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(SecondaryCardLogVo secondaryCardLog) {
startPage();
List<SecondaryCardLogVo> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
return getDataTable(list);
}
}
package share.web.controller.system;
import io.swagger.annotations.ApiOperation;
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.vo.SecondaryCardOrderVo;
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(SecondaryCardOrderVo secondaryCardOrder) {
startPage();
List<SecondaryCardOrderVo> 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);
}
@ApiOperation(value = "通过订单编号查询订单")
@GetMapping(value = "/{secondaryCardNo}")
public R<SecondaryCardOrderVo> querySecondaryCardInfoByNo(@PathVariable("secondaryCardNo") String secondaryCardNo) {
return R.ok(secondaryCardOrderService.querySecondaryCardInfoByNo(secondaryCardNo));
}
}
...@@ -12,10 +12,8 @@ import org.springframework.validation.annotation.Validated; ...@@ -12,10 +12,8 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import share.common.core.domain.R; import share.common.core.domain.R;
import share.common.core.redis.RedisUtil; import share.common.core.redis.RedisUtil;
import share.common.enums.MessageReminderEnum;
import share.common.utils.JsonConvertUtil; import share.common.utils.JsonConvertUtil;
import share.system.domain.SConsumerToken; import share.system.domain.SConsumerToken;
import share.system.domain.SOrder;
import share.system.domain.TemplateMessage; import share.system.domain.TemplateMessage;
import share.system.request.RegisterThirdSConsumerRequest; import share.system.request.RegisterThirdSConsumerRequest;
import share.system.request.WxBindingPhoneRequest; import share.system.request.WxBindingPhoneRequest;
...@@ -199,13 +197,13 @@ public class WeChatController { ...@@ -199,13 +197,13 @@ public class WeChatController {
logger.debug("更新完成的消费者令牌列表: {}", sConsumerTokenList); logger.debug("更新完成的消费者令牌列表: {}", sConsumerTokenList);
} }
@GetMapping("/test1") // @GetMapping("/test1")
public void test(String orderNo) { // public void test(String orderNo) {
SOrder byOrderN = sOrderService.getByOrderNo(orderNo); // SOrder byOrderN = sOrderService.getByOrderNo(orderNo);
wechatNewService.sendPublicTemplateMessage(byOrderN, MessageReminderEnum.CLEANING, byOrderN.getConsumerId()); // wechatNewService.sendPublicTemplateMessage(byOrderN, MessageReminderEnum.CLEANING, byOrderN.getConsumerId());
wechatNewService.sendPublicTemplateMessage(byOrderN, MessageReminderEnum.ORDER_RESERVE, byOrderN.getConsumerId()); // wechatNewService.sendPublicTemplateMessage(byOrderN, MessageReminderEnum.ORDER_RESERVE, byOrderN.getConsumerId());
//
} // }
} }
......
...@@ -76,7 +76,7 @@ public class CouponRetryTask { ...@@ -76,7 +76,7 @@ public class CouponRetryTask {
List<SConsumerCoupon> sConsumerCoupons = sConsumerCouponService.list(consumerCouponWrapper); List<SConsumerCoupon> sConsumerCoupons = sConsumerCouponService.list(consumerCouponWrapper);
if (sConsumerCoupons.size() > 100) { if (sConsumerCoupons.size() > 100) {
sConsumerCoupons.subList(0, 100); sConsumerCoupons = sConsumerCoupons.subList(0, 100);
} }
if (!CollectionUtils.isEmpty(sConsumerCoupons)) { if (!CollectionUtils.isEmpty(sConsumerCoupons)) {
List<SConsumerCoupon> updatedCoupons = new ArrayList<>(); List<SConsumerCoupon> updatedCoupons = new ArrayList<>();
...@@ -90,10 +90,26 @@ public class CouponRetryTask { ...@@ -90,10 +90,26 @@ public class CouponRetryTask {
.getOpenShopUuid(); .getOpenShopUuid();
TuangouReceiptGetConsumedReponseEntity getconsumed = qpService.getconsumed(item.getCouponCode(), openShopUuid); TuangouReceiptGetConsumedReponseEntity getconsumed = qpService.getconsumed(item.getCouponCode(), openShopUuid);
if (!ObjectUtils.isEmpty(getconsumed)) { if (!ObjectUtils.isEmpty(getconsumed)) {
item.setCouponPayPrice(BigDecimal.valueOf(getconsumed.getDeal_price())); item.setCouponPayPrice(BigDecimal.valueOf(getconsumed.getDeal_price()).subtract(BigDecimal.valueOf(getconsumed.getOrder_shoppromo_amount())));
logger.debug("美团优惠卷购买金额为:" + item.getCouponPayPrice()); logger.debug("美团优惠卷购买金额为:" + item.getCouponPayPrice());
} else { } else {
item.setUseStatus(UserStatusEnum.EXPIRED.getCode()); finalList.stream().forEach(store -> {
TuangouReceiptGetConsumedReponseEntity newGetconsumed = qpService.getconsumed(item.getCouponCode(), store.getOpenShopUuid());
logger.debug("门店:" + store.getName() + "优惠券码:" + item.getCouponCode());
if (!ObjectUtils.isEmpty(newGetconsumed)) {
item.setStoreId(store.getId());
item.setCouponPayPrice(BigDecimal.valueOf(newGetconsumed.getDeal_price()).subtract(BigDecimal.valueOf(newGetconsumed.getOrder_shoppromo_amount())));
logger.debug("门店:" + store.getName() + "优惠券码:" + item.getCouponCode());
logger.debug("美团优惠卷购买金额为:" + item.getCouponPayPrice());
//跳出循环
return;
}
logger.debug("门店:" + store.getName() + "优惠券码:" + item.getCouponCode() + "查询优惠券失败" + newGetconsumed);
});
if (item.getCouponPayPrice() == null) {
item.setCouponPayPrice(BigDecimal.ZERO);
item.setUseStatus(UserStatusEnum.EXPIRED.getCode());
}
} }
} else if (PlatformTypeEnum.TIKTOK.getCode().equals(item.getPlatformType())) { } else if (PlatformTypeEnum.TIKTOK.getCode().equals(item.getPlatformType())) {
JSONObject data = tiktokService.certificateGet(item.getEncryptedCode()); JSONObject data = tiktokService.certificateGet(item.getEncryptedCode());
......
...@@ -107,6 +107,9 @@ public class RedisTask { ...@@ -107,6 +107,9 @@ public class RedisTask {
@Autowired @Autowired
private MemberConfigService memberConfigService; private MemberConfigService memberConfigService;
@Autowired
private SharingActivitiesService sharingActivitiesService;
//15分钟的常量 //15分钟的常量
final long FIFTEEN_MINUTES = 60 * 15; final long FIFTEEN_MINUTES = 60 * 15;
...@@ -296,10 +299,14 @@ public class RedisTask { ...@@ -296,10 +299,14 @@ public class RedisTask {
logger.debug("保洁工单派单通知发送开始"); logger.debug("保洁工单派单通知发送开始");
//通知保洁人员 //通知保洁人员
sConsumerService.selectListByStoreId(sOrder.getStoreId()).stream().forEach(item -> { sConsumerService.selectListByStoreId(sOrder.getStoreId()).stream().forEach(item -> {
// 循环发送短信提示门店保洁打扫卫生 if (item.getTextMessage().equals(YesNoEnum.yes.getIndex())) {
smsService.sendSmsCleanRecordsRemind15(item.getPhone(), sStore, sRoom); // 循环发送短信提示门店保洁打扫卫生
//公众号发送保洁工单派单通知 smsService.sendSmsCleanRecordsRemind15(item.getPhone(), sStore, sRoom);
wechatNewService.sendPublicTemplateMessage(finalSOrder, MessageReminderEnum.CLEANING, item.getId()); }
if (item.getOfficialAccount().equals(YesNoEnum.yes.getIndex())) {
//公众号发送保洁工单派单通知
wechatNewService.sendPublicTemplateMessage(finalSOrder, MessageReminderEnum.CLEANING, item.getId());
}
}); });
logger.debug("保洁工单派单通知发送结束"); logger.debug("保洁工单派单通知发送结束");
return; return;
...@@ -320,6 +327,48 @@ public class RedisTask { ...@@ -320,6 +327,48 @@ public class RedisTask {
redisUtil.delete(o); redisUtil.delete(o);
throw new BaseException("订单不存在!"); throw new BaseException("订单不存在!");
} }
//查询当前用户是否只有一个订单
LambdaQueryWrapper<SOrder> sOrderLambdaQueryWrapper = new LambdaQueryWrapper<>();
sOrderLambdaQueryWrapper.eq(SOrder :: getConsumerId,sOrder.getConsumerId());
sOrderLambdaQueryWrapper.eq(SOrder::getPayStatus, YesNoEnum.yes.getIndex());
sOrderLambdaQueryWrapper.notIn(SOrder::getRefundStatus, RefundStatusEnum.getRefundedStatus());
sOrderLambdaQueryWrapper.in(SOrder::getStatus, OrderStatusEnum.getUnfinishOrderStatus());
sOrderLambdaQueryWrapper.eq(SOrder::getIsDelete, YesNoEnum.no.getIndex());
List<SOrder> sOrderList = isOrderService.list(sOrderLambdaQueryWrapper);
if (sOrderList.size() == 1){
//查询是否有上级
LambdaQueryWrapper<SharingActivities> sharingActivitiesLambdaQueryWrapper = new LambdaQueryWrapper<>();
sharingActivitiesLambdaQueryWrapper.eq(SharingActivities :: getNewUid,sOrder.getConsumerId());
SharingActivities sharingActivities = sharingActivitiesService.getOne(sharingActivitiesLambdaQueryWrapper);
if (ObjectUtil.isNotEmpty(sharingActivities)){
LambdaQueryWrapper<ConsumerWallet> consumerWalletLambdaQueryWrapper = new LambdaQueryWrapper<>();
consumerWalletLambdaQueryWrapper.eq(ConsumerWallet::getConsumerId,sharingActivities.getUid());
ConsumerWallet consumerWallet = consumerWalletService.getOne(consumerWalletLambdaQueryWrapper);
if (ObjectUtil.isNotEmpty(consumerWallet)){
//添加时长
BigDecimal anHour = new BigDecimal(1.0);
consumerWallet.setRemainingDuration(consumerWallet.getRemainingDuration().add(anHour));
consumerWallet.setUpdateTime(DateUtils.getNowDate());
consumerWalletService.updateConsumerWallet(consumerWallet);
}else {
//新增钱包
ConsumerWallet newConsumerWallet = new ConsumerWallet();
BigDecimal defaultVlue = new BigDecimal(0.0);
newConsumerWallet.setCreateTime(DateUtils.getNowDate());
newConsumerWallet.setConsumerId(sharingActivities.getUid());
newConsumerWallet.setBalance(defaultVlue);
newConsumerWallet.setRemainingIntegral(defaultVlue);
newConsumerWallet.setRemainingDuration(defaultVlue);
newConsumerWallet.setEquityFund(defaultVlue);
newConsumerWallet.setAccumulateEquityFund(defaultVlue);
consumerWalletService.save(newConsumerWallet);
BigDecimal anHour = new BigDecimal(1.0);
newConsumerWallet.setRemainingDuration(newConsumerWallet.getRemainingDuration().add(anHour));
newConsumerWallet.setUpdateTime(DateUtils.getNowDate());
consumerWalletService.updateConsumerWallet(newConsumerWallet);
}
}
}
if (extracted(o, sOrders, sOrder)) return; if (extracted(o, sOrders, sOrder)) return;
//更改订单状态 //更改订单状态
sOrder.setStatus(OrderStatusEnum.USED.getCode()); sOrder.setStatus(OrderStatusEnum.USED.getCode());
...@@ -348,7 +397,7 @@ public class RedisTask { ...@@ -348,7 +397,7 @@ public class RedisTask {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("orderNo", sOrder.getOrderNo()); map.put("orderNo", sOrder.getOrderNo());
//当前时间加15分钟 //当前时间加15分钟
Date date = DateUtil.offsetMinute(new Date(), 15); Date date = DateUtil.offsetMinute(sOrder.getEndDate(), 15);
map.put("expirationTime", date.toString()); map.put("expirationTime", date.toString());
JSONObject json = new JSONObject(map); JSONObject json = new JSONObject(map);
redisUtil.set(ReceiptRdeisEnum.ROOM_EXPIRE_TIME.getValue() + sOrder.getOrderNo(), json.toString()); redisUtil.set(ReceiptRdeisEnum.ROOM_EXPIRE_TIME.getValue() + sOrder.getOrderNo(), json.toString());
......
...@@ -156,5 +156,10 @@ ...@@ -156,5 +156,10 @@
<artifactId>cron-utils</artifactId> <artifactId>cron-utils</artifactId>
<version>9.1.3</version> <version>9.1.3</version>
</dependency> </dependency>
<dependency>
<groupId>com.github.wechatpay-apiv3</groupId>
<artifactId>wechatpay-java</artifactId>
<version>0.2.14</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableName;
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_monthly_card
*
* @author wuwenlong
* @date 2024-08-27
*/
@Data
@TableName(value = "s_consumer_monthly_card")
public class ConsumerMonthlyCard extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 月卡配置表id
*/
@Excel(name = "月卡配置表id")
private Long monthlyCardConfId;
/**
* 用户ID
*/
@Excel(name = "用户ID")
private Long consumerId;
/**
* 用户手机号
*/
@Excel(name = "用户手机号")
private String phone;
/**
* 免费时长
*/
@Excel(name = "免费时长")
private Long freeDuration;
/**
* 月卡天数
*/
@Excel(name = "月卡天数")
private Long monthlyCardDays;
/**
* 次卡有效期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "次卡有效期", width = 30, dateFormat = "yyyy-MM-dd")
private Date expirationDate;
/**
* 删除标记:1-删除,0-正常
*/
private Long isDelete;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("monthlyCardConfId", getMonthlyCardConfId())
.append("consumerId", getConsumerId())
.append("phone", getPhone())
.append("freeDuration", getFreeDuration())
.append("monthlyCardDays", getMonthlyCardDays())
.append("expirationDate", getExpirationDate())
.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.baomidou.mybatisplus.annotation.TableName;
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
@TableName(value = "s_consumer_secondary_card")
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();
}
}
...@@ -58,6 +58,18 @@ public class ConsumerWallet extends BaseEntity { ...@@ -58,6 +58,18 @@ public class ConsumerWallet extends BaseEntity {
@TableField(select = false) @TableField(select = false)
private Long isDelete; private Long isDelete;
/**
* 权益金
*/
@Excel(name = "权益金")
private BigDecimal equityFund;
/**
* 累计权益金
*/
@Excel(name = "累计权益金")
private BigDecimal accumulateEquityFund;
@Override @Override
public String toString() { public String toString() {
......
...@@ -83,6 +83,9 @@ public class Device extends BaseEntity ...@@ -83,6 +83,9 @@ public class Device extends BaseEntity
/** 门店房间ID */ /** 门店房间ID */
private Long roomId; private Long roomId;
/** 设备新密码*/
private String newDevPsw;
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -26,6 +26,9 @@ public class EquityMembersOrderConfig extends BaseEntity { ...@@ -26,6 +26,9 @@ public class EquityMembersOrderConfig extends BaseEntity {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
@Excel(name = "配置名称")
private String name;
/** /**
* 默认会员等级 * 默认会员等级
*/ */
...@@ -50,6 +53,9 @@ public class EquityMembersOrderConfig extends BaseEntity { ...@@ -50,6 +53,9 @@ public class EquityMembersOrderConfig extends BaseEntity {
@Excel(name = "会员有效期") @Excel(name = "会员有效期")
private Long validityPeriod; private Long validityPeriod;
@Excel(name = "赠送积分")
private BigDecimal giftPoints;
/** /**
* 是否删除 * 是否删除
*/ */
......
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
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_monthly_card_conf
*
* @author wuwenlong
* @date 2024-08-27
*/
@Data
@TableName(value = "s_monthly_card_conf")
public class MonthlyCardConf extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 配置名称
*/
@Excel(name = "配置名称")
private String name;
/**
* 月卡金额
*/
@Excel(name = "月卡金额")
private BigDecimal monthlyCardAmount;
/**
* 免费时长
*/
@Excel(name = "免费时长")
private Long freeDuration;
/**
* 月卡天数
*/
@Excel(name = "月卡天数")
private Long monthlyCardDays;
/**
* 是否删除(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("monthlyCardAmount", getMonthlyCardAmount())
.append("freeDuration", getFreeDuration())
.append("monthlyCardDays", getMonthlyCardDays())
.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.baomidou.mybatisplus.annotation.TableName;
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_monthly_card_log
*
* @author wuwenlong
* @date 2024-08-27
*/
@Data
@TableName(value = "s_monthly_card_log")
public class MonthlyCardLog extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 用户月卡id
*/
@Excel(name = "用户月卡id")
private Long consumerMonthlyCardId;
/**
* 用户ID
*/
@Excel(name = "用户ID")
private Long consumerId;
/**
* 用户手机号
*/
@Excel(name = "用户手机号")
private String phone;
/**
* 使用时长
*/
@Excel(name = "使用时长")
private Long useDuration;
/**
* 剩余时长
*/
@Excel(name = "剩余时长")
private Long residueDuration;
/**
* 删除标记: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("consumerMonthlyCardId", getConsumerMonthlyCardId())
.append("consumerId", getConsumerId())
.append("phone", getPhone())
.append("useDuration", getUseDuration())
.append("residueDuration", getResidueDuration())
.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.*;
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_monthly_card_order
*
* @author wuwenlong
* @date 2024-08-27
*/
@Data
@TableName(value = "s_monthly_card_order")
public class MonthlyCardOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 月卡购买记录编号
*/
@Excel(name = "月卡购买记录编号")
private String monthlyCardNo;
/**
* 扫呗平台唯一订单号
*/
@Excel(name = "扫呗平台唯一订单号")
private String outTradeNo;
/**
* 商户订单号
*/
@Excel(name = "商户订单号")
private String terminalTrace;
/**
* 月卡购买金额
*/
@Excel(name = "月卡购买金额")
private BigDecimal monthlyCardAmount;
/**
* 月卡配置id
*/
@Excel(name = "月卡配置id")
private Long monthlyCardConfId;
/**
* 用户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;
/**
* 是否删除(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("monthlyCardNo", getMonthlyCardNo())
.append("outTradeNo", getOutTradeNo())
.append("terminalTrace", getTerminalTrace())
.append("monthlyCardAmount", getMonthlyCardAmount())
.append("monthlyCardConfId", getMonthlyCardConfId())
.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();
}
}
...@@ -108,4 +108,10 @@ public class SConsumer implements Serializable ...@@ -108,4 +108,10 @@ public class SConsumer implements Serializable
@TableField(exist = false) @TableField(exist = false)
private Integer position; private Integer position;
@TableField(exist = false)
private Integer textMessage;
@TableField(exist = false)
private Integer officialAccount;
} }
...@@ -18,10 +18,14 @@ public class SStoreConsumer { ...@@ -18,10 +18,14 @@ public class SStoreConsumer {
private Integer position; private Integer position;
//电控 是否接收公众号 //电控
private Integer controller; private Integer controller;
//门控 是否接收短信 //门控
private Integer gating; private Integer gating;
//是否接收短信
private Integer textMessage;
//是否接收公众号
private Integer officialAccount;
} }
package share.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
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
@TableName(value = "s_secondary_card_conf")
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 com.baomidou.mybatisplus.annotation.TableName;
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
@TableName("s_secondary_card_log")
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.*;
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
@TableName("s_secondary_card_order")
public class SecondaryCardOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.AUTO)
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;
import com.baomidou.mybatisplus.annotation.TableName;
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 com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
/**
* 分享活动绑定关系对象 s_sharing_activities
*
* @author wuwenlong
* @date 2024-09-02
*/
@Data
@TableName("s_sharing_activities")
public class SharingActivities extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 活动类型(0-新用户注册,1-权益金会员分享) */
@Excel(name = "活动类型(0-新用户注册,1-权益金会员分享)")
private String activityType;
/** 上级id */
@Excel(name = "上级id")
private Long uid;
/** 下级id */
@Excel(name = "下级id")
private Long newUid;
/** 删除标记: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("activityType", getActivityType())
.append("uid", getUid())
.append("newUid", getNewUid())
.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_withdraw_log
*
* @author lwj
* @date 2024-08-28
*/
@Data
public class WithdrawLog extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 提现用户ID */
@Excel(name = "提现用户ID")
private Long consumerId;
/** 提现金额 */
@Excel(name = "提现金额")
private BigDecimal amount;
/** 状态:1-提现申请,2-审核通过,3-审核不通过,4-已撤销,5-交易成功,6-交易失败 */
@Excel(name = "状态")
private Integer status;
/** 提现订单号,系统自动生成的 */
@Excel(name = "提现订单号")
private String withdrawOrder;
/** 提现手续费 */
@Excel(name = "提现手续费")
private BigDecimal withdrawCharge;
/** 申请提现时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请提现时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date withdrawApplyTime;
/** 提现备注 */
@Excel(name = "提现备注")
private String withdrawRemark;
/** 提现方式:1-微信 */
@Excel(name = "提现方式:1-微信")
private Integer withdrawType;
/** 是否删除 */
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField(select = false)
private Long isDelete;
/** 微信转账场景 */
@Excel(name = "微信转账场景")
private String transferSceneId;
/** 用户的openid */
@Excel(name = "用户的openid")
private String openid;
/** 微信批次单号 */
@Excel(name = "微信批次单号")
private String batchId;
/** 微信批次状态 */
@Excel(name = "微信批次状态")
private String batchStatus;
/** 微信接口错误描述 */
@Excel(name = "微信接口错误描述")
private String errorDesc;
/** 错误码 */
@Excel(name = "错误码")
private String errorCode;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("consumerId", getConsumerId())
.append("amount", getAmount())
.append("status", getStatus())
.append("withdrawOrder", getWithdrawOrder())
.append("withdrawCharge", getWithdrawCharge())
.append("withdrawApplyTime", getWithdrawApplyTime())
.append("withdrawRemark", getWithdrawRemark())
.append("withdrawType", getWithdrawType())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDelete", getIsDelete())
.append("transferSceneId", getTransferSceneId())
.append("openid", getOpenid())
.append("batchId", getBatchId())
.append("batchStatus", getBatchStatus())
.append("errorDesc", getErrorDesc())
.append("errorCode", getErrorCode())
.toString();
}
}
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.ConsumerMonthlyCard;
import java.math.BigDecimal;
@Data
public class ConsumerMonthlyCardVo extends ConsumerMonthlyCard {
//用户昵称
private String nickName;
//用户头像
private String avatar;
//配置名称
private String confName;
//月卡金额
private BigDecimal confAmount;
}
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.MonthlyCardLog;
import java.math.BigDecimal;
@Data
public class MonthlyCardLogVo extends MonthlyCardLog {
//用户昵称
private String nickName;
//用户头像
private String avatar;
//配置名称
private String confName;
//次卡金额
private BigDecimal confAmount;
}
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.MonthlyCardOrder;
import java.math.BigDecimal;
@Data
public class MonthlyCardOrderVo extends MonthlyCardOrder {
//用户昵称
private String nickName;
//用户头像
private String avatar;
//配置名称
private String confName;
//次卡金额
private BigDecimal confAmount;
}
...@@ -29,6 +29,10 @@ public class SConsumerVo extends SConsumer { ...@@ -29,6 +29,10 @@ public class SConsumerVo extends SConsumer {
private Integer controller; private Integer controller;
private Integer gating; private Integer gating;
//是否接收短信
private Integer textMessage;
//是否接收公众号
private Integer officialAccount;
private ConsumerMember consumerMember; private ConsumerMember consumerMember;
......
...@@ -14,11 +14,19 @@ public class SStoreConsumerVo { ...@@ -14,11 +14,19 @@ public class SStoreConsumerVo {
*/ */
private Long consumerId; private Long consumerId;
//电控 是否接收公众号
private Integer controller; private Integer controller;
//门控 是否接收短信
private Integer gating; private Integer gating;
private Integer position; private Integer position;
//是否接收短信
private Integer textMessage;
//是否接收公众号
private Integer officialAccount;
private Long[] consumerIds; private Long[] consumerIds;
} }
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;
//配置名称
private String confName;
//次卡金额
private BigDecimal confAmount;
}
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.ConsumerMonthlyCard;
import share.system.domain.vo.ConsumerMonthlyCardVo;
import java.util.List;
/**
* 用户月卡Mapper接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface ConsumerMonthlyCardMapper extends BaseMapper<ConsumerMonthlyCard> {
/**
* 查询用户月卡
*
* @param id 用户月卡主键
* @return 用户月卡
*/
public ConsumerMonthlyCard selectConsumerMonthlyCardById(Long id);
/**
* 查询用户月卡列表
*
* @param consumerMonthlyCard 用户月卡
* @return 用户月卡集合
*/
public List<ConsumerMonthlyCardVo> selectConsumerMonthlyCardList(ConsumerMonthlyCardVo consumerMonthlyCard);
/**
* 新增用户月卡
*
* @param consumerMonthlyCard 用户月卡
* @return 结果
*/
public int insertConsumerMonthlyCard(ConsumerMonthlyCard consumerMonthlyCard);
/**
* 修改用户月卡
*
* @param consumerMonthlyCard 用户月卡
* @return 结果
*/
public int updateConsumerMonthlyCard(ConsumerMonthlyCard consumerMonthlyCard);
/**
* 删除用户月卡
*
* @param id 用户月卡主键
* @return 结果
*/
public int deleteConsumerMonthlyCardById(Long id);
/**
* 批量删除用户月卡
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteConsumerMonthlyCardByIds(Long[] ids);
ConsumerMonthlyCardVo selectByConsumerId(ConsumerMonthlyCardVo consumerMemberVo);
}
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);
List<ConsumerSecondaryCardVo> selectByConsumerId(ConsumerSecondaryCardVo vo);
}
package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.MonthlyCardConf;
import java.util.List;
/**
* 月卡配置Mapper接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface MonthlyCardConfMapper extends BaseMapper<MonthlyCardConf> {
/**
* 查询月卡配置
*
* @param id 月卡配置主键
* @return 月卡配置
*/
public MonthlyCardConf selectMonthlyCardConfById(Long id);
/**
* 查询月卡配置列表
*
* @param monthlyCardConf 月卡配置
* @return 月卡配置集合
*/
public List<MonthlyCardConf> selectMonthlyCardConfList(MonthlyCardConf monthlyCardConf);
/**
* 新增月卡配置
*
* @param monthlyCardConf 月卡配置
* @return 结果
*/
public int insertMonthlyCardConf(MonthlyCardConf monthlyCardConf);
/**
* 修改月卡配置
*
* @param monthlyCardConf 月卡配置
* @return 结果
*/
public int updateMonthlyCardConf(MonthlyCardConf monthlyCardConf);
/**
* 删除月卡配置
*
* @param id 月卡配置主键
* @return 结果
*/
public int deleteMonthlyCardConfById(Long id);
/**
* 批量删除月卡配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMonthlyCardConfByIds(Long[] ids);
}
package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.MonthlyCardLog;
import share.system.domain.vo.MonthlyCardLogVo;
import java.util.List;
/**
* 月卡使用记录Mapper接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface MonthlyCardLogMapper extends BaseMapper<MonthlyCardLog> {
/**
* 查询月卡使用记录
*
* @param id 月卡使用记录主键
* @return 月卡使用记录
*/
public MonthlyCardLog selectMonthlyCardLogById(Long id);
/**
* 查询月卡使用记录列表
*
* @param monthlyCardLog 月卡使用记录
* @return 月卡使用记录集合
*/
public List<MonthlyCardLogVo> selectMonthlyCardLogList(MonthlyCardLogVo monthlyCardLog);
/**
* 新增月卡使用记录
*
* @param monthlyCardLog 月卡使用记录
* @return 结果
*/
public int insertMonthlyCardLog(MonthlyCardLog monthlyCardLog);
/**
* 修改月卡使用记录
*
* @param monthlyCardLog 月卡使用记录
* @return 结果
*/
public int updateMonthlyCardLog(MonthlyCardLog monthlyCardLog);
/**
* 删除月卡使用记录
*
* @param id 月卡使用记录主键
* @return 结果
*/
public int deleteMonthlyCardLogById(Long id);
/**
* 批量删除月卡使用记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMonthlyCardLogByIds(Long[] ids);
}
package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.MonthlyCardOrder;
import share.system.domain.vo.MonthlyCardOrderVo;
import java.util.List;
/**
* 月卡订单Mapper接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface MonthlyCardOrderMapper extends BaseMapper<MonthlyCardOrder> {
/**
* 查询月卡订单
*
* @param id 月卡订单主键
* @return 月卡订单
*/
public MonthlyCardOrder selectMonthlyCardOrderById(Long id);
/**
* 查询月卡订单列表
*
* @param monthlyCardOrder 月卡订单
* @return 月卡订单集合
*/
public List<MonthlyCardOrderVo> selectMonthlyCardOrderList(MonthlyCardOrderVo monthlyCardOrder);
/**
* 新增月卡订单
*
* @param monthlyCardOrder 月卡订单
* @return 结果
*/
public int insertMonthlyCardOrder(MonthlyCardOrder monthlyCardOrder);
/**
* 修改月卡订单
*
* @param monthlyCardOrder 月卡订单
* @return 结果
*/
public int updateMonthlyCardOrder(MonthlyCardOrder monthlyCardOrder);
/**
* 删除月卡订单
*
* @param id 月卡订单主键
* @return 结果
*/
public int deleteMonthlyCardOrderById(Long id);
/**
* 批量删除月卡订单
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMonthlyCardOrderByIds(Long[] ids);
MonthlyCardOrder getInfoByEntity(MonthlyCardOrder monthlyCardOrder);
}
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 share.system.domain.vo.SecondaryCardLogVo;
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<SecondaryCardLogVo> selectSecondaryCardLogList(SecondaryCardLogVo 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 share.system.domain.vo.SecondaryCardOrderVo;
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<SecondaryCardOrderVo> selectSecondaryCardOrderList(SecondaryCardOrderVo 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.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SharingActivities;
/**
* 分享活动绑定关系Mapper接口
*
* @author wuwenlong
* @date 2024-09-02
*/
public interface SharingActivitiesMapper extends BaseMapper<SharingActivities>
{
/**
* 查询分享活动绑定关系
*
* @param id 分享活动绑定关系主键
* @return 分享活动绑定关系
*/
public SharingActivities selectSharingActivitiesById(Long id);
/**
* 查询分享活动绑定关系列表
*
* @param sharingActivities 分享活动绑定关系
* @return 分享活动绑定关系集合
*/
public List<SharingActivities> selectSharingActivitiesList(SharingActivities sharingActivities);
/**
* 新增分享活动绑定关系
*
* @param sharingActivities 分享活动绑定关系
* @return 结果
*/
public int insertSharingActivities(SharingActivities sharingActivities);
/**
* 修改分享活动绑定关系
*
* @param sharingActivities 分享活动绑定关系
* @return 结果
*/
public int updateSharingActivities(SharingActivities sharingActivities);
/**
* 删除分享活动绑定关系
*
* @param id 分享活动绑定关系主键
* @return 结果
*/
public int deleteSharingActivitiesById(Long id);
/**
* 批量删除分享活动绑定关系
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSharingActivitiesByIds(Long[] ids);
}
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 = "CreateMonthlyCardRequest对象", description = "下单请求对象")
public class CreateMonthlyCardRequest {
@ApiModelProperty(value = "支付类型(1:微信,2:支付宝)", required = true)
@NotNull(message = "支付类型不能为空")
private Integer payType;
@ApiModelProperty(value = "充值配置表id")
@NotNull(message = "充值配置表id")
private Long monthlyCardConfId;
}
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;
}
...@@ -46,4 +46,10 @@ public class WxRegisterPhoneRequest implements Serializable { ...@@ -46,4 +46,10 @@ public class WxRegisterPhoneRequest implements Serializable {
@NotBlank(message = "手机号code不能为空") @NotBlank(message = "手机号code不能为空")
private String phoneCode; private String phoneCode;
@ApiModelProperty(value = "上级id")
private Long uid;
@ApiModelProperty(value = "活动类型")
private String activityType;
} }
...@@ -27,7 +27,7 @@ public class EquityMembersResultResponse { ...@@ -27,7 +27,7 @@ public class EquityMembersResultResponse {
private String payType; private String payType;
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private String rechargeNo; private String equityOrderNo;
@ApiModelProperty(value = "微信支付回调的url") @ApiModelProperty(value = "微信支付回调的url")
private String notifyUrl; private String notifyUrl;
......
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 = "MonthlyyCardPayResultResponse对象", description = "订单支付结果响应对象")
public class MonthlyyCardPayResultResponse {
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 monthlyCardNo;
@ApiModelProperty(value = "微信支付回调的url")
private String notifyUrl;
}
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.ConsumerMonthlyCard;
import share.system.domain.vo.ConsumerMonthlyCardVo;
import java.util.List;
/**
* 用户月卡Service接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface ConsumerMonthlyCardService extends IService<ConsumerMonthlyCard> {
/**
* 查询用户月卡
*
* @param id 用户月卡主键
* @return 用户月卡
*/
public ConsumerMonthlyCard selectConsumerMonthlyCardById(Long id);
/**
* 查询用户月卡列表
*
* @param consumerMonthlyCard 用户月卡
* @return 用户月卡集合
*/
public List<ConsumerMonthlyCardVo> selectConsumerMonthlyCardList(ConsumerMonthlyCardVo consumerMonthlyCard);
/**
* 新增用户月卡
*
* @param consumerMonthlyCard 用户月卡
* @return 结果
*/
public int insertConsumerMonthlyCard(ConsumerMonthlyCard consumerMonthlyCard);
/**
* 修改用户月卡
*
* @param consumerMonthlyCard 用户月卡
* @return 结果
*/
public int updateConsumerMonthlyCard(ConsumerMonthlyCard consumerMonthlyCard);
/**
* 批量删除用户月卡
*
* @param ids 需要删除的用户月卡主键集合
* @return 结果
*/
public int deleteConsumerMonthlyCardByIds(Long[] ids);
/**
* 删除用户月卡信息
*
* @param id 用户月卡主键
* @return 结果
*/
public int deleteConsumerMonthlyCardById(Long id);
ConsumerMonthlyCardVo selectByConsumerId();
}
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);
List<ConsumerSecondaryCardVo> selectByConsumerId();
}
...@@ -68,4 +68,6 @@ public interface ConsumerWalletService extends IService<ConsumerWallet> { ...@@ -68,4 +68,6 @@ public interface ConsumerWalletService extends IService<ConsumerWallet> {
boolean addConsumerWallet(ConsumerWallet consumerWallet); boolean addConsumerWallet(ConsumerWallet consumerWallet);
boolean editConsumerWallet(ConsumerWallet consumerWallet, Recharge recharge, ConsumerMember one); boolean editConsumerWallet(ConsumerWallet consumerWallet, Recharge recharge, ConsumerMember one);
void accumulatedConsumptionStatistics(Long consumerId);
} }
package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.MonthlyCardConf;
import java.util.List;
/**
* 月卡配置Service接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface MonthlyCardConfService extends IService<MonthlyCardConf> {
/**
* 查询月卡配置
*
* @param id 月卡配置主键
* @return 月卡配置
*/
public MonthlyCardConf selectMonthlyCardConfById(Long id);
/**
* 查询月卡配置列表
*
* @param monthlyCardConf 月卡配置
* @return 月卡配置集合
*/
public List<MonthlyCardConf> selectMonthlyCardConfList(MonthlyCardConf monthlyCardConf);
/**
* 新增月卡配置
*
* @param monthlyCardConf 月卡配置
* @return 结果
*/
public int insertMonthlyCardConf(MonthlyCardConf monthlyCardConf);
/**
* 修改月卡配置
*
* @param monthlyCardConf 月卡配置
* @return 结果
*/
public int updateMonthlyCardConf(MonthlyCardConf monthlyCardConf);
/**
* 批量删除月卡配置
*
* @param ids 需要删除的月卡配置主键集合
* @return 结果
*/
public int deleteMonthlyCardConfByIds(Long[] ids);
/**
* 删除月卡配置信息
*
* @param id 月卡配置主键
* @return 结果
*/
public int deleteMonthlyCardConfById(Long id);
}
package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.MonthlyCardLog;
import share.system.domain.vo.MonthlyCardLogVo;
import java.util.List;
/**
* 月卡使用记录Service接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface MonthlyCardLogService extends IService<MonthlyCardLog> {
/**
* 查询月卡使用记录
*
* @param id 月卡使用记录主键
* @return 月卡使用记录
*/
public MonthlyCardLog selectMonthlyCardLogById(Long id);
/**
* 查询月卡使用记录列表
*
* @param monthlyCardLog 月卡使用记录
* @return 月卡使用记录集合
*/
public List<MonthlyCardLogVo> selectMonthlyCardLogList(MonthlyCardLogVo monthlyCardLog);
/**
* 新增月卡使用记录
*
* @param monthlyCardLog 月卡使用记录
* @return 结果
*/
public int insertMonthlyCardLog(MonthlyCardLog monthlyCardLog);
/**
* 修改月卡使用记录
*
* @param monthlyCardLog 月卡使用记录
* @return 结果
*/
public int updateMonthlyCardLog(MonthlyCardLog monthlyCardLog);
/**
* 批量删除月卡使用记录
*
* @param ids 需要删除的月卡使用记录主键集合
* @return 结果
*/
public int deleteMonthlyCardLogByIds(Long[] ids);
/**
* 删除月卡使用记录信息
*
* @param id 月卡使用记录主键
* @return 结果
*/
public int deleteMonthlyCardLogById(Long id);
}
package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.MonthlyCardOrder;
import share.system.domain.vo.MonthlyCardOrderVo;
import share.system.request.CreateMonthlyCardRequest;
import share.system.response.MonthlyyCardPayResultResponse;
import java.util.List;
/**
* 月卡订单Service接口
*
* @author wuwenlong
* @date 2024-08-27
*/
public interface MonthlyCardOrderService extends IService<MonthlyCardOrder> {
/**
* 查询月卡订单
*
* @param id 月卡订单主键
* @return 月卡订单
*/
public MonthlyCardOrder selectMonthlyCardOrderById(Long id);
/**
* 查询月卡订单列表
*
* @param monthlyCardOrder 月卡订单
* @return 月卡订单集合
*/
public List<MonthlyCardOrderVo> selectMonthlyCardOrderList(MonthlyCardOrderVo monthlyCardOrder);
/**
* 新增月卡订单
*
* @param monthlyCardOrder 月卡订单
* @return 结果
*/
public int insertMonthlyCardOrder(MonthlyCardOrder monthlyCardOrder);
/**
* 修改月卡订单
*
* @param monthlyCardOrder 月卡订单
* @return 结果
*/
public int updateMonthlyCardOrder(MonthlyCardOrder monthlyCardOrder);
/**
* 批量删除月卡订单
*
* @param ids 需要删除的月卡订单主键集合
* @return 结果
*/
public int deleteMonthlyCardOrderByIds(Long[] ids);
/**
* 删除月卡订单信息
*
* @param id 月卡订单主键
* @return 结果
*/
public int deleteMonthlyCardOrderById(Long id);
MonthlyyCardPayResultResponse createMonthlyCard(CreateMonthlyCardRequest request);
MonthlyCardOrderVo queryMonthlyCardInfoByNo(String monthlyCardNo);
void paymentSuccessful(MonthlyCardOrder monthlyCardOrder);
MonthlyCardOrder getInfoByEntity(MonthlyCardOrder monthlyCardOrder);
}
package share.system.service; package share.system.service;
import share.system.domain.EquityMembersOrder; import share.system.domain.*;
import share.system.domain.Recharge; import share.system.response.*;
import share.system.domain.SOrder;
import share.system.response.EquityMembersResultResponse;
import share.system.response.OrderPayResultResponse;
import share.system.response.RechargePayResultResponse;
/** /**
* @Author wwl * @Author wwl
...@@ -36,4 +32,7 @@ public interface OrderPayService { ...@@ -36,4 +32,7 @@ public interface OrderPayService {
EquityMembersResultResponse saobeiEquityMembersOrderPayment(EquityMembersOrder equityMembersOrder); EquityMembersResultResponse saobeiEquityMembersOrderPayment(EquityMembersOrder equityMembersOrder);
SecondaryCardOrderPayResultResponse saobeiSecondaryCardOrderPayment(SecondaryCardOrder secondaryCardOrder);
MonthlyyCardPayResultResponse saobeiCreateMonthlyCardOrderPayment(MonthlyCardOrder monthlyCardOrder);
} }
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 share.system.domain.vo.SecondaryCardLogVo;
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<SecondaryCardLogVo> selectSecondaryCardLogList(SecondaryCardLogVo 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.domain.vo.SecondaryCardOrderVo;
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<SecondaryCardOrderVo> selectSecondaryCardOrderList(SecondaryCardOrderVo 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);
SecondaryCardOrderVo querySecondaryCardInfoByNo(String secondaryCardNo);
}
package share.system.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.SharingActivities;
/**
* 分享活动绑定关系Service接口
*
* @author wuwenlong
* @date 2024-09-02
*/
public interface SharingActivitiesService extends IService<SharingActivities>
{
/**
* 查询分享活动绑定关系
*
* @param id 分享活动绑定关系主键
* @return 分享活动绑定关系
*/
public SharingActivities selectSharingActivitiesById(Long id);
/**
* 查询分享活动绑定关系列表
*
* @param sharingActivities 分享活动绑定关系
* @return 分享活动绑定关系集合
*/
public List<SharingActivities> selectSharingActivitiesList(SharingActivities sharingActivities);
/**
* 新增分享活动绑定关系
*
* @param sharingActivities 分享活动绑定关系
* @return 结果
*/
public int insertSharingActivities(SharingActivities sharingActivities);
/**
* 修改分享活动绑定关系
*
* @param sharingActivities 分享活动绑定关系
* @return 结果
*/
public int updateSharingActivities(SharingActivities sharingActivities);
/**
* 批量删除分享活动绑定关系
*
* @param ids 需要删除的分享活动绑定关系主键集合
* @return 结果
*/
public int deleteSharingActivitiesByIds(Long[] ids);
/**
* 删除分享活动绑定关系信息
*
* @param id 分享活动绑定关系主键
* @return 结果
*/
public int deleteSharingActivitiesById(Long id);
}
...@@ -3,6 +3,7 @@ package share.system.service; ...@@ -3,6 +3,7 @@ package share.system.service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import share.common.enums.MessageReminderEnum; import share.common.enums.MessageReminderEnum;
import share.system.domain.SOrder; import share.system.domain.SOrder;
import share.system.domain.WithdrawLog;
import share.system.domain.vo.*; import share.system.domain.vo.*;
import share.system.response.WeChatJsSdkConfigResponse; import share.system.response.WeChatJsSdkConfigResponse;
...@@ -192,4 +193,5 @@ public interface WechatNewService { ...@@ -192,4 +193,5 @@ public interface WechatNewService {
*/ */
WeChatPhoneNumberVo getPhoneNumber(String code); WeChatPhoneNumberVo getPhoneNumber(String code);
Boolean initiateBatchTransfer(WithdrawLog withdrawLog);
} }
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.ConsumerMonthlyCard;
import share.system.domain.SConsumer;
import share.system.domain.vo.ConsumerMonthlyCardVo;
import share.system.mapper.ConsumerMonthlyCardMapper;
import share.system.service.ConsumerMonthlyCardService;
import share.system.service.SConsumerService;
import java.util.List;
/**
* 用户月卡Service业务层处理
*
* @author wuwenlong
* @date 2024-08-27
*/
@Service
public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyCardMapper, ConsumerMonthlyCard> implements ConsumerMonthlyCardService {
@Autowired
private ConsumerMonthlyCardMapper consumerMonthlyCardMapper;
@Autowired
private SConsumerService sConsumerService;
/**
* 查询用户月卡
*
* @param id 用户月卡主键
* @return 用户月卡
*/
@Override
public ConsumerMonthlyCard selectConsumerMonthlyCardById(Long id) {
return consumerMonthlyCardMapper.selectConsumerMonthlyCardById(id);
}
/**
* 查询用户月卡列表
*
* @param consumerMonthlyCard 用户月卡
* @return 用户月卡
*/
@Override
public List<ConsumerMonthlyCardVo> selectConsumerMonthlyCardList(ConsumerMonthlyCardVo consumerMonthlyCard) {
return consumerMonthlyCardMapper.selectConsumerMonthlyCardList(consumerMonthlyCard);
}
/**
* 新增用户月卡
*
* @param consumerMonthlyCard 用户月卡
* @return 结果
*/
@Override
public int insertConsumerMonthlyCard(ConsumerMonthlyCard consumerMonthlyCard) {
consumerMonthlyCard.setCreateTime(DateUtils.getNowDate());
return consumerMonthlyCardMapper.insertConsumerMonthlyCard(consumerMonthlyCard);
}
/**
* 修改用户月卡
*
* @param consumerMonthlyCard 用户月卡
* @return 结果
*/
@Override
public int updateConsumerMonthlyCard(ConsumerMonthlyCard consumerMonthlyCard) {
consumerMonthlyCard.setUpdateTime(DateUtils.getNowDate());
return consumerMonthlyCardMapper.updateConsumerMonthlyCard(consumerMonthlyCard);
}
/**
* 批量删除用户月卡
*
* @param ids 需要删除的用户月卡主键
* @return 结果
*/
@Override
public int deleteConsumerMonthlyCardByIds(Long[] ids) {
return consumerMonthlyCardMapper.deleteConsumerMonthlyCardByIds(ids);
}
/**
* 删除用户月卡信息
*
* @param id 用户月卡主键
* @return 结果
*/
@Override
public int deleteConsumerMonthlyCardById(Long id) {
return consumerMonthlyCardMapper.deleteConsumerMonthlyCardById(id);
}
@Override
public ConsumerMonthlyCardVo selectByConsumerId() {
SConsumer info = sConsumerService.getInfo();
ConsumerMonthlyCardVo vo = new ConsumerMonthlyCardVo();
vo.setConsumerId(info.getId());
return consumerMonthlyCardMapper.selectByConsumerId(vo);
}
}
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.SConsumer;
import share.system.domain.vo.ConsumerSecondaryCardVo;
import share.system.mapper.ConsumerSecondaryCardMapper;
import share.system.service.ConsumerSecondaryCardService;
import share.system.service.SConsumerService;
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;
@Autowired
private SConsumerService sConsumerService;
/**
* 查询用户次卡
*
* @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);
}
@Override
public List<ConsumerSecondaryCardVo> selectByConsumerId() {
SConsumer info = sConsumerService.getInfo();
ConsumerSecondaryCardVo vo = new ConsumerSecondaryCardVo();
vo.setConsumerId(info.getId());
return consumerSecondaryCardMapper.selectByConsumerId(vo);
}
}
...@@ -202,6 +202,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme ...@@ -202,6 +202,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
LambdaQueryWrapper<Device> queryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<Device> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(Device::getDevType, DeviceType.DEVICE_CCEE.getCode()); queryWrapper.eq(Device::getDevType, DeviceType.DEVICE_CCEE.getCode());
queryWrapper.isNotNull(Device::getRoomId); queryWrapper.isNotNull(Device::getRoomId);
queryWrapper.inSql(Device::getRoomId, "select id from s_room where room_type not in ('4', '5')");
List<Device> list = deviceMapper.selectList(queryWrapper); List<Device> list = deviceMapper.selectList(queryWrapper);
if (list.size() > 0) { if (list.size() > 0) {
// 默认15天 // 默认15天
......
...@@ -54,6 +54,10 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -54,6 +54,10 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
private RedisUtil redisUtil; private RedisUtil redisUtil;
@Autowired @Autowired
private ConsumerWalletService consumerWalletService; private ConsumerWalletService consumerWalletService;
@Autowired
private IntegralLogService integralLogService;
@Autowired
private MemberProgressLogService memberProgressLogService;
/** /**
* 查询权益会员订单 * 查询权益会员订单
...@@ -176,7 +180,18 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -176,7 +180,18 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
newConsumerMember.setMemberConfigId(memberConfig.getId()); newConsumerMember.setMemberConfigId(memberConfig.getId());
newConsumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())), newConsumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())),
equityMembersOrderConfig.getValidityPeriod().intValue())); equityMembersOrderConfig.getValidityPeriod().intValue()));
newConsumerMember.setMembershipProgress(BigDecimal.ZERO); newConsumerMember.setMembershipProgress(equityMembersOrderConfig.getGiftPoints());
if (equityMembersOrderConfig.getGiftPoints().compareTo(BigDecimal.ZERO) > 0) {
MemberProgressLog memberProgressLog = new MemberProgressLog();
memberProgressLog.setConsumerId(equityMembersOrder.getConsumerId());
memberProgressLog.setCurrentProgress(BigDecimal.ZERO);
memberProgressLog.setVariableProgress(equityMembersOrderConfig.getGiftPoints());
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setOperationTime(new Date());
memberProgressLog.setCreateTime(new Date());
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Math.toIntExact(memberConfig.getValidityPeriod())));
memberProgressLogService.save(memberProgressLog);
}
newConsumerMember.setCreateTime(new Date()); newConsumerMember.setCreateTime(new Date());
newConsumerMember.setIsRights(YesNoEnum.yes.getIndex()); newConsumerMember.setIsRights(YesNoEnum.yes.getIndex());
consumerMemberService.save(newConsumerMember); consumerMemberService.save(newConsumerMember);
...@@ -189,21 +204,24 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -189,21 +204,24 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
redisUtil.set(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + equityMembersOrder.getConsumerId(), json.toString()); redisUtil.set(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + equityMembersOrder.getConsumerId(), json.toString());
logger.debug("redis新增权益会员有效期"); logger.debug("redis新增权益会员有效期");
} else { } else {
MemberConfig memberConfigServiceOne = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMembershipLevel, consumerMember.getMembershipLevel())
.eq(MemberConfig::getMemberType, MemberTypeEnum.RIGHTS.getIndex()));
if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) { if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) {
//在原来的基础上增加有效期 //在原来的基础上增加有效期
consumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, consumerMember.getExpirationDate())), consumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, consumerMember.getExpirationDate())),
equityMembersOrderConfig.getValidityPeriod().intValue())); memberConfigServiceOne.getValidityPeriod().intValue()));
extracted(equityMembersOrder, equityMembersOrderConfig, consumerMember, consumerWallet, memberConfigServiceOne);
consumerMemberService.updateConsumerMember(consumerMember); consumerMemberService.updateConsumerMember(consumerMember);
logger.debug("权益会员原来的基础上增加有效期"); logger.debug("权益会员原来的基础上增加有效期");
} else { } else {
consumerMember.setIsRights(YesNoEnum.yes.getIndex()); consumerMember.setIsRights(YesNoEnum.yes.getIndex());
//修改会员类型为权益会员 //修改会员类型为权益会员
consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex()); consumerMember.setMemberType(MemberTypeEnum.RIGHTS.getIndex());
consumerMember.setMemberConfigId(memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() consumerMember.setMemberConfigId(memberConfigServiceOne.getId());
.eq(MemberConfig::getMembershipLevel, consumerMember.getMembershipLevel())
.eq(MemberConfig::getMemberType, MemberTypeEnum.RIGHTS.getIndex())).getId());
consumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())), consumerMember.setExpirationDate(DateUtils.addYears(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())),
equityMembersOrderConfig.getValidityPeriod().intValue())); memberConfigServiceOne.getValidityPeriod().intValue()));
extracted(equityMembersOrder, equityMembersOrderConfig, consumerMember, consumerWallet, memberConfigServiceOne);
consumerMemberService.updateConsumerMember(consumerMember); consumerMemberService.updateConsumerMember(consumerMember);
logger.debug("修改会员类型为权益会员"); logger.debug("修改会员类型为权益会员");
} }
...@@ -220,12 +238,61 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -220,12 +238,61 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
consumerWalletOne.setBalance(BigDecimal.ZERO); consumerWalletOne.setBalance(BigDecimal.ZERO);
consumerWalletOne.setRemainingDuration(BigDecimal.ZERO); consumerWalletOne.setRemainingDuration(BigDecimal.ZERO);
consumerWalletOne.setRemainingIntegral(BigDecimal.ZERO); consumerWalletOne.setRemainingIntegral(BigDecimal.ZERO);
if (equityMembersOrderConfig.getGiftPoints().compareTo(BigDecimal.ZERO) > 0) {
consumerWalletOne.setRemainingIntegral(consumerWalletOne.getRemainingIntegral().add(equityMembersOrderConfig.getGiftPoints()));
IntegralLog integralLog = new IntegralLog();
integralLog.setConsumerId(equityMembersOrder.getConsumerId());
integralLog.setCurrentIntegral(BigDecimal.ZERO);
integralLog.setVariableIntegral(equityMembersOrderConfig.getGiftPoints());
integralLog.setOperationType(YesNoEnum.yes.getIndex());
integralLog.setOperationTime(new Date());
integralLog.setCreateTime(new Date());
integralLogService.save(integralLog);
}
consumerWalletOne.setCreateTime(new Date()); consumerWalletOne.setCreateTime(new Date());
consumerWalletService.save(consumerWalletOne); consumerWalletService.save(consumerWalletOne);
consumerWalletService.accumulatedConsumptionStatistics(equityMembersOrder.getConsumerId());
} }
updateEquityMembersOrder(equityMembersOrder); updateEquityMembersOrder(equityMembersOrder);
} }
private void extracted(EquityMembersOrder equityMembersOrder, EquityMembersOrderConfig equityMembersOrderConfig,
ConsumerMember consumerMember, ConsumerWallet consumerWallet, MemberConfig memberConfigServiceOne) {
if (equityMembersOrderConfig.getGiftPoints().compareTo(BigDecimal.ZERO) > 0) {
MemberProgressLog memberProgressLog = new MemberProgressLog();
memberProgressLog.setConsumerId(equityMembersOrder.getConsumerId());
memberProgressLog.setCurrentProgress(consumerMember.getMembershipProgress());
consumerMember.setMembershipProgress(equityMembersOrderConfig.getGiftPoints().add(consumerMember.getMembershipProgress()));
memberProgressLog.setVariableProgress(equityMembersOrderConfig.getGiftPoints().add(consumerMember.getMembershipProgress()));
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setOperationTime(new Date());
memberProgressLog.setCreateTime(new Date());
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Math.toIntExact(memberConfigServiceOne.getValidityPeriod())));
IntegralLog integralLog = new IntegralLog();
integralLog.setConsumerId(equityMembersOrder.getConsumerId());
integralLog.setCurrentIntegral(consumerMember.getMembershipProgress());
consumerWallet.setRemainingIntegral(consumerWallet.getRemainingIntegral().add(equityMembersOrderConfig.getGiftPoints()));
integralLog.setVariableIntegral(equityMembersOrderConfig.getGiftPoints().add(consumerWallet.getRemainingIntegral()));
integralLog.setOperationType(YesNoEnum.yes.getIndex());
integralLog.setOperationTime(new Date());
integralLog.setCreateTime(new Date());
integralLogService.save(integralLog);
memberProgressLogService.save(memberProgressLog);
consumerWalletService.updateById(consumerWallet);
}
//查询当前会员类型和下一级的会员配置
MemberConfig one = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
.eq(MemberConfig::getMemberType, consumerMember.getMemberType())
.eq(MemberConfig::getMembershipLevel, consumerMember.getMembershipLevel() + 1L));
if (ObjectUtil.isNotEmpty(one)) {
//判断是否升级
if (ObjectUtil.isNotEmpty(one) && consumerMember.getMembershipProgress().compareTo(BigDecimal.valueOf(one.getLimitRequirements())) >= 0) {
consumerMember.setMembershipLevel(consumerMember.getMembershipLevel() + 1L);
consumerMember.setMemberConfigId(one.getId());
}
}
}
@Override @Override
public Boolean cancelPay(String equityOrderNo) { public Boolean cancelPay(String equityOrderNo) {
EquityMembersOrder equityMembersOrder = getByEquityOrderNo(equityOrderNo); EquityMembersOrder equityMembersOrder = getByEquityOrderNo(equityOrderNo);
......
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.MonthlyCardConf;
import share.system.mapper.MonthlyCardConfMapper;
import share.system.service.MonthlyCardConfService;
import java.util.List;
/**
* 月卡配置Service业务层处理
*
* @author wuwenlong
* @date 2024-08-27
*/
@Service
public class MonthlyCardConfServiceImpl extends ServiceImpl<MonthlyCardConfMapper, MonthlyCardConf> implements MonthlyCardConfService {
@Autowired
private MonthlyCardConfMapper monthlyCardConfMapper;
/**
* 查询月卡配置
*
* @param id 月卡配置主键
* @return 月卡配置
*/
@Override
public MonthlyCardConf selectMonthlyCardConfById(Long id) {
return monthlyCardConfMapper.selectMonthlyCardConfById(id);
}
/**
* 查询月卡配置列表
*
* @param monthlyCardConf 月卡配置
* @return 月卡配置
*/
@Override
public List<MonthlyCardConf> selectMonthlyCardConfList(MonthlyCardConf monthlyCardConf) {
return monthlyCardConfMapper.selectMonthlyCardConfList(monthlyCardConf);
}
/**
* 新增月卡配置
*
* @param monthlyCardConf 月卡配置
* @return 结果
*/
@Override
public int insertMonthlyCardConf(MonthlyCardConf monthlyCardConf) {
monthlyCardConf.setCreateTime(DateUtils.getNowDate());
return monthlyCardConfMapper.insertMonthlyCardConf(monthlyCardConf);
}
/**
* 修改月卡配置
*
* @param monthlyCardConf 月卡配置
* @return 结果
*/
@Override
public int updateMonthlyCardConf(MonthlyCardConf monthlyCardConf) {
monthlyCardConf.setUpdateTime(DateUtils.getNowDate());
return monthlyCardConfMapper.updateMonthlyCardConf(monthlyCardConf);
}
/**
* 批量删除月卡配置
*
* @param ids 需要删除的月卡配置主键
* @return 结果
*/
@Override
public int deleteMonthlyCardConfByIds(Long[] ids) {
return monthlyCardConfMapper.deleteMonthlyCardConfByIds(ids);
}
/**
* 删除月卡配置信息
*
* @param id 月卡配置主键
* @return 结果
*/
@Override
public int deleteMonthlyCardConfById(Long id) {
return monthlyCardConfMapper.deleteMonthlyCardConfById(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.MonthlyCardLog;
import share.system.domain.vo.MonthlyCardLogVo;
import share.system.mapper.MonthlyCardLogMapper;
import share.system.service.MonthlyCardLogService;
import java.util.List;
/**
* 月卡使用记录Service业务层处理
*
* @author wuwenlong
* @date 2024-08-27
*/
@Service
public class MonthlyCardLogServiceImpl extends ServiceImpl<MonthlyCardLogMapper, MonthlyCardLog> implements MonthlyCardLogService {
@Autowired
private MonthlyCardLogMapper monthlyCardLogMapper;
/**
* 查询月卡使用记录
*
* @param id 月卡使用记录主键
* @return 月卡使用记录
*/
@Override
public MonthlyCardLog selectMonthlyCardLogById(Long id) {
return monthlyCardLogMapper.selectMonthlyCardLogById(id);
}
/**
* 查询月卡使用记录列表
*
* @param monthlyCardLog 月卡使用记录
* @return 月卡使用记录
*/
@Override
public List<MonthlyCardLogVo> selectMonthlyCardLogList(MonthlyCardLogVo monthlyCardLog) {
return monthlyCardLogMapper.selectMonthlyCardLogList(monthlyCardLog);
}
/**
* 新增月卡使用记录
*
* @param monthlyCardLog 月卡使用记录
* @return 结果
*/
@Override
public int insertMonthlyCardLog(MonthlyCardLog monthlyCardLog) {
monthlyCardLog.setCreateTime(DateUtils.getNowDate());
return monthlyCardLogMapper.insertMonthlyCardLog(monthlyCardLog);
}
/**
* 修改月卡使用记录
*
* @param monthlyCardLog 月卡使用记录
* @return 结果
*/
@Override
public int updateMonthlyCardLog(MonthlyCardLog monthlyCardLog) {
monthlyCardLog.setUpdateTime(DateUtils.getNowDate());
return monthlyCardLogMapper.updateMonthlyCardLog(monthlyCardLog);
}
/**
* 批量删除月卡使用记录
*
* @param ids 需要删除的月卡使用记录主键
* @return 结果
*/
@Override
public int deleteMonthlyCardLogByIds(Long[] ids) {
return monthlyCardLogMapper.deleteMonthlyCardLogByIds(ids);
}
/**
* 删除月卡使用记录信息
*
* @param id 月卡使用记录主键
* @return 结果
*/
@Override
public int deleteMonthlyCardLogById(Long id) {
return monthlyCardLogMapper.deleteMonthlyCardLogById(id);
}
}
package share.system.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.ConsumerMonthlyCard;
import share.system.domain.MonthlyCardConf;
import share.system.domain.MonthlyCardOrder;
import share.system.domain.SConsumer;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.MonthlyCardOrderVo;
import share.system.mapper.MonthlyCardOrderMapper;
import share.system.request.CreateMonthlyCardRequest;
import share.system.response.MonthlyyCardPayResultResponse;
import share.system.service.*;
import java.util.Date;
import java.util.List;
/**
* 月卡订单Service业务层处理
*
* @author wuwenlong
* @date 2024-08-27
*/
@Service
public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMapper, MonthlyCardOrder> implements MonthlyCardOrderService {
@Autowired
private MonthlyCardOrderMapper monthlyCardOrderMapper;
@Autowired
private SConsumerService sConsumerService;
@Autowired
private OrderPayService orderPayService;
@Autowired
private MonthlyCardConfService monthlyCardConfService;
@Autowired
private ConsumerMonthlyCardService consumerMonthlyCardService;
/**
* 查询月卡订单
*
* @param id 月卡订单主键
* @return 月卡订单
*/
@Override
public MonthlyCardOrder selectMonthlyCardOrderById(Long id) {
return monthlyCardOrderMapper.selectMonthlyCardOrderById(id);
}
/**
* 查询月卡订单列表
*
* @param monthlyCardOrder 月卡订单
* @return 月卡订单
*/
@Override
public List<MonthlyCardOrderVo> selectMonthlyCardOrderList(MonthlyCardOrderVo monthlyCardOrder) {
return monthlyCardOrderMapper.selectMonthlyCardOrderList(monthlyCardOrder);
}
/**
* 新增月卡订单
*
* @param monthlyCardOrder 月卡订单
* @return 结果
*/
@Override
public int insertMonthlyCardOrder(MonthlyCardOrder monthlyCardOrder) {
monthlyCardOrder.setCreateTime(DateUtils.getNowDate());
return monthlyCardOrderMapper.insertMonthlyCardOrder(monthlyCardOrder);
}
/**
* 修改月卡订单
*
* @param monthlyCardOrder 月卡订单
* @return 结果
*/
@Override
public int updateMonthlyCardOrder(MonthlyCardOrder monthlyCardOrder) {
monthlyCardOrder.setUpdateTime(DateUtils.getNowDate());
return monthlyCardOrderMapper.updateMonthlyCardOrder(monthlyCardOrder);
}
/**
* 批量删除月卡订单
*
* @param ids 需要删除的月卡订单主键
* @return 结果
*/
@Override
public int deleteMonthlyCardOrderByIds(Long[] ids) {
return monthlyCardOrderMapper.deleteMonthlyCardOrderByIds(ids);
}
/**
* 删除月卡订单信息
*
* @param id 月卡订单主键
* @return 结果
*/
@Override
public int deleteMonthlyCardOrderById(Long id) {
return monthlyCardOrderMapper.deleteMonthlyCardOrderById(id);
}
@Override
public MonthlyyCardPayResultResponse createMonthlyCard(CreateMonthlyCardRequest 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("请绑定手机号");
}
}
MonthlyCardOrder monthlyCardOrder = generatMonthlyCarddOrder(request, user);
monthlyCardOrder.setCreateTime(new Date());
save(monthlyCardOrder);
MonthlyyCardPayResultResponse response = orderPayService.saobeiCreateMonthlyCardOrderPayment(monthlyCardOrder);
return response;
}
private MonthlyCardOrder generatMonthlyCarddOrder(CreateMonthlyCardRequest request, SConsumer user) {
MonthlyCardOrder monthlyCardOrder = new MonthlyCardOrder();
BeanUtils.copyProperties(request, monthlyCardOrder);
MonthlyCardConf byId = monthlyCardConfService.getById(request.getMonthlyCardConfId());
if (ObjectUtil.isEmpty(byId)) {
throw new BaseException("月卡配置异常");
}
monthlyCardOrder.setMonthlyCardNo(BaseUtil.getOrderNo("YK"));
monthlyCardOrder.setMonthlyCardAmount(byId.getMonthlyCardAmount());
monthlyCardOrder.setPayStatus(YesNoEnum.no.getIndex());
monthlyCardOrder.setConsumerId(user.getId());
monthlyCardOrder.setPhone(user.getPhone());
return monthlyCardOrder;
}
@Override
public MonthlyCardOrderVo queryMonthlyCardInfoByNo(String monthlyCardNo) {
LambdaQueryWrapper<MonthlyCardOrder> lqw = Wrappers.lambdaQuery();
lqw.eq(MonthlyCardOrder::getMonthlyCardNo, monthlyCardNo);
MonthlyCardOrder one = getOne(lqw);
MonthlyCardOrderVo vo = new MonthlyCardOrderVo();
BeanUtils.copyProperties(one, vo);
return vo;
}
@Override
public void paymentSuccessful(MonthlyCardOrder monthlyCardOrder) {
ConsumerMonthlyCard consumerMonthlyCard = new ConsumerMonthlyCard();
MonthlyCardConf byId = monthlyCardConfService.getById(monthlyCardOrder.getMonthlyCardConfId());
consumerMonthlyCard.setMonthlyCardConfId(byId.getId());
consumerMonthlyCard.setConsumerId(monthlyCardOrder.getConsumerId());
consumerMonthlyCard.setPhone(monthlyCardOrder.getPhone());
consumerMonthlyCard.setExpirationDate(DateUtils.addYears(new Date(), byId.getMonthlyCardDays().intValue()));
consumerMonthlyCard.setFreeDuration(byId.getFreeDuration());
consumerMonthlyCard.setMonthlyCardDays(byId.getMonthlyCardDays());
consumerMonthlyCardService.save(consumerMonthlyCard);
}
@Override
public MonthlyCardOrder getInfoByEntity(MonthlyCardOrder monthlyCardOrder) {
return monthlyCardOrderMapper.getInfoByEntity(monthlyCardOrder);
}
}
...@@ -9,6 +9,8 @@ import cn.hutool.json.JSONArray; ...@@ -9,6 +9,8 @@ import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -40,6 +42,8 @@ import java.util.stream.Collectors; ...@@ -40,6 +42,8 @@ import java.util.stream.Collectors;
@Service @Service
public class MqttxServiceImpl implements MqttxService { public class MqttxServiceImpl implements MqttxService {
private static final Logger log = LoggerFactory.getLogger(MqttxServiceImpl.class);
@Autowired @Autowired
private DeviceGatewayMapper deviceGatewayMapper; private DeviceGatewayMapper deviceGatewayMapper;
@Autowired @Autowired
...@@ -148,7 +152,7 @@ public class MqttxServiceImpl implements MqttxService { ...@@ -148,7 +152,7 @@ public class MqttxServiceImpl implements MqttxService {
@Override @Override
public boolean mqttReport(String topic, String payload) { public boolean mqttReport(String topic, String payload) {
boolean isSuccess = false; boolean isSuccess = false;
System.out.println("cespayload: "+payload); log.info("cespayload: "+payload);
if (topic.endsWith(MqttReportType.getTopicStr("batch_report"))) { if (topic.endsWith(MqttReportType.getTopicStr("batch_report"))) {
JSONObject json = JSONUtil.parseObj(payload); JSONObject json = JSONUtil.parseObj(payload);
if (json.size() > 0) { if (json.size() > 0) {
...@@ -757,7 +761,7 @@ public class MqttxServiceImpl implements MqttxService { ...@@ -757,7 +761,7 @@ public class MqttxServiceImpl implements MqttxService {
l = 10L - betweenDay; l = 10L - betweenDay;
} }
} }
System.out.println("测试设备消息间隔:"+ l); log.info("测试设备消息间隔:"+ l);
// 异步执行 // 异步执行
this.supplyAsync(l, vo, room.getStoreId()); this.supplyAsync(l, vo, room.getStoreId());
......
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