weiximei 6 yıl önce
ebeveyn
işleme
0ecafe28a5

+ 4
- 0
whole-estate/src/main/java/com/example/wholeestate/controller/ActivityController.java Dosyayı Görüntüle

@@ -160,6 +160,10 @@ public class ActivityController extends BaseController {
160 160
             responseBean.addError("活动不存在!");
161 161
             return responseBean;
162 162
         }
163
+        if (activity.getStatus() == 1) {
164
+            responseBean.addError("已发布的活动不能删除!");
165
+            return responseBean;
166
+        }
163 167
         activity.setStatus(-1);
164 168
         iActivityService.update(activity, activityQueryWrapper);
165 169
         responseBean.addSuccess("操作成功!");

+ 2
- 0
whole-estate/src/main/java/com/example/wholeestate/service/IBuildingService.java Dosyayı Görüntüle

@@ -61,4 +61,6 @@ public interface IBuildingService extends IService<Building> {
61 61
      * @return
62 62
      */
63 63
     ResponseBean buildingdelete(String id);
64
+
65
+
64 66
 }

+ 2
- 1
whole-estate/src/main/resources/mapper/BuildingMapper.xml Dosyayı Görüntüle

@@ -4,8 +4,9 @@
4 4
     <select id="buildingList" resultType="com.example.wholeestate.model.Building">
5 5
         SELECT * FROM ta_building
6 6
             <where>
7
+            status > -1
7 8
             <if test="Name != null and Name != ''">
8
-            and  ta_building.name like concat('%',#{Name,jdbcType=VARCHAR},'%')
9
+            and  (ta_building.name like concat('%',#{Name,jdbcType=VARCHAR},'%') or ta_building.building_name like concat('%',#{Name,jdbcType=VARCHAR},'%'))
9 10
             </if>
10 11
             <if test="Code != null and Code != ''">
11 12
             and  ta_building.code like concat('%',#{Code,jdbcType=VARCHAR},'%')