Commit ea632aa1 authored by huangcb's avatar huangcb

货主注册、司机注册时,帐号状态默认为正常

parent 112e7a59
......@@ -294,7 +294,7 @@ public class DriverAccountServiceImpl extends ServiceImpl<DriverAccountDao, Driv
driverAccountEntity.setAccount(form.getAccount());
driverAccountEntity.setCarrierId(form.getCarrierId());
driverAccountEntity.setSalt(passwordComponent.generateAccountPwdSalt());
driverAccountEntity.setAccountStatus(DriverConstants.ACCOUNT_STATUS_BLOCK);
driverAccountEntity.setAccountStatus(DriverConstants.ACCOUNT_STATUS_UNBLOCK);
driverAccountEntity.setSourceType(DriverConstants.ACCOUNT_SOURCE_TYPE_REGISTER);
driverAccountEntity.setAuditStatus(DriverConstants.ACCOUNT_AUDIT_STATUS_UNAUDITED);
this.baseMapper.insert(driverAccountEntity);
......
......@@ -110,6 +110,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountDao, AccountEntity> i
String salt = passwordComponent.generateAccountPwdSalt();
accountEntity.setSalt(salt);
accountEntity.setPassword(passwordComponent.generatePwd4Salt(form.getPassword(), salt));
accountEntity.setAccountStatus(GoodsOwnerConstants.OWNER_ACCOUNT_STATUS_UNBLOCK);
accountEntity.setSourceType(GoodsOwnerConstants.OWNER_SOURCE_TYPE_PLATFORM);
accountEntity.setAuditStatus(GoodsOwnerConstants.OWNER_AUDIT_STATUS_SUCCESS);
this.baseMapper.insert(accountEntity);
......@@ -307,6 +308,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountDao, AccountEntity> i
// 3.新增帐号
accountEntity.setAccount(account);
accountEntity.setSalt(passwordComponent.generateAccountPwdSalt());
accountEntity.setAccountStatus(GoodsOwnerConstants.OWNER_ACCOUNT_STATUS_UNBLOCK);
accountEntity.setSourceType(GoodsOwnerConstants.OWNER_SOURCE_TYPE_REGISTER);
accountEntity.setAuditStatus(GoodsOwnerConstants.OWNER_AUDIT_STATUS_UNAUDITED);
this.baseMapper.insert(accountEntity);
......
......@@ -50,6 +50,7 @@ public class BaseTestController {
httpHeaders.add("esv_department_children", "1,2,3");
httpHeaders.add("esv_user", "1");
httpHeaders.add("esv_account", "admin");
httpHeaders.add("Source-Type", "1");
httpHeaders.add(CommonConstants.REQ_SOURCE_TYPE_KEY, CommonConstants.REQ_SOURCE_TYPE_WEB);
return httpHeaders;
}
......
package com.esv.freight.customer.common.component;
import com.esv.freight.customer.BaseTestController;
import lombok.extern.slf4j.Slf4j;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* @description:
* @project: freight-customer-service
* @name: com.esv.freight.customer.common.component.RedisComponentTest
* @author: 黄朝斌
* @email: huangchaobin@esvtek.com
* @createTime: 2020/05/16 13:35
* @version:1.0
*/
@RunWith(SpringRunner.class)
@SpringBootTest
@Slf4j
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class RedisComponentTest extends BaseTestController {
@Autowired
RedisComponent redisComponent;
@Test
public void test() {
String cacheKey = "freight-app-service::token::1::13606060606";
log.info(redisComponent.get(cacheKey).toString());
redisComponent.del(cacheKey);
log.info((String) redisComponent.get(cacheKey));
}
}
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