Commit f10779e2 by qwmqiuwenmin

fix

parent 5ad41911
...@@ -27,5 +27,7 @@ public interface StaffDepartmentRelatedService { ...@@ -27,5 +27,7 @@ public interface StaffDepartmentRelatedService {
List<TabHaobanStaffDepartmentRelated> listByDepartmentIdByKeyword(String departmentId, String keyword); List<TabHaobanStaffDepartmentRelated> listByDepartmentIdByKeyword(String departmentId, String keyword);
List<TabHaobanStaffDepartmentRelated> listByWxUserId(String wxUserId); List<TabHaobanStaffDepartmentRelated> listByWxUserId(String wxUserId);
StaffDepartmentRelatedDTO getById(String staffDepartmentStaffRelatedId);
} }
...@@ -84,6 +84,10 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated ...@@ -84,6 +84,10 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated
public List<TabHaobanStaffDepartmentRelated> listByDepartmentIdByKeyword(String departmentId, String keyword) { public List<TabHaobanStaffDepartmentRelated> listByDepartmentIdByKeyword(String departmentId, String keyword) {
return mapper.listByDepartmentIdByKeyword(departmentId,keyword); return mapper.listByDepartmentIdByKeyword(departmentId,keyword);
} }
@Override
public StaffDepartmentRelatedDTO getById(String staffDepartmentStaffRelatedId) {
return EntityUtil.changeEntityByJSON(StaffDepartmentRelatedDTO.class, mapper.getById(staffDepartmentStaffRelatedId));
}
} }
...@@ -211,7 +211,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -211,7 +211,7 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override @Override
public void del(String staffDepartmentStaffRelatedId) { public void del(String staffDepartmentStaffRelatedId) {
StaffDepartmentRelatedDTO related = staffDepartmentRelatedService.selectById(staffDepartmentStaffRelatedId); StaffDepartmentRelatedDTO related = staffDepartmentRelatedService.getById(staffDepartmentStaffRelatedId);
if(related != null) { if(related != null) {
List<TabHaobanStaffDepartmentRelated> relatedList = staffDepartmentRelatedService.listStaffDepartmentByStaffId(related.getStaffId()); List<TabHaobanStaffDepartmentRelated> relatedList = staffDepartmentRelatedService.listStaffDepartmentByStaffId(related.getStaffId());
if(relatedList == null || relatedList.isEmpty()){ if(relatedList == null || relatedList.isEmpty()){
......
import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService; //import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService; //import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService; //import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService;
import com.gic.redis.data.util.RedisUtil;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"}) @ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
public class ServiceTest { public class ServiceTest {
@Autowired // @Autowired
private WxEnterpriseRelatedApiService wxEnterpriseRelatedApiService; // private WxEnterpriseRelatedApiService wxEnterpriseRelatedApiService;
@Autowired // @Autowired
private QywxUserApiService qywxUserApiService; // private QywxUserApiService qywxUserApiService;
@Test @Test
public void test() { public void test() {
//wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId("073e89a37eb14acabf258e59a57359b6"); //wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId("073e89a37eb14acabf258e59a57359b6");
RedisUtil.delCache("haoban-sync-department-ca66a01b79474c40b3e7c7f93daf1a3b");
} }
@Test // @Test
public void test1() { // public void test1() {
String corpSelfExternalUseridInfo = qywxUserApiService.getCorpSelfExternalUseridInfo("ww50d418adce14b4a9" // String corpSelfExternalUseridInfo = qywxUserApiService.getCorpSelfExternalUseridInfo("ww50d418adce14b4a9"
, "1azg6LG5Vj_YKFO-X27to4S4x_y-f6APR0fwE9YnQd8", "wm-0J8CQAAbGIhtnLd51B97OO_0gf3zw"); // , "1azg6LG5Vj_YKFO-X27to4S4x_y-f6APR0fwE9YnQd8", "wm-0J8CQAAbGIhtnLd51B97OO_0gf3zw");
System.out.println(corpSelfExternalUseridInfo); // System.out.println(corpSelfExternalUseridInfo);
} // }
} }
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