Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
828ae90b61
6 files changed
+51
-31
No files matched your search
+2
-1
@@ -476,7 +476,8 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
List<SupermarketSpuUpdateStockReqDTO.Item> list = carList.stream().map(v -> {
|
||||
SupermarketSpuUpdateStockReqDTO.Item item = new SupermarketSpuUpdateStockReqDTO.Item();
|
||||
item.setId(v.getProductId());
|
||||
item.setIncrCount(v.getProductCount() * base);
|
||||
double weight = BigDecimal.valueOf(v.getProductCount()).multiply(BigDecimal.valueOf(base)).setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
item.setIncrCount(weight);
|
||||
return item;
|
||||
}).toList();
|
||||
dto.setItems(list);
|
||||
|
||||
+2
-1
@@ -44,12 +44,13 @@ oauth2:
|
||||
# 正元智慧
|
||||
# https://gwyc.zj.gov.cn/API/%E7%9C%81%E5%B9%B3%E5%8F%B0API%E5%AF%B9%E6%8E%A5%E6%8E%A5%E5%8F%A3.html
|
||||
zy:
|
||||
# base-url: http://60.191.37.212:18079
|
||||
# 测试1
|
||||
# base-url: http://60.191.37.212:18079
|
||||
# app-id: 689C8D6F5059A6F85B8BE45A49001ACB
|
||||
# app-secret: BD21DA0DEB8F0FC43246B0BD2FCAE6FF
|
||||
|
||||
# 测试2
|
||||
# base-url: http://60.191.37.212:18079
|
||||
# app-id: FC455B0A788E334AC08FB3E1D8385C75
|
||||
# app-secret: E9131D0BCC9054808675DA1E2E199023
|
||||
|
||||
|
||||
+2
-1
@@ -120,7 +120,8 @@ public class WalletTransactionController {
|
||||
|
||||
@Operation(summary = "分页查询复杂查询", description = "分页查询复杂查询")
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletTransaction_view')")
|
||||
// TODO 这个比较公用先不加权限
|
||||
// @PreAuthorize("@pms.hasPermission('wallet_walletTransaction_view')")
|
||||
public R getWalletTransactionPageJoin(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
|
||||
DataScope dataScope = new DataScope();
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto, dataScope));
|
||||
|
||||
+40
-23
@@ -30,50 +30,64 @@ import java.util.Objects;
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/walletType" )
|
||||
@Tag(description = "walletType" , name = "钱包类型管理" )
|
||||
@RequestMapping("/walletType")
|
||||
@Tag(description = "walletType", name = "钱包类型管理")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class WalletTypeController {
|
||||
|
||||
private final WalletTypeService walletTypeService;
|
||||
private final WalletTypeService walletTypeService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param walletType 钱包类型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_view')" )
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_view')")
|
||||
public R getWalletTypePage(@ParameterObject Page page, @ParameterObject WalletTypeEntity walletType) {
|
||||
LambdaQueryWrapper<WalletTypeEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.orderByDesc(WalletTypeEntity::getCreateTime);
|
||||
return R.ok(walletTypeService.page(page, wrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询下拉
|
||||
*/
|
||||
@Operation(summary = "查询下拉", description = "查询下拉")
|
||||
@GetMapping("/select")
|
||||
public R<Page<WalletTypeEntity>> walletList(@ParameterObject Page page) {
|
||||
LambdaQueryWrapper<WalletTypeEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.orderByDesc(WalletTypeEntity::getCreateTime);
|
||||
return R.ok(walletTypeService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询钱包类型
|
||||
*
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
@GetMapping("/{id}")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_view')")
|
||||
public R getById(@PathVariable("id") Long id) {
|
||||
return R.ok(walletTypeService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包类型
|
||||
*
|
||||
* @param dto 钱包类型
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增钱包类型" , description = "新增钱包类型" )
|
||||
@SysLog("新增钱包类型" )
|
||||
@Operation(summary = "新增钱包类型", description = "新增钱包类型")
|
||||
@SysLog("新增钱包类型")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_add')")
|
||||
public R save(@RequestBody WalletTypeEntity dto) {
|
||||
walletTypeService.create(dto);
|
||||
return R.ok(true);
|
||||
@@ -81,13 +95,14 @@ public class WalletTypeController {
|
||||
|
||||
/**
|
||||
* 修改钱包类型
|
||||
*
|
||||
* @param dto 钱包类型
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改钱包类型" , description = "修改钱包类型" )
|
||||
@SysLog("修改钱包类型" )
|
||||
@Operation(summary = "修改钱包类型", description = "修改钱包类型")
|
||||
@SysLog("修改钱包类型")
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_edit')" )
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_edit')")
|
||||
public R updateById(@RequestBody WalletTypeEntity dto) {
|
||||
walletTypeService.edit(dto);
|
||||
return R.ok(true);
|
||||
@@ -95,13 +110,14 @@ public class WalletTypeController {
|
||||
|
||||
/**
|
||||
* 通过id删除钱包类型
|
||||
*
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除钱包类型" , description = "通过id删除钱包类型" )
|
||||
@SysLog("通过id删除钱包类型" )
|
||||
@Operation(summary = "通过id删除钱包类型", description = "通过id删除钱包类型")
|
||||
@SysLog("通过id删除钱包类型")
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_del')" )
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_del')")
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(walletTypeService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
@@ -109,14 +125,15 @@ public class WalletTypeController {
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
*
|
||||
* @param walletType 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_export')" )
|
||||
public List<WalletTypeEntity> export(WalletTypeEntity walletType,Long[] ids) {
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletType_export')")
|
||||
public List<WalletTypeEntity> export(WalletTypeEntity walletType, Long[] ids) {
|
||||
return walletTypeService.list(Wrappers.lambdaQuery(walletType).in(ArrayUtil.isNotEmpty(ids), WalletTypeEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -95,7 +95,7 @@ public class MchManageServiceImpl extends ServiceImpl<MchManageMapper, MchManage
|
||||
e.printStackTrace();
|
||||
log.error("|{}|新增商户,生成收款码错误dto:|{}|error:|{}|", TAG, JSON.toJSONString(dto), e.getMessage());
|
||||
}
|
||||
walletThirdZyService.syncAllMch(dto.getId(), Boolean.FALSE);
|
||||
// walletThirdZyService.syncAllMch(dto.getId(), Boolean.FALSE);
|
||||
return dto.getId();
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class MchManageServiceImpl extends ServiceImpl<MchManageMapper, MchManage
|
||||
throw new RuntimeException("商户不存在");
|
||||
}
|
||||
baseMapper.updateById(dto);
|
||||
walletThirdZyService.syncAllMch(dto.getId(), Boolean.FALSE);
|
||||
// walletThirdZyService.syncAllMch(dto.getId(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -122,7 +122,7 @@ public class MchManageServiceImpl extends ServiceImpl<MchManageMapper, MchManage
|
||||
// 删除缓存
|
||||
list.forEach(v -> {
|
||||
redisTemplate.opsForValue().getAndDelete(CacheConstants.WALLET_MCH + v);
|
||||
walletThirdZyService.syncAllMch(v, Boolean.TRUE);
|
||||
// walletThirdZyService.syncAllMch(v, Boolean.TRUE);
|
||||
});
|
||||
baseMapper.deleteByIds(list);
|
||||
}
|
||||
|
||||
+2
-2
@@ -434,7 +434,7 @@ public class WalletManageServiceImpl extends ServiceImpl<WalletManageMapper, Wal
|
||||
);
|
||||
}
|
||||
// 同步到正元
|
||||
walletThirdZyService.syncAllUser(userId);
|
||||
// walletThirdZyService.syncAllUser(userId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ public class WalletManageServiceImpl extends ServiceImpl<WalletManageMapper, Wal
|
||||
if (ObjectUtil.isEmpty(deptId)) return;
|
||||
if (ObjectUtil.isEmpty(isDel)) return;
|
||||
// 同步到正元
|
||||
walletThirdZyService.syncAllDept(deptId, isDel);
|
||||
// walletThirdZyService.syncAllDept(deptId, isDel);
|
||||
}
|
||||
|
||||
private void disposeList(List<WalletManageVo> list, WalletManageDto dto) {
|
||||
|
||||
Reference in new issue
Block a user