Commit 693800b5 authored by tangfang's avatar tangfang

修改用户二维码生成

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