Compare commits
2 Commits
2eeeab2fca
...
4dd8c53649
| Author | SHA1 | Date | |
|---|---|---|---|
| 4dd8c53649 | |||
| aa096bb997 |
@ -11,6 +11,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Hidden;
|
import io.swagger.v3.oas.annotations.Hidden;
|
||||||
@ -23,6 +24,7 @@ import lombok.Data;
|
|||||||
* @author zrb
|
* @author zrb
|
||||||
* @since 2024-10-15
|
* @since 2024-10-15
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@TableName("hd_cloud_manage.yt_t_battery_station")
|
@TableName("hd_cloud_manage.yt_t_battery_station")
|
||||||
@Schema(name = "BatteryStation", description = "换电站")
|
@Schema(name = "BatteryStation", description = "换电站")
|
||||||
|
|||||||
@ -19,6 +19,9 @@ public class PageListWalletRequest extends BasePageRequest {
|
|||||||
@Schema(description = "户主ID")
|
@Schema(description = "户主ID")
|
||||||
private String ownerId;
|
private String ownerId;
|
||||||
|
|
||||||
|
@Schema(description = "用户名")
|
||||||
|
private String uname;
|
||||||
|
|
||||||
@Schema(description = "编码")
|
@Schema(description = "编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
|||||||
@ -54,6 +54,7 @@ public class WalletAccountController {
|
|||||||
public Result<Integer> update(@ParameterObject WalletAccount wa) {
|
public Result<Integer> update(@ParameterObject WalletAccount wa) {
|
||||||
return walletAccountService.update(wa);
|
return walletAccountService.update(wa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "查询")
|
@Operation(summary = "查询")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ -92,15 +93,19 @@ public class WalletAccountController {
|
|||||||
}
|
}
|
||||||
@Operation(summary = "获取WalleCode")
|
@Operation(summary = "获取WalleCode")
|
||||||
@PostMapping("/getWalleCode")
|
@PostMapping("/getWalleCode")
|
||||||
@ApiOperationSupport(order = 8)
|
@ApiOperationSupport(order = 9)
|
||||||
public Result<String> getWalleCode(String wuid) {
|
public Result<String> getWalleCode(String wuid) {
|
||||||
return walletAccountService.getWalleCode(wuid);
|
return walletAccountService.getWalleCode(wuid);
|
||||||
}
|
}
|
||||||
@Operation(summary = "获取附加信息")
|
@Operation(summary = "获取附加信息")
|
||||||
@PostMapping("/getPayAttach")
|
@PostMapping("/getPayAttach")
|
||||||
@ApiOperationSupport(order = 8)
|
@ApiOperationSupport(order = 10)
|
||||||
public Result<WechatPayAttach> getPayAttach(String wuid) {
|
public Result<WechatPayAttach> getPayAttach(String wuid) {
|
||||||
return walletAccountService.getPayAttach(wuid);
|
return walletAccountService.getPayAttach(wuid);
|
||||||
}
|
}
|
||||||
|
@PostMapping({"/updateName"})
|
||||||
|
@ApiOperationSupport(order = 11)
|
||||||
|
public Result<Integer> updateName(@ParameterObject WalletAccount wa) {
|
||||||
|
return walletAccountService.updateName(wa);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,4 +30,6 @@ public interface WalletAccountService {
|
|||||||
public Result<String> getWalleCode(String wuid);
|
public Result<String> getWalleCode(String wuid);
|
||||||
|
|
||||||
public Result<WechatPayAttach> getPayAttach(String wuid);
|
public Result<WechatPayAttach> getPayAttach(String wuid);
|
||||||
|
|
||||||
|
public Result<Integer> updateName(WalletAccount wa);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,23 +125,26 @@ public class WalletAccountServiceImpl implements WalletAccountService {
|
|||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
return new Result<Integer>().success(n);
|
return new Result<Integer>().success(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Result<Integer>().error("更新资金账户失败!");
|
return new Result<Integer>().error("更新资金账户失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<List<WalletAccountVO>> list(PageListWalletRequest plwr) {
|
public Result<List<WalletAccountVO>> list(PageListWalletRequest plwr) {
|
||||||
Page<WalletAccount> page = new Page<WalletAccount>(plwr.getPageNo(), plwr.getPageSize());
|
Page<WalletAccount> page = new Page<WalletAccount>(plwr.getPageNo(), plwr.getPageSize());
|
||||||
|
QueryWrapper<WalletAccount> queryWrapper = new QueryWrapper<WalletAccount>()
|
||||||
page = walletAccountDao.selectPage(page, new QueryWrapper<WalletAccount>()
|
|
||||||
.eq(StringUtils.hasText(plwr.getCode()), "code", plwr.getCode())
|
.eq(StringUtils.hasText(plwr.getCode()), "code", plwr.getCode())
|
||||||
|
.like(StringUtils.hasText(plwr.getUname()), "acc_name", plwr.getUname())
|
||||||
.eq(StringUtils.hasText(plwr.getStationCode()), "station_code", plwr.getStationCode())
|
.eq(StringUtils.hasText(plwr.getStationCode()), "station_code", plwr.getStationCode())
|
||||||
.eq(plwr.getOwnerType() != null, "owner_type", plwr.getOwnerType())
|
.eq(plwr.getOwnerType() != null, "owner_type", plwr.getOwnerType())
|
||||||
.eq(StringUtils.hasText(plwr.getOwnerId()), "owner_id", plwr.getOwnerId())
|
.eq(StringUtils.hasText(plwr.getOwnerId()), "owner_id", plwr.getOwnerId())
|
||||||
.orderByDesc("pk_id"));
|
.orderByDesc("pk_id");
|
||||||
|
page = walletAccountDao.selectPage(page, queryWrapper);
|
||||||
|
|
||||||
if (page.getRecords().isEmpty()) {
|
if (page.getRecords().isEmpty()) {
|
||||||
return new Result<List<WalletAccountVO>>().error(CodeMsg.DATABASE_RESULT_NULL);
|
return new Result<List<WalletAccountVO>>().error(CodeMsg.DATABASE_RESULT_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 转换为VO并查询用户信息
|
// 2. 转换为VO并查询用户信息
|
||||||
List<WalletAccountVO> voList = page.getRecords().stream().map(account -> {
|
List<WalletAccountVO> voList = page.getRecords().stream().map(account -> {
|
||||||
WalletAccountVO vo = new WalletAccountVO();
|
WalletAccountVO vo = new WalletAccountVO();
|
||||||
@ -276,6 +279,22 @@ public class WalletAccountServiceImpl implements WalletAccountService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<Integer> updateName(WalletAccount wa) {
|
||||||
|
if (wa == null) {
|
||||||
|
return new Result<Integer>().error("参数不能为空");
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<WalletAccount> walletAccountLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
walletAccountLambdaQueryWrapper.eq(WalletAccount::getOwnerId, wa.getOwnerId());
|
||||||
|
WalletAccount walletAccount = walletAccountDao.selectOne(walletAccountLambdaQueryWrapper);
|
||||||
|
if (walletAccount != null) {
|
||||||
|
walletAccount.setAccName(wa.getAccName());
|
||||||
|
walletAccountDao.updateById(walletAccount);
|
||||||
|
return new Result<Integer>().success(1);
|
||||||
|
}
|
||||||
|
return new Result<Integer>().error("未找到对应的账户");
|
||||||
|
}
|
||||||
|
|
||||||
// 查询 WechatUser 的封装方法
|
// 查询 WechatUser 的封装方法
|
||||||
private WechatUser queryWechatUserByWuid(String wuid) {
|
private WechatUser queryWechatUserByWuid(String wuid) {
|
||||||
LambdaQueryWrapper<WechatUser> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<WechatUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|||||||
@ -157,7 +157,7 @@ public class GZHMessageTemplateService {
|
|||||||
break;
|
break;
|
||||||
// 付款完成
|
// 付款完成
|
||||||
case 3:
|
case 3:
|
||||||
templateId = gzhProperties.getOrderSwapEndTemplateId();
|
templateId = gzhProperties.getOrderEndTemplateId();
|
||||||
miniprogram.setPath(orderDetailPage);
|
miniprogram.setPath(orderDetailPage);
|
||||||
PayTemplateData payData = new PayTemplateData();
|
PayTemplateData payData = new PayTemplateData();
|
||||||
payData.setThing2(osb.getStationName());
|
payData.setThing2(osb.getStationName());
|
||||||
@ -170,6 +170,7 @@ public class GZHMessageTemplateService {
|
|||||||
break;
|
break;
|
||||||
//预约即将失效
|
//预约即将失效
|
||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -44,6 +44,10 @@ public class WechatUserServiceImpl implements WechatUserService {
|
|||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
return new Result<String>().success(1);
|
return new Result<String>().success(1);
|
||||||
}
|
}
|
||||||
|
WalletAccount walletAccount = new WalletAccount();
|
||||||
|
walletAccount.setOwnerId(wuser.getWuid());
|
||||||
|
walletAccount.setAccName(wuser.getName());
|
||||||
|
cloudService.updateName(walletAccount);
|
||||||
return new Result<String>().error("修改微信用户信息出错!");
|
return new Result<String>().error("修改微信用户信息出错!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -93,4 +93,7 @@ public interface CloudService {
|
|||||||
|
|
||||||
@PostMapping(value = "/wallet/getPayAttach", consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
@PostMapping(value = "/wallet/getPayAttach", consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||||
public Result<WechatPayAttach> getPayAttach(@NotBlank String wuid);
|
public Result<WechatPayAttach> getPayAttach(@NotBlank String wuid);
|
||||||
|
|
||||||
|
@PostMapping(value = "/wallet/updateName", consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
|
||||||
|
public Result<WechatPayAttach> updateName(@NotBlank WalletAccount wa);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user