| | |
| | | package com.yami.trading.admin.controller.dz; |
| | | |
| | | import com.yami.trading.bean.dz.ExchangeApplyOrderDz; |
| | | import com.yami.trading.bean.dz.StockDz; |
| | | import com.yami.trading.bean.ipo.ApplyNewSharesOrder; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.common.exception.BusinessException; |
| | | import com.yami.trading.dao.dz.ExchangeApplyOrderDzMapper; |
| | | import com.yami.trading.service.dz.StockDzService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | StockDzService stockDzService; |
| | | |
| | | @Resource |
| | | ExchangeApplyOrderDzMapper exchangeApplyOrderDzMapper; |
| | | |
| | | @ApiOperation("获取etf列表") |
| | | @PostMapping({"getDzListByAdmin.do"}) |
| | |
| | | @ApiOperation("新增大宗") |
| | | @PostMapping({"addByAdmin.do"}) |
| | | public Result addByAdmin(@RequestParam(value = "stockCode") String stockCode, |
| | | @RequestParam(value = "stockNum") String stockNum, |
| | | @RequestParam(value = "stockName", required = false) String stockName, |
| | | @RequestParam(value = "stockNum", required = false) String stockNum, |
| | | @RequestParam(value = "password", required = false) String password, |
| | | @RequestParam(value = "startTime") String startTime, |
| | | @RequestParam(value = "endTime") String endTime, |
| | | @RequestParam(value = "discount", required = false) String discount, |
| | | @RequestParam(value = "period", required = false) Integer period, |
| | | @RequestParam(value = "nowPrice") String nowPrice, |
| | | @RequestParam(value = "switchType", defaultValue = "0") Integer switchType) { |
| | | return stockDzService.addByAdmin(stockCode, stockNum, password, startTime, endTime, discount, period,nowPrice,switchType, Constants.indices); |
| | | @RequestParam(value = "switchType", defaultValue = "0") Integer switchType, |
| | | @RequestParam(value = "dayRate", defaultValue = "0") double dayRate) { |
| | | return stockDzService.addByAdmin(stockCode, stockName, stockNum, password, startTime, endTime, discount, period,nowPrice,switchType, Constants.indices, dayRate); |
| | | } |
| | | |
| | | /** |
| | |
| | | public Result getDzCheckList(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, |
| | | @RequestParam(value = "pageSize", defaultValue = "15") int pageSize, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestParam(value = "stockCode", required = false)String stockCode) { |
| | | return stockDzService.getDzCheckList(pageNum, pageSize, state, stockCode, Constants.indices, null); |
| | | @RequestParam(value = "stockCode", required = false)String stockCode, |
| | | @RequestParam(value = "userName", required = false)String userName) { |
| | | return stockDzService.getDzCheckList(pageNum, pageSize, state, stockCode, Constants.indices, userName, null); |
| | | } |
| | | |
| | | @ApiOperation("大宗审核") |
| | |
| | | return stockDzService.dzCheck(id, checkType, orderNum, 0); |
| | | } |
| | | |
| | | @ApiOperation(value = "解锁/锁定") |
| | | @PostMapping("unLock") |
| | | public Result unLock(String id){ |
| | | if (StringUtils.isEmpty(id)){ |
| | | throw new BusinessException("请选择申购订单记录"); |
| | | } |
| | | ExchangeApplyOrderDz order = exchangeApplyOrderDzMapper.selectById(id); |
| | | if (order == null){ |
| | | throw new BusinessException("未查到订单"); |
| | | } |
| | | if (order.getUnLock() != null && order.getUnLock() == 1) { |
| | | order.setUnLock(0); |
| | | } else { |
| | | order.setUnLock(1); |
| | | } |
| | | exchangeApplyOrderDzMapper.updateById(order); |
| | | return Result.succeed(); |
| | | } |
| | | |
| | | } |