Commit 4f22dd8892300a98a91e68317bebc62f06acbd29
1 parent
f08ffcd7
feat: 用户消息推送,载重上传
Showing
24 changed files
with
527 additions
and
36 deletions
trash-garbage/src/main/java/com/trash/garbage/controller/GarbageOrderController.java
| ... | ... | @@ -19,10 +19,7 @@ import com.trash.garbage.global.Result; |
| 19 | 19 | import com.trash.garbage.global.ResultCode; |
| 20 | 20 | import com.trash.garbage.pojo.domain.GarOrder; |
| 21 | 21 | import com.trash.garbage.pojo.dto.*; |
| 22 | -import com.trash.garbage.pojo.vo.GarOrderMatchAskVo; | |
| 23 | -import com.trash.garbage.pojo.vo.OrderDetailTransportVo; | |
| 24 | -import com.trash.garbage.pojo.vo.OrderDetailVo; | |
| 25 | -import com.trash.garbage.pojo.vo.ScanDriverDetailVo; | |
| 22 | +import com.trash.garbage.pojo.vo.*; | |
| 26 | 23 | import com.trash.garbage.service.GarOrderService; |
| 27 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
| 28 | 25 | import org.springframework.security.access.prepost.PreAuthorize; |
| ... | ... | @@ -55,6 +52,22 @@ public class GarbageOrderController { |
| 55 | 52 | return Result.OK(garOrderService.saveOrder(dto)); |
| 56 | 53 | } |
| 57 | 54 | |
| 55 | + @GetMapping("/query/message/list/{pageNo}/{pageSize}") | |
| 56 | + public Result<?> queryOrderMessageList(@PathVariable("pageNo") Integer pageNo, @PathVariable("pageSize") Integer pageSize) { | |
| 57 | + return Result.OK(garOrderService.queryOrderMessageList(pageNo, pageSize)); | |
| 58 | + } | |
| 59 | + | |
| 60 | + @GetMapping("/query/message/count") | |
| 61 | + public Result<Integer> queryOrderMessageCount() { | |
| 62 | + return Result.OK(garOrderService.queryOrderMessageCount()); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @PutMapping("/read/message") | |
| 66 | + public Result<?> readMessage(@RequestBody List<String> messageIds) { | |
| 67 | + return Result.OK(garOrderService.readMessage(messageIds)); | |
| 68 | + } | |
| 69 | + | |
| 70 | + | |
| 58 | 71 | @RequestMapping("upload") |
| 59 | 72 | public Result<?> uploadFile(@RequestParam("file") MultipartFile file) { |
| 60 | 73 | String fileName = null; |
| ... | ... | @@ -100,8 +113,8 @@ public class GarbageOrderController { |
| 100 | 113 | } |
| 101 | 114 | |
| 102 | 115 | @GetMapping("/scan/detail/{askId}") |
| 103 | - @Log(title = "确认趟次", businessType = BusinessType.INSERT) | |
| 104 | - public Result<GarOrderMatchAskVo> scanDetail(@PathVariable("askId")String askId) { | |
| 116 | + @Log(title = "趟次详情", businessType = BusinessType.INSERT) | |
| 117 | + public Result<GarOrderMatchAskVo> scanDetail(@PathVariable("askId") String askId) { | |
| 105 | 118 | return Result.OK(garOrderService.scanDetail(askId)); |
| 106 | 119 | } |
| 107 | 120 | |
| ... | ... | @@ -182,7 +195,6 @@ public class GarbageOrderController { |
| 182 | 195 | return Result.OK(garOrderService.queryEvaluateDetail(orderId)); |
| 183 | 196 | } |
| 184 | 197 | |
| 185 | - | |
| 186 | 198 | @GetMapping("/company") |
| 187 | 199 | public Result<?> queryEnterpriseList(TransportationEnterprise dto) { |
| 188 | 200 | return Result.OK(garOrderService.queryEnterpriseList(dto)); | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/global/GlobalStatus.java
| ... | ... | @@ -31,6 +31,8 @@ public class GlobalStatus { |
| 31 | 31 | /** |
| 32 | 32 | * 微信登录 |
| 33 | 33 | */ |
| 34 | + ORDER_MESSAGE_READ(1, "消息已读"), | |
| 35 | + ORDER_MESSAGE_UNREAD(0, "消息未读"), | |
| 34 | 36 | WX_LOGIN(1, "微信登录"), |
| 35 | 37 | /** |
| 36 | 38 | * 普通登录 |
| ... | ... | @@ -125,4 +127,5 @@ public class GlobalStatus { |
| 125 | 127 | return this.description; |
| 126 | 128 | } |
| 127 | 129 | } |
| 130 | + | |
| 128 | 131 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/mapper/mapper/GarOrderMatchAskMapper.java renamed to trash-garbage/src/main/java/com/trash/garbage/mapper/GarOrderMatchAskMapper.java
trash-garbage/src/main/java/com/trash/garbage/mapper/mapper/GarOrderMatchDisposalMapper.java renamed to trash-garbage/src/main/java/com/trash/garbage/mapper/GarOrderMatchDisposalMapper.java
trash-garbage/src/main/java/com/trash/garbage/mapper/GarUserOrderMessageHistoryMapper.java
0 → 100644
| 1 | +package com.trash.garbage.mapper; | |
| 2 | + | |
| 3 | +import com.trash.garbage.pojo.domain.GarUserOrderMessageHistory; | |
| 4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
| 5 | + | |
| 6 | +/** | |
| 7 | +* @author 20412 | |
| 8 | +* @description 针对表【gar_user_order_message_history】的数据库操作Mapper | |
| 9 | +* @createDate 2024-05-13 14:31:31 | |
| 10 | +* @Entity com.trash.garbage.pojo.domain.GarUserOrderMessageHistory | |
| 11 | +*/ | |
| 12 | +public interface GarUserOrderMessageHistoryMapper extends BaseMapper<GarUserOrderMessageHistory> { | |
| 13 | + | |
| 14 | +} | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/mapper/GarUserOrderMessageMapper.java
0 → 100644
| 1 | +package com.trash.garbage.mapper; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
| 4 | +import com.trash.garbage.pojo.domain.GarUserOrderMessage; | |
| 5 | +import com.trash.garbage.pojo.vo.GarUserOrderMessageVo; | |
| 6 | +import org.apache.ibatis.annotations.Param; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | +* @author 20412 | |
| 12 | +* @description 针对表【gar_user_order_message】的数据库操作Mapper | |
| 13 | +* @createDate 2024-05-13 13:44:12 | |
| 14 | +* @Entity garbage.domain.GarUserOrderMessage | |
| 15 | +*/ | |
| 16 | +public interface GarUserOrderMessageMapper extends BaseMapper<GarUserOrderMessage> { | |
| 17 | + | |
| 18 | + List<GarUserOrderMessageVo> queryMessageListByUserIdWithState(@Param("userId") String userId, @Param("status") Integer status); | |
| 19 | +} | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarOrderMatchAsk.java
| ... | ... | @@ -36,6 +36,7 @@ public class GarOrderMatchAsk implements Serializable { |
| 36 | 36 | * |
| 37 | 37 | */ |
| 38 | 38 | private String garOrderHandlerTel; |
| 39 | + private Double garCarryingWeight; | |
| 39 | 40 | |
| 40 | 41 | /** |
| 41 | 42 | * |
| ... | ... | @@ -204,4 +205,12 @@ public class GarOrderMatchAsk implements Serializable { |
| 204 | 205 | public void setGarOrderContainerVolume(String garOrderContainerVolume) { |
| 205 | 206 | this.garOrderContainerVolume = garOrderContainerVolume; |
| 206 | 207 | } |
| 208 | + | |
| 209 | + public Double getGarCarryingWeight() { | |
| 210 | + return garCarryingWeight; | |
| 211 | + } | |
| 212 | + | |
| 213 | + public void setGarCarryingWeight(Double garCarryingWeight) { | |
| 214 | + this.garCarryingWeight = garCarryingWeight; | |
| 215 | + } | |
| 207 | 216 | } |
| 208 | 217 | \ No newline at end of file | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarUserOrderMessage.java
0 → 100644
| 1 | +package com.trash.garbage.pojo.domain; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.FieldFill; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 7 | +import lombok.Data; | |
| 8 | +import lombok.EqualsAndHashCode; | |
| 9 | +import lombok.ToString; | |
| 10 | + | |
| 11 | +import java.io.Serializable; | |
| 12 | +import java.util.Date; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * | |
| 16 | + * @TableName gar_user_order_message | |
| 17 | + */ | |
| 18 | +@TableName(value ="gar_user_order_message") | |
| 19 | +@ToString | |
| 20 | +@EqualsAndHashCode | |
| 21 | +public class GarUserOrderMessage implements Serializable { | |
| 22 | + /** | |
| 23 | + * | |
| 24 | + */ | |
| 25 | + @TableId | |
| 26 | + private String garId; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * | |
| 30 | + */ | |
| 31 | + private String garContent; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * | |
| 35 | + */ | |
| 36 | + @TableField(fill = FieldFill.INSERT) | |
| 37 | + private Date garCreateTime; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * | |
| 41 | + */ | |
| 42 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 43 | + private Date garUpdateTime; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * | |
| 47 | + */ | |
| 48 | + @TableField(fill = FieldFill.INSERT) | |
| 49 | + private String garCreateBy; | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * | |
| 53 | + */ | |
| 54 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 55 | + private String garUpdateBy; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * | |
| 59 | + */ | |
| 60 | + private String garRemark; | |
| 61 | + | |
| 62 | + private String garUserId; | |
| 63 | + | |
| 64 | + private String garUserTel; | |
| 65 | + | |
| 66 | + private Integer garMessageState; | |
| 67 | + | |
| 68 | + @TableField(exist = false) | |
| 69 | + private static final long serialVersionUID = 1L; | |
| 70 | + | |
| 71 | + public Integer getGarMessageState() { | |
| 72 | + return garMessageState; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void setGarMessageState(Integer garMessageState) { | |
| 76 | + this.garMessageState = garMessageState; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public String getGarId() { | |
| 80 | + return garId; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public void setGarId(String garId) { | |
| 84 | + this.garId = garId; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public String getGarContent() { | |
| 88 | + return garContent; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setGarContent(String garContent) { | |
| 92 | + this.garContent = garContent; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public Date getGarCreateTime() { | |
| 96 | + return garCreateTime; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void setGarCreateTime(Date garCreateTime) { | |
| 100 | + this.garCreateTime = garCreateTime; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public Date getGarUpdateTime() { | |
| 104 | + return garUpdateTime; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setGarUpdateTime(Date garUpdateTime) { | |
| 108 | + this.garUpdateTime = garUpdateTime; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public String getGarCreateBy() { | |
| 112 | + return garCreateBy; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public void setGarCreateBy(String garCreateBy) { | |
| 116 | + this.garCreateBy = garCreateBy; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public String getGarUpdateBy() { | |
| 120 | + return garUpdateBy; | |
| 121 | + } | |
| 122 | + | |
| 123 | + public void setGarUpdateBy(String garUpdateBy) { | |
| 124 | + this.garUpdateBy = garUpdateBy; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public String getGarRemark() { | |
| 128 | + return garRemark; | |
| 129 | + } | |
| 130 | + | |
| 131 | + public void setGarRemark(String garRemark) { | |
| 132 | + this.garRemark = garRemark; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public String getGarUserId() { | |
| 136 | + return garUserId; | |
| 137 | + } | |
| 138 | + | |
| 139 | + public void setGarUserId(String garUserId) { | |
| 140 | + this.garUserId = garUserId; | |
| 141 | + } | |
| 142 | + | |
| 143 | + public String getGarUserTel() { | |
| 144 | + return garUserTel; | |
| 145 | + } | |
| 146 | + | |
| 147 | + public void setGarUserTel(String garUserTel) { | |
| 148 | + this.garUserTel = garUserTel; | |
| 149 | + } | |
| 150 | +} | |
| 0 | 151 | \ No newline at end of file | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/dto/AskTransportDto.java
| ... | ... | @@ -5,6 +5,7 @@ import lombok.ToString; |
| 5 | 5 | |
| 6 | 6 | import javax.validation.constraints.NotBlank; |
| 7 | 7 | import javax.validation.constraints.NotEmpty; |
| 8 | +import javax.validation.constraints.NotNull; | |
| 8 | 9 | import java.util.List; |
| 9 | 10 | |
| 10 | 11 | /** |
| ... | ... | @@ -17,6 +18,8 @@ public class AskTransportDto { |
| 17 | 18 | private String garOrderId; |
| 18 | 19 | @NotBlank(message = "驾驶员id为不能为空") |
| 19 | 20 | private String garOrderHandlerId; |
| 21 | + @NotNull(message = "车辆载重不能为空") | |
| 22 | + private Double garCarryingWeight; | |
| 20 | 23 | @NotBlank(message = "垃圾类型不能为空") |
| 21 | 24 | private String garOrderTrashType; |
| 22 | 25 | @NotBlank(message = "车牌号不能为空") |
| ... | ... | @@ -34,6 +37,14 @@ public class AskTransportDto { |
| 34 | 37 | @NotEmpty(message = "请上传全景图片") |
| 35 | 38 | private List<String> fillImageList; |
| 36 | 39 | |
| 40 | + public Double getGarCarryingWeight() { | |
| 41 | + return garCarryingWeight; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setGarCarryingWeight(Double garCarryingWeight) { | |
| 45 | + this.garCarryingWeight = garCarryingWeight; | |
| 46 | + } | |
| 47 | + | |
| 37 | 48 | public String getGarOrderHandlerCompanyName() { |
| 38 | 49 | return garOrderHandlerCompanyName; |
| 39 | 50 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/vo/GarUserOrderMessageVo.java
0 → 100644
| 1 | +package com.trash.garbage.pojo.vo; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import lombok.EqualsAndHashCode; | |
| 5 | +import lombok.ToString; | |
| 6 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 7 | + | |
| 8 | +import java.util.Date; | |
| 9 | + | |
| 10 | +@ToString | |
| 11 | +@EqualsAndHashCode | |
| 12 | +public class GarUserOrderMessageVo { | |
| 13 | + private String garId; | |
| 14 | + private String garTitle; | |
| 15 | + private String garContent; | |
| 16 | + | |
| 17 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |
| 18 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |
| 19 | + private Date garCreateTime; | |
| 20 | + | |
| 21 | + public Date getGarCreateTime() { | |
| 22 | + return garCreateTime; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setGarCreateTime(Date garCreateTime) { | |
| 26 | + this.garCreateTime = garCreateTime; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public String getGarId() { | |
| 30 | + return garId; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setGarId(String garId) { | |
| 34 | + this.garId = garId; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public String getGarTitle() { | |
| 38 | + return garTitle; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setGarTitle(String garTitle) { | |
| 42 | + this.garTitle = garTitle; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getGarContent() { | |
| 46 | + return garContent; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setGarContent(String garContent) { | |
| 50 | + this.garContent = garContent; | |
| 51 | + } | |
| 52 | +} | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/vo/OrderDetailTransportVo.java
| ... | ... | @@ -66,6 +66,15 @@ public class OrderDetailTransportVo { |
| 66 | 66 | private String garAskId; |
| 67 | 67 | private String garHandlerCarCode; |
| 68 | 68 | private String garOrderContainerVolume; |
| 69 | + private Double garCarryingWeight; | |
| 70 | + | |
| 71 | + public Double getGarCarryingWeight() { | |
| 72 | + return garCarryingWeight; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void setGarCarryingWeight(Double garCarryingWeight) { | |
| 76 | + this.garCarryingWeight = garCarryingWeight; | |
| 77 | + } | |
| 69 | 78 | |
| 70 | 79 | public String getGarOrderContainerVolume() { |
| 71 | 80 | return garOrderContainerVolume; |
| ... | ... | @@ -235,4 +244,5 @@ public class OrderDetailTransportVo { |
| 235 | 244 | public void setGarOrderCompanyTel(String garOrderCompanyTel) { |
| 236 | 245 | this.garOrderCompanyTel = garOrderCompanyTel; |
| 237 | 246 | } |
| 247 | + | |
| 238 | 248 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/GarOrderService.java
| ... | ... | @@ -5,7 +5,6 @@ import com.github.pagehelper.PageInfo; |
| 5 | 5 | import com.trash.enterprise.domain.TransportationEnterprise; |
| 6 | 6 | import com.trash.garbage.pojo.domain.GarOrder; |
| 7 | 7 | import com.trash.garbage.pojo.domain.GarOrderEvaluate; |
| 8 | -import com.trash.garbage.pojo.domain.GarOrderMatchAsk; | |
| 9 | 8 | import com.trash.garbage.pojo.domain.GarOrderMatchHandler; |
| 10 | 9 | import com.trash.garbage.pojo.dto.*; |
| 11 | 10 | import com.trash.garbage.pojo.vo.*; |
| ... | ... | @@ -91,4 +90,9 @@ public interface GarOrderService extends IService<GarOrder> { |
| 91 | 90 | |
| 92 | 91 | String createHandlerQrCode(String orderId); |
| 93 | 92 | |
| 93 | + PageInfo queryOrderMessageList(Integer pageNo, Integer pageSize); | |
| 94 | + | |
| 95 | + String readMessage(List<String> messageIds); | |
| 96 | + | |
| 97 | + Integer queryOrderMessageCount(); | |
| 94 | 98 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/GarUserOrderMessageHistoryService.java
0 → 100644
| 1 | +package com.trash.garbage.service; | |
| 2 | + | |
| 3 | +import com.trash.garbage.pojo.domain.GarUserOrderMessageHistory; | |
| 4 | +import com.baomidou.mybatisplus.extension.service.IService; | |
| 5 | + | |
| 6 | +/** | |
| 7 | +* @author 20412 | |
| 8 | +* @description 针对表【gar_user_order_message_history】的数据库操作Service | |
| 9 | +* @createDate 2024-05-13 14:31:31 | |
| 10 | +*/ | |
| 11 | +public interface GarUserOrderMessageHistoryService extends IService<GarUserOrderMessageHistory> { | |
| 12 | + | |
| 13 | +} | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/GarUserOrderMessageService.java
0 → 100644
| 1 | +package com.trash.garbage.service; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.extension.service.IService; | |
| 4 | +import com.trash.garbage.pojo.domain.GarUserOrderMessage; | |
| 5 | +import com.trash.garbage.pojo.vo.GarUserOrderMessageVo; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +/** | |
| 10 | +* @author 20412 | |
| 11 | +* @description 针对表【gar_user_order_message】的数据库操作Service | |
| 12 | +* @createDate 2024-05-13 13:44:12 | |
| 13 | +*/ | |
| 14 | +public interface GarUserOrderMessageService extends IService<GarUserOrderMessage> { | |
| 15 | + | |
| 16 | + List<GarUserOrderMessageVo> queryMessageListByUserIdWithState(String userId, Integer status); | |
| 17 | +} | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderMatchAskServiceImpl.java
| 1 | 1 | package com.trash.garbage.service.impl; |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | -import com.trash.garbage.mapper.mapper.GarOrderMatchAskMapper; | |
| 4 | +import com.trash.garbage.mapper.GarOrderMatchAskMapper; | |
| 5 | 5 | import com.trash.garbage.pojo.domain.GarOrderMatchAsk; |
| 6 | -import com.trash.garbage.pojo.vo.DispatchDisposalVo; | |
| 7 | 6 | import com.trash.garbage.service.GarOrderMatchAskService; |
| 8 | 7 | import org.springframework.stereotype.Service; |
| 9 | 8 | |
| 10 | -import java.util.List; | |
| 11 | - | |
| 12 | 9 | /** |
| 13 | 10 | * @author 20412 |
| 14 | 11 | * @description 针对表【gar_order_match_ask(匹配处理场所人员表)】的数据库操作Service实现 | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderMatchDisposalServiceImpl.java
| 1 | 1 | package com.trash.garbage.service.impl; |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | -import com.trash.garbage.mapper.mapper.GarOrderMatchDisposalMapper; | |
| 4 | +import com.trash.garbage.mapper.GarOrderMatchDisposalMapper; | |
| 5 | 5 | import com.trash.garbage.pojo.domain.GarOrderMatchDisposal; |
| 6 | 6 | import com.trash.garbage.pojo.vo.DispatchDisposalVo; |
| 7 | 7 | import com.trash.garbage.service.GarOrderMatchDisposalService; | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
| ... | ... | @@ -43,43 +43,36 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 43 | 43 | implements GarOrderService { |
| 44 | 44 | |
| 45 | 45 | |
| 46 | + @Autowired | |
| 47 | + private GarUserOrderMessageService orderMessageService; | |
| 48 | + @Autowired | |
| 49 | + private GarUserOrderMessageHistoryService orderMessageHistoryService; | |
| 46 | 50 | @Resource |
| 47 | 51 | private SMSUtils smsUtils; |
| 48 | - | |
| 49 | 52 | @Autowired |
| 50 | 53 | private GarOrderImageService garOrderImageService; |
| 51 | - | |
| 52 | 54 | @Autowired |
| 53 | 55 | private GarOrderMatchAskService askService; |
| 54 | - | |
| 55 | 56 | @Autowired |
| 56 | 57 | private GarAddressService garAddressService; |
| 57 | - | |
| 58 | 58 | @Autowired |
| 59 | 59 | private GarOrderMatchAskService matchAskService; |
| 60 | - | |
| 61 | 60 | @Autowired |
| 62 | 61 | private GarOrderMatchDisposalService disposalService; |
| 63 | 62 | @Autowired |
| 64 | 63 | private ITransportationEnterpriseService transportationEnterpriseService; |
| 65 | - | |
| 66 | 64 | @Autowired |
| 67 | 65 | private GarOrderEvaluateService garOrderEvaluateService; |
| 68 | 66 | @Autowired |
| 69 | 67 | private GarSearchHistoryService garSearchHistoryService; |
| 70 | - | |
| 71 | 68 | @Autowired |
| 72 | 69 | private GarUserService garUserService; |
| 73 | - | |
| 74 | 70 | @Autowired |
| 75 | 71 | private IDriverService driverService; |
| 76 | - | |
| 77 | 72 | @Autowired |
| 78 | 73 | private GarOrderMatchHandlerService handlerService; |
| 79 | - | |
| 80 | 74 | @Autowired |
| 81 | 75 | private GarOrderCarService garOrderCarService; |
| 82 | - | |
| 83 | 76 | @Autowired |
| 84 | 77 | private RedisCache redisCache; |
| 85 | 78 | |
| ... | ... | @@ -354,8 +347,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 354 | 347 | String tel = GlobalStatus.GarUserStatusEnum.NORMAL_USER.getDescription().equals(user.getGarUserType()) ? |
| 355 | 348 | order.getGarOrderCompanyTel() : order.getGarOrderContactTel(); |
| 356 | 349 | String message = GlobalStatus.GarUserStatusEnum.NORMAL_USER.getDescription().equals(user.getGarUserType()) ? |
| 357 | - "居民取消订单:您的清运订单已取消,详情可在小程序查看" : "企业拒单"; | |
| 350 | + "您的清运订单已取消,详情可在小程序查看" : "企业拒单"; | |
| 358 | 351 | smsUtils.sendMessage(tel, message); |
| 352 | + // TODO 用户消息通知 订单菜单消息 | |
| 353 | + userOrderMessageSend(order, message); | |
| 359 | 354 | return "订单取消成功"; |
| 360 | 355 | } |
| 361 | 356 | // 用户修改 |
| ... | ... | @@ -384,7 +379,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 384 | 379 | order.setGarRealCarCount(garOrderCars.size()); |
| 385 | 380 | updateById(order); |
| 386 | 381 | // TODO 发送短信用户修改订单了 |
| 387 | - smsUtils.sendMessage(dto.getGarOrderCompanyTel(), "您的清运订单有修改,请及时查看并处理!"); | |
| 382 | + String message = "您的清运订单有修改,请及时查看并处理!"; | |
| 383 | + smsUtils.sendMessage(dto.getGarOrderCompanyTel(), message); | |
| 384 | + // TODO 用户消息通知 订单菜单消息 | |
| 385 | + userOrderMessageSend(order, message); | |
| 388 | 386 | return "修改成功"; |
| 389 | 387 | } |
| 390 | 388 | // 企业负责人 清运-》完成 |
| ... | ... | @@ -398,7 +396,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 398 | 396 | .set(GarOrder::getGarOrderCompanyUserId, user.getGarUserId()); |
| 399 | 397 | update(uw); |
| 400 | 398 | // TODO 短信提醒 |
| 401 | - smsUtils.sendMessage(order.getGarOrderContactTel(), "运输公司已接受订单号为 " + order.getGarOrderId() + " 的订单。"); | |
| 399 | + String message = "运输公司已接受订单号为 " + order.getGarOrderId() + " 的订单。"; | |
| 400 | + smsUtils.sendMessage(order.getGarOrderContactTel(), message); | |
| 401 | + // TODO 用户消息通知 订单菜单消息 | |
| 402 | + userOrderMessageSend(order, message); | |
| 402 | 403 | return "已接受订单"; |
| 403 | 404 | } |
| 404 | 405 | // 企业负责人 清运中 ==》已完成 |
| ... | ... | @@ -424,13 +425,25 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 424 | 425 | handlerService.update(uwh); |
| 425 | 426 | } |
| 426 | 427 | // TODO 短信提醒 |
| 427 | - smsUtils.sendMessage(order.getGarOrderContactTel(), "运输公司已完成订单号为 " + order.getGarOrderId() + " 的订单。"); | |
| 428 | + String message = "运输公司已完成订单号为 " + order.getGarOrderId() + " 的订单。"; | |
| 429 | + smsUtils.sendMessage(order.getGarOrderContactTel(), message); | |
| 430 | + // TODO 用户消息通知 订单菜单消息 | |
| 431 | + userOrderMessageSend(order, message); | |
| 428 | 432 | return "订单已完成"; |
| 429 | 433 | } |
| 430 | 434 | |
| 431 | 435 | throw new BizException(ResultCode.CODE_400); |
| 432 | 436 | } |
| 433 | 437 | |
| 438 | + private void userOrderMessageSend(GarOrder order, String message) { | |
| 439 | + GarUserOrderMessage guom = new GarUserOrderMessage(); | |
| 440 | + guom.setGarMessageState(GlobalStatus.GarUserStatusEnum.ORDER_MESSAGE_UNREAD.getStatus()); | |
| 441 | + guom.setGarContent(message); | |
| 442 | + guom.setGarUserId(order.getGarCreateBy()); | |
| 443 | + guom.setGarUserTel(order.getGarOrderContactTel()); | |
| 444 | + orderMessageService.save(guom); | |
| 445 | + } | |
| 446 | + | |
| 434 | 447 | @Override |
| 435 | 448 | public String uploadImageUrlByType(UploadDto dto) { |
| 436 | 449 | List<GarOrderImage> garOrderImages = new ArrayList<>(dto.getImageUrls().size()); |
| ... | ... | @@ -784,7 +797,6 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 784 | 797 | |
| 785 | 798 | @Override |
| 786 | 799 | public String askTransport(AskTransportDto dto) { |
| 787 | - | |
| 788 | 800 | // TODO 判断是否运载完毕 已经到预估趟次则不在生成验证码 |
| 789 | 801 | String orderId = dto.getGarOrderId(); |
| 790 | 802 | |
| ... | ... | @@ -815,13 +827,15 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 815 | 827 | garOrderImageService.saveBatch(imageList); |
| 816 | 828 | if (transportCount == (order.getGarRealCarCount() - 1)) { |
| 817 | 829 | // TODO 发送短信 通知企业和用户 修改订单状态为完成 disposal 和 handler表的状态一起修改 |
| 818 | - smsUtils.sendMessage(order.getGarOrderContactTel(), "您的清运订单已完成,可前往小程序进行评价,感谢您的使用"); | |
| 830 | + String message = "您的清运订单已完成,可前往小程序进行评价,感谢您的使用"; | |
| 831 | + smsUtils.sendMessage(order.getGarOrderContactTel(), message); | |
| 819 | 832 | smsUtils.sendMessage(order.getGarOrderCompanyTel(), "您的清运订单已完成,详情可在小程序查看。"); |
| 820 | 833 | successOrder(order, dto); |
| 821 | 834 | redisCache.deleteObject(orderId); |
| 835 | + // TODO 用户消息通知 订单菜单消息 | |
| 836 | + userOrderMessageSend(order, message); | |
| 822 | 837 | return "当前订单已完成"; |
| 823 | 838 | } |
| 824 | - //TODO 短信通知 | |
| 825 | 839 | return "当前趟次记录成功"; |
| 826 | 840 | } |
| 827 | 841 | |
| ... | ... | @@ -900,6 +914,45 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 900 | 914 | return code; |
| 901 | 915 | } |
| 902 | 916 | |
| 917 | + @Override | |
| 918 | + public PageInfo queryOrderMessageList(Integer pageNo, Integer pageSize) { | |
| 919 | + PageHelper.startPage(pageNo, pageSize); | |
| 920 | + String userId = SecurityUtils.getLoginUser().getUser().getUserId(); | |
| 921 | + LambdaQueryWrapper<GarUserOrderMessage> qw = new LambdaQueryWrapper<>(); | |
| 922 | + qw.eq(GarUserOrderMessage::getGarUserId, userId) | |
| 923 | + .eq(GarUserOrderMessage::getGarMessageState, GlobalStatus.GarUserStatusEnum.ORDER_MESSAGE_UNREAD.getStatus()); | |
| 924 | + List<GarUserOrderMessageVo> messageVos = orderMessageService.queryMessageListByUserIdWithState(userId, GlobalStatus.GarUserStatusEnum.ORDER_MESSAGE_UNREAD.getStatus()); | |
| 925 | + PageInfo<GarUserOrderMessageVo> pageInfo = new PageInfo<>(messageVos, pageSize); | |
| 926 | + return pageInfo; | |
| 927 | + } | |
| 928 | + | |
| 929 | + @Override | |
| 930 | + public String readMessage(List<String> messageIds) { | |
| 931 | + LambdaQueryWrapper<GarUserOrderMessage> qw = new LambdaQueryWrapper<>(); | |
| 932 | + qw.in(GarUserOrderMessage::getGarId, messageIds); | |
| 933 | + List<GarUserOrderMessage> messageList = orderMessageService.list(qw); | |
| 934 | + List<GarUserOrderMessageHistory> historyList = messageList.stream().map(item -> { | |
| 935 | + GarUserOrderMessageHistory history = new GarUserOrderMessageHistory(); | |
| 936 | + item.setGarMessageState(GlobalStatus.GarUserStatusEnum.ORDER_MESSAGE_READ.getStatus()); | |
| 937 | + BeanUtils.copyProperties(item, history, "garId"); | |
| 938 | + return history; | |
| 939 | + }).collect(Collectors.toList()); | |
| 940 | + orderMessageHistoryService.saveBatch(historyList); | |
| 941 | + // 删除数据 | |
| 942 | + orderMessageService.removeByIds(messageIds); | |
| 943 | + return "消息确认成功"; | |
| 944 | + } | |
| 945 | + | |
| 946 | + @Override | |
| 947 | + public Integer queryOrderMessageCount() { | |
| 948 | + String userId = SecurityUtils.getLoginUser().getUser().getUserId(); | |
| 949 | + LambdaQueryWrapper<GarUserOrderMessage> qw = new LambdaQueryWrapper<>(); | |
| 950 | + qw.eq(GarUserOrderMessage::getGarUserId, userId) | |
| 951 | + .eq(GarUserOrderMessage::getGarMessageState, GlobalStatus.GarUserStatusEnum.ORDER_MESSAGE_UNREAD.getStatus()); | |
| 952 | + int count = orderMessageService.count(qw); | |
| 953 | + return count; | |
| 954 | + } | |
| 955 | + | |
| 903 | 956 | private void handleCleanNumber(TransportationEnterpriseVo vo, List<GarOrder> orderList) { |
| 904 | 957 | Long cleanNumber = 0L; |
| 905 | 958 | for (GarOrder order : orderList) { | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserOrderMessageHistoryServiceImpl.java
0 → 100644
| 1 | +package com.trash.garbage.service.impl; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
| 4 | +import com.trash.garbage.pojo.domain.GarUserOrderMessageHistory; | |
| 5 | +import com.trash.garbage.service.GarUserOrderMessageHistoryService; | |
| 6 | +import com.trash.garbage.mapper.GarUserOrderMessageHistoryMapper; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +/** | |
| 10 | +* @author 20412 | |
| 11 | +* @description 针对表【gar_user_order_message_history】的数据库操作Service实现 | |
| 12 | +* @createDate 2024-05-13 14:31:31 | |
| 13 | +*/ | |
| 14 | +@Service | |
| 15 | +public class GarUserOrderMessageHistoryServiceImpl extends ServiceImpl<GarUserOrderMessageHistoryMapper, GarUserOrderMessageHistory> | |
| 16 | + implements GarUserOrderMessageHistoryService{ | |
| 17 | + | |
| 18 | +} | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserOrderMessageServiceImpl.java
0 → 100644
| 1 | +package com.trash.garbage.service.impl; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
| 4 | +import com.trash.garbage.pojo.domain.GarUserOrderMessage; | |
| 5 | +import com.trash.garbage.pojo.vo.GarUserOrderMessageVo; | |
| 6 | +import com.trash.garbage.service.GarUserOrderMessageService; | |
| 7 | +import com.trash.garbage.mapper.GarUserOrderMessageMapper; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +/** | |
| 13 | +* @author 20412 | |
| 14 | +* @description 针对表【gar_user_order_message】的数据库操作Service实现 | |
| 15 | +* @createDate 2024-05-13 13:44:12 | |
| 16 | +*/ | |
| 17 | +@Service | |
| 18 | +public class GarUserOrderMessageServiceImpl extends ServiceImpl<GarUserOrderMessageMapper, GarUserOrderMessage> | |
| 19 | + implements GarUserOrderMessageService { | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public List<GarUserOrderMessageVo> queryMessageListByUserIdWithState(String userId, Integer status) { | |
| 23 | + return baseMapper.queryMessageListByUserIdWithState(userId, status); | |
| 24 | + } | |
| 25 | +} | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | ... | ... |
trash-garbage/src/main/resources/mapper/GarOrderMapper.xml
| ... | ... | @@ -52,6 +52,7 @@ |
| 52 | 52 | <result property="garHandlerCarCode" column="gar_handler_car_code"/> |
| 53 | 53 | <result property="garOrderContainerVolume" column="gar_order_container_volume"/> |
| 54 | 54 | <result property="fillImage" column="fill_image"/> |
| 55 | + <result property="garCarryingWeight" column="gar_carrying_weight" jdbcType="DOUBLE"/> | |
| 55 | 56 | <result property="garAskId" column="gar_ask_id"/> |
| 56 | 57 | </collection> |
| 57 | 58 | </resultMap> |
| ... | ... | @@ -197,6 +198,7 @@ |
| 197 | 198 | `disposal`.gar_order_disposal_status, |
| 198 | 199 | `order`.gar_real_car_count, |
| 199 | 200 | `ask`.gar_id gar_ask_id, |
| 201 | + `ask`.gar_carrying_weight, | |
| 200 | 202 | `ask`.gar_handler_car_code, |
| 201 | 203 | `ask`.gar_order_handler_id |
| 202 | 204 | FROM gar_order `order` | ... | ... |
trash-garbage/src/main/resources/mapper/GarOrderMatchAskMapper.xml
| ... | ... | @@ -2,11 +2,12 @@ |
| 2 | 2 | <!DOCTYPE mapper |
| 3 | 3 | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 4 | 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 5 | -<mapper namespace="com.trash.garbage.mapper.mapper.GarOrderMatchAskMapper"> | |
| 5 | +<mapper namespace="com.trash.garbage.mapper.GarOrderMatchAskMapper"> | |
| 6 | 6 | |
| 7 | 7 | <resultMap id="BaseResultMap" type="com.trash.garbage.pojo.domain.GarOrderMatchAsk"> |
| 8 | 8 | <id property="garId" column="gar_id" jdbcType="VARCHAR"/> |
| 9 | 9 | <result property="garOrderId" column="gar_order_id" jdbcType="VARCHAR"/> |
| 10 | + <result property="garCarryingWeight" column="gar_carrying_weight" jdbcType="VARCHAR"/> | |
| 10 | 11 | <result property="garOrderHandlerTel" column="gar_order_handler_tel" jdbcType="VARCHAR"/> |
| 11 | 12 | <result property="garOrderHandlerName" column="gar_order_handler_name" jdbcType="VARCHAR"/> |
| 12 | 13 | <result property="garOrderContainerVolume" column="gar_order_container_volume" jdbcType="VARCHAR"/> |
| ... | ... | @@ -20,7 +21,7 @@ |
| 20 | 21 | </resultMap> |
| 21 | 22 | |
| 22 | 23 | <sql id="Base_Column_List"> |
| 23 | - gar_id,gar_order_id,gar_order_handler_tel,gar_order_container_volume, | |
| 24 | + gar_id,gar_order_id,gar_order_handler_tel,gar_order_container_volume,gar_carrying_weight, | |
| 24 | 25 | gar_order_handler_name,gar_order_handler_company_id,gar_order_handler_company_name, |
| 25 | 26 | gar_create_time,gar_update_time,gar_create_by, |
| 26 | 27 | gar_update_by,gar_remark | ... | ... |
trash-garbage/src/main/resources/mapper/GarOrderMatchDisposalMapper.xml
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <!DOCTYPE mapper |
| 3 | 3 | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 4 | 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 5 | -<mapper namespace="com.trash.garbage.mapper.mapper.GarOrderMatchDisposalMapper"> | |
| 5 | +<mapper namespace="com.trash.garbage.mapper.GarOrderMatchDisposalMapper"> | |
| 6 | 6 | |
| 7 | 7 | <resultMap id="BaseResultMap" type="com.trash.garbage.pojo.domain.GarOrderMatchDisposal"> |
| 8 | 8 | <id property="garId" column="gar_id" jdbcType="VARCHAR"/> | ... | ... |
trash-garbage/src/main/resources/mapper/GarUserOrderMessageHistoryMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.trash.garbage.mapper.GarUserOrderMessageHistoryMapper"> | |
| 6 | + | |
| 7 | + <resultMap id="BaseResultMap" type="com.trash.garbage.pojo.domain.GarUserOrderMessageHistory"> | |
| 8 | + <id property="garId" column="gar_id" jdbcType="VARCHAR"/> | |
| 9 | + <result property="garContent" column="gar_content" jdbcType="VARCHAR"/> | |
| 10 | + <result property="garCreateTime" column="gar_create_time" jdbcType="TIMESTAMP"/> | |
| 11 | + <result property="garUpdateTime" column="gar_update_time" jdbcType="TIMESTAMP"/> | |
| 12 | + <result property="garCreateBy" column="gar_create_by" jdbcType="VARCHAR"/> | |
| 13 | + <result property="garUpdateBy" column="gar_update_by" jdbcType="VARCHAR"/> | |
| 14 | + <result property="garRemark" column="gar_remark" jdbcType="VARCHAR"/> | |
| 15 | + <result property="garUserId" column="gar_user_id" jdbcType="VARCHAR"/> | |
| 16 | + <result property="garUserTel" column="gar_user_tel" jdbcType="VARCHAR"/> | |
| 17 | + <result property="garMessageState" column="gar_message_state" jdbcType="TINYINT"/> | |
| 18 | + </resultMap> | |
| 19 | + | |
| 20 | + <sql id="Base_Column_List"> | |
| 21 | + gar_id,gar_content,gar_create_time, | |
| 22 | + gar_update_time,gar_create_by,gar_update_by, | |
| 23 | + gar_remark,gar_user_id,gar_user_tel, | |
| 24 | + gar_message_state | |
| 25 | + </sql> | |
| 26 | +</mapper> | ... | ... |
trash-garbage/src/main/resources/mapper/GarUserOrderMessageMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.trash.garbage.mapper.GarUserOrderMessageMapper"> | |
| 6 | + | |
| 7 | + <resultMap id="BaseResultMap" type="com.trash.garbage.pojo.domain.GarUserOrderMessage"> | |
| 8 | + <id property="garId" column="gar_id" jdbcType="VARCHAR"/> | |
| 9 | + <result property="garContent" column="gar_content" jdbcType="VARCHAR"/> | |
| 10 | + <result property="garCreateTime" column="gar_create_time" jdbcType="TIMESTAMP"/> | |
| 11 | + <result property="garUpdateTime" column="gar_update_time" jdbcType="TIMESTAMP"/> | |
| 12 | + <result property="garCreateBy" column="gar_create_by" jdbcType="VARCHAR"/> | |
| 13 | + <result property="garUpdateBy" column="gar_update_by" jdbcType="VARCHAR"/> | |
| 14 | + <result property="garRemark" column="gar_remark" jdbcType="VARCHAR"/> | |
| 15 | + <result property="garUserId" column="gar_user_id" jdbcType="VARCHAR"/> | |
| 16 | + <result property="garUserTel" column="gar_user_tel" jdbcType="VARCHAR"/> | |
| 17 | + <result property="garMessageState" column="gar_message_state" jdbcType="TINYINT"/> | |
| 18 | + </resultMap> | |
| 19 | + | |
| 20 | + <sql id="Base_Column_List"> | |
| 21 | + gar_id,gar_content,gar_create_time,gar_user_id, | |
| 22 | + gar_update_time,gar_create_by,gar_update_by, | |
| 23 | + gar_remark,gar_user_tel,gar_message_state | |
| 24 | + </sql> | |
| 25 | + <select id="queryMessageListByUserIdWithState" | |
| 26 | + resultType="com.trash.garbage.pojo.vo.GarUserOrderMessageVo"> | |
| 27 | + select gar_id,gar_content,gar_user_tel | |
| 28 | + from gar_user_order_message | |
| 29 | + <where> | |
| 30 | + <if test="userId != null"> | |
| 31 | + and gar_user_id = #{userId} | |
| 32 | + </if> | |
| 33 | + <if test="userId != null"> | |
| 34 | + and gar_message_state = #{status} | |
| 35 | + </if> | |
| 36 | + </where> | |
| 37 | + | |
| 38 | + </select> | |
| 39 | +</mapper> | ... | ... |