Commit f44d233d authored by libin's avatar libin

佣金明细

parent dd5fae09
...@@ -3,7 +3,6 @@ package com.github.wxiaoqi.security.admin.biz; ...@@ -3,7 +3,6 @@ package com.github.wxiaoqi.security.admin.biz;
import com.github.wxiaoqi.security.admin.entity.MyWallet; import com.github.wxiaoqi.security.admin.entity.MyWallet;
import com.github.wxiaoqi.security.admin.mapper.MyWalletMapper; import com.github.wxiaoqi.security.admin.mapper.MyWalletMapper;
import com.github.wxiaoqi.security.admin.vo.AppletWalletVo; import com.github.wxiaoqi.security.admin.vo.AppletWalletVo;
import com.github.wxiaoqi.security.admin.vo.WalletVo;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -26,13 +26,14 @@ import java.util.List; ...@@ -26,13 +26,14 @@ import java.util.List;
@Service @Service
public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> { public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
public WalletCathPageVo findWatchCatchByWithdrawalState(Integer state, Integer pageNo, Integer pageSize){ public WalletCathPageVo findWatchCatchByWithdrawalState(Integer userId,Integer state, Integer pageNo, Integer pageSize){
WalletCathPageVo walletCathPageVo = new WalletCathPageVo(); WalletCathPageVo walletCathPageVo = new WalletCathPageVo();
Example example = new Example(MyWalletCath.class); Example example = new Example(MyWalletCath.class);
Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("stauts",state); criteria.andEqualTo("stauts",state);
criteria.andEqualTo("userId",userId);
PageDataVO<MyWalletCath> walletCathPage = PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example)); PageDataVO<MyWalletCath> walletCathPage = PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example));
List<MyWalletCath> walletCaths = walletCathPage.getData(); List<MyWalletCath> walletCaths = walletCathPage.getData();
......
package com.github.wxiaoqi.security.admin.rest;
import com.github.wxiaoqi.security.admin.biz.MyWalletCathBiz;
import com.github.wxiaoqi.security.admin.vo.WalletCathPageVo;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil;
import com.github.wxiaoqi.security.auth.common.util.jwt.IJWTInfo;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/7/12 14:17
*/
@RestController
@RequestMapping("/walletcath")
public class WalletCathController {
@Autowired
private MyWalletCathBiz myWalletCathBiz;
@Autowired
private UserAuthUtil userAuthUtil;
@Autowired
private UserAuthConfig userAuthConfig;
@GetMapping
public ObjectRestResponse<WalletCathPageVo> findWatchCatchByWithdrawalState(@RequestParam("state") Integer state,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize,
HttpServletRequest request) {
try {
IJWTInfo infoFromToken = userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request));
WalletCathPageVo catchByWithdrawa = myWalletCathBiz.findWatchCatchByWithdrawalState(Integer.valueOf(infoFromToken.getId()), state, pageNo, pageSize);
return ObjectRestResponse.succ(catchByWithdrawa);
} catch (Exception e) {
throw new BaseException(e);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment