Commit 07d1d007 by qwmqiuwenmin

fix

parent 435e006b
...@@ -76,6 +76,8 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -76,6 +76,8 @@ public class WxEnterpriseDTO implements Serializable {
private Date contactSecretLastTime; private Date contactSecretLastTime;
private Date memberSecretLastTime; private Date memberSecretLastTime;
private Integer storeTotal;
private Date createTime; private Date createTime;
...@@ -389,6 +391,14 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -389,6 +391,14 @@ public class WxEnterpriseDTO implements Serializable {
this.contactSecretFlag = contactSecretFlag; this.contactSecretFlag = contactSecretFlag;
} }
public Integer getStoreTotal() {
return storeTotal;
}
public void setStoreTotal(Integer storeTotal) {
this.storeTotal = storeTotal;
}
......
...@@ -164,5 +164,11 @@ public interface DepartmentApiService { ...@@ -164,5 +164,11 @@ public interface DepartmentApiService {
boolean isInitLocked(String wxEnterpriseId); boolean isInitLocked(String wxEnterpriseId);
void syncWxDepartmentByParentMQ(String res); void syncWxDepartmentByParentMQ(String res);
/**
* 统计门店总数
* @param wxEnterpriseId
* @return
*/
Integer totalStoreCountByEnterpriseId(String wxEnterpriseId);
} }
...@@ -64,4 +64,6 @@ public interface DepartmentMapper { ...@@ -64,4 +64,6 @@ public interface DepartmentMapper {
List<TabHaobanDepartment> listByIds(@Param("departmentIds")List<String> departmentIds); List<TabHaobanDepartment> listByIds(@Param("departmentIds")List<String> departmentIds);
TabHaobanDepartment getTempFlagDepartment(@Param("wxEnterpriseId") String wxEnterpriseId); TabHaobanDepartment getTempFlagDepartment(@Param("wxEnterpriseId") String wxEnterpriseId);
Integer totalStoreCountByEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId);
} }
\ No newline at end of file
...@@ -54,4 +54,6 @@ public interface DepartmentService { ...@@ -54,4 +54,6 @@ public interface DepartmentService {
*/ */
DepartmentDTO getTempFlagDepartment(String wxEnterpriseId); DepartmentDTO getTempFlagDepartment(String wxEnterpriseId);
Integer totalStoreCountByEnterpriseId(String wxEnterpriseId);
} }
...@@ -190,4 +190,9 @@ public class DepartmentServiceImpl implements DepartmentService { ...@@ -190,4 +190,9 @@ public class DepartmentServiceImpl implements DepartmentService {
public DepartmentDTO getTempFlagDepartment(String wxEnterpriseId) { public DepartmentDTO getTempFlagDepartment(String wxEnterpriseId) {
return EntityUtil.changeEntityByJSON(DepartmentDTO.class, mapper.getTempFlagDepartment(wxEnterpriseId)); return EntityUtil.changeEntityByJSON(DepartmentDTO.class, mapper.getTempFlagDepartment(wxEnterpriseId));
} }
@Override
public Integer totalStoreCountByEnterpriseId(String wxEnterpriseId) {
return mapper.totalStoreCountByEnterpriseId(wxEnterpriseId);
}
} }
...@@ -753,4 +753,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService { ...@@ -753,4 +753,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
} }
} }
@Override
public Integer totalStoreCountByEnterpriseId(String wxEnterpriseId) {
return departmentService.totalStoreCountByEnterpriseId(wxEnterpriseId);
}
} }
...@@ -488,5 +488,14 @@ ...@@ -488,5 +488,14 @@
and status_flag = 1 and status_flag = 1
and temp_flag = 1 and temp_flag = 1
</select> </select>
<select id="totalStoreCountByEnterpriseId" resultType="java.lang.Integer" parameterType="java.lang.String" >
select
count(1)
from tab_haoban_department
where wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1
and recycle_flag != 1
and store_flag = 1
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -102,6 +102,7 @@ public class WxEnterpriseController extends WebBaseController{ ...@@ -102,6 +102,7 @@ public class WxEnterpriseController extends WebBaseController{
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseApiService.getOne(wxEnterpriseId); WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseApiService.getOne(wxEnterpriseId);
wxEnterpriseDTO.setSmallVersion("免费版"); wxEnterpriseDTO.setSmallVersion("免费版");
wxEnterpriseDTO.setStoreTotal(departmentApiService.totalStoreCountByEnterpriseId(wxEnterpriseId));
return resultResponse(HaoBanErrCode.ERR_1,wxEnterpriseDTO); return resultResponse(HaoBanErrCode.ERR_1,wxEnterpriseDTO);
} }
......
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