parent
14eade9413
commit
12fb4390be
@ -0,0 +1,64 @@ |
|||||||
|
package com.bweb.controller; |
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper; |
||||||
|
import com.github.pagehelper.PageInfo; |
||||||
|
import com.hai.common.security.SessionObject; |
||||||
|
import com.hai.common.security.UserCenter; |
||||||
|
import com.hai.common.utils.ResponseMsgUtil; |
||||||
|
import com.hai.model.HighUserModel; |
||||||
|
import com.hai.model.ResponseData; |
||||||
|
import com.hai.service.HighGoldRecService; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import org.slf4j.Logger; |
||||||
|
import org.slf4j.LoggerFactory; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Controller; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
import javax.servlet.http.HttpServletRequest; |
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: 胡锐 |
||||||
|
* @Description: |
||||||
|
* @Date: 2021/3/28 23:54 |
||||||
|
*/ |
||||||
|
@Controller |
||||||
|
@RequestMapping(value = "/highGoldRec") |
||||||
|
@Api(value = "金币接口") |
||||||
|
public class HighGoldRecController { |
||||||
|
|
||||||
|
private static Logger log = LoggerFactory.getLogger(HighGoldRecController.class); |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private UserCenter userCenter; |
||||||
|
|
||||||
|
@Resource |
||||||
|
private HighGoldRecService highGoldRecService; |
||||||
|
|
||||||
|
@RequestMapping(value="/getUserGoldRecList",method = RequestMethod.GET) |
||||||
|
@ResponseBody |
||||||
|
@ApiOperation(value = "获取用户金币使用情况") |
||||||
|
public ResponseData getUserGoldRecList(@RequestParam(name = "goldType", required = false) Integer goldType, |
||||||
|
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||||
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
||||||
|
try { |
||||||
|
Map<String, Object> map = new HashMap<>(); |
||||||
|
map.put("goldType", goldType); |
||||||
|
|
||||||
|
PageHelper.startPage(pageNum,pageSize); |
||||||
|
return ResponseMsgUtil.success(new PageInfo<>(highGoldRecService.getGoldRec(map))); |
||||||
|
|
||||||
|
} catch (Exception e) { |
||||||
|
log.error("HighCouponController -> getCouponList() error!",e); |
||||||
|
return ResponseMsgUtil.exception(e); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
package com.hai.model; |
||||||
|
|
||||||
|
import com.hai.entity.HighUser; |
||||||
|
|
||||||
|
public class HighGoldRecModel { |
||||||
|
|
||||||
|
private HighUser highUser; |
||||||
|
|
||||||
|
public HighUser getHighUser() { |
||||||
|
return highUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setHighUser(HighUser highUser) { |
||||||
|
this.highUser = highUser; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue