查询用户积分
parent
b68819ffc3
commit
d0c14ebf8b
@ -0,0 +1,39 @@
|
||||
package com.flossom.miniProgram.controller;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserIntegralLog;
|
||||
import com.flossom.common.core.web.controller.BaseController;
|
||||
import com.flossom.common.core.web.domain.AjaxResult;
|
||||
import com.flossom.common.core.web.page.TableDataInfo;
|
||||
import com.flossom.miniProgram.service.IWxUserIntegralService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信用户积分 Controller
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2023-12-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/integralLog")
|
||||
public class WxUserIntegraController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWxUserIntegralService wxUserIntegralLogService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户积分列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/obtainUserIntegral")
|
||||
public TableDataInfo obtainUserIntegral() {
|
||||
startPage();
|
||||
List<WxUserIntegralLog> list = wxUserIntegralLogService.obtainUserIntegral();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.flossom.miniProgram.service;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserIntegralLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IWxUserIntegralService {
|
||||
|
||||
List<WxUserIntegralLog> obtainUserIntegral();
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.flossom.miniProgram.service.impl;
|
||||
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserIntegralLog;
|
||||
import com.flossom.common.core.domain.entity.WxUserMember;
|
||||
import com.flossom.common.core.mapper.WxUserIntegralLogMapper;
|
||||
import com.flossom.common.security.utils.SecurityUtils;
|
||||
import com.flossom.miniProgram.service.IWxUserIntegralService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class WxUserIntegralServiceImpl implements IWxUserIntegralService {
|
||||
|
||||
@Autowired
|
||||
private WxUserIntegralLogMapper wxUserIntegralLogMapper;
|
||||
|
||||
@Override
|
||||
public List<WxUserIntegralLog> obtainUserIntegral() {
|
||||
WxUserMember wxUserMember = SecurityUtils.getLoginUser().getWxUserMember();
|
||||
return wxUserIntegralLogMapper.obtainUserIntegral(wxUserMember.getId());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue