|
|
|
@ -9,11 +9,8 @@ import java.io.UnsupportedEncodingException; |
|
|
|
|
import java.net.URLDecoder; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
|
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment; |
|
|
|
|
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService; |
|
|
|
@ -23,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
|
|
import org.jeecg.modules.demo.customerpayment.utils.BankUtil; |
|
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil; |
|
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
|
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams; |
|
|
|
@ -42,7 +40,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
/** |
|
|
|
|
* @Description: 顾客支付信息管理 |
|
|
|
|
* @Author: jeecg-boot |
|
|
|
|
* @Date: 2022-12-03 |
|
|
|
|
* @Date: 2022-12-21 |
|
|
|
|
* @Version: V1.0 |
|
|
|
|
*/ |
|
|
|
|
@Api(tags="顾客支付信息管理") |
|
|
|
@ -75,32 +73,6 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment, |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|
* @param customerPayment |
|
|
|
|
* @param pageNo |
|
|
|
|
* @param pageSize |
|
|
|
|
* @param req |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "顾客支付信息管理-分页列表查询") |
|
|
|
|
@ApiOperation(value="顾客支付信息管理-分页列表查询", notes="顾客支付信息管理-分页列表查询") |
|
|
|
|
@GetMapping(value = "/listcustom") |
|
|
|
|
public Result<?> listcustom(CustomerPayment customerPayment, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
QueryWrapper<CustomerPayment> queryWrapper = QueryGenerator.initQueryWrapper(customerPayment, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("createBy",sysUser.getUsername()); |
|
|
|
|
Page<CustomerPayment> page = new Page<CustomerPayment>(pageNo, pageSize); |
|
|
|
|
IPage<CustomerPayment> pageList = customerPaymentService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 添加 |
|
|
|
|
* |
|
|
|
@ -111,9 +83,20 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment, |
|
|
|
|
@ApiOperation(value="顾客支付信息管理-添加", notes="顾客支付信息管理-添加") |
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
|
public Result<?> add(@RequestBody CustomerPayment customerPayment) { |
|
|
|
|
if(customerPayment.getPaymentType().equals("2")){ |
|
|
|
|
BankUtil bankUtil = new BankUtil(); |
|
|
|
|
if (bankUtil.checkBankCard(customerPayment.getAccountNo())){ |
|
|
|
|
customerPayment.setBankDeposit(bankUtil.getNameOfBank(customerPayment.getAccountNo())); |
|
|
|
|
customerPaymentService.save(customerPayment); |
|
|
|
|
return Result.OK("添加成功!你的银行开是"+bankUtil.getNameOfBank(customerPayment.getAccountNo())); |
|
|
|
|
}else { |
|
|
|
|
return Result.error("请检查银行卡号"); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
customerPaymentService.save(customerPayment); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|