Browse Source

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
3cf57ee84a

+ 1 - 0
src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java

@@ -206,6 +206,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.updateOrderPayment(p));
 		return res;
 	}
+	
 	/**
 	 * 付款详情
 	 * @param t

+ 1 - 0
src/main/java/com/goafanti/organization/service/ThirdPartyCompanyService.java

@@ -48,4 +48,5 @@ public interface ThirdPartyCompanyService {
 
 	List<outFinancialPayment> selectfinancialPayment(Integer id);
 
+
 }

+ 14 - 8
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -163,16 +163,19 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	@Override
 	public int updateOrderPayment(TOrderPayment p) {
-		//状态 0审核 1驳回 2待支付 3已支付
 		Integer type=NoticeStatus.PAYMENT_NODE.getCode();
-		if (p.getStatus()==1)type= NoticeStatus.PAYMENT_NO.getCode();
-		else if(p.getStatus()==2)type= NoticeStatus.PAYMENT_YES.getCode();
-		NoticeInformationBo ni=financialPaymentMapper.selectBypidGetNotice(p.getId());
-		AdminListBo a =adminMapper.getDeptNameByAid(TokenManager.getAdminId());
-		addNoticAndSendEmail(ni,a,type);
-		PaymentLog pl=new PaymentLog(p.getId(),0,p.getRemarks(),a.getId(),a.getName());
-		paymentLogMapper.insertSelective(pl);
+		if (p.getStatus()==1)type= NoticeStatus.PAYMENT_YES.getCode();
+		else if(p.getStatus()==2)type= NoticeStatus.PAYMENT_NO.getCode();
+		if (p.getStatus()!=0) {
+			NoticeInformationBo ni=financialPaymentMapper.selectBypidGetNotice(p.getId());
+			AdminListBo a =adminMapper.getDeptNameByAid(TokenManager.getAdminId());
+			addNoticAndSendEmail(ni,a,type);
+			PaymentLog pl=new PaymentLog(p.getId(),p.getStatus(),p.getRemarks(),a.getId(),a.getName());
+			paymentLogMapper.insertSelective(pl);
+			
+		}
 		return tOrderPaymentMapper.updateByPrimaryKeySelective(p);
+	
 	}
 
 
@@ -231,4 +234,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			}
 		}
 	}
+
+
+	
 }