Compare commits
5 Commits
c951baedd5
...
fd2d1d62ef
Author | SHA1 | Date |
---|---|---|
|
fd2d1d62ef | |
|
fadfd8058f | |
|
dfa4f4d245 | |
|
87f259cd6f | |
|
d09f89c827 |
|
@ -166,15 +166,19 @@ public class MallProductController extends BaseController {
|
|||
R<ModelProduct> modelProductR = modelService.selectModelById(id);
|
||||
ModelProduct data = modelProductR.getData();
|
||||
if (Objects.nonNull(data)) {
|
||||
LambdaQueryWrapper<ModelPurchaseRecord> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ModelPurchaseRecord::getUserId, SecurityUtils.getUserId())
|
||||
.eq(ModelPurchaseRecord::getProductId, id)
|
||||
.eq(ModelPurchaseRecord::getProductType, 0);
|
||||
ModelPurchaseRecord modelPurchaseRecord = modelPurchaseRecordMapper.selectOne(wrapper);
|
||||
data.setIsBuy(1);
|
||||
if (Objects.isNull(modelPurchaseRecord)) {
|
||||
data.setIsBuy(0);
|
||||
Long userIdMax = SecurityUtils.getUserIdMax();
|
||||
if (userIdMax != 0){
|
||||
LambdaQueryWrapper<ModelPurchaseRecord> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ModelPurchaseRecord::getUserId, userIdMax)
|
||||
.eq(ModelPurchaseRecord::getProductId, id)
|
||||
.eq(ModelPurchaseRecord::getProductType, 0);
|
||||
ModelPurchaseRecord modelPurchaseRecord = modelPurchaseRecordMapper.selectOne(wrapper);
|
||||
data.setIsBuy(1);
|
||||
if (Objects.isNull(modelPurchaseRecord)) {
|
||||
data.setIsBuy(0);
|
||||
}
|
||||
}
|
||||
data.setIsBuy(0);
|
||||
modelProductR.setData(data);
|
||||
}
|
||||
return modelProductR;
|
||||
|
|
|
@ -124,6 +124,11 @@ public class PersonHomeVo {
|
|||
@ApiModelProperty(value = "付费金额 当提问类型为付费时必填")
|
||||
private Double amount;
|
||||
|
||||
/**
|
||||
* 状态 0未解决 1已解决
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
|
|
@ -92,6 +92,12 @@ public class QuestionVo {
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 状态 0未解决 1已解决
|
||||
*/
|
||||
@ApiModelProperty(value = "状态 0未解决 1已解决")
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue