字段问题
This commit is contained in:
@@ -51,7 +51,7 @@ public class TbShopShareRecord extends BasePageDto implements Serializable {
|
|||||||
* 1 未领取 2 已领取 3 已使用
|
* 1 未领取 2 已领取 3 已使用
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
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 createTime;
|
||||||
|
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ public class TbShopShareRecordServiceImpl implements TbShopShareRecordService {
|
|||||||
@Override
|
@Override
|
||||||
public Map query(TbShopShareRecord tbShopShareRecord) {
|
public Map query(TbShopShareRecord tbShopShareRecord) {
|
||||||
Map<String, Object> result = tbShopShareRecordMapper.statisticsRecord(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());
|
PageHelper.startPage(tbShopShareRecord.getPage(), tbShopShareRecord.getSize());
|
||||||
|
|
||||||
List<TbShopShareRecord> records;
|
List<TbShopShareRecord> records;
|
||||||
@@ -79,7 +84,7 @@ public class TbShopShareRecordServiceImpl implements TbShopShareRecordService {
|
|||||||
for (TbShopShareRecord shareRecord : records) {
|
for (TbShopShareRecord shareRecord : records) {
|
||||||
shareRecord.setBeInvitedName(userInfoMapper.selectNameByPrimaryKey(shareRecord.getBeInvitedId()));
|
shareRecord.setBeInvitedName(userInfoMapper.selectNameByPrimaryKey(shareRecord.getBeInvitedId()));
|
||||||
}
|
}
|
||||||
result.put("records",new PageInfo<>(records));
|
result.put("records",new PageInfo<>());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,19 +133,13 @@ public class TbShopShareRecordServiceImpl implements TbShopShareRecordService {
|
|||||||
query.setUpdateTime(new Date());
|
query.setUpdateTime(new Date());
|
||||||
}
|
}
|
||||||
if (shopUserInfo == null) {
|
if (shopUserInfo == null) {
|
||||||
if (query != null) {
|
if (query == null) {
|
||||||
query.setStatus(1);
|
|
||||||
tbShopShareRecordMapper.update(query);
|
|
||||||
} else {
|
|
||||||
tbShopShareRecord.setStatus(1);
|
tbShopShareRecord.setStatus(1);
|
||||||
tbShopShareRecordMapper.insert(tbShopShareRecord);
|
tbShopShareRecordMapper.insert(tbShopShareRecord);
|
||||||
}
|
}
|
||||||
saveShopUser(tbShopShareRecord.getBeInvitedId(), tbShopShareRecord.getShopId());
|
saveShopUser(tbShopShareRecord.getBeInvitedId(), tbShopShareRecord.getShopId());
|
||||||
} else {
|
} else {
|
||||||
if (query != null) {
|
if (query == null){
|
||||||
query.setStatus(0);
|
|
||||||
tbShopShareRecordMapper.update(query);
|
|
||||||
} else {
|
|
||||||
tbShopShareRecord.setStatus(0);
|
tbShopShareRecord.setStatus(0);
|
||||||
tbShopShareRecordMapper.insert(tbShopShareRecord);
|
tbShopShareRecordMapper.insert(tbShopShareRecord);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user