Browse Source

邮件发送金额修改

anderx 4 years ago
parent
commit
979d8ecd3d

+ 1 - 2
src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml

@@ -544,10 +544,9 @@
 	<select id="AllselectStartPatentNew" resultType="com.goafanti.patent.bo.PatentNewBo">
 		select
 		a.id,a.patent_no patentNo,a.name ,a.aid ,a.email ,a.end_date endDate,a.status
-		,c.buyer_name userName
+		,c.buyer_name userName,a.salesman_remind salesmanRemind
 		from patent_new a left join t_order_task b on a.tid =b.id left join
 		t_order_mid c on b.order_no=c.order_no
-		where a.status &lt; 8
 	</select>
 	<select id="AllselectEndPatentNew" resultMap="BaseResultMap">
 		select

+ 3 - 1
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -94,6 +94,7 @@ public class PatentTask {
 				Date date=new Date();
 				// 计算相差日期
 				int count = (int) ((end.getTimeInMillis() - now.getTimeInMillis()) / (1000 * 3600 * 24));
+				System.out.println(count+"==="+p.getStatus()+"========="+p.getPatentNo());
 				boolean flag=false;
 				if (count > 60 && count <= 90&&p.getStatus()!=1) {
 					flag=true;
@@ -115,7 +116,8 @@ public class PatentTask {
 					flag=true;
 					status = 5;
 					s5.add(p.getId().toString());
-				}else if(count<0&&p.getStatus()==5) {
+				}else if(count<0&&p.getSalesmanRemind()==1) {
+					System.out.println(p.getPatentNo());
 					s6.add(p.getId().toString());
 				}
 				if (flag) {

+ 1 - 1
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -419,7 +419,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 				}
 				Admin a = adminMapper.selectByPrimaryKey(patentNew.getAid());
 				String userName=patentNewMapper.selectUserNameByTid(patentNew.getTid());
-				BigDecimal amout= patentNew.getPatentAmount().multiply(new BigDecimal(1000));
+				BigDecimal amout= patentNew.getPatentAmount().multiply(new BigDecimal(10000));
 				EmailBo emailBo = new EmailBo("专利提醒", patentNew.getEmail().trim(), userName, "科德集团", a.getName(),
 						patentNew.getName(), patentNew.getPatentNo(),amout.stripTrailingZeros().toPlainString(),
 						DateFormatUtils.format(patentNew.getEndDate(), "yyyy-MM-dd"), patentNew.getStatus());