字段问题

This commit is contained in:
2024-11-08 14:23:42 +08:00
parent 7c2b6cb25f
commit b2e228b83a
2 changed files with 10 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ public class TbShopShareRecord extends BasePageDto implements Serializable {
* 1 未领取 2 已领取 3 已使用
*/
private Integer status;
private boolean isSuccess = true;
private boolean success = true;
/**
* 生效时间/获得奖励的时间
*/
@@ -60,5 +60,6 @@ public class TbShopShareRecord extends BasePageDto implements Serializable {
private Date createTime;
private Date updateTime;
}

View File

@@ -68,6 +68,11 @@ public class TbShopShareRecordServiceImpl implements TbShopShareRecordService {
@Override
public Map query(TbShopShareRecord tbShopShareRecord) {
Map<String, Object> result = tbShopShareRecordMapper.statisticsRecord(tbShopShareRecord);
if(CollectionUtil.isEmpty(result)){
result=new HashMap<>();
result.put("isSuccess",0);
result.put("isFail",0);
}
PageHelper.startPage(tbShopShareRecord.getPage(), tbShopShareRecord.getSize());
List<TbShopShareRecord> records;
@@ -79,7 +84,7 @@ public class TbShopShareRecordServiceImpl implements TbShopShareRecordService {
for (TbShopShareRecord shareRecord : records) {
shareRecord.setBeInvitedName(userInfoMapper.selectNameByPrimaryKey(shareRecord.getBeInvitedId()));
}
result.put("records",new PageInfo<>(records));
result.put("records",new PageInfo<>());
return result;
}
@@ -128,19 +133,13 @@ public class TbShopShareRecordServiceImpl implements TbShopShareRecordService {
query.setUpdateTime(new Date());
}
if (shopUserInfo == null) {
if (query != null) {
query.setStatus(1);
tbShopShareRecordMapper.update(query);
} else {
if (query == null) {
tbShopShareRecord.setStatus(1);
tbShopShareRecordMapper.insert(tbShopShareRecord);
}
saveShopUser(tbShopShareRecord.getBeInvitedId(), tbShopShareRecord.getShopId());
} else {
if (query != null) {
query.setStatus(0);
tbShopShareRecordMapper.update(query);
} else {
if (query == null){
tbShopShareRecord.setStatus(0);
tbShopShareRecordMapper.insert(tbShopShareRecord);
}