Commit 99037a74 by fudahua

主门单配置

parent 30f4ec9a
package com.gic.haoban.manage.service.service.out.impl; package com.gic.haoban.manage.service.service.out.impl;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -11,22 +12,29 @@ import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService; ...@@ -11,22 +12,29 @@ import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService;
import java.util.Date; import java.util.Date;
import static org.slf4j.LoggerFactory.getLogger;
@Service @Service
public class ClerkMainStoreRelatedApiServiceImpl implements ClerkMainStoreRelatedApiService { public class ClerkMainStoreRelatedApiServiceImpl implements ClerkMainStoreRelatedApiService {
private static final Logger logger = getLogger(ClerkMainStoreRelatedApiServiceImpl.class);
@Autowired
@Autowired
ClerkMainStoreRelatedService clerkMainStoreRelatedService; ClerkMainStoreRelatedService clerkMainStoreRelatedService;
@Override @Override
public void setMainStore(String staffId, String storeId, String wxEnterpriseId) { public void setMainStore(String staffId, String storeId, String wxEnterpriseId) {
TabHaobanClerkMainStoreRelated related = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId); TabHaobanClerkMainStoreRelated related = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId);
if (null != related && (!related.getStoreId().equals(storeId))) { if (related == null) {
related.setStatusFlag(0); clerkMainStoreRelatedService.setMainStore(staffId, storeId, wxEnterpriseId);
} else if (null != related && (!related.getStoreId().equals(storeId))) {
related.setStatusFlag(0);
related.setUpdateTime(new Date()); related.setUpdateTime(new Date());
clerkMainStoreRelatedService.update(related); clerkMainStoreRelatedService.update(related);
} clerkMainStoreRelatedService.setMainStore(staffId, storeId, wxEnterpriseId);
clerkMainStoreRelatedService.setMainStore(staffId, storeId, wxEnterpriseId); } else {
} logger.info("已经设置过主门店:{}", staffId);
}
}
@Override @Override
public ClerkMainStoreRelatedDTO getWxEnterpriseIdAndStaffId(String wxEnterpriseId, String staffId) { public ClerkMainStoreRelatedDTO getWxEnterpriseIdAndStaffId(String wxEnterpriseId, String staffId) {
......
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