傅行帆 5 jaren geleden
bovenliggende
commit
f0670a3ef5

+ 8
- 6
src/main/java/com/huiju/estateagents/controller/TaGoodsController.java Bestand weergeven

@@ -58,7 +58,7 @@ public class TaGoodsController extends BaseController {
58 58
                                     @RequestParam(value = "buildingId",required = false) String buildingId,
59 59
                                     @RequestParam(value ="priceLesser",required = false) Integer priceLesser,
60 60
                                     @RequestParam(value ="priceGreater",required = false) Integer priceGreater,
61
-                                    @RequestParam(value ="status",required = false) Integer status){
61
+                                    @RequestParam(value ="status",required = false) Integer status,HttpServletRequest request){
62 62
         ResponseBean responseBean = new ResponseBean();
63 63
         try {
64 64
             //使用分页插件
@@ -68,6 +68,7 @@ public class TaGoodsController extends BaseController {
68 68
             queryWrapper.lt(null!=priceGreater,"point_price",priceGreater);
69 69
             queryWrapper.gt(null != priceLesser,"point_price",priceLesser);
70 70
             queryWrapper.eq(null != status,"status",status);
71
+            queryWrapper.eq("org_id",getOrgId(request));
71 72
             queryWrapper.eq(!StringUtils.isEmpty(buildingId),"building_id",buildingId);
72 73
             queryWrapper.orderByDesc("create_date");
73 74
 
@@ -87,13 +88,13 @@ public class TaGoodsController extends BaseController {
87 88
      * @return
88 89
      */
89 90
     @RequestMapping(value="/admin/taGoods/add",method= RequestMethod.POST)
90
-    public ResponseBean taGoodsAdd(@RequestBody TaGoods taGoods){
91
+    public ResponseBean taGoodsAdd(@RequestBody TaGoods taGoods,HttpServletRequest request){
91 92
         ResponseBean responseBean = new ResponseBean();
92 93
         try {
93 94
 
94 95
             Integer cityId = iTaBuildingService.getCityById(taGoods.getBuildingId());
95 96
             taGoods.setCityId(cityId);
96
-
97
+            taGoods.setOrgId(getOrgId(request));
97 98
             if (iTaGoodsService.save(taGoods)){
98 99
                 responseBean.addSuccess(taGoods);
99 100
             }else {
@@ -135,13 +136,13 @@ public class TaGoodsController extends BaseController {
135 136
      * @return
136 137
      */
137 138
     @RequestMapping(value="/admin/taGoods",method= RequestMethod.PUT)
138
-    public ResponseBean taGoodsUpdate(@RequestBody TaGoods taGoods){
139
+    public ResponseBean taGoodsUpdate(@RequestBody TaGoods taGoods,HttpServletRequest request){
139 140
         ResponseBean responseBean = new ResponseBean();
140 141
         try {
141 142
 
142 143
             Integer cityId = iTaBuildingService.getCityById(taGoods.getBuildingId());
143 144
             taGoods.setCityId(cityId);
144
-
145
+            taGoods.setOrgId(getOrgId(request));
145 146
             if (iTaGoodsService.updateById(taGoods)){
146 147
                 responseBean.addSuccess(taGoods);
147 148
             }else {
@@ -161,7 +162,7 @@ public class TaGoodsController extends BaseController {
161 162
      * @return
162 163
      */
163 164
     @RequestMapping(value="/admin/taGoods/change",method= RequestMethod.PUT)
164
-    public ResponseBean taGoodsChange(@RequestBody TaGoods taGoods){
165
+    public ResponseBean taGoodsChange(@RequestBody TaGoods taGoods,HttpServletRequest request){
165 166
         ResponseBean responseBean = new ResponseBean();
166 167
         try {
167 168
             if(null != taGoods.getStatus() && taGoods.getStatus().equals(CommConstant.STATUS_NORMAL)){
@@ -169,6 +170,7 @@ public class TaGoodsController extends BaseController {
169 170
             }else {
170 171
                 taGoods.setStatus(CommConstant.STATUS_NORMAL);
171 172
             }
173
+            taGoods.setOrgId(getOrgId(request));
172 174
             if (iTaGoodsService.updateById(taGoods)){
173 175
                 responseBean.addSuccess(taGoods);
174 176
             }else {

+ 3
- 1
src/main/java/com/huiju/estateagents/controller/TaPointsExchangeController.java Bestand weergeven

@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestParam;
19 19
 import org.springframework.web.bind.annotation.ResponseBody;
20 20
 import org.springframework.web.bind.annotation.RestController;
21 21
 
22
+import javax.servlet.http.HttpServletRequest;
22 23
 import java.time.LocalDateTime;
23 24
 
24 25
 /**
@@ -57,7 +58,7 @@ public class TaPointsExchangeController extends BaseController {
57 58
                                              @RequestParam(value ="startVerifyDate",required = false) String startVerifyDate,
58 59
                                              @RequestParam(value ="endVerifyDate",required = false) String endVerifyDate,
59 60
                                              @RequestParam(value ="status",required = false) Integer status,
60
-                                             @RequestParam(value ="tel",required = false) String tel){
61
+                                             @RequestParam(value ="tel",required = false) String tel, HttpServletRequest request){
61 62
         ResponseBean responseBean = new ResponseBean();
62 63
         try {
63 64
             //使用分页插件
@@ -72,6 +73,7 @@ public class TaPointsExchangeController extends BaseController {
72 73
             taPointsExchange.setEndVerifyDate(endVerifyDate);
73 74
             taPointsExchange.setStatus(status);
74 75
             taPointsExchange.setTel(tel);
76
+            taPointsExchange.setOrgId(getOrgId(request));
75 77
             
76 78
             responseBean = iTaPointsExchangeService.selectList(pageNum,pageSize,taPointsExchange);
77 79
 

+ 3
- 0
src/main/resources/mapper/TaPointsExchangeMapper.xml Bestand weergeven

@@ -28,6 +28,9 @@
28 28
         <if test="taPointsExchange.status != null and taPointsExchange.status != '' or taPointsExchange.status ==0">
29 29
             and  t.`status` = #{taPointsExchange.status}
30 30
         </if>
31
+        <if test="taPointsExchange.orgId != null and taPointsExchange.orgId != ''">
32
+            and  t.org_id = #{taPointsExchange.orgId}
33
+        </if>
31 34
         <if test="taPointsExchange.personName != null and taPointsExchange.personName != ''">
32 35
             and  t.person_name like concat('%',#{taPointsExchange.personName},'%')
33 36
         </if>