mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
update 会员发票抬头功能代码
This commit is contained in:
@@ -13,13 +13,25 @@ import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.SMSUtil;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.dto.BindingCarNoDTO;
|
||||
import com.jsowell.pile.dto.BindingCardDTO;
|
||||
import com.jsowell.pile.dto.CreateInvoiceTitleDTO;
|
||||
import com.jsowell.pile.dto.MemberRegisterAndLoginDTO;
|
||||
import com.jsowell.pile.dto.MemberRegisterDTO;
|
||||
import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
||||
import com.jsowell.pile.dto.WechatLoginDTO;
|
||||
import com.jsowell.pile.dto.WeixinPayDTO;
|
||||
import com.jsowell.pile.service.IMemberBasicInfoService;
|
||||
import com.jsowell.pile.service.IMemberPlateNumberRelationService;
|
||||
import com.jsowell.pile.vo.uniapp.InvoiceTitleVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||
import com.jsowell.service.MemberService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
@@ -352,4 +364,47 @@ public class MemberController extends BaseController {
|
||||
logger.info("用户解绑鉴权卡 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员发票抬头
|
||||
* http://localhost:8080/uniapp/member/createMemberInvoiceTitle
|
||||
*/
|
||||
@PostMapping("/createMemberInvoiceTitle")
|
||||
public RestApiResponse<?> createMemberInvoiceTitle(HttpServletRequest request, CreateInvoiceTitleDTO title) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String memberId = getMemberIdByAuthorization(request);
|
||||
memberService.createMemberInvoiceTitle(title);
|
||||
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
|
||||
*/
|
||||
@GetMapping("/queryMemberInvoiceTitles")
|
||||
public RestApiResponse<?> queryMemberInvoiceTitles(HttpServletRequest request) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String memberId = getMemberIdByAuthorization(request);
|
||||
List<InvoiceTitleVO> list = memberService.queryMemberInvoiceTitles(memberId);
|
||||
response = new RestApiResponse<>(ImmutableMap.of("list", list));
|
||||
} 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);
|
||||
}
|
||||
logger.info("查询会员发票抬头列表 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user