| | |
| | | |
| | | import com.taoke.autopay.dao.ClientInfoMapper; |
| | | import com.taoke.autopay.entity.ClientInfo; |
| | | import com.taoke.autopay.entity.SystemConfigKeyEnum; |
| | | import com.taoke.autopay.exception.LoginException; |
| | | import com.taoke.autopay.service.ClientInfoService; |
| | | import com.taoke.autopay.service.SystemConfigService; |
| | | import com.taoke.autopay.utils.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | public class ClientInfoServiceImpl implements ClientInfoService { |
| | | @Resource |
| | | private ClientInfoMapper clientInfoMapper; |
| | | |
| | | @Resource |
| | | private SystemConfigService systemConfigService; |
| | | |
| | | @Override |
| | | public ClientInfo login(String account, String pwd) throws LoginException { |
| | |
| | | update.setPwd(pwd); |
| | | clientInfoMapper.updateByPrimaryKeySelective(update); |
| | | } |
| | | |
| | | @Override |
| | | public List<Long> getRePayClientIds() { |
| | | List<Long> idList = new ArrayList<>(); |
| | | |
| | | String clientIds = systemConfigService.getValueCache(SystemConfigKeyEnum.RE_EXCUTE_PAY_CLIENTS); |
| | | if (StringUtil.isNullOrEmpty(clientIds)) { |
| | | return idList; |
| | | } |
| | | String[] ids = clientIds.trim().split(","); |
| | | for (String id : ids) { |
| | | idList.add(Long.parseLong(id)); |
| | | } |
| | | return idList; |
| | | } |
| | | } |