|
|
@@ -209,10 +209,16 @@ public class PartnerLiftingRecordServiceImpl extends ServiceImpl<PartnerLiftingR
|
|
|
|
|
|
@Override
|
|
|
public HttpResult confirmUnlocking(PartnerRecordApper recordApper) {
|
|
|
-
|
|
|
+ PartnerLiftingRecord liftingRecord = baseMapper.selectById(recordApper.getRecordId());
|
|
|
+ if (Objects.isNull(liftingRecord)){
|
|
|
+ return HttpResult.error("数据不存在");
|
|
|
+ }
|
|
|
+ String max = baseMapper.selectMaxGradeByUserId(liftingRecord.getUserId());
|
|
|
+ if (StringUtils.isNotEmpty( max) && !StringUtils.equals(max,liftingRecord.getOriginalLevel())){
|
|
|
+ return HttpResult.error("请先解锁上一等级");
|
|
|
+ }
|
|
|
int insert = recordApperMapper.insert(recordApper);
|
|
|
if (insert > 0){
|
|
|
- PartnerLiftingRecord liftingRecord = baseMapper.selectById(recordApper.getRecordId());
|
|
|
liftingRecord.setAuditStatus(3);
|
|
|
baseMapper.updateById(liftingRecord);
|
|
|
PartnerPurchaseRecord record = getPurchaseRecord(recordApper, liftingRecord);
|