feat: 提问和提问评论
parent
b2a3596f20
commit
cf6dcdee4c
|
@ -2,13 +2,16 @@ package com.mcwl.web.controller.communityCenter;
|
|||
|
||||
|
||||
import com.mcwl.common.core.domain.AjaxResult;
|
||||
import com.mcwl.common.core.domain.entity.SysUser;
|
||||
import com.mcwl.common.core.page.TableDataInfo;
|
||||
import com.mcwl.common.utils.SecurityUtils;
|
||||
import com.mcwl.communityCenter.domain.dto.QuestionDetailRes;
|
||||
import com.mcwl.communityCenter.domain.dto.QuestionPageRes;
|
||||
import com.mcwl.communityCenter.domain.dto.QuestionReplyRes;
|
||||
import com.mcwl.communityCenter.domain.dto.QuestionRes;
|
||||
import com.mcwl.communityCenter.domain.vo.QuestionVo;
|
||||
import com.mcwl.communityCenter.service.QuestionService;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
@ -30,6 +33,8 @@ public class QuestionController {
|
|||
|
||||
private final QuestionService questionService;
|
||||
|
||||
private final ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 提问
|
||||
*/
|
||||
|
@ -37,6 +42,28 @@ public class QuestionController {
|
|||
@ApiOperation(value = "提问")
|
||||
public AjaxResult addQuestion(@RequestBody @Valid QuestionRes questionRes) {
|
||||
|
||||
// 提问类型
|
||||
Integer type = questionRes.getType();
|
||||
|
||||
// 付费金额
|
||||
Double amount = questionRes.getAmount();
|
||||
|
||||
// 类型为1时,付费金额不能为空
|
||||
if (Objects.equals(type, 1) && Objects.isNull(amount)) {
|
||||
return AjaxResult.error("付费金额不能为空");
|
||||
}
|
||||
|
||||
// 付费类型为1时,判断钱包余额是否充足
|
||||
if (Objects.equals(type, 1)) {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
SysUser sysUser = sysUserService.selectUserById(userId);
|
||||
Double wallet = sysUser.getWallet();
|
||||
if (wallet < amount) {
|
||||
return AjaxResult.error("钱包余额不足");
|
||||
}
|
||||
} else {
|
||||
questionRes.setAmount(0.0);
|
||||
}
|
||||
|
||||
return questionService.addQuestion(questionRes);
|
||||
|
||||
|
@ -76,16 +103,16 @@ public class QuestionController {
|
|||
return AjaxResult.success(questionVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复
|
||||
*/
|
||||
@PostMapping("reply")
|
||||
@ApiOperation(value = "回复")
|
||||
public AjaxResult reply(@RequestBody @Valid QuestionReplyRes questionReplyRes) {
|
||||
|
||||
return questionService.reply(questionReplyRes);
|
||||
|
||||
}
|
||||
// /**
|
||||
// * 回复
|
||||
// */
|
||||
// @PostMapping("reply")
|
||||
// @ApiOperation(value = "回复")
|
||||
// public AjaxResult reply(@RequestBody @Valid QuestionReplyRes questionReplyRes) {
|
||||
//
|
||||
// return questionService.reply(questionReplyRes);
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -115,6 +115,11 @@ public class SysUser extends BaseEntity
|
|||
*/
|
||||
private Double freePoints;
|
||||
|
||||
/**
|
||||
* 钱包-金币
|
||||
*/
|
||||
private Double wallet;
|
||||
|
||||
|
||||
public SysUser()
|
||||
{
|
||||
|
@ -364,6 +369,14 @@ public class SysUser extends BaseEntity
|
|||
this.freePoints = freePoints;
|
||||
}
|
||||
|
||||
public Double getWallet() {
|
||||
return wallet;
|
||||
}
|
||||
|
||||
public void setWallet(Double wallet) {
|
||||
this.wallet = wallet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SysUser{" +
|
||||
|
|
|
@ -11,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -23,64 +24,67 @@ import java.util.Date;
|
|||
public class Question extends BaseEntity {
|
||||
|
||||
@TableId
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 用户id - 租户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id - 租户id")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
@ApiModelProperty(value = "社区id")
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 提问用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "提问用户id")
|
||||
private Long questionUserId;
|
||||
|
||||
/**
|
||||
* 提问内容
|
||||
*/
|
||||
@ApiModelProperty(value = "提问内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 提问图片
|
||||
*/
|
||||
@ApiModelProperty(value = "提问图片")
|
||||
private String questionUrl;
|
||||
|
||||
/**
|
||||
* 回复内容
|
||||
*/
|
||||
@ApiModelProperty(value = "答复内容")
|
||||
private String reply;
|
||||
|
||||
/**
|
||||
* 回复时间
|
||||
*/
|
||||
@ApiModelProperty(value = "答复时间")
|
||||
private Date replyTime;
|
||||
// /**
|
||||
// * 回复内容
|
||||
// */
|
||||
// @ApiModelProperty(value = "答复内容")
|
||||
// private String reply;
|
||||
//
|
||||
// /**
|
||||
// * 回复时间
|
||||
// */
|
||||
// @ApiModelProperty(value = "答复时间")
|
||||
// private Date replyTime;
|
||||
|
||||
/**
|
||||
* 是否匿名
|
||||
*/
|
||||
@ApiModelProperty(value = "是否匿名")
|
||||
private Integer isAnonymous;
|
||||
|
||||
// /**
|
||||
// * 状态
|
||||
// */
|
||||
// @ApiModelProperty(value = "状态")
|
||||
// private Integer status;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
* 提问类型 0免费 1付费
|
||||
*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 付费金额 当提问类型为付费时必填
|
||||
*/
|
||||
private Double amount;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package com.mcwl.communityCenter.domain;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mcwl.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 提问评论
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("cc_question_comment")
|
||||
public class QuestionComment extends BaseEntity {
|
||||
|
||||
@TableId
|
||||
private String id;
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
private String communityId;
|
||||
/**
|
||||
* 提问id
|
||||
*/
|
||||
private String questionId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 是否接受
|
||||
*/
|
||||
private String isAccept;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -22,7 +22,7 @@ public class QuestionPageRes extends PageDomain {
|
|||
@ApiModelProperty(value = "社区id", required = true)
|
||||
private Long communityId;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
// @ApiModelProperty(value = "状态")
|
||||
// private Integer status;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.mcwl.communityCenter.domain.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
@ -44,9 +45,24 @@ public class QuestionRes {
|
|||
/**
|
||||
* 是否匿名 0 否 1 是
|
||||
*/
|
||||
//swagger给上默认值
|
||||
@ApiModelProperty(value = "是否匿名", position = 5)
|
||||
@NotNull(message = "是否匿名不能为空")
|
||||
private Integer isAnonymous = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 提问类型 0免费 1付费
|
||||
*/
|
||||
@ApiModelProperty(value = "提问类型 0免费 1付费", required = true, position = 6)
|
||||
@NotNull(message = "提问类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 付费金额 当提问类型为付费时必填
|
||||
*/
|
||||
@ApiModelProperty(value = "付费金额,当提问类型为1时必填")
|
||||
private Double amount;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import javax.validation.constraints.NotBlank;
|
|||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 社区请求参数
|
||||
* 社区返回数据
|
||||
*/
|
||||
@Data
|
||||
@TableName("cc_community")
|
||||
|
|
|
@ -59,23 +59,23 @@ public class QuestionVo {
|
|||
@ApiModelProperty(value = "提问时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 答复用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "答复用户id")
|
||||
private Long replyUserId;
|
||||
|
||||
/**
|
||||
* 回复内容
|
||||
*/
|
||||
@ApiModelProperty(value = "回复内容")
|
||||
private String reply;
|
||||
|
||||
/**
|
||||
* 回复时间
|
||||
*/
|
||||
@ApiModelProperty(value = "回复时间")
|
||||
private Date replyTime;
|
||||
// /**
|
||||
// * 答复用户id
|
||||
// */
|
||||
// @ApiModelProperty(value = "答复用户id")
|
||||
// private Long replyUserId;
|
||||
//
|
||||
// /**
|
||||
// * 回复内容
|
||||
// */
|
||||
// @ApiModelProperty(value = "回复内容")
|
||||
// private String reply;
|
||||
//
|
||||
// /**
|
||||
// * 回复时间
|
||||
// */
|
||||
// @ApiModelProperty(value = "回复时间")
|
||||
// private Date replyTime;
|
||||
|
||||
/**
|
||||
* 是否匿名
|
||||
|
@ -83,6 +83,16 @@ public class QuestionVo {
|
|||
@ApiModelProperty(value = "是否匿名")
|
||||
private Integer isAnonymous;
|
||||
|
||||
/**
|
||||
* 提问类型 0免费 1付费
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 付费金额 当提问类型为付费时必填
|
||||
*/
|
||||
private Double amount;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@ public interface QuestionMapper extends BaseMapper<Question> {
|
|||
Long tenantId,
|
||||
@NotNull(message = "社区不能为空")
|
||||
@Param("communityId")
|
||||
Long communityId,
|
||||
@Param("status")
|
||||
Integer status);
|
||||
Long communityId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Question selectByIdAndTenantIdAndCommunityId(@Param("id")
|
||||
|
@ -38,7 +36,5 @@ public interface QuestionMapper extends BaseMapper<Question> {
|
|||
Long tenantId,
|
||||
@NotNull(message = "社区不能为空")
|
||||
@Param("communityId")
|
||||
Long communityId,
|
||||
@Param("status")
|
||||
Integer status);
|
||||
Long communityId);
|
||||
}
|
||||
|
|
|
@ -26,11 +26,11 @@ public interface QuestionService extends IService<Question> {
|
|||
|
||||
QuestionVo getDetail(QuestionDetailRes questionDetailRes);
|
||||
|
||||
/**
|
||||
* 回复问题
|
||||
* @param questionReplyRes 回复信息
|
||||
*/
|
||||
AjaxResult reply(QuestionReplyRes questionReplyRes);
|
||||
// /**
|
||||
// * 回复问题
|
||||
// * @param questionReplyRes 回复信息
|
||||
// */
|
||||
// AjaxResult reply(QuestionReplyRes questionReplyRes);
|
||||
|
||||
TableDataInfo listImage(@Valid QuestionPageRes questionPageRes);
|
||||
}
|
||||
|
|
|
@ -70,30 +70,30 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|||
return AjaxResult.error("租户或社区不存在");
|
||||
}
|
||||
|
||||
if (Objects.equals(tenantId, userId)) {
|
||||
return AjaxResult.error("您不能提问自己的问题");
|
||||
}
|
||||
// if (Objects.equals(tenantId, userId)) {
|
||||
// return AjaxResult.error("您不能提问自己的问题");
|
||||
// }
|
||||
|
||||
//提问人(userId)是否在社区中
|
||||
Invite invite = inviteMapper.selectByTenantIdAndCommunityIdAndInviteeUserId(tenantId, communityId, userId);
|
||||
if (Objects.isNull(invite)) {
|
||||
return AjaxResult.error("您不是该社区成员,不能提问");
|
||||
}
|
||||
// Invite invite = inviteMapper.selectByTenantIdAndCommunityIdAndInviteeUserId(tenantId, communityId, userId);
|
||||
// if (Objects.isNull(invite)) {
|
||||
// return AjaxResult.error("您不是该社区成员,不能提问");
|
||||
// }
|
||||
|
||||
Question question = new Question();
|
||||
BeanUtil.copyProperties(questionRes, question);
|
||||
question.setQuestionUserId(userId);
|
||||
question.setStatus(StatusConstant.STATUS_UNREPLIED);
|
||||
// question.setStatus(StatusConstant.STATUS_UNREPLIED);
|
||||
baseMapper.insert(question);
|
||||
|
||||
|
||||
CommunityAdvice communityAdvice = new CommunityAdvice();
|
||||
communityAdvice.setTenantId(tenantId);
|
||||
communityAdvice.setCommunityId(communityId);
|
||||
communityAdvice.setUserId(tenantId);
|
||||
communityAdvice.setTitle("您有新的问题");
|
||||
communityAdvice.setContent(questionRes.getContent());
|
||||
communityAdviceMapper.insert(communityAdvice);
|
||||
// CommunityAdvice communityAdvice = new CommunityAdvice();
|
||||
// communityAdvice.setTenantId(tenantId);
|
||||
// communityAdvice.setCommunityId(communityId);
|
||||
// communityAdvice.setUserId(tenantId);
|
||||
// communityAdvice.setTitle("您有新的问题");
|
||||
// communityAdvice.setContent(questionRes.getContent());
|
||||
// communityAdviceMapper.insert(communityAdvice);
|
||||
|
||||
|
||||
return AjaxResult.success();
|
||||
|
@ -105,7 +105,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|||
|
||||
Page<Question> page = initPage(questionPageRes);
|
||||
|
||||
baseMapper.list(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId(), questionPageRes.getStatus());
|
||||
// baseMapper.list(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId(), questionPageRes.getStatus());
|
||||
baseMapper.list(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId());
|
||||
|
||||
// 获取分页数据
|
||||
List<Question> questionList = page.getRecords();
|
||||
|
@ -153,43 +154,44 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|||
return questionVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复问题
|
||||
*
|
||||
* @param questionReplyRes 回复信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult reply(QuestionReplyRes questionReplyRes) {
|
||||
|
||||
Long communityId = questionReplyRes.getCommunityId();
|
||||
Long questionId = questionReplyRes.getQuestionId();
|
||||
LambdaQueryWrapper<Question> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.eq(Question::getId, questionId)
|
||||
.eq(Question::getCommunityId, communityId)
|
||||
.eq(Question::getStatus, StatusConstant.STATUS_UNREPLIED);
|
||||
|
||||
// 查询问题信息
|
||||
Question question = baseMapper.selectOne(lqw);
|
||||
|
||||
if (Objects.isNull(question)) {
|
||||
return AjaxResult.error("问题不存在或已被回复");
|
||||
}
|
||||
|
||||
question.setReply(questionReplyRes.getReply());
|
||||
question.setStatus(StatusConstant.STATUS_REPLIED);
|
||||
question.setReplyTime(new Date());
|
||||
|
||||
baseMapper.updateById(question);
|
||||
return AjaxResult.success();
|
||||
|
||||
}
|
||||
// /**
|
||||
// * 回复问题
|
||||
// *
|
||||
// * @param questionReplyRes 回复信息
|
||||
// */
|
||||
// @Override
|
||||
// public AjaxResult reply(QuestionReplyRes questionReplyRes) {
|
||||
//
|
||||
// Long communityId = questionReplyRes.getCommunityId();
|
||||
// Long questionId = questionReplyRes.getQuestionId();
|
||||
// LambdaQueryWrapper<Question> lqw = new LambdaQueryWrapper<>();
|
||||
// lqw.eq(Question::getId, questionId)
|
||||
// .eq(Question::getCommunityId, communityId)
|
||||
// .eq(Question::getStatus, StatusConstant.STATUS_UNREPLIED);
|
||||
//
|
||||
// // 查询问题信息
|
||||
// Question question = baseMapper.selectOne(lqw);
|
||||
//
|
||||
// if (Objects.isNull(question)) {
|
||||
// return AjaxResult.error("问题不存在或已被回复");
|
||||
// }
|
||||
//
|
||||
// question.setReply(questionReplyRes.getReply());
|
||||
// question.setStatus(StatusConstant.STATUS_REPLIED);
|
||||
// question.setReplyTime(new Date());
|
||||
//
|
||||
// baseMapper.updateById(question);
|
||||
// return AjaxResult.success();
|
||||
//
|
||||
// }
|
||||
|
||||
@Override
|
||||
public TableDataInfo listImage(QuestionPageRes questionPageRes) {
|
||||
|
||||
Page<Question> page = initPage(questionPageRes);
|
||||
|
||||
baseMapper.listImage(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId(), questionPageRes.getStatus());
|
||||
// baseMapper.listImage(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId(), questionPageRes.getStatus());
|
||||
baseMapper.listImage(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId());
|
||||
|
||||
// 获取分页数据
|
||||
List<Question> questionList = page.getRecords();
|
||||
|
|
|
@ -6,17 +6,31 @@
|
|||
|
||||
|
||||
<select id="list" resultType="com.mcwl.communityCenter.domain.Question">
|
||||
select id, tenant_id, community_id, question_user_id, content,question_url, reply,reply_time,is_anonymous,status
|
||||
select id,
|
||||
tenant_id,
|
||||
community_id,
|
||||
question_user_id,
|
||||
content,
|
||||
question_url,
|
||||
is_anonymous,
|
||||
amount,
|
||||
type
|
||||
from cc_question
|
||||
where del_flag = '0'
|
||||
and tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
<if test="status != null">
|
||||
and status= #{status}
|
||||
</if>
|
||||
order by amount desc, create_time desc
|
||||
</select>
|
||||
<select id="selectByIdAndTenantIdAndCommunityId" resultType="com.mcwl.communityCenter.domain.Question">
|
||||
select id, tenant_id, community_id, question_user_id, content,question_url, reply,reply_time,is_anonymous,status
|
||||
select id,
|
||||
tenant_id,
|
||||
community_id,
|
||||
question_user_id,
|
||||
content,
|
||||
question_url,
|
||||
is_anonymous,
|
||||
amount,
|
||||
type
|
||||
from cc_question
|
||||
where id = #{id}
|
||||
and tenant_id = #{tenantId}
|
||||
|
@ -24,14 +38,20 @@
|
|||
and del_flag = '0'
|
||||
</select>
|
||||
<select id="listImage" resultType="com.mcwl.communityCenter.domain.Question">
|
||||
select id, tenant_id, community_id, question_user_id, content,question_url, reply,reply_time,is_anonymous,status
|
||||
select id,
|
||||
tenant_id,
|
||||
community_id,
|
||||
question_user_id,
|
||||
content,
|
||||
question_url,
|
||||
is_anonymous,
|
||||
amount,
|
||||
type
|
||||
from cc_question
|
||||
where del_flag = '0'
|
||||
and tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
<if test="status != null">
|
||||
and status= #{status}
|
||||
</if>
|
||||
and question_url is not null
|
||||
order by amount desc, create_time desc
|
||||
</select>
|
||||
</mapper>
|
|
@ -24,12 +24,7 @@ import java.util.Objects;
|
|||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* @Author:ChenYan
|
||||
* @Project:McWl
|
||||
* @Package:com.mcwl.resource.service.impl
|
||||
* @Filename:ModelCommentLikeServiceImpl
|
||||
* @Description TODO
|
||||
* @Date:2025/1/12 12:01
|
||||
* 模型评论点赞
|
||||
*/
|
||||
@Service
|
||||
public class ModelCommentLikeServiceImpl extends ServiceImpl<ModelCommentLikeMapper,ModelCommentLike> implements ModelCommentLikeService {
|
||||
|
|
|
@ -25,12 +25,7 @@ import java.util.List;
|
|||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author:ChenYan
|
||||
* @Project:McWl
|
||||
* @Package:com.mcwl.resource.service.impl
|
||||
* @Filename:ModelCommentServiceImpl
|
||||
* @Description TODO
|
||||
* @Date:2025/1/12 12:03
|
||||
* 模型评论
|
||||
*/
|
||||
@Service
|
||||
public class ModelCommentServiceImpl extends ServiceImpl<ModelCommentMapper, ModelComment> implements ModelCommentService {
|
||||
|
|
|
@ -19,6 +19,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 图片评论点赞
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ModelImageCommentLikeServiceImpl extends ServiceImpl<ModelImageCommentLikeMapper, ModelImageCommentLike> implements ModelImageCommentLikeService {
|
||||
|
|
|
@ -22,6 +22,9 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 图片评论实现
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ModelImageCommentServiceImpl extends ServiceImpl<ModelImageCommentMapper, ModelImageComment> implements ModelImageCommentService {
|
||||
|
|
|
@ -17,6 +17,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 图片点赞实现
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ModelImageLikeServiceImpl extends ServiceImpl<ModelImageLikeMapper, ModelImageLike> implements ModelImageLikeService {
|
||||
|
|
|
@ -35,6 +35,9 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 图片实现
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ModelImageServiceImpl extends ServiceImpl<ModelImageMapper, ModelImage> implements ModelImageService {
|
||||
|
|
|
@ -15,12 +15,7 @@ import java.util.Date;
|
|||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author:ChenYan
|
||||
* @Project:McWl
|
||||
* @Package:com.mcwl.resource.service.impl
|
||||
* @Filename:ModelLikeServiceImpl
|
||||
* @Description TODO
|
||||
* @Date:2025/1/12 12:05
|
||||
* 模型点赞
|
||||
*/
|
||||
@Service
|
||||
public class ModelLikeServiceImpl extends ServiceImpl<ModelLikeMapper, ModelLike> implements ModelLikeService {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<result property="sex" column="sex" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="password" column="password" />
|
||||
<result property="wallet" column="wallet" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="loginIp" column="login_ip" />
|
||||
|
@ -49,7 +50,7 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.inviter_user_id, u.free_points,
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,u.wallet, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.inviter_user_id, u.free_points,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
from sys_user u
|
||||
|
@ -59,7 +60,7 @@
|
|||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,u.wallet u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
|
@ -88,7 +89,7 @@
|
|||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber,u.wallet u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
|
@ -105,7 +106,7 @@
|
|||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber,u.wallet u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
|
|
Loading…
Reference in New Issue