Showing
6 changed files
with
225 additions
and
0 deletions
| 1 | +package com.tianting.infoloop.mapper; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 4 | +import com.tianting.infoloop.model.db.DinerMealSuspensionRecord; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 学生停餐记录Mapper接口 | ||
| 8 | + */ | ||
| 9 | +public interface DinerMealSuspensionRecordMapper extends BaseMapper<DinerMealSuspensionRecord> { | ||
| 10 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +package com.tianting.infoloop.model.db; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.FieldFill; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 7 | +import com.baomidou.mybatisplus.annotation.TableLogic; | ||
| 8 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 9 | +import com.baomidou.mybatisplus.extension.activerecord.Model; | ||
| 10 | +import lombok.Data; | ||
| 11 | +import lombok.EqualsAndHashCode; | ||
| 12 | +import lombok.experimental.Accessors; | ||
| 13 | + | ||
| 14 | +import java.io.Serializable; | ||
| 15 | +import java.time.LocalDateTime; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * @TableName diner_meal_suspension_records | ||
| 19 | + */ | ||
| 20 | +@Data | ||
| 21 | +@Accessors(chain = true) | ||
| 22 | +@EqualsAndHashCode(callSuper = true) | ||
| 23 | +@TableName(value ="diner_meal_suspension_records") | ||
| 24 | +public class DinerMealSuspensionRecord extends Model<DinerMealSuspensionRecord> implements Serializable { | ||
| 25 | + | ||
| 26 | + @TableId(type = IdType.AUTO) | ||
| 27 | + private Integer id; | ||
| 28 | + | ||
| 29 | + private Integer enterpriseId; | ||
| 30 | + | ||
| 31 | + private Integer clientId; | ||
| 32 | + | ||
| 33 | + private Integer classId; | ||
| 34 | + | ||
| 35 | + private Integer dinerId; | ||
| 36 | + | ||
| 37 | + private LocalDateTime startAt; | ||
| 38 | + | ||
| 39 | + private LocalDateTime endAt; | ||
| 40 | + | ||
| 41 | + private String comment; | ||
| 42 | + | ||
| 43 | + private Integer createdBy; | ||
| 44 | + | ||
| 45 | + @TableField(fill = FieldFill.INSERT) | ||
| 46 | + private LocalDateTime createdAt; | ||
| 47 | + | ||
| 48 | + private Integer creationSource; | ||
| 49 | + | ||
| 50 | + private Integer updatedBy; | ||
| 51 | + | ||
| 52 | + @TableField(fill = FieldFill.INSERT_UPDATE) | ||
| 53 | + private LocalDateTime updatedAt; | ||
| 54 | + | ||
| 55 | + private Integer updateSource; | ||
| 56 | + | ||
| 57 | + @TableLogic | ||
| 58 | + private Boolean isDeleted; | ||
| 59 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +package com.tianting.infoloop.service; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
| 4 | +import com.tianting.infoloop.model.db.DinerMealSuspensionRecord; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 学生停餐记录服务接口 | ||
| 8 | + */ | ||
| 9 | +public interface DinerMealSuspensionRecordService extends IService<DinerMealSuspensionRecord> { | ||
| 10 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
src/main/java/com/tianting/infoloop/service/impl/DinerMealSuspensionRecordServiceImpl.java
0 → 100644
| 1 | +package com.tianting.infoloop.service.impl; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 4 | +import com.tianting.infoloop.mapper.DinerMealSuspensionRecordMapper; | ||
| 5 | +import com.tianting.infoloop.model.db.DinerMealSuspensionRecord; | ||
| 6 | +import com.tianting.infoloop.service.DinerMealSuspensionRecordService; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 学生停餐记录服务实现类 | ||
| 11 | + */ | ||
| 12 | +@Service | ||
| 13 | +public class DinerMealSuspensionRecordServiceImpl extends ServiceImpl<DinerMealSuspensionRecordMapper, DinerMealSuspensionRecord> implements DinerMealSuspensionRecordService { | ||
| 14 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -54,6 +54,15 @@ service MealOrderServiceRpc { | ... | @@ -54,6 +54,15 @@ service MealOrderServiceRpc { |
| 54 | rpc QueryMealMenuRecordsByCondition (QueryMealMenuRecordsByConditionRpcRequest) returns (QueryMealMenuRecordsByConditionRpcResponse) {} | 54 | rpc QueryMealMenuRecordsByCondition (QueryMealMenuRecordsByConditionRpcRequest) returns (QueryMealMenuRecordsByConditionRpcResponse) {} |
| 55 | rpc CreateMealMenuRecord (CreateMealMenuRecordRpcRequest) returns (CreateMealMenuRecordRpcResponse) {} | 55 | rpc CreateMealMenuRecord (CreateMealMenuRecordRpcRequest) returns (CreateMealMenuRecordRpcResponse) {} |
| 56 | rpc QueryLatestMealMenuRecordsByClientIds (QueryLatestMealMenuRecordsByClientIdsRpcRequest) returns (QueryLatestMealMenuRecordsByClientIdsRpcResponse) {} | 56 | rpc QueryLatestMealMenuRecordsByClientIds (QueryLatestMealMenuRecordsByClientIdsRpcRequest) returns (QueryLatestMealMenuRecordsByClientIdsRpcResponse) {} |
| 57 | + | ||
| 58 | + // 停餐记录相关服务 | ||
| 59 | + rpc getDinerMealSuspensionRecordById(GetDinerMealSuspensionRecordByIdRpcRequest) returns (GetDinerMealSuspensionRecordByIdRpcResponse); | ||
| 60 | + rpc getDinerMealSuspensionRecordsByIds(GetDinerMealSuspensionRecordsByIdsRpcRequest) returns (GetDinerMealSuspensionRecordsByIdsRpcResponse); | ||
| 61 | + rpc queryDinerMealSuspensionRecordsByCondition(QueryDinerMealSuspensionRecordsByConditionRpcRequest) returns (QueryDinerMealSuspensionRecordsByConditionRpcResponse); | ||
| 62 | + rpc createDinerMealSuspensionRecord(CreateDinerMealSuspensionRecordRpcRequest) returns (CreateDinerMealSuspensionRecordRpcResponse); | ||
| 63 | + rpc batchCreateDinerMealSuspensionRecords(BatchCreateDinerMealSuspensionRecordsRpcRequest) returns (BatchCreateDinerMealSuspensionRecordsRpcResponse); | ||
| 64 | + rpc updateDinerMealSuspensionRecord(UpdateDinerMealSuspensionRecordRpcRequest) returns (UpdateDinerMealSuspensionRecordRpcResponse); | ||
| 65 | + rpc deleteDinerMealSuspensionRecordsByIds(DeleteDinerMealSuspensionRecordsByIdsRpcRequest) returns (DeleteDinerMealSuspensionRecordsRpcResponse); | ||
| 57 | } | 66 | } |
| 58 | 67 | ||
| 59 | enum MealOrderOrderMethodEnum { | 68 | enum MealOrderOrderMethodEnum { |
| ... | @@ -823,3 +832,126 @@ message QueryLatestMealMenuRecordsByClientIdsRpcRequest { | ... | @@ -823,3 +832,126 @@ message QueryLatestMealMenuRecordsByClientIdsRpcRequest { |
| 823 | message QueryLatestMealMenuRecordsByClientIdsRpcResponse { | 832 | message QueryLatestMealMenuRecordsByClientIdsRpcResponse { |
| 824 | repeated SingleMealMenuRecordRpcResponse responses = 1; | 833 | repeated SingleMealMenuRecordRpcResponse responses = 1; |
| 825 | } | 834 | } |
| 835 | + | ||
| 836 | +// 停餐记录相关消息定义 | ||
| 837 | +message SingleDinerMealSuspensionRecordRpcResponse { | ||
| 838 | + int32 id = 1; | ||
| 839 | + int32 enterpriseId = 2; | ||
| 840 | + int32 clientId = 3; | ||
| 841 | + int32 classId = 4; | ||
| 842 | + int32 dinerId = 5; | ||
| 843 | + int64 startAt = 6; | ||
| 844 | + int64 endAt = 7; | ||
| 845 | + string comment = 8; | ||
| 846 | + int64 createdAt = 9; | ||
| 847 | + int32 createdBy = 10; | ||
| 848 | + int32 creationSource = 11; | ||
| 849 | + int64 updatedAt = 12; | ||
| 850 | + int32 updatedBy = 13; | ||
| 851 | + int32 updateSource = 14; | ||
| 852 | +} | ||
| 853 | + | ||
| 854 | +message GetDinerMealSuspensionRecordByIdRpcRequest { | ||
| 855 | + int64 id = 1; | ||
| 856 | +} | ||
| 857 | + | ||
| 858 | +message GetDinerMealSuspensionRecordByIdRpcResponse { | ||
| 859 | + SingleDinerMealSuspensionRecordRpcResponse response = 1; | ||
| 860 | +} | ||
| 861 | + | ||
| 862 | +message GetDinerMealSuspensionRecordsByIdsRpcRequest { | ||
| 863 | + repeated int32 ids = 1; | ||
| 864 | +} | ||
| 865 | + | ||
| 866 | +message GetDinerMealSuspensionRecordsByIdsRpcResponse { | ||
| 867 | + repeated SingleDinerMealSuspensionRecordRpcResponse responses = 1; | ||
| 868 | +} | ||
| 869 | + | ||
| 870 | +message QueryDinerMealSuspensionRecordsByConditionRpcRequest { | ||
| 871 | + int32 enterpriseId = 1; | ||
| 872 | + bool shouldFilterClientIds = 2; | ||
| 873 | + repeated int32 clientIds = 3; | ||
| 874 | + bool shouldFilterClassIds = 4; | ||
| 875 | + repeated int32 classIds = 5; | ||
| 876 | + bool shouldFilterDinerIds = 6; | ||
| 877 | + repeated int32 dinerIds = 7; | ||
| 878 | + bool shouldFilterStartAt = 8; | ||
| 879 | + int64 startAt = 9; | ||
| 880 | + bool shouldFilterEndAt = 10; | ||
| 881 | + int64 endAt = 11; | ||
| 882 | +} | ||
| 883 | + | ||
| 884 | +message QueryDinerMealSuspensionRecordsByConditionRpcResponse { | ||
| 885 | + repeated SingleDinerMealSuspensionRecordRpcResponse responses = 1; | ||
| 886 | +} | ||
| 887 | + | ||
| 888 | +message CreateDinerMealSuspensionRecordRpcRequest { | ||
| 889 | + int32 enterpriseId = 1; | ||
| 890 | + int32 createdBy = 2; | ||
| 891 | + int32 creationSource = 3; | ||
| 892 | + DinerMealSuspensionRecordCreation creation = 4; | ||
| 893 | +} | ||
| 894 | + | ||
| 895 | +message DinerMealSuspensionRecordCreation { | ||
| 896 | + int32 clientId = 1; | ||
| 897 | + int32 classId = 2; | ||
| 898 | + int32 dinerId = 3; | ||
| 899 | + int64 startAt = 4; | ||
| 900 | + int64 endAt = 5; | ||
| 901 | + string comment = 6; | ||
| 902 | +} | ||
| 903 | + | ||
| 904 | +message CreateDinerMealSuspensionRecordRpcResponse { | ||
| 905 | + bool isCreated = 1; | ||
| 906 | + int32 id = 2; | ||
| 907 | +} | ||
| 908 | + | ||
| 909 | +message UpdateDinerMealSuspensionRecordRpcRequest { | ||
| 910 | + int32 enterpriseId = 1; | ||
| 911 | + int32 updatedBy = 2; | ||
| 912 | + int32 updateSource = 3; | ||
| 913 | + DinerMealSuspensionRecordModification modification = 4; | ||
| 914 | +} | ||
| 915 | + | ||
| 916 | +message DinerMealSuspensionRecordModification { | ||
| 917 | + int32 id = 1; | ||
| 918 | + bool shouldUpdateClientId = 2; | ||
| 919 | + int32 clientId = 3; | ||
| 920 | + bool shouldUpdateClassId = 4; | ||
| 921 | + int32 classId = 5; | ||
| 922 | + bool shouldUpdateDinerId = 6; | ||
| 923 | + int32 dinerId = 7; | ||
| 924 | + bool shouldUpdateStartAt = 8; | ||
| 925 | + int64 startAt = 9; | ||
| 926 | + bool shouldUpdateEndAt = 10; | ||
| 927 | + int64 endAt = 11; | ||
| 928 | + bool shouldUpdateComment = 12; | ||
| 929 | + string comment = 13; | ||
| 930 | +} | ||
| 931 | + | ||
| 932 | +message UpdateDinerMealSuspensionRecordRpcResponse { | ||
| 933 | + bool isUpdated = 1; | ||
| 934 | +} | ||
| 935 | + | ||
| 936 | +message DeleteDinerMealSuspensionRecordsByIdsRpcRequest { | ||
| 937 | + repeated int32 ids = 1; | ||
| 938 | + int32 enterpriseId = 2; | ||
| 939 | + int32 updatedBy = 3; | ||
| 940 | + int32 updateSource = 4; | ||
| 941 | +} | ||
| 942 | + | ||
| 943 | +message DeleteDinerMealSuspensionRecordsRpcResponse { | ||
| 944 | + bool isDeleted = 1; | ||
| 945 | +} | ||
| 946 | + | ||
| 947 | +message BatchCreateDinerMealSuspensionRecordsRpcRequest { | ||
| 948 | + int32 enterpriseId = 1; | ||
| 949 | + int32 createdBy = 2; | ||
| 950 | + int32 creationSource = 3; | ||
| 951 | + repeated DinerMealSuspensionRecordCreation creations = 4; | ||
| 952 | +} | ||
| 953 | + | ||
| 954 | +message BatchCreateDinerMealSuspensionRecordsRpcResponse { | ||
| 955 | + bool isCreated = 1; | ||
| 956 | + repeated int32 ids = 2; | ||
| 957 | +} | ... | ... |
-
Please register or login to post a comment