This commit is contained in:
2026-04-25 15:14:22 +08:00
parent 6aca41d70e
commit 0124730063
9 changed files with 83 additions and 269 deletions

View File

@@ -65,6 +65,24 @@ public class TtOrnamentsController extends BaseController {
return ornamentsService.grantOrnaments(userId, ornamentsId, ornamentsLevelId, num);
}
@ApiOperation("新增饰品")
@PostMapping("/addTtOrnament")
public AjaxResult add(@RequestBody TtOrnament ttOrnament) {
if (ttOrnament.getId() == null) {
ttOrnament.setId(System.currentTimeMillis());
}
if (ttOrnament.getMarketHashName() == null){
ttOrnament.setMarketHashName(String.valueOf(System.currentTimeMillis()));
}
return toAjax(ornamentsService.save(ttOrnament));
}
@ApiOperation("修改饰品")
@PostMapping("/editTtOrnament")
public AjaxResult edit(@RequestBody TtOrnament ttOrnament) {
return toAjax(ornamentsService.updateById(ttOrnament));
}
@PutMapping("/updateOrnamentPrice")
public AjaxResult updateOrnamentPrice(@RequestBody TtOrnamentsPrice ttOrnamentsPrice) {
return ornamentsService.updateOrnamentPrice(ttOrnamentsPrice.getId(), ttOrnamentsPrice.getPrice());