提交修改
This commit is contained in:
parent
e0ed398e3d
commit
e021ed86be
@ -1,15 +1,16 @@
|
||||
package com.heyu.api.data.entity.vv;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.lz.mybatis.plugin.annotations.AS;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*评论表
|
||||
* @author quyixiao
|
||||
* @since 2025-10-22
|
||||
* @since 2025-11-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -42,6 +43,11 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String buyer_phone = CLASS_NAME + "buyer_phone"; // 买家手机号
|
||||
public final static String track_number = CLASS_NAME + "track_number"; // 包裹id
|
||||
public final static String is_system = CLASS_NAME + "is_system"; // 是否是系统评论
|
||||
public final static String reason_ = CLASS_NAME + "reason"; // 原因
|
||||
public final static String gmt_agree = CLASS_NAME + "gmt_agree"; // 同意时间
|
||||
public final static String gmt_reject = CLASS_NAME + "gmt_reject"; // 拒绝时间
|
||||
public final static String agree_user = CLASS_NAME + "agree_user"; // 同意用户
|
||||
public final static String reject_user = CLASS_NAME + "reject_user"; // 拒绝用户
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -87,6 +93,16 @@ private static final long serialVersionUID = 1L;
|
||||
private String trackNumber;
|
||||
//是否是系统评论
|
||||
private Integer isSystem;
|
||||
//原因
|
||||
private String reason;
|
||||
//同意时间
|
||||
private Date gmtAgree;
|
||||
//拒绝时间
|
||||
private Date gmtReject;
|
||||
//同意用户
|
||||
private String agreeUser;
|
||||
//拒绝用户
|
||||
private String rejectUser;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -417,6 +433,81 @@ private static final long serialVersionUID = 1L;
|
||||
this.isSystem = isSystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 原因
|
||||
* @return
|
||||
*/
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
/**
|
||||
* 原因
|
||||
* @param reason
|
||||
*/
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同意时间
|
||||
* @return
|
||||
*/
|
||||
public Date getGmtAgree() {
|
||||
return gmtAgree;
|
||||
}
|
||||
/**
|
||||
* 同意时间
|
||||
* @param gmtAgree
|
||||
*/
|
||||
public void setGmtAgree(Date gmtAgree) {
|
||||
this.gmtAgree = gmtAgree;
|
||||
}
|
||||
|
||||
/**
|
||||
* 拒绝时间
|
||||
* @return
|
||||
*/
|
||||
public Date getGmtReject() {
|
||||
return gmtReject;
|
||||
}
|
||||
/**
|
||||
* 拒绝时间
|
||||
* @param gmtReject
|
||||
*/
|
||||
public void setGmtReject(Date gmtReject) {
|
||||
this.gmtReject = gmtReject;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同意用户
|
||||
* @return
|
||||
*/
|
||||
public String getAgreeUser() {
|
||||
return agreeUser;
|
||||
}
|
||||
/**
|
||||
* 同意用户
|
||||
* @param agreeUser
|
||||
*/
|
||||
public void setAgreeUser(String agreeUser) {
|
||||
this.agreeUser = agreeUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* 拒绝用户
|
||||
* @return
|
||||
*/
|
||||
public String getRejectUser() {
|
||||
return rejectUser;
|
||||
}
|
||||
/**
|
||||
* 拒绝用户
|
||||
* @param rejectUser
|
||||
*/
|
||||
public void setRejectUser(String rejectUser) {
|
||||
this.rejectUser = rejectUser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvCommentEntity{" +
|
||||
@ -442,6 +533,11 @@ private static final long serialVersionUID = 1L;
|
||||
",buyerPhone=" + buyerPhone +
|
||||
",trackNumber=" + trackNumber +
|
||||
",isSystem=" + isSystem +
|
||||
",reason=" + reason +
|
||||
",gmtAgree=" + gmtAgree +
|
||||
",gmtReject=" + gmtReject +
|
||||
",agreeUser=" + agreeUser +
|
||||
",rejectUser=" + rejectUser +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -49,7 +49,7 @@ public class MysqlMain_update {
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
|
||||
list.add(new TablesBean("vv_package"));
|
||||
list.add(new TablesBean("vv_comment"));
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.heyu.api.alibaba.request.mm.order;
|
||||
|
||||
|
||||
import com.heyu.api.alibaba.request.mm.AdminBaseDTO;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VVCommentAgreeRequest extends AdminBaseDTO {
|
||||
|
||||
|
||||
/***
|
||||
* 评论id
|
||||
*/
|
||||
private Long id ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package com.heyu.api.alibaba.request.mm.order;
|
||||
|
||||
|
||||
import com.heyu.api.alibaba.request.mm.AdminBaseDTO;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VVCommentRejectRequest extends AdminBaseDTO {
|
||||
|
||||
|
||||
/***
|
||||
* id
|
||||
*/
|
||||
private Long id ;
|
||||
|
||||
/***
|
||||
* 原因
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@ package com.heyu.api.controller.mm;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.heyu.api.alibaba.request.mm.order.VVCommentAgreeRequest;
|
||||
import com.heyu.api.alibaba.request.mm.order.VVCommentRejectRequest;
|
||||
import com.heyu.api.alibaba.request.mm.order.VVCommentRequest;
|
||||
import com.heyu.api.common.annotation.Describe;
|
||||
import com.heyu.api.data.dao.vv.VvCommentDao;
|
||||
@ -9,6 +11,7 @@ import com.heyu.api.data.dao.vv.VvCommentDetailDao;
|
||||
import com.heyu.api.data.dto.vv.VvCommentDTO;
|
||||
import com.heyu.api.data.entity.vv.VvCommentDetailEntity;
|
||||
import com.heyu.api.data.entity.vv.VvCommentEntity;
|
||||
import com.heyu.api.data.enums.CommentStatusEnums;
|
||||
import com.heyu.api.data.service.impl.AbstractCommentAction;
|
||||
import com.heyu.api.data.utils.R;
|
||||
import com.heyu.api.utils.ISelect;
|
||||
@ -22,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@ -35,6 +39,7 @@ public class AdminCommentController {
|
||||
|
||||
@Autowired
|
||||
private VvCommentDetailDao vvCommentDetailDao;
|
||||
|
||||
/***
|
||||
* 列表
|
||||
*
|
||||
@ -73,11 +78,11 @@ public class AdminCommentController {
|
||||
}
|
||||
});
|
||||
List<VvCommentEntity> vvCommentEntities = pageUtils.getRows();
|
||||
List<VvCommentDTO> commentDTOS = new ArrayList<>();
|
||||
List<VvCommentDTO> commentDTOS = new ArrayList<>();
|
||||
for (VvCommentEntity vvCommentEntity : vvCommentEntities) {
|
||||
VvCommentDTO vvCommentDTO = new VvCommentDTO();
|
||||
BeanUtils.copyProperties(vvCommentEntity, vvCommentDTO);
|
||||
vvCommentDTO.setCommentActionList(AbstractCommentAction.getOrderActionDTO(vvCommentEntity,false));
|
||||
vvCommentDTO.setCommentActionList(AbstractCommentAction.getOrderActionDTO(vvCommentEntity, false));
|
||||
List<VvCommentDetailEntity> vvCommentDetailEntities = vvCommentDetailDao.selectVvCommentDetailByCommentId(vvCommentDTO.getId());
|
||||
vvCommentDTO.setVvCommentDetailEntities(vvCommentDetailEntities);
|
||||
commentDTOS.add(vvCommentDTO);
|
||||
@ -85,6 +90,7 @@ public class AdminCommentController {
|
||||
pageUtils.setRows(commentDTOS);
|
||||
return R.ok().setData(pageUtils);
|
||||
}
|
||||
|
||||
/***
|
||||
*
|
||||
*/
|
||||
@ -123,27 +129,31 @@ public class AdminCommentController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* /mm/comment/agree
|
||||
*/
|
||||
@Describe("同意评论")
|
||||
@RequestMapping("/agree")
|
||||
public R agree(@RequestBody VVCommentRequest vvCommentRequest) {
|
||||
|
||||
public R agree(@RequestBody VVCommentAgreeRequest vvCommentRequest) {
|
||||
VvCommentEntity vvCommentEntity = vvCommentDao.selectVvCommentById(vvCommentRequest.getId());
|
||||
vvCommentEntity.setStatus(CommentStatusEnums.approval_pass.getStatus());
|
||||
vvCommentEntity.setGmtAgree(new Date());
|
||||
vvCommentEntity.setAgreeUser(vvCommentRequest.getUserName());
|
||||
vvCommentDao.updateVvCommentById(vvCommentEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/***
|
||||
* /mm/comment/reject
|
||||
|
||||
*/
|
||||
@Describe("拒绝评论")
|
||||
@RequestMapping("/reject")
|
||||
public R reject(@RequestBody VVCommentRequest vvCommentRequest) {
|
||||
|
||||
public R reject(@RequestBody VVCommentRejectRequest vvCommentRequest) {
|
||||
VvCommentEntity vvCommentEntity = vvCommentDao.selectVvCommentById(vvCommentRequest.getId());
|
||||
vvCommentEntity.setStatus(CommentStatusEnums.approval_not_pass.getStatus());
|
||||
vvCommentEntity.setRejectUser(vvCommentRequest.getUserName());
|
||||
vvCommentDao.updateVvCommentById(vvCommentEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user