Commit aaf1a350 by Water Wang

optimize

parent bab1eb58
......@@ -96,7 +96,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
responseVO.setLoginTimes(logTimes);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
}
}else{
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830001")));
}
......
package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclCustomerLog;
import com.yd.dal.mapper.customer.AclCustomerLogMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service("aclCustomerLogDALService")
public class AclCustomerLogDALService {
public interface AclCustomerLogDALService {
@Resource
private AclCustomerLogMapper aclCustomerLogMapper;
public List<AclCustomerLog> findLogInfoByCustomerId(Long customerId) {
List<AclCustomerLog> customerLogList = new ArrayList<>();
if(customerId != null){
customerLogList = aclCustomerLogMapper.findLogInfoByCustomerId(customerId);
}
return customerLogList;
}
/**
* 根据customerId查询指定用户的日志
* @param customerId
* @return
*/
List<AclCustomerLog> findLogInfoByCustomerId(Long customerId);
/**
* 保存用户日志
* @param customerId 用户id
* @param plateFlag 1-在线平台 2-经纪
*/
public void saveCustomerLog(Long customerId, int plateFlag) {
AclCustomerLog customerLog = new AclCustomerLog();
customerLog.setCustomerId(customerId);
customerLog.setFromPlateform(plateFlag);
customerLog.setLoginTime(new Date());
customerLog.setIsSuccess(1);
customerLog.setCreatedAt(new Date());
customerLog.setCreatedBy(-1L);
aclCustomerLogMapper.insert(customerLog);
}
void saveCustomerLog(Long customerId, int plateFlag);
}
package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclCustomerLog;
import com.yd.dal.mapper.customer.AclCustomerLogMapper;
import com.yd.dal.service.customer.AclCustomerLogDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service("aclCustomerLogDALService")
public class AclCustomerLogDALServiceImpl implements AclCustomerLogDALService {
@Resource
private AclCustomerLogMapper aclCustomerLogMapper;
/**
* 根据customerId查询指定用户的日志
* @param customerId
* @return
*/
public List<AclCustomerLog> findLogInfoByCustomerId(Long customerId) {
List<AclCustomerLog> customerLogList = new ArrayList<>();
if(customerId != null){
customerLogList = aclCustomerLogMapper.findLogInfoByCustomerId(customerId);
}
return customerLogList;
}
/**
* 保存用户日志
* @param customerId 用户id
* @param plateFlag 1-在线平台 2-经纪
*/
public void saveCustomerLog(Long customerId, int plateFlag) {
AclCustomerLog customerLog = new AclCustomerLog();
customerLog.setCustomerId(customerId);
customerLog.setFromPlateform(plateFlag);
customerLog.setLoginTime(new Date());
customerLog.setIsSuccess(1);
customerLog.setCreatedAt(new Date());
customerLog.setCreatedBy(-1L);
aclCustomerLogMapper.insert(customerLog);
}
}
package com.yd.dal.service.practitioner;
import com.yd.dal.entity.practitioner.PractitionerSubordinateInfo;
import com.yd.dal.mapper.practitioner.PractitionerSubordinateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("practitionerSubordinateDALService")
public class PractitionerSubordinateDALService {
@Autowired
private PractitionerSubordinateMapper practitionerSubordinateMapper;
/**
* 根据体系ID获取体系相关信息
* @param subordinateId 体系ID
* @return
*/
public PractitionerSubordinateInfo findSubordinateInfo(Long subordinateId) {
PractitionerSubordinateInfo subordinateInfo = null;
if(subordinateId != null){
subordinateInfo = practitionerSubordinateMapper.findSubordinateInfo(subordinateId);
}
return subordinateInfo;
}
public interface PractitionerSubordinateDALService {
PractitionerSubordinateInfo findSubordinateInfo(Long subordinateId);
}
package com.yd.dal.service.practitioner.impl;
import com.yd.dal.entity.practitioner.PractitionerSubordinateInfo;
import com.yd.dal.mapper.practitioner.PractitionerSubordinateMapper;
import com.yd.dal.service.practitioner.PractitionerSubordinateDALService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("practitionerSubordinateDALService")
public class PractitionerSubordinateDALServiceImpl implements PractitionerSubordinateDALService {
@Autowired
private PractitionerSubordinateMapper practitionerSubordinateMapper;
/**
* 根据体系ID获取体系相关信息
* @param subordinateId 体系ID
* @return
*/
public PractitionerSubordinateInfo findSubordinateInfo(Long subordinateId) {
PractitionerSubordinateInfo subordinateInfo = null;
if(subordinateId != null){
subordinateInfo = practitionerSubordinateMapper.findSubordinateInfo(subordinateId);
}
return subordinateInfo;
}
}
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