Commit 7af9980b by jinxin

企业微信接口开发

parent 98dd9597
...@@ -56,7 +56,7 @@ public interface LicenceOrderApiService { ...@@ -56,7 +56,7 @@ public interface LicenceOrderApiService {
* @param type 订单状态 * @param type 订单状态
* @return * @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 { ...@@ -65,7 +65,7 @@ public interface LicenceOrderApiService {
* @param voucher 凭证url * @param voucher 凭证url
* @return * @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 { ...@@ -26,4 +26,6 @@ public interface TabHaobanLicenceOrderProgressMapper {
Integer deleteByOrderId(@Param("orderId") Long orderId); Integer deleteByOrderId(@Param("orderId") Long orderId);
Integer uploadLicenceOrderVoucher(@Param("orderId")Long orderId, @Param("voucher")String voucher);
} }
...@@ -41,7 +41,7 @@ public interface LicenceOrderService { ...@@ -41,7 +41,7 @@ public interface LicenceOrderService {
* @param type 订单状态 * @param type 订单状态
* @return * @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 { ...@@ -49,7 +49,7 @@ public interface LicenceOrderService {
* @param voucher 凭证url * @param voucher 凭证url
* @return * @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 { ...@@ -78,14 +78,18 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
tabHaobanLicenceOrderProgressMapper.insert(orderProgress); tabHaobanLicenceOrderProgressMapper.insert(orderProgress);
} }
@Override @Override
public Boolean updateLicenceOrderType(Long orderId, Integer type) { public Boolean updateLicenceOrderType(Long orderId, Integer type,String enterpriseId,String wxEnterpriseId,String creatorName) {
return null; return null;
} }
@Override @Override
public Boolean uploadLicenceOrderVoucher(Long orderId, String voucher) { public Boolean uploadLicenceOrderVoucher(Long orderId, String voucher,String enterpriseId,String wxEnterpriseId,String creatorName) {
return null; tabHaobanLicenceOrderMapper.uploadLicenceOrderVoucher(orderId,voucher);
//记录订单进度
// TODO: 2023/3/21 需要判断是否第二次上传
saveOrderProgress(orderId,"凭证已上传,审核中",enterpriseId,wxEnterpriseId,creatorName);
return true;
} }
@Override @Override
......
...@@ -91,14 +91,14 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService { ...@@ -91,14 +91,14 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
} }
@Override @Override
public ServiceResponse<Boolean> updateLicenceOrderType(Long orderId, Integer type) { public ServiceResponse<Boolean> updateLicenceOrderType(Long orderId, Integer type,String enterpriseId,String wxEnterpriseId,String creatorName) {
licenceOrderService.updateLicenceOrderType(orderId,type); licenceOrderService.updateLicenceOrderType(orderId,type,enterpriseId,wxEnterpriseId,creatorName);
return ServiceResponse.success(true); return ServiceResponse.success(true);
} }
@Override @Override
public ServiceResponse<Boolean> uploadLicenceOrderVoucher(Long orderId, String voucher) { public ServiceResponse<Boolean> uploadLicenceOrderVoucher(Long orderId, String voucher,String enterpriseId,String wxEnterpriseId,String creatorName) {
licenceOrderService.uploadLicenceOrderVoucher(orderId,voucher); licenceOrderService.uploadLicenceOrderVoucher(orderId,voucher,enterpriseId,wxEnterpriseId,creatorName);
return ServiceResponse.success(true); return ServiceResponse.success(true);
} }
......
...@@ -109,4 +109,10 @@ ...@@ -109,4 +109,10 @@
WHERE order_id = #{orderId} WHERE order_id = #{orderId}
</update> </update>
<update id="uploadLicenceOrderVoucher" >
UPDATE tab_haoban_licence_order_progress
SET voucher = #{voucher}
WHERE order_id = #{orderId} and delete_flag = 0
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -123,10 +123,13 @@ public class LicenceOrderController { ...@@ -123,10 +123,13 @@ public class LicenceOrderController {
@RequestMapping("licence-order-cancel") @RequestMapping("licence-order-cancel")
public RestResponse<Boolean> cancelLicenceOrder(@RequestParam Long orderId,Integer type) { public RestResponse<Boolean> cancelLicenceOrder(@RequestParam Long orderId,Integer type) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser(); 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()); 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); return RestResponse.successResult(result);
} }
/** /**
...@@ -135,10 +138,13 @@ public class LicenceOrderController { ...@@ -135,10 +138,13 @@ public class LicenceOrderController {
@RequestMapping("licence-order-voucher-upload") @RequestMapping("licence-order-voucher-upload")
public RestResponse<Boolean> uploadLicenceOrderVoucher(@RequestParam Long orderId,String voucher) { public RestResponse<Boolean> uploadLicenceOrderVoucher(@RequestParam Long orderId,String voucher) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser(); 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()); 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); 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