|
|
@@ -99,16 +99,16 @@ public class MetaUserPropService {
|
|
|
metaPropPrice = 100;
|
|
|
}
|
|
|
int goldNum = metaPropPrice * metaPropNum;
|
|
|
- metaUserGoldService.changeNum(userId, goldNum, String.format("永久道具:[],数量:[],单价:[],转化成金币[]", metaProp.getId(), metaPropNum, metaPropPrice, goldNum));
|
|
|
+ metaUserGoldService.changeNum(userId, goldNum, String.format("永久道具:[%S],数量:[%S],单价:[%S],转化成金币[%S]", metaProp.getId(), metaPropNum, metaPropPrice, goldNum));
|
|
|
// 未拥有该道具,领取一个,多余转化为金币
|
|
|
if (init) {
|
|
|
metaUserProp.setNum(1);
|
|
|
MetaUserProp save = metaUserPropRepo.save(metaUserProp);
|
|
|
metaUserPropRecordService.save(metaUserProp.getUserId(), metaProp, MetaPropOperationType.RECEIVE, 1);
|
|
|
- return MetaRestResult.returnSuccess(String.format("永久道具仅限持有一个,多余道具将转化为[]个金币!", goldNum), save);
|
|
|
+ return MetaRestResult.returnSuccess(String.format("永久道具仅限持有一个,多余道具将转化为[%S]个金币!", goldNum), save);
|
|
|
}
|
|
|
// 已拥有该道具,全部转为道具后返回
|
|
|
- return MetaRestResult.returnSuccess(String.format("玩家已拥有该道具,所领取的道具将转化为[]个金币!", goldNum));
|
|
|
+ return MetaRestResult.returnSuccess(String.format("玩家已拥有该道具,所领取的道具将转化为[%S]个金币!", goldNum));
|
|
|
}
|
|
|
MetaUserProp save = metaUserPropRepo.save(metaUserProp);
|
|
|
metaUserPropRecordService.save(metaUserProp.getUserId(), metaProp, MetaPropOperationType.RECEIVE, num);
|