|
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
|
4
|
4
|
import java.util.List;
|
5
|
5
|
import java.util.Map;
|
6
|
6
|
|
|
7
|
+import com.ydw.yunbuyer.web.pm.dao.PmItemDao;
|
7
|
8
|
import org.apache.commons.lang3.StringUtils;
|
8
|
9
|
import org.springframework.beans.factory.annotation.Autowired;
|
9
|
10
|
import org.springframework.stereotype.Repository;
|
|
@@ -32,6 +33,9 @@ public class WxSubmitDaoImpl extends BaseDaoImpl<t_pm_offline_apply> implements
|
32
|
33
|
@Autowired
|
33
|
34
|
private BaseMySQLService bs;
|
34
|
35
|
|
|
36
|
+ @Autowired
|
|
37
|
+ private PmItemDao pmItemDao;
|
|
38
|
+
|
35
|
39
|
/**
|
36
|
40
|
* 线下报名
|
37
|
41
|
*
|
|
@@ -125,12 +129,14 @@ public class WxSubmitDaoImpl extends BaseDaoImpl<t_pm_offline_apply> implements
|
125
|
129
|
// }
|
126
|
130
|
pm_offline_apply.setIs_pay(2);
|
127
|
131
|
bs.updateObjT(pm_offline_apply);
|
128
|
|
- /*String sql = "select t.* from t_pm_item_submit t where t.status=0 " +
|
|
132
|
+ String sql = "select t.* from t_pm_item_submit t where t.status=0 " +
|
129
|
133
|
" and t.pm_item_id= '"+pm_offline_apply.getPm_item_id()+"' " +
|
130
|
134
|
" and t.pm_user_id= '"+pm_offline_apply.getPm_user_id()+"' ";
|
131
|
135
|
t_pm_item_submit pm_item_submit = bs.findObj(sql, t_pm_item_submit.class);
|
132
|
|
- pm_item_submit.setStatus(-100);
|
133
|
|
- bs.updateObjT(pm_item_submit);*/
|
|
136
|
+ if (pm_item_submit != null){
|
|
137
|
+ pm_item_submit.setStatus(-100);
|
|
138
|
+ bs.updateObjT(pm_item_submit);
|
|
139
|
+ }
|
134
|
140
|
}
|
135
|
141
|
|
136
|
142
|
@Override
|
|
@@ -194,6 +200,9 @@ public class WxSubmitDaoImpl extends BaseDaoImpl<t_pm_offline_apply> implements
|
194
|
200
|
if (price.compareTo(pm_item.getPrice_start()) < 0) {
|
195
|
201
|
return false;
|
196
|
202
|
}
|
|
203
|
+ //竞价时间
|
|
204
|
+ long new_time_end = System.currentTimeMillis() + pm_item.getUpdate_interval() * 1000;
|
|
205
|
+ pmItemDao.update_time_end(pm_item, new_time_end);
|
197
|
206
|
String sql = "select t.* from t_pm_item_submit t where (t.pm_user_id=?) and (t.pm_item_id=?) and t.status=0 ";
|
198
|
207
|
t_pm_item_submit pm_item_submit = bs.findObj(t_pm_item_submit.class, sql,
|
199
|
208
|
new Object[] { offline_apply_id, pm_item_id });
|