用户积分记录

This commit is contained in:
2025-12-11 11:15:29 +08:00
parent a722f14045
commit cf17edee43
5 changed files with 26 additions and 5 deletions

View File

@@ -11,6 +11,8 @@ import com.czg.market.service.MkPointsUserService;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.query.QueryCondition;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
@@ -84,10 +86,7 @@ public class UPointsController {
public CzgResult<Page<MkPointsUserRecord>> getPointsRecord(@RequestParam(required = false, defaultValue = "1") Integer page,
@RequestParam(required = false, defaultValue = "10") Integer size,
@RequestParam Long id) {
return CzgResult.success(pointsUserRecordService.page(Page.of(page, size),
QueryWrapper.create().select().select(ShopInfo::getShopName)
.eq(MkPointsUserRecord::getMkPointsUserId, id)
.leftJoin(ShopInfo.class).on(ShopInfo::getId, MkPointsUserRecord::getShopId)
.orderBy(MkPointsUserRecord::getCreateTime, false)));
return CzgResult.success(pointsUserRecordService.getPointsUserRecord(page, size, id));
}
}