init
This commit is contained in:
25
yudao-module-canteen/yudao-module-canteen-api/pom.xml
Normal file
25
yudao-module-canteen/yudao-module-canteen-api/pom.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-canteen</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>yudao-module-canteen-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
<description> <!-- 4. 新增 description 为该模块的描述 -->
|
||||
食堂收费模块,主要实现 用餐人员信息、商品支付、学生请假 等功能。
|
||||
</description>
|
||||
|
||||
<dependencies> <!-- 5. 新增 yudao-common 依赖 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,13 @@
|
||||
package api.order;
|
||||
|
||||
import api.order.dto.UserPayOrderRefundReqDTO;
|
||||
|
||||
/**
|
||||
* 用户 API 接口
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
public interface UserPayOrderApi {
|
||||
|
||||
int refund(UserPayOrderRefundReqDTO userPayOrderRefundReqDTO);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package api.order.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserPayOrderRefundReqDTO {
|
||||
|
||||
private String tradeOrderNo;
|
||||
|
||||
private Integer price;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package api.user;
|
||||
|
||||
import api.user.dto.UserInfoReqDTO;
|
||||
import api.user.dto.UserInfoRespDTO;
|
||||
|
||||
/**
|
||||
* 用户 API 接口
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
public interface UserInfoApi {
|
||||
|
||||
UserInfoRespDTO selectByIdForUpdate(Long id);
|
||||
|
||||
int subBalance(UserInfoReqDTO userInfoReqDTO);
|
||||
|
||||
boolean verifyStudentId(Long id, Long userId);
|
||||
|
||||
int addBalance(UserInfoReqDTO userInfoReqDTO);
|
||||
|
||||
boolean updateUnPaidAlreadyById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package api.user.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 学校食堂用户 DTO
|
||||
*
|
||||
* @author 张书铭
|
||||
*/
|
||||
@Data
|
||||
public class UserInfoReqDTO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private String productId;
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package api.user.dto;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学校食堂用户 DO
|
||||
*
|
||||
* @author 张书铭
|
||||
*/
|
||||
@Data
|
||||
public class UserInfoRespDTO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 班级
|
||||
*/
|
||||
private String classCla;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 本月是否已缴费
|
||||
*/
|
||||
private String izPaidAlready;
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
private String openId;
|
||||
/**
|
||||
* 用餐类型
|
||||
*
|
||||
* 枚举
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 余额
|
||||
*/
|
||||
private Integer balance;
|
||||
/**
|
||||
* 预计缴费金额
|
||||
*/
|
||||
private Integer expectBalance;
|
||||
/**
|
||||
* 预计用餐开始时间
|
||||
*/
|
||||
private LocalDateTime mealStartTime;
|
||||
/**
|
||||
* 预计用餐结束时间
|
||||
*/
|
||||
private LocalDateTime mealEndTime;
|
||||
/**
|
||||
* 当月上学天数
|
||||
*/
|
||||
private String workDays;
|
||||
/**
|
||||
* 下月上学天数
|
||||
*/
|
||||
private String nextWorkDays;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private String productId;
|
||||
/**
|
||||
* 间餐数量
|
||||
*/
|
||||
private Integer diningRoomCount;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.canteen.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* Infra 错误码枚举类
|
||||
*
|
||||
* infra 系统,使用 1-001-000-000 段
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
// === 参数配置 1-001-000-000 ===
|
||||
|
||||
ErrorCode USER_INFO_NOT_EXISTS = new ErrorCode(1_010_001_001, "用户不存在");
|
||||
ErrorCode LEAVE_INFO_NOT_EXISTS = new ErrorCode(1_010_001_002, "请假记录不存在");
|
||||
ErrorCode LEAVE_DAY_NOT_EXISTS = new ErrorCode(1_010_001_003, "请假天数不能超出当月工作日天数");
|
||||
ErrorCode LEAVE_INFO_EXISTS = new ErrorCode(1_010_001_004, "用户已存在,请联系客服");
|
||||
ErrorCode USER_INFO_NOT_VALID_PARAMS = new ErrorCode(1_010_001_005,"参数无效");
|
||||
ErrorCode LEAVE_DAY_NOT_EXISTS1 = new ErrorCode(1_010_001_006, "请假天数只能为1天,请联系客服");
|
||||
ErrorCode LEAVE_DAY_NOT_EXISTS2 = new ErrorCode(1_010_001_007, "当天已请假,如需变更,请联系客服");
|
||||
ErrorCode SUMMARY_REPORT_NOT_EXISTS = new ErrorCode(1_010_001_008, "用餐统计报不存在");
|
||||
ErrorCode USER_INFO_REPEATED_DEDUCTION = new ErrorCode(1_010_001_009, "今日已扣除,请勿重复扣除");
|
||||
ErrorCode USER_INFO_IDCARD_DEDUCTION = new ErrorCode(1_010_001_010, "身份证解析失败,请联系客服");
|
||||
ErrorCode USER_INFO_IDCARD_EXISTS = new ErrorCode(1_010_001_011, "身份证已注册,请联系客服");
|
||||
ErrorCode USER_UPDATE_BALANCE_ERR = new ErrorCode(1_010_001_012, "更新余额失败");
|
||||
|
||||
ErrorCode LEAVE_UPDATE_NOT_EXISTS = new ErrorCode(1_010_001_013, "请假状态修改失败,请联系管理员");
|
||||
ErrorCode LEAVE_SWITCH_NOT_EXISTS = new ErrorCode(1_010_001_014, "非用餐日,禁止请假");
|
||||
ErrorCode LEAVE_PAIDALREADY_NOT_EXISTS = new ErrorCode(1_010_001_015, "本月未缴费禁止请假");
|
||||
|
||||
ErrorCode USER_PAY_ORDER_NOT_EXISTS = new ErrorCode(1_011_001_001, "食堂缴费订单统计不存在");
|
||||
ErrorCode USER_RE_DO_ORDER = new ErrorCode(1_011_001_002, "重复缴费,本周已经缴费");
|
||||
ErrorCode YU_EBU_ZU_JIN_ZHI_QING_JIA = new ErrorCode(1_011_001_003, "余额不足,禁止请假");
|
||||
}
|
||||
Reference in New Issue
Block a user