| | |
| | | package com.nq.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.nq.common.ServerResponse; |
| | | |
| | | import com.nq.dao.MoneyLogMapper; |
| | | import com.nq.dao.StockConfigMapper; |
| | | import com.nq.pojo.MoneyLog; |
| | | import com.nq.pojo.SiteSpread; |
| | | import com.nq.pojo.StockConfig; |
| | | import com.nq.service.IMoneyLogServces; |
| | | import com.nq.service.ISiteSpreadService; |
| | | import com.nq.service.IStockConfigServices; |
| | | import com.nq.service.IUserService; |
| | | |
| | | import com.nq.utils.PropertiesUtil; |
| | |
| | | |
| | | import com.nq.vo.user.UserLoginResultVO; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.http.util.TextUtils; |
| | | import org.slf4j.Logger; |
| | | |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | @Autowired |
| | | ISiteSpreadService iSiteSpreadService; |
| | | |
| | | @Autowired |
| | | StockConfigMapper stockConfigMapper; |
| | | |
| | | @Autowired |
| | | IMoneyLogServces iMoneyLogServces; |
| | | |
| | | @Autowired |
| | | MoneyLogMapper moneyLogMapper; |
| | | |
| | | //注册 |
| | | @RequestMapping(value = {"reg.do"}, method = {RequestMethod.POST}) |
| | | @ResponseBody |
| | |
| | | return ServerResponse.createBySuccess("Success", siteSpread); |
| | | } |
| | | |
| | | @RequestMapping({"queryStockConfig.do"}) |
| | | @ResponseBody |
| | | public ServerResponse updateConfig(){ |
| | | StockConfig stockConfig = stockConfigMapper.selectOne(new LambdaQueryWrapper<StockConfig>().eq(StockConfig::getCKey, "buy_handling_charge")); |
| | | return ServerResponse.createBySuccess(stockConfig); |
| | | |
| | | } |
| | | |
| | | |
| | | @RequestMapping({"moneylogAll.do"}) |
| | | @ResponseBody |
| | | public ServerResponse taskList(@RequestParam(value = "userId") String userId, |
| | | @RequestParam(value = "type", required = false) String type, |
| | | @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, |
| | | @RequestParam(value = "pageSize", defaultValue = "50") int pageSize) { |
| | | Page<MoneyLog> page1 = new Page<>(pageNum, pageSize); |
| | | QueryWrapper<MoneyLog> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | if(!TextUtils.isEmpty(userId)){ |
| | | queryWrapper.eq("user_id",userId); |
| | | } |
| | | if(StringUtils.isNotEmpty(type)){ |
| | | queryWrapper.eq("type",type); |
| | | } |
| | | queryWrapper.orderByDesc("create_time"); |
| | | return ServerResponse.createBySuccess(moneyLogMapper.selectPage(page1,queryWrapper)); |
| | | } |
| | | } |
| | | |