小程序支付bug

This commit is contained in:
齐天大圣 2024-06-05 17:33:31 +08:00
parent c392e64f59
commit c0ef041238
5 changed files with 19 additions and 80 deletions

View File

@ -32,13 +32,13 @@
<!-- 列表信息--> <!-- 列表信息-->
<el-card style="margin-top: 20px" > <el-card style="margin-top: 20px" >
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd"
>新增二维码</el-button> >新增二维码</el-button>
</el-col> </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row> </el-row>
@ -46,12 +46,12 @@
<el-table-column type="index" width="80" align="center" label="序号"/> <el-table-column type="index" width="80" align="center" label="序号"/>
<el-table-column label="二维码SN号" align="center" prop="tagCodeSn" /> <el-table-column label="二维码SN号" align="center" prop="tagCodeSn" />
<el-table-column label="码牌SN号" align="center" prop="snCode" /> <el-table-column label="码牌SN号" align="center" prop="snCode" />
<el-table-column label="是否绑定员工" align="center" prop="mtStatus" width="110"> <!-- <el-table-column label="是否绑定员工" align="center" prop="mtStatus" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.mtStatus == 1"></span> <span v-if="scope.row.mtStatus == 1"></span>
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column label="绑定员工" align="center" prop="staffName"></el-table-column> <el-table-column label="绑定员工" align="center" prop="staffName"></el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/> <el-table-column label="创建时间" align="center" prop="createTime" width="150"/>

View File

@ -49,6 +49,9 @@ public class TagCodeRecordController extends BaseController {
@Resource @Resource
private OilTagService oilTagService; private OilTagService oilTagService;
@Resource
private TagCodeService tagCodeService;
@Resource @Resource
private ILJStaffService mtStaffService; private ILJStaffService mtStaffService;
@ -80,6 +83,7 @@ public class TagCodeRecordController extends BaseController {
tagCodeRecord.setId(tagCodeRecordDTO.getId()); tagCodeRecord.setId(tagCodeRecordDTO.getId());
tagCodeRecord.setStaffId(tagCodeRecordDTO.getStaffId()); tagCodeRecord.setStaffId(tagCodeRecordDTO.getStaffId());
tagCodeRecord.setStaffName(ljStaff.getRealName()); tagCodeRecord.setStaffName(ljStaff.getRealName());
tagCodeService.selectByTagCodeSn(tagCodeRecordDTO.getTagCodeSn());
return getSuccessResult(this.tagCodeRecordService.updateById(tagCodeRecord)); return getSuccessResult(this.tagCodeRecordService.updateById(tagCodeRecord));
} }
// 一键解绑 // 一键解绑

View File

@ -20,5 +20,7 @@ public interface TagCodeService extends IService<TagCode> {
ResponseEntity<InputStreamResource> add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception; ResponseEntity<InputStreamResource> add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception;
ResponseEntity<InputStreamResource> exportZip(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception; ResponseEntity<InputStreamResource> exportZip(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception;
TagCode selectByTagCodeSn(String tagCodeSn);
} }

View File

@ -165,80 +165,13 @@ public class TagCodeServiceImpl extends ServiceImpl<TagCodeMapper, TagCode> impl
return ResponseEntity.ok() return ResponseEntity.ok()
.body(new InputStreamResource(zipInputStream)); .body(new InputStreamResource(zipInputStream));
// boolean flag = false; }
// if (ObjectUtils.isNotEmpty(tagCodeDTO) && ObjectUtils.isNotEmpty(tagCodeDTO.getTotal())){
// int total = tagCodeDTO.getTotal();
// Random random1 = new Random();
// int i2 = random1.nextInt(1000);
// for (int i = 0; i < total; i++) {
// Random random = new Random();
// int i1 = random.nextInt(90000000);
// //String url = "https://oil.youkerr.com/";
// String url = "https://www.tuofeng.cc/oilRefuel?sn=byx"+i1;
// // String finalPath="/temp/qrCode/" + oilTag.getSnCode() + ".jpg";
// //String finalPath="D:\\office\\document\\photos\\tagCode\\"+"str"+i+".jpg";
// //String finalPath="/temp/tagCode/" + "byx"+i1 + ".jpg";
// //String finalPath="/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "/"+i2 + "byx"+i1 + ".jpg";
//
// TagCode tagCode = new TagCode();
//
// tagCode.setCollection(url);
// tagCode.setTagCodeSn("byx"+i1);
// tagCode.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString()));
//
// //在图片上生成二维码
// String backgroundImage = "static/qrCodeImg/huanyingguanglin.jpg";
// InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage);
// String urls = "";
// urls = "/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "-"+i2;
// File file1 = new File(urls);
// // String finalPath="/temp/tagCode/" + "byx"+i1 + ".jpg";
// String finalPath=urls+"/" + "byx"+i1 + ".jpg";
// qrCodeUtils.createLogoCodePictures(null, url, finalPath, null,null,urls);
//
//
// // 判断目录是否存在
// if (!file1.exists()) {
// file1.mkdirs();
// }
//
// File file =new File(finalPath);
// FileInputStream fileInputStream =new FileInputStream(file);
// // FileInputStream fileInputStream =new FileInputStream(file1);
// MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream);
//// 返回图片路径
// String saveFile = backendFileController.saveFile(resFile);
// //return saveFile;
// tagCode.setImageUrl(saveFile);
// flag = save(tagCode);
// }
//
// //导出码牌
// //String IMAGE_DIRECTORY = "D:\\temp\\tagCode\\"+DateUtil.formatDate(new Date(), "yyyyMMdd")+"-"+i2;
// String IMAGE_DIRECTORY = "/temp/tagCode/"+DateUtil.formatDate(new Date(), "yyyyMMdd")+"-"+i2;
//
// List<File> imageFiles = getImageFiles(IMAGE_DIRECTORY);
// InputStream zipInputStream = createZipInputStream(imageFiles);
//
// response.setHeader("Content-Disposition", "attachment; filename=\"images.zip\"");
//
// return ResponseEntity.ok()
// .body(new InputStreamResource(zipInputStream));
// }else {
// InputStream inputStream = new InputStream() {
// @Override
// public int read() throws IOException {
// return 0;
// }
// };
// return ResponseEntity.ok()
// .body(new InputStreamResource(inputStream));
// }
//String IMAGE_DIRECTORY = "D:\\temp\\qrCode\\DateUtil.formatDate(new Date(), \"yyyyMMdd\") +";
@Override
public TagCode selectByTagCodeSn(String tagCodeSn) {
LambdaQueryWrapper<TagCode> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TagCode::getTagCodeSn, tagCodeSn)
return null;
} }
private List<File> getImageFiles(String directory) { private List<File> getImageFiles(String directory) {

View File

@ -56,9 +56,9 @@
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between; "> <view style="width: 100%;display: flex;align-items: center;justify-content: space-between; ">
<view class="bai-box"> <view class="bai-box">
<view class="title-card">电子囤油卡</view> <view class="title-card">电子囤油卡</view>
<view class="">{{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].refuelMoney || '0'}}L <!-- <view class="">{{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].refuelMoney || '0'}}L
</view> </view>
<view>剩余油量{{cardsList[cardsIndex].refuelMoney || '0'}}L</view> <view>剩余油量{{cardsList[cardsIndex].refuelMoney || '0'}}L</view> -->
<!-- <view style="lins"> **** **** **** 970 </view> --> <!-- <view style="lins"> **** **** **** 970 </view> -->
</view> </view>
<!-- <view class=""> <!-- <view class="">
@ -176,7 +176,7 @@
console.log(res) console.log(res)
if (res.code == 200) { if (res.code == 200) {
this.cardsList = res.data.records this.cardsList = res.data.records
console.log(this.toil,111,res); console.log(this.toil, 111, res);
} }
}) })
}, },