Commit 08dd04f4 by 墨竹

feat:提供根据分组查询数量接口

parent fe1dfa4a
package com.gic.haoban.manage.api.service.hm;
/**
* @author mozhu
* @date 2022/7/5 09:33
*/
public interface HmClerkRelationApiService {
}
...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.dao.mapper.hm; ...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.dao.mapper.hm;
import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO; import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO;
import com.gic.haoban.manage.service.entity.hm.TabHaobanHmQrcode; import com.gic.haoban.manage.service.entity.hm.TabHaobanHmQrcode;
import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO; import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO;
import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -155,5 +156,25 @@ public interface TabHaobanHmQrcodeMapper { ...@@ -155,5 +156,25 @@ public interface TabHaobanHmQrcodeMapper {
* @date 2022-07-08 15:10:57 * @date 2022-07-08 15:10:57
*/ */
List<TabHaobanHmQrcode> getHmStoreByEnterpriseId(@Param("enterpriseId") String enterpriseId); List<TabHaobanHmQrcode> getHmStoreByEnterpriseId(@Param("enterpriseId") String enterpriseId);
/**
* 根据分组id获取活码数量
*
* @param enterpriseId 企业标识
* @return int
* @author mozhu
* @date 2022-07-12 15:18:34
*/
List<HmQrcodeGroupNumBO> getGroupIdNumByEnterpriseId(@Param("enterpriseId") String enterpriseId);
/**
* 获取总数
*
* @param enterpriseId 企业标识
* @return int
* @author mozhu
* @date 2022-07-12 15:10:09
*/
int getTotalByEnterpriseId(@Param("enterpriseId") String enterpriseId);
} }
...@@ -89,6 +89,8 @@ public class HmQrcodeBO implements Serializable { ...@@ -89,6 +89,8 @@ public class HmQrcodeBO implements Serializable {
* 活码分组 * 活码分组
*/ */
private Long hmGroupId; private Long hmGroupId;
private String staffId;
private String staffName;
public Long getHmId() { public Long getHmId() {
...@@ -323,5 +325,20 @@ public class HmQrcodeBO implements Serializable { ...@@ -323,5 +325,20 @@ public class HmQrcodeBO implements Serializable {
this.hmGroupId = hmGroupId; this.hmGroupId = hmGroupId;
} }
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
} }
package com.gic.haoban.manage.service.pojo.bo.hm;
import java.io.Serializable;
public class HmQrcodeGroupNumBO implements Serializable {
private static final long serialVersionUID = -7006820026168431701L;
private Integer num;
private Integer hmGroupId;
private String hmGroupName;
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public Integer getHmGroupId() {
return hmGroupId;
}
public void setHmGroupId(Integer hmGroupId) {
this.hmGroupId = hmGroupId;
}
public String getHmGroupName() {
return hmGroupName;
}
public void setHmGroupName(String hmGroupName) {
this.hmGroupName = hmGroupName;
}
}
...@@ -4,6 +4,7 @@ import com.gic.api.base.commons.Page; ...@@ -4,6 +4,7 @@ import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO; import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO;
import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO; import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO;
import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO; import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO;
import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO;
import java.util.List; import java.util.List;
...@@ -143,4 +144,25 @@ public interface HmQrcodeService { ...@@ -143,4 +144,25 @@ public interface HmQrcodeService {
* @date 2022-07-08 15:09:50 * @date 2022-07-08 15:09:50
*/ */
List<HmQrcodeBO> getHmStoreByEnterpriseId(String enterpriseId); List<HmQrcodeBO> getHmStoreByEnterpriseId(String enterpriseId);
/**
* 根据分组id获取活码数量
*
* @param enterpriseId 企业标识
* @return {@link List }<{@link HmQrcodeGroupNumBO }>
* @author mozhu
* @date 2022-07-12 15:20:48
*/
List<HmQrcodeGroupNumBO> getGroupIdNumByEnterpriseId(String enterpriseId);
/**
* 获取总数
*
* @param enterpriseId 企业标识
* @return int
* @author mozhu
* @date 2022-07-12 15:08:35
*/
int getTotalByEnterpriseId(String enterpriseId);
} }
...@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO; ...@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO;
import com.gic.haoban.manage.service.dao.mapper.hm.TabHaobanHmQrcodeMapper; import com.gic.haoban.manage.service.dao.mapper.hm.TabHaobanHmQrcodeMapper;
import com.gic.haoban.manage.service.entity.hm.TabHaobanHmQrcode; import com.gic.haoban.manage.service.entity.hm.TabHaobanHmQrcode;
import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO; import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO;
import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO;
import com.gic.haoban.manage.service.service.hm.HmQrcodeService; import com.gic.haoban.manage.service.service.hm.HmQrcodeService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
...@@ -104,4 +105,14 @@ public class HmQrcodeServiceImpl implements HmQrcodeService { ...@@ -104,4 +105,14 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
public List<HmQrcodeBO> getHmStoreByEnterpriseId(String enterpriseId) { public List<HmQrcodeBO> getHmStoreByEnterpriseId(String enterpriseId) {
return EntityUtil.changeEntityListNew(HmQrcodeBO.class,tabHaobanHmQrcodeMapper.getHmStoreByEnterpriseId(enterpriseId)); return EntityUtil.changeEntityListNew(HmQrcodeBO.class,tabHaobanHmQrcodeMapper.getHmStoreByEnterpriseId(enterpriseId));
} }
@Override
public List<HmQrcodeGroupNumBO> getGroupIdNumByEnterpriseId(String enterpriseId) {
return tabHaobanHmQrcodeMapper.getGroupIdNumByEnterpriseId(enterpriseId);
}
@Override
public int getTotalByEnterpriseId(String enterpriseId) {
return tabHaobanHmQrcodeMapper.getTotalByEnterpriseId(enterpriseId);
}
} }
package com.gic.haoban.manage.service.service.out.impl.hm;
import com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService;
import org.springframework.stereotype.Service;
/**
* @author mozhu
* @date 2022/7/5 09:34
*/
@Service
public class HmClerkRelationApiServiceImpl implements HmClerkRelationApiService {
}
...@@ -119,9 +119,6 @@ ...@@ -119,9 +119,6 @@
<dubbo:service interface="com.gic.haoban.manage.api.service.hm.HmQrcodeApiService" <dubbo:service interface="com.gic.haoban.manage.api.service.hm.HmQrcodeApiService"
ref="hmQrcodeApiServiceImpl" timeout="10000" /> ref="hmQrcodeApiServiceImpl" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService"
ref="hmClerkRelationApiServiceImpl" timeout="10000" />
<dubbo:reference interface="com.gic.enterprise.api.service.DepartmentService" id="gicDepartmentService"/> <dubbo:reference interface="com.gic.enterprise.api.service.DepartmentService" id="gicDepartmentService"/>
<dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxDepartmentApiService" <dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxDepartmentApiService"
id="qywxDepartmentApiService"/> id="qywxDepartmentApiService"/>
......
...@@ -322,5 +322,21 @@ ...@@ -322,5 +322,21 @@
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
GROUP BY store_id GROUP BY store_id
</select> </select>
<select id="getGroupIdNumByEnterpriseId" resultType="com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO">
select hm_group_id,
COUNT(hm_id)
from tab_haoban_hm_qrcode
where status_flag != 0
and enterprise_id = #{enterpriseId}
GROUP BY hm_group_id
</select>
<select id="getTotalByEnterpriseId" resultType="int">
select COUNT(*)
from tab_haoban_hm_qrcode
where status_flag != 0
and enterprise_id = #{enterpriseId}
</select>
</mapper> </mapper>
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