Commit 7af9980b by jinxin

企业微信接口开发

parent 98dd9597
......@@ -56,7 +56,7 @@ public interface LicenceOrderApiService {
* @param type 订单状态
* @return
*/
ServiceResponse<Boolean> updateLicenceOrderType(Long orderId, Integer type);
ServiceResponse<Boolean> updateLicenceOrderType(Long orderId, Integer type,String enterpriseId,String wxEnterpriseId,String creatorName);
/**
* 订单凭证上传
......@@ -65,7 +65,7 @@ public interface LicenceOrderApiService {
* @param voucher 凭证url
* @return
*/
ServiceResponse<Boolean> uploadLicenceOrderVoucher(Long orderId, String voucher);
ServiceResponse<Boolean> uploadLicenceOrderVoucher(Long orderId, String voucher,String enterpriseId,String wxEnterpriseId,String creatorName);
/**
* 订单支付接口
......
......@@ -26,4 +26,6 @@ public interface TabHaobanLicenceOrderProgressMapper {
Integer deleteByOrderId(@Param("orderId") Long orderId);
Integer uploadLicenceOrderVoucher(@Param("orderId")Long orderId, @Param("voucher")String voucher);
}
......@@ -41,7 +41,7 @@ public interface LicenceOrderService {
* @param type 订单状态
* @return
*/
Boolean updateLicenceOrderType(Long orderId, Integer type);
Boolean updateLicenceOrderType(Long orderId, Integer type,String enterpriseId,String wxEnterpriseId,String creatorName);
/**
* 上次订单支付凭证
......@@ -49,7 +49,7 @@ public interface LicenceOrderService {
* @param voucher 凭证url
* @return
*/
Boolean uploadLicenceOrderVoucher(Long orderId, String voucher);
Boolean uploadLicenceOrderVoucher(Long orderId, String voucher,String enterpriseId,String wxEnterpriseId,String creatorName);
/**
* 查询企业是否存在订单未支付接口
......
......@@ -78,14 +78,18 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
tabHaobanLicenceOrderProgressMapper.insert(orderProgress);
}
@Override
public Boolean updateLicenceOrderType(Long orderId, Integer type) {
public Boolean updateLicenceOrderType(Long orderId, Integer type,String enterpriseId,String wxEnterpriseId,String creatorName) {
return null;
}
@Override
public Boolean uploadLicenceOrderVoucher(Long orderId, String voucher) {
return null;
public Boolean uploadLicenceOrderVoucher(Long orderId, String voucher,String enterpriseId,String wxEnterpriseId,String creatorName) {
tabHaobanLicenceOrderMapper.uploadLicenceOrderVoucher(orderId,voucher);
//记录订单进度
// TODO: 2023/3/21 需要判断是否第二次上传
saveOrderProgress(orderId,"凭证已上传,审核中",enterpriseId,wxEnterpriseId,creatorName);
return true;
}
@Override
......
......@@ -91,14 +91,14 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
}
@Override
public ServiceResponse<Boolean> updateLicenceOrderType(Long orderId, Integer type) {
licenceOrderService.updateLicenceOrderType(orderId,type);
public ServiceResponse<Boolean> updateLicenceOrderType(Long orderId, Integer type,String enterpriseId,String wxEnterpriseId,String creatorName) {
licenceOrderService.updateLicenceOrderType(orderId,type,enterpriseId,wxEnterpriseId,creatorName);
return ServiceResponse.success(true);
}
@Override
public ServiceResponse<Boolean> uploadLicenceOrderVoucher(Long orderId, String voucher) {
licenceOrderService.uploadLicenceOrderVoucher(orderId,voucher);
public ServiceResponse<Boolean> uploadLicenceOrderVoucher(Long orderId, String voucher,String enterpriseId,String wxEnterpriseId,String creatorName) {
licenceOrderService.uploadLicenceOrderVoucher(orderId,voucher,enterpriseId,wxEnterpriseId,creatorName);
return ServiceResponse.success(true);
}
......
......@@ -109,4 +109,10 @@
WHERE order_id = #{orderId}
</update>
<update id="uploadLicenceOrderVoucher" >
UPDATE tab_haoban_licence_order_progress
SET voucher = #{voucher}
WHERE order_id = #{orderId} and delete_flag = 0
</update>
</mapper>
\ No newline at end of file
......@@ -123,10 +123,13 @@ public class LicenceOrderController {
@RequestMapping("licence-order-cancel")
public RestResponse<Boolean> cancelLicenceOrder(@RequestParam Long orderId,Integer type) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
if (loginUser == null || StringUtils.isBlank(loginUser.getEnterpriseId())){
String enterpriseId = loginUser.getEnterpriseId();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
String clerkName = loginUser.getClerkName();
if (loginUser == null || StringUtils.isBlank(enterpriseId)){
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_4.getCode()),HaoBanErrCode.ERR_4.getMsg());
}
Boolean result = licenceOrderApiService.updateLicenceOrderType(orderId, type).getResult();
Boolean result = licenceOrderApiService.updateLicenceOrderType(orderId, type,enterpriseId,wxEnterpriseId,clerkName).getResult();
return RestResponse.successResult(result);
}
/**
......@@ -135,10 +138,13 @@ public class LicenceOrderController {
@RequestMapping("licence-order-voucher-upload")
public RestResponse<Boolean> uploadLicenceOrderVoucher(@RequestParam Long orderId,String voucher) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
if (loginUser == null || StringUtils.isBlank(loginUser.getEnterpriseId())){
String enterpriseId = loginUser.getEnterpriseId();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
String clerkName = loginUser.getClerkName();
if (loginUser == null || StringUtils.isBlank(enterpriseId)){
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_4.getCode()),HaoBanErrCode.ERR_4.getMsg());
}
Boolean result = licenceOrderApiService.uploadLicenceOrderVoucher(orderId, voucher).getResult();
Boolean result = licenceOrderApiService.uploadLicenceOrderVoucher(orderId, voucher,enterpriseId,wxEnterpriseId,clerkName).getResult();
return RestResponse.successResult(result);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment