Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

Administrator 4 vuotta sitten
vanhempi
commit
0427d65c31

+ 4 - 4
boman-web-core/src/main/java/com/boman/web/core/mapper/StandardMapper.java

@@ -53,7 +53,7 @@ public interface StandardMapper {
      * @param packColCondition packColCondition
      * @return int
      */
-    @SelectProvider(type = SqlProvider.class, method = "delete")
+    @DeleteProvider(type = SqlProvider.class, method = "delete")
     Integer delete(@Param("tableName") String tableName, @Param("condition") JSONObject condition
             , @Param("packColCondition") JSONObject packColCondition);
 
@@ -77,8 +77,8 @@ public interface StandardMapper {
      * @param packColCondition packColCondition
      * @return int
      */
-    @SelectProvider(type = SqlProvider.class, method = "update")
-    int update(@Param("tableName") String tableName, @Param("packCommitData") JSONObject packCommitData
+    @UpdateProvider(type = SqlProvider.class, method = "update")
+    Integer update(@Param("tableName") String tableName, @Param("packCommitData") JSONObject packCommitData
             , @Param("packColCondition") JSONObject packColCondition);
 
 
@@ -319,7 +319,7 @@ public interface StandardMapper {
                 wholeSql.append(key).append(covert(queryType, columnType, key, value)).append(" , ");
             }
 
-            wholeSql.append(StringUtils.substringBeforeLast(wholeSql.toString(), " , "));
+            wholeSql = new StringBuilder(StringUtils.substringBeforeLast(wholeSql.toString(), " , "));
             packCondition(packColCondition, wholeSql);
 
             String sqlStr = wholeSql.toString();

+ 5 - 1
boman-web-core/src/main/java/com/boman/web/core/service/message/MessageServiceImpl.java

@@ -79,7 +79,11 @@ public class MessageServiceImpl implements MessageService {
 
         // 修改子表
         int effective = receiveService.withdrawByMessageId(id);
-        return !eqZero(effective);
+        if (eqZero(effective)) {
+            throw new RuntimeException("撤回收文失败");
+        }
+
+        return true;
     }
 
     /*

+ 2 - 1
boman-web-core/src/main/java/com/boman/web/core/service/update/BaseUpdateServiceImpl.java

@@ -84,7 +84,8 @@ public class BaseUpdateServiceImpl implements IBaseUpdateService {
         JSONObject packColCondition = selectService.packColCondition(columns, condition);
         JSONObject packCommitData = selectService.packColCondition(columns, commitData);
 
-        return mapper.update(tableName, packCommitData, packColCondition);
+        Integer update = mapper.update(tableName, packCommitData, packColCondition);
+        return 1;
 
     }