Просмотр исходного кода

优化 小区入驻审核页面

wuxw лет назад: 6
Родитель
Сommit
8cea4e1842

+ 10 - 0
StoreService/src/main/java/com/java110/store/dao/IStoreServiceDao.java

@@ -264,4 +264,14 @@ public interface IStoreServiceDao {
      */
     public void updateStoreUserInstance(Map info) throws DAOException;
 
+
+    /**
+     * 查询商户信息(instance过程)
+     * 根据bId 查询商户信息
+     * @param info bId 信息
+     * @return 商户信息
+     * @throws DAOException
+     */
+    public List<Map> getStores(Map info) throws DAOException;
+
 }

+ 9 - 0
StoreService/src/main/java/com/java110/store/dao/impl/StoreServiceDaoImpl.java

@@ -500,4 +500,13 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
             throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户用户信息Instance数据失败:"+ JSONObject.toJSONString(info));
         }
     }
+
+    @Override
+    public List<Map> getStores(Map info) throws DAOException {
+        logger.debug("查询商户信息 入参 info : {}",info);
+
+        List<Map> propertyUsers = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStores",info);
+
+        return propertyUsers;
+    }
 }

+ 66 - 0
StoreService/src/main/java/com/java110/store/smo/impl/StoreInnerServiceSMOImpl.java

@@ -0,0 +1,66 @@
+package com.java110.store.smo.impl;
+
+import com.java110.common.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.core.smo.store.IStoreInnerServiceSMO;
+import com.java110.dto.OwnerCarDto;
+import com.java110.dto.PageDto;
+import com.java110.dto.UserDto;
+import com.java110.dto.store.StoreDto;
+import com.java110.store.dao.IStoreServiceDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+/**
+ * @ClassName StoreInnerServiceSMOImpl 商户内部实现类
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2019/9/20 15:17
+ * @Version 1.0
+ * add by wuxw 2019/9/20
+ **/
+@Service("StoreInnerServiceSMOImpl")
+public class StoreInnerServiceSMOImpl  extends BaseServiceSMO implements IStoreInnerServiceSMO {
+
+    @Autowired
+    private IStoreServiceDao storeServiceDaoImpl;
+
+    @Override
+    public List<StoreDto> getStores(StoreDto storeDto) {
+        //校验是否传了 分页信息
+
+        int page = storeDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            storeDto.setPage((page - 1) * storeDto.getRow());
+            storeDto.setRow(page * storeDto.getRow());
+        }
+
+        List<StoreDto> storeDtos = BeanConvertUtil.covertBeanList(storeServiceDaoImpl.getStores(BeanConvertUtil.beanCovertMap(storeDto)), StoreDto.class);
+
+        if (storeDtos == null || storeDtos.size() == 0) {
+            return storeDtos;
+        }
+
+      /*  String[] userIds = getUserIds(ownerCars);
+        //根据 userId 查询用户信息
+        List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds);
+
+        for (OwnerCarDto ownerCar : ownerCars) {
+            refreshOwnerCar(ownerCar, users);
+        }*/
+        return storeDtos;
+    }
+
+
+    public IStoreServiceDao getStoreServiceDaoImpl() {
+        return storeServiceDaoImpl;
+    }
+
+    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
+        this.storeServiceDaoImpl = storeServiceDaoImpl;
+    }
+}

+ 1 - 1
WebService/src/main/java/com/java110/web/components/community/AuditEnterCommunityManageComponent.java

@@ -37,7 +37,7 @@ public class AuditEnterCommunityManageComponent {
     public ResponseEntity<String> list(IPageData pd) {
 
         JSONObject reqParam = JSONObject.parseObject(pd.getReqData());
-        reqParam.put("state", StateConstant.AGREE_AUDIT);
+        reqParam.put("state", StateConstant.NO_AUDIT);
 
         IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getToken(),
                 reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId());

+ 32 - 0
java110-db/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml

@@ -442,4 +442,36 @@
         </if>
     </update>
 
+    <!-- 查询商户 -->
+    <select id="getStores" parameterType="Map" resultType="Map">
+        select s.store_id,s.b_id,s.user_id,s.name,s.address,s.tel,s.store_type_cd,s.nearby_landmarks,s.map_x,s.map_y,s.status_cd
+        from s_store s
+        where s.status_cd = '0'
+        <if test="userId != null and userId != ''">
+            and s.user_id = #{userId}
+        </if>
+        <if test="name != null and name !=''">
+            and s.name like concat('%',#{name},'%')
+        </if>
+        <if test="address != null and address != ''">
+            and s.address like concat('%',#{address},'%')
+        </if>
+        <if test="tel != null and tel != ''">
+            and s.tel = #{tel}
+        </if>
+        <if test="storeTypeCd != null and storeTypeCd != ''">
+            and s.store_type_cd = #{storeTypeCd}
+        </if>
+        <if test="nearbyLandmarks != null and nearbyLandmarks != ''">
+            and s.nearby_landmarks = #{nearbyLandmarks}
+        </if>
+        <if test="storeId != null and storeId !=''">
+            and s.store_id = #{storeId}
+        </if>
+        order by s.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+    </select>
+
 </mapper>