Commit 03955ad1 by 徐高华

激活统计

parent 9065bb9c
......@@ -17,8 +17,6 @@ public interface WxEnterpriseActiveDataApiService {
*/
ServiceResponse<Integer> saveOrUpdate(String wxEnterpriseId);
ServiceResponse<StaffActiveDataDTO> getWxEnterpriseActiveDataById(String id);
ServiceResponse<StaffActiveDataDTO> getWxEnterpriseActiveDataByWxEnterpriseId(String wxEnterpriseId);
......
......@@ -14,8 +14,6 @@ public interface TabHaobanWxEnterpriseActiveDataMapper {
int insert(TabHaobanWxEnterpriseActiveData tabHaobanWxEnterpriseActiveData);
TabHaobanWxEnterpriseActiveData getWxEnterpriseActiveDataById(@Param("id")String id);
TabHaobanWxEnterpriseActiveData getWxEnterpriseActiveDataByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId);
int updateActiveDataByWxEnterpriseId(TabHaobanWxEnterpriseActiveData activeData);
......
......@@ -16,9 +16,5 @@ public interface WxEnterpriseActiveDataService {
*/
Integer saveOrUpdate(String wxEnterpriseId);
StaffActiveDataDTO getWxEnterpriseActiveDataById(String id);
StaffActiveDataDTO getWxEnterpriseActiveDataByWxEnterpriseId(String wxEnterpriseId);
}
......@@ -101,16 +101,7 @@ public class WxEnterpriseActiveDataServiceImpl implements WxEnterpriseActiveData
}
@Override
public StaffActiveDataDTO getWxEnterpriseActiveDataById(String id) {
if (StrUtil.isBlank(id))
return null;
return EntityUtil.changeEntityByJSON(StaffActiveDataDTO.class, tabHaobanWxEnterpriseActiveDataMapper.getWxEnterpriseActiveDataById(id));
}
@Override
public StaffActiveDataDTO getWxEnterpriseActiveDataByWxEnterpriseId(String wxEnterpriseId) {
if (StrUtil.isBlank(wxEnterpriseId))
return null;
return EntityUtil.changeEntityByJSON(StaffActiveDataDTO.class, tabHaobanWxEnterpriseActiveDataMapper.getWxEnterpriseActiveDataById(wxEnterpriseId));
return EntityUtil.changeEntityByJSON(StaffActiveDataDTO.class, tabHaobanWxEnterpriseActiveDataMapper.getWxEnterpriseActiveDataByWxEnterpriseId(wxEnterpriseId));
}
}
package com.gic.haoban.manage.service.service.out.impl;
import cn.hutool.core.util.ObjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.StaffActiveDataDTO;
import com.gic.haoban.manage.api.service.WxEnterpriseActiveDataApiService;
import com.gic.haoban.manage.service.service.WxEnterpriseActiveDataService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.util.ObjectUtil;
/**
* @description:
......@@ -17,7 +17,6 @@ import org.springframework.stereotype.Service;
*/
@Service
public class WxEnterpriseActiveDataApiServiceImpl implements WxEnterpriseActiveDataApiService {
private static final Logger log = LogManager.getLogger(WxEnterpriseApiServiceImpl.class);
@Autowired
private WxEnterpriseActiveDataService wxEnterpriseActiveDataService;
......@@ -27,20 +26,13 @@ public class WxEnterpriseActiveDataApiServiceImpl implements WxEnterpriseActiveD
}
@Override
public ServiceResponse<StaffActiveDataDTO> getWxEnterpriseActiveDataById(String id) {
StaffActiveDataDTO staffActiveDataDTO= wxEnterpriseActiveDataService.getWxEnterpriseActiveDataById(id);
if (ObjectUtil.isNotNull(staffActiveDataDTO))
return ServiceResponse.success(staffActiveDataDTO);
else
return ServiceResponse.failure("9999","id不存在");
}
@Override
public ServiceResponse<StaffActiveDataDTO> getWxEnterpriseActiveDataByWxEnterpriseId(String wxEnterpriseId) {
StaffActiveDataDTO staffActiveDataDTO= wxEnterpriseActiveDataService.getWxEnterpriseActiveDataByWxEnterpriseId(wxEnterpriseId);
if (ObjectUtil.isNotNull(staffActiveDataDTO))
if (ObjectUtil.isNotNull(staffActiveDataDTO)) {
return ServiceResponse.success(staffActiveDataDTO);
else
return ServiceResponse.failure("9999","wxEnterpriseId不存在");
} else {
StaffActiveDataDTO dto = new StaffActiveDataDTO() ;
return ServiceResponse.success(dto) ;
}
}
}
......@@ -21,10 +21,6 @@
#{transfer,jdbcType=INTEGER},#{activated,jdbcType=INTEGER},#{expired,jdbcType=INTEGER},now(),0)
</insert>
<select id="getWxEnterpriseActiveDataById" resultMap="BaseResultMap">
select * from tab_haoban_wx_enterprise_active_data where id=#{id} and delete_flag=0
</select>
<select id="getWxEnterpriseActiveDataByWxEnterpriseId" resultMap="BaseResultMap">
select * from tab_haoban_wx_enterprise_active_data where wx_enterprise_id=#{wxEnterpriseId} and delete_flag=0
</select>
......@@ -55,8 +51,4 @@
where wx_enterprise_id=#{wxEnterpriseId}
</update>
</mapper>
\ No newline at end of file
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