Commit 7fbffd95 by levphon

工单标准接口-数据迁移

1 parent e55a21d6
......@@ -11,6 +11,8 @@ import java.util.List;
@Mapper
public interface ZhongliAccountMapper extends CommonBaseMapper<ZhongliAccount> {
int updateZhongliAccountUserId();
List<ZhongliAccountModel> selectByLevel(@Param("level") String level);
}
\ No newline at end of file
......@@ -37,6 +37,9 @@ public class ZhongliVehicleService {
private VehiclePermitMapper vehiclePermitMapper;
public void linkVehicle2Account() {
//更新用户id
zhongliAccountMapper.updateZhongliAccountUserId();
List<ZhongliAccountModel> accountModelList = zhongliAccountMapper.selectByLevel(null);
Map<String, ZhongliAccountModel> accountMap = accountModelList.stream().collect(Collectors.toMap(ZhongliAccountModel::getAccount, v -> v));
......
......@@ -29,6 +29,12 @@
`type`, del_flag, created_date, created_by, updated_date, updated_by
</sql>
<update id="updateZhongliAccountUserId">
update t_zhongli_account tza,t_user tu
set tza.created_by = tu.id
where tza.account = tu.account and tu.del_flag = 0
</update>
<select id="selectByLevel" resultType="cn.com.glsx.stdinterface.modules.model.ZhongliAccountModel">
select `level`, created_by userId, account, username, department, role_name roleName
from t_zhongli_account
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!