XMTT 6 vuotta sitten
vanhempi
commit
c7ea14be49

+ 3 - 2
src/main/java/com/ekexiu/portal/platform/PlatformService.java

36
import java.util.LinkedList;
36
import java.util.LinkedList;
37
import java.util.List;
37
import java.util.List;
38
import java.util.Map;
38
import java.util.Map;
39
import java.util.Objects;
39
import java.util.concurrent.TimeUnit;
40
import java.util.concurrent.TimeUnit;
40
import java.util.concurrent.atomic.AtomicInteger;
41
import java.util.concurrent.atomic.AtomicInteger;
41

42

208

209

209
	@Path("/reqResetPw")
210
	@Path("/reqResetPw")
210
	@Post
211
	@Post
211
	public void requestResetPasswordWithEmail(@JdbcConn Connection con, String mail, String url) throws SQLException, JfwBaseException {
212
	public void requestResetPasswordWithEmail(@JdbcConn Connection con, String mail,String id, String url) throws SQLException, JfwBaseException {
212
		PlatformUser pu = this.platformDao.queryUser(con, mail);
213
		PlatformUser pu = this.platformDao.queryUser(con, mail);
213
		if (pu == null)
214
		if (pu == null || !Objects.equals(pu.getId(), id))
214
			throw new JfwBaseException(-600001, "not found user");
215
			throw new JfwBaseException(-600001, "not found user");
215
		StateCode<String, String> sc = new StateCode<String, String>();
216
		StateCode<String, String> sc = new StateCode<String, String>();
216
		sc.setCode(pu.getId());
217
		sc.setCode(pu.getId());

+ 3 - 3
src/main/java/com/ekexiu/portal/service/DemandService.java

395
	public PageQueryResult<Demand> query(@JdbcConn Connection con, @Nullable String state, @Nullable String source,@Nullable String  cost, @Nullable String duration, boolean byCreateTime, @Nullable String key, @DefaultValue("1") int pageNo,
395
	public PageQueryResult<Demand> query(@JdbcConn Connection con, @Nullable String state, @Nullable String source,@Nullable String  cost, @Nullable String duration, boolean byCreateTime, @Nullable String key, @DefaultValue("1") int pageNo,
396
			@DefaultValue("5") int pageSize) throws SQLException {
396
			@DefaultValue("5") int pageSize) throws SQLException {
397
		if(("2").equals(state)){
397
		if(("2").equals(state)){
398
			return this.demandDao.pageQueryOrderByModifyTimeDesc(con, state, source, cost, duration, key, pageSize, pageNo);
398
			return this.demandDao.pageQueryOrderByModifyTimeDesc(con, state, source, cost, duration, key == null ? null : ("%" + key + "%"), pageSize, pageNo);
399
		}
399
		}
400
		if(byCreateTime){
400
		if(byCreateTime){
401
			return this.demandDao.pageQueryOrderByCreateTimeDesc(con, state, source, cost, duration, key, pageSize, pageNo);
401
			return this.demandDao.pageQueryOrderByCreateTimeDesc(con, state, source, cost, duration, key == null ? null : ("%" + key + "%"), pageSize, pageNo);
402
		}else{
402
		}else{
403
			return this.demandDao.pageQueryOrderByInvalidDayAsc(con, state, source, cost, duration, key, pageSize, pageNo);
403
			return this.demandDao.pageQueryOrderByInvalidDayAsc(con, state, source, cost, duration, key == null ? null : ("%" + key + "%"), pageSize, pageNo);
404
		}
404
		}
405
	}
405
	}
406
}
406
}