Commit e6f94283 authored by yanzg's avatar yanzg

消除成功接收处理

parent 903c08a6
......@@ -227,14 +227,15 @@ public class DateHelper {
SimpleDateFormat shortSdf = new SimpleDateFormat(FORMAT_DAY_STRING);
Date now = null;
try {
if (currentMonth >= 1 && currentMonth <= 3)
if (currentMonth >= 1 && currentMonth <= 3) {
c.set(Calendar.MONTH, 0);
else if (currentMonth >= 4 && currentMonth <= 6)
} else if (currentMonth >= 4 && currentMonth <= 6) {
c.set(Calendar.MONTH, 3);
else if (currentMonth >= 7 && currentMonth <= 9)
} else if (currentMonth >= 7 && currentMonth <= 9) {
c.set(Calendar.MONTH, 6);
else if (currentMonth >= 10 && currentMonth <= 12)
} else if (currentMonth >= 10 && currentMonth <= 12) {
c.set(Calendar.MONTH, 9);
}
c.set(Calendar.DATE, 1);
now = longSdf.parse(shortSdf.format(c.getTime()) + " 00:00:00");
} catch (Exception e) {
......
......@@ -169,11 +169,15 @@ public class FileHelper {
//删除子文件
if (files[i].isFile()) {
flag = deleteFile(files[i].getAbsolutePath());
if (!flag) break;
if (!flag) {
break;
}
} //删除子目录
else {
flag = deleteDirectory(files[i].getAbsolutePath());
if (!flag) break;
if (!flag) {
break;
}
}
}
if (!flag) return false;
......
......@@ -100,6 +100,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param model 需要创建的数据
* @return 创建的主键编号, 创建成功,返回主键,否则为空
*/
@Override
public String create(Object model) {
// 判断主键是字符串和需要生成主键
boolean isKeyString = this.Table.Table.getKeyType() == String.class;
......@@ -137,6 +138,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param model 需要修改的数据
* @return 删除的主键编号
*/
@Override
public String update(Object model) {
String keyString = this.getKeyString(model);
if (StringHelper.isEmpty(keyString)) {
......@@ -169,6 +171,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param model 需要保存的数据
* @return 保存的主键编号
*/
@Override
public String save(Object model) {
String id = this.getKeyString(model);
if (StringHelper.isEmpty(id)) {
......@@ -184,6 +187,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param model 需要删除的数据
* @return 删除的主键编号
*/
@Override
public int remove(Object model) {
// 获取来源主键
Object from = model;
......@@ -220,6 +224,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
@Override
public <T extends Object> T load(Object model, Class<T> cls) {
// 获取来源主键
Object from = model;
......
......@@ -168,6 +168,7 @@ public class AllBeanRowMapper<T> implements RowMapper<T> {
*
* @see ResultSetMetaData
*/
@Override
public T mapRow(ResultSet rs, int rowNumber) throws SQLException, TypeMismatchException {
Assert.state(this.mappedClass != null, "Mapped class was not specified");
T mappedObject = BeanUtils.instantiate(this.mappedClass);
......
......@@ -72,6 +72,7 @@ public abstract class BaseServiceImpl<T> implements BaseService<T> {
*
* @param models 需要修改的数据
*/
@Override
public List<String> update(T... models) {
List<String> ids = new ArrayList<String>();
for (T t : models) {
......
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