Commit e0b235b3 by jinxin

审核订单接口

parent c20b00a3
......@@ -114,5 +114,14 @@ public interface LicenceOrderApiService {
*/
ServiceResponse<List<String>> getOrderIdList(String param,Integer type,String wxEnterpriseId);
/**
* 审核订单
* @param orderId 订单id
* @param flag 是否通过 0 否 1是
* @param reason 不通过原因
* @return
*/
ServiceResponse<Boolean> checkLicenceOrder(Long orderId,Integer flag,String reason,String enterpriseId,String wxEnterpriseId,String creatorName);
}
......@@ -102,6 +102,8 @@ public class LicenceOrderController {
String wxEnterpriseId = loginUser.getWxEnterpriseId();
String clerkName = loginUser.getClerkName();
Boolean result = licenceOrderApiService.updateLicenceOrderType(orderId, 2, enterpriseId, wxEnterpriseId, clerkName, 1).getResult();
//微信退款 todo
return RestResponse.successResult(result);
}
......@@ -120,9 +122,13 @@ public class LicenceOrderController {
/**
* 审核订单
* @param orderId 订单id
* @param flag 是否通过 0 否 1是
* @param reason 不通过原因
* @return
*/
@RequestMapping("licence-order-check")
public RestResponse<Boolean> checkLicenceOrder(@RequestParam Long orderId) {
public RestResponse<Boolean> checkLicenceOrder(@RequestParam Long orderId,Integer flag,String reason) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
if (loginUser == null || StringUtils.isBlank(loginUser.getEnterpriseId())) {
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_4.getCode()), HaoBanErrCode.ERR_4.getMsg());
......@@ -130,7 +136,7 @@ public class LicenceOrderController {
String enterpriseId = loginUser.getEnterpriseId();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
String clerkName = loginUser.getClerkName();
Boolean result = licenceOrderApiService.updateLicenceOrderType(orderId, 2, enterpriseId, wxEnterpriseId, clerkName, 1).getResult();
Boolean result = licenceOrderApiService.checkLicenceOrder(orderId, flag, reason,enterpriseId, wxEnterpriseId, clerkName).getResult();
return RestResponse.successResult(result);
}
......
......@@ -118,4 +118,6 @@ public interface TabHaobanLicenceOrderMapper {
List<String> getQywxOrderId(@Param("qywxOrderId") String qywxOrderId,@Param("wxEnterpriseId") String wxEnterpriseId);
Integer saveOrderCheckReason(@Param("orderId") Long orderId, @Param("reason") String reason,@Param("type") Integer type);
}
......@@ -124,5 +124,14 @@ public interface LicenceOrderService {
*/
List<String> getOrderIdList(String param, Integer type, String wxEnterpriseId);
/**
* 审核订单
* @param orderId 订单id
* @param flag 是否通过 0 否 1是
* @param reason 不通过原因
* @return
*/
Boolean checkLicenceOrder(Long orderId,Integer flag,String reason,String enterpriseId,String wxEnterpriseId,String creatorName);
}
......@@ -242,4 +242,22 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
}
return result;
}
@Override
public Boolean checkLicenceOrder(Long orderId, Integer flag, String reason, String enterpriseId, String wxEnterpriseId, String creatorName) {
if (flag == 0){
//更新微信订单状态
tabHaobanLicenceOrderMapper.saveOrderCheckReason(orderId,reason,0);
//记录订单进度
saveOrderProgress(orderId,"审核未通过,请重新上传凭证",enterpriseId,wxEnterpriseId,creatorName,0,null,reason);
}else {
//更新微信订单状态
tabHaobanLicenceOrderMapper.updateLicenceOrderType(orderId,1);
//记录订单进度
saveOrderProgress(orderId,"已支付",enterpriseId,wxEnterpriseId,creatorName,0,null,null);
}
return null;
}
}
......@@ -249,4 +249,10 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
public ServiceResponse<List<String>> getOrderIdList(String param, Integer type, String wxEnterpriseId) {
return ServiceResponse.success(licenceOrderService.getOrderIdList(param,type,wxEnterpriseId));
}
@Override
public ServiceResponse<Boolean> checkLicenceOrder(Long orderId, Integer flag, String reason,String enterpriseId,String wxEnterpriseId,String creatorName) {
licenceOrderService.checkLicenceOrder(orderId,flag,reason,enterpriseId,wxEnterpriseId,creatorName);
return null;
}
}
......@@ -283,4 +283,11 @@
FROM tab_haoban_licence_order WHERE qywx_order_id like concat (#{qywxOrderId},'%') and delete_flag=0 and wx_enterprise_id = #{wxEnterpriseId}
</select>
<update id="saveOrderCheckReason">
UPDATE tab_haoban_licence_order
SET reason = #{reason} ,update_time = now(),order_status_reason = '审核未通过',order_status = #{type}
WHERE order_id = #{orderId}
and delete_flag = 0
</update>
</mapper>
\ No newline at end of file
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