mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-28 19:18:00 +08:00
删除发票抬头信息
This commit is contained in:
@@ -393,6 +393,7 @@ public class MemberController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/updateMemberInvoiceTitle")
|
@PostMapping("/updateMemberInvoiceTitle")
|
||||||
public RestApiResponse<?> updateMemberInvoiceTitle(HttpServletRequest request, @RequestBody InvoiceTitleDTO dto) {
|
public RestApiResponse<?> updateMemberInvoiceTitle(HttpServletRequest request, @RequestBody InvoiceTitleDTO dto) {
|
||||||
|
logger.info("修改会员发票抬头 param:{}", JSONObject.toJSONString(dto));
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
String memberId = getMemberIdByAuthorization(request);
|
String memberId = getMemberIdByAuthorization(request);
|
||||||
@@ -409,6 +410,31 @@ public class MemberController extends BaseController {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会员发票抬头
|
||||||
|
* @param request
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/deleteMemberInvoiceTitle")
|
||||||
|
public RestApiResponse<?> deleteMemberInvoiceTitle(HttpServletRequest request, @RequestBody InvoiceTitleDTO dto) {
|
||||||
|
logger.info("修改会员发票抬头 param:{}", JSONObject.toJSONString(dto));
|
||||||
|
RestApiResponse<?> response = null;
|
||||||
|
try {
|
||||||
|
String memberId = getMemberIdByAuthorization(request);
|
||||||
|
dto.setMemberId(memberId);
|
||||||
|
memberService.deleteMemberInvoiceTitle(dto);
|
||||||
|
response = new RestApiResponse<>();
|
||||||
|
} catch (BusinessException e) {
|
||||||
|
logger.error("修改会员发票抬头 error", e);
|
||||||
|
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("修改会员发票抬头 error", e);
|
||||||
|
response = new RestApiResponse<>(e);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询会员发票抬头列表
|
* 查询会员发票抬头列表
|
||||||
* http://localhost:8080/uniapp/member/queryMemberInvoiceTitles
|
* http://localhost:8080/uniapp/member/queryMemberInvoiceTitles
|
||||||
|
|||||||
@@ -404,6 +404,8 @@ public class MemberService {
|
|||||||
public void updateMemberInvoiceTitle(InvoiceTitleDTO dto) {
|
public void updateMemberInvoiceTitle(InvoiceTitleDTO dto) {
|
||||||
MemberInvoiceTitle title = new MemberInvoiceTitle();
|
MemberInvoiceTitle title = new MemberInvoiceTitle();
|
||||||
BeanUtils.copyProperties(dto, title);
|
BeanUtils.copyProperties(dto, title);
|
||||||
|
title.setId(Long.valueOf(dto.getTitleId()));
|
||||||
|
title.setName(dto.getTitleName());
|
||||||
if (StringUtils.isEmail(dto.getReception())) {
|
if (StringUtils.isEmail(dto.getReception())) {
|
||||||
title.setEmail(dto.getReception());
|
title.setEmail(dto.getReception());
|
||||||
} else {
|
} else {
|
||||||
@@ -412,6 +414,14 @@ public class MemberService {
|
|||||||
int i = memberInvoiceTitleService.updateMemberInvoiceTitle(title);
|
int i = memberInvoiceTitleService.updateMemberInvoiceTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会员发票抬头
|
||||||
|
* @param dto
|
||||||
|
*/
|
||||||
|
public void deleteMemberInvoiceTitle(InvoiceTitleDTO dto) {
|
||||||
|
memberInvoiceTitleService.deleteMemberInvoiceTitleById(Long.valueOf(dto.getTitleId()));
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, Object> rechargeBalance(WeixinPayDTO dto) throws Exception {
|
public Map<String, Object> rechargeBalance(WeixinPayDTO dto) throws Exception {
|
||||||
PaymentScenarioDTO paymentScenarioDTO = new PaymentScenarioDTO();
|
PaymentScenarioDTO paymentScenarioDTO = new PaymentScenarioDTO();
|
||||||
paymentScenarioDTO.setType(ScenarioEnum.BALANCE.getValue());
|
paymentScenarioDTO.setType(ScenarioEnum.BALANCE.getValue());
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class InvoiceTitleDTO {
|
|||||||
/**
|
/**
|
||||||
* 单位名称
|
* 单位名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String titleName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 税号
|
* 税号
|
||||||
|
|||||||
Reference in New Issue
Block a user