Commit 724915ed by 徐高华

企微托管

parent e3c946b8
...@@ -5,7 +5,7 @@ import java.io.Serializable; ...@@ -5,7 +5,7 @@ import java.io.Serializable;
public class OpenStaffLicenseDTO implements Serializable { public class OpenStaffLicenseDTO implements Serializable {
private int total ; private int total ;
private int giceTotal ; private int gicTotal ;
private int useNum ; private int useNum ;
private int validNum ; private int validNum ;
...@@ -17,12 +17,12 @@ public class OpenStaffLicenseDTO implements Serializable { ...@@ -17,12 +17,12 @@ public class OpenStaffLicenseDTO implements Serializable {
this.total = total; this.total = total;
} }
public int getGiceTotal() { public int getGicTotal() {
return giceTotal; return gicTotal;
} }
public void setGiceTotal(int giceTotal) { public void setGicTotal(int gicTotal) {
this.giceTotal = giceTotal; this.gicTotal = gicTotal;
} }
public int getUseNum() { public int getUseNum() {
......
...@@ -53,4 +53,6 @@ public interface OpenStaffMapper { ...@@ -53,4 +53,6 @@ public interface OpenStaffMapper {
List<String> listOpenStoreId(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId")String enterpriseId); List<String> listOpenStoreId(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId")String enterpriseId);
void updateStopTime(@Param("id") Long openStaffId, @Param("type") int type, @Param("time") int time); void updateStopTime(@Param("id") Long openStaffId, @Param("type") int type, @Param("time") int time);
int getNum(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId")String enterpriseId , @Param("status")int status) ;
} }
\ No newline at end of file
...@@ -229,6 +229,10 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService { ...@@ -229,6 +229,10 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override @Override
public ServiceResponse<OpenStaffLicenseDTO> getLicenseInfo(String wxEnterpriseId, String enterpriseId) { public ServiceResponse<OpenStaffLicenseDTO> getLicenseInfo(String wxEnterpriseId, String enterpriseId) {
OpenStaffLicenseDTO dto = new OpenStaffLicenseDTO(); OpenStaffLicenseDTO dto = new OpenStaffLicenseDTO();
int useNum = this.openStaffMapper.getNum(wxEnterpriseId,enterpriseId,0) ;
int validNum = this.openStaffMapper.getNum(wxEnterpriseId,enterpriseId,1) ;
dto.setUseNum(useNum);
dto.setValidNum(validNum);
return ServiceResponse.success(dto); return ServiceResponse.success(dto);
} }
......
...@@ -216,6 +216,7 @@ ...@@ -216,6 +216,7 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="listOpenStaffByStore" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"> <select id="listOpenStaffByStore" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO">
select a.staff_id staffId , b.clerk_id clerkId , b.store_id storeId from tab_haoban_open_staff a left join tab_haoban_staff_clerk_relation b select a.staff_id staffId , b.clerk_id clerkId , b.store_id storeId from tab_haoban_open_staff a left join tab_haoban_staff_clerk_relation b
on a.staff_id = b.staff_id and b.status_flag = 1 on a.staff_id = b.staff_id and b.status_flag = 1
...@@ -225,6 +226,7 @@ ...@@ -225,6 +226,7 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="listAll" resultType="java.lang.String"> <select id="listAll" resultType="java.lang.String">
select staff_id from tab_haoban_open_staff where status_flag = 1 select staff_id from tab_haoban_open_staff where status_flag = 1
</select> </select>
...@@ -235,4 +237,12 @@ ...@@ -235,4 +237,12 @@
and b.status_flag = 1 and b.status_flag = 1
</select> </select>
<select id="getNum" resultType="java.lang.Integer">
select count(*) from tab_haoban_staff_clerk_relation where wx_enterprise_id = #{wxEnterpriseId} and enterprise_id=#{enterpriseId}
<if test="status==1">
and status_flag = 1
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -254,6 +254,8 @@ public class QywxOpenController { ...@@ -254,6 +254,8 @@ public class QywxOpenController {
if (!resp.isSuccess()) { if (!resp.isSuccess()) {
return RestResponse.failure("9999", resp.getMessage()); return RestResponse.failure("9999", resp.getMessage());
} }
OpenQwAccountInfoVO vo = this.getCheckInfo(wxEnterpriseId,enterpriseId) ;
resp.getResult().setGicTotal(vo.getGicTotal());
return RestResponse.successResult(resp.getResult()); return RestResponse.successResult(resp.getResult());
} }
...@@ -309,7 +311,7 @@ public class QywxOpenController { ...@@ -309,7 +311,7 @@ public class QywxOpenController {
} }
String json = dto.getModuleSetting(); String json = dto.getModuleSetting();
WechatWorkServiceSetting bo = JSONObject.parseObject(json, WechatWorkServiceSetting.class); WechatWorkServiceSetting bo = JSONObject.parseObject(json, WechatWorkServiceSetting.class);
vo.setGiceTotal(bo.getAccountNumber()); vo.setGicTotal(bo.getAccountNumber());
} }
} }
log.info("OpenQwAccountInfoVO={}", JSONObject.toJSONString(vo)); log.info("OpenQwAccountInfoVO={}", JSONObject.toJSONString(vo));
......
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