修复留言板Bug
This commit is contained in:
parent
3ff14d7135
commit
e106f2ee3f
@ -49,6 +49,9 @@ public class XhpcMessageBoardController {
|
|||||||
@PostMapping("/platform/message")
|
@PostMapping("/platform/message")
|
||||||
public AjaxResult platformSendMessageToUser(@RequestBody PlatformSendMessageToUserRequest platformRequest) {
|
public AjaxResult platformSendMessageToUser(@RequestBody PlatformSendMessageToUserRequest platformRequest) {
|
||||||
|
|
||||||
|
if (platformRequest.getMessageContent() == null || "".equals(platformRequest.getMessageContent())) {
|
||||||
|
return AjaxResult.error("必须传入有效的信息内容");
|
||||||
|
}
|
||||||
xhpcMessageBoardService.platformSendMessageToUser(platformRequest);
|
xhpcMessageBoardService.platformSendMessageToUser(platformRequest);
|
||||||
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
@ -77,7 +80,7 @@ public class XhpcMessageBoardController {
|
|||||||
* @date 2022/1/15 18:47
|
* @date 2022/1/15 18:47
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
@PatchMapping("/user/message")
|
@GetMapping("/user/message")
|
||||||
public AjaxResult platformQueryMessage(UserQueryCondition userQueryCondition) {
|
public AjaxResult platformQueryMessage(UserQueryCondition userQueryCondition) {
|
||||||
|
|
||||||
QueryUserMassageResponse queryUserMassageResponse = xhpcMessageBoardService.platformQueryMessage(userQueryCondition);
|
QueryUserMassageResponse queryUserMassageResponse = xhpcMessageBoardService.platformQueryMessage(userQueryCondition);
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import com.xhpc.common.util.DateUtil;
|
|||||||
import com.xhpc.common.util.MyPagingUtil;
|
import com.xhpc.common.util.MyPagingUtil;
|
||||||
import com.xhpc.system.api.domain.SysUser;
|
import com.xhpc.system.api.domain.SysUser;
|
||||||
import com.xhpc.system.api.model.LoginUser;
|
import com.xhpc.system.api.model.LoginUser;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -41,7 +43,7 @@ public class XhpcMessageBoardServiceImpl implements XhpcMessageBoardService {
|
|||||||
@Resource
|
@Resource
|
||||||
UserTypeService userTypeService;
|
UserTypeService userTypeService;
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(XhpcMessageBoardServiceImpl.class);
|
||||||
/**
|
/**
|
||||||
* 将用户发送的信息保存到数据库中
|
* 将用户发送的信息保存到数据库中
|
||||||
*
|
*
|
||||||
|
|||||||
@ -118,10 +118,10 @@
|
|||||||
AND tenant_type = #{tenantType}
|
AND tenant_type = #{tenantType}
|
||||||
AND del_flag IS NULL
|
AND del_flag IS NULL
|
||||||
AND have_new_info = 0
|
AND have_new_info = 0
|
||||||
<if test="userType!=null">
|
<if test="userType!=null and userType!=''">
|
||||||
AND sender_type = #{userType}
|
AND sender_type = #{userType}
|
||||||
</if>
|
</if>
|
||||||
<if test="senderAccount">
|
<if test="senderAccount!=null and senderAccount!=''">
|
||||||
AND sender_account = #{senderAccount}
|
AND sender_account = #{senderAccount}
|
||||||
</if>
|
</if>
|
||||||
LIMIT #{currentPage},#{items}
|
LIMIT #{currentPage},#{items}
|
||||||
@ -133,10 +133,10 @@
|
|||||||
AND tenant_type = #{tenantType}
|
AND tenant_type = #{tenantType}
|
||||||
AND del_flag IS NULL
|
AND del_flag IS NULL
|
||||||
AND have_new_info = 0
|
AND have_new_info = 0
|
||||||
<if test="userType!=null">
|
<if test="userType!=null and userType!=''">
|
||||||
AND sender_type = #{userType}
|
AND sender_type = #{userType}
|
||||||
</if>
|
</if>
|
||||||
<if test="senderAccount">
|
<if test="senderAccount!=null and senderAccount!=''">
|
||||||
AND sender_account = #{senderAccount}
|
AND sender_account = #{senderAccount}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user