Commit 693800b5 authored by tangfang's avatar tangfang

修改用户二维码生成

parent 9759fb71
......@@ -4,13 +4,16 @@ import com.pangding.web.authority.service.CompanyMoneyService;
import com.pangding.web.authority.service.FinanceService;
import com.pangding.web.authority.vo.reqvo.WithdrawalReqVo;
import com.pangding.web.authority.vo.resvo.WithdrawalResVo;
import com.pangding.web.util.DateUtil;
import com.pangding.web.vo.order.req.CapitalFlowReqVo;
import com.pangding.web.vo.order.req.back.CashWithdrawalBackReqVo;
import com.pangding.web.vo.order.res.CapitalFlowListResVo;
import com.pangding.web.vo.system.pd.company.CompanyMoneyVo;
import com.pangding.web.vo.system.req.company.CompanyMoneyReqVo;
import com.pangding.web.vo.system.res.company.CompanyMoneyTotalResVo;
import com.yanzuoguang.util.exception.CodeException;
import com.yanzuoguang.util.helper.CheckerHelper;
import com.yanzuoguang.util.helper.DateHelper;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.ResponseResult;
import io.swagger.annotations.Api;
......@@ -19,13 +22,17 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import static com.yanzuoguang.util.helper.DateHelper.getCurDate;
/**
* @Author zhangjinyao
* @create 2019/6/18 19:53
*/
@RestController
@RequestMapping(value = "/finance",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "/finance", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "余额", description = "余额")
public class FinanceController {
@Autowired
......@@ -44,7 +51,7 @@ public class FinanceController {
CheckerHelper.newInstance()
.notBlankCheck("companyId", req.getCompanyId())
.checkException();
if("10001".equals(req.getCompanyId())){
if ("10001".equals(req.getCompanyId())) {
req.setCompanyId("");
}
if (!StringHelper.isEmpty(req.getDateType()) && 1 == req.getDateType()) {
......@@ -66,15 +73,16 @@ public class FinanceController {
@PostMapping(value = "/withdrawal")
@ApiOperation(value = "公司余额查询", notes = "返回公司余额信息")
public ResponseResult<WithdrawalResVo> withdrawal(@RequestBody WithdrawalReqVo reqVo){
public ResponseResult<WithdrawalResVo> withdrawal(@RequestBody WithdrawalReqVo reqVo) {
CheckerHelper.newInstance()
.notBlankCheck("companyId",reqVo.getCompanyId())
.notBlankCheck("companyId", reqVo.getCompanyId())
.checkException();
return ResponseResult.result(financeService.withdrawal(reqVo));
}
/**
* 提现申请
*
* @param req
* @return
*/
......@@ -95,12 +103,13 @@ public class FinanceController {
* 提现回调
*/
@RequestMapping(value = "/withdrawalBack")
public ResponseResult<String> withdrawalBack(@RequestBody CashWithdrawalBackReqVo req){
public ResponseResult<String> withdrawalBack(@RequestBody CashWithdrawalBackReqVo req) {
return financeService.withdrawalBack(req);
}
/**
* 转账
*
* @param req
* @return
*/
......@@ -118,13 +127,34 @@ public class FinanceController {
@RequestMapping(value = "findCompanyMoneyList")
@ApiOperation(value = "找到公司资金汇总列表", notes = "返回公司资金汇总列表")
public ResponseResult<CompanyMoneyTotalResVo> findCompanyMoneyList(@RequestBody CompanyMoneyReqVo req){
public ResponseResult<CompanyMoneyTotalResVo> findCompanyMoneyList(@RequestBody CompanyMoneyReqVo req) {
// CheckerHelper.newInstance()
// .notBlankCheck("companyId", req.getCompanyId())
// .notBlankCheck("startDate", req.getStartDate())
// .notBlankCheck("endDate", req.getEndDate())
// .checkException();
Date now = DateHelper.getDateTime(DateHelper.toDay(DateHelper.getDateTime(getCurDate())));
if(!StringHelper.isEmpty(req.getStartDate())){
req.setStartDate("2023-01-16");
Date start = DateHelper.getDateTime(DateHelper.toDay(DateHelper.getDateTime(req.getStartDate())));
System.out.println(DateHelper.compare(start, now));
if (DateHelper.compare(start, now) == 0) {
req.setStartDate(DateUtil.getBeforDateStr(req.getStartDate()));
}
}
if(!StringHelper.isEmpty(req.getEndDate())){
Date end = DateHelper.getDateTime(DateHelper.toDay(DateHelper.getDateTime(req.getEndDate())));
if (DateHelper.compare(now, end) == 0) {
req.setEndDate(DateUtil.getBeforDateStr(req.getEndDate()));
}
}
return ResponseResult.result(companyMoneyService.findCompanyMoney(req));
}
@RequestMapping(value = "/findLastInfo")
@ApiOperation(value = "查询最后一条数据的finalMoney", notes = "查询最后一条数据的finalMoney")
public ResponseResult<CompanyMoneyVo> findLastInfo(@RequestBody CompanyMoneyReqVo req){
public ResponseResult<CompanyMoneyVo> findLastInfo(@RequestBody CompanyMoneyReqVo req) {
return ResponseResult.result(companyMoneyService.findLastInfo(req));
}
......
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