Commit 707efc83 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed db sql error

parent a7e0ea48
...@@ -111,7 +111,7 @@ public interface TaxRuleSettingMapper extends MyMapper { ...@@ -111,7 +111,7 @@ public interface TaxRuleSettingMapper extends MyMapper {
*/ */
int updateByPrimaryKey(TaxRuleSetting record); int updateByPrimaryKey(TaxRuleSetting record);
@Select("SELECT TRS.GROUP_NAME,TRS.ID,TRS.IS_DEFAULT,TRS.NAME,TRS.TAX_BASE,TRS.TAX_RATE*100 AS TAX_RATE,TRSO.ORGANZATION_ID" @Select("SELECT TRS.GROUP_NAME,TRS.ID,TRS.IS_DEFAULT,TRS.NAME,TRS.TAX_BASE,TRS.TAX_RATE*100 AS TAX_RATE,TRSO.ORGANIZATION_ID"
+ " FROM TAX_RULE_SETTING TRS " + " FROM TAX_RULE_SETTING TRS "
+ "LEFT JOIN TAX_RULE_SETTING_ORGANIZATION TRSO ON TRS.ID=TRSO.TAX_SETTING_ID") + "LEFT JOIN TAX_RULE_SETTING_ORGANIZATION TRSO ON TRS.ID=TRSO.TAX_SETTING_ID")
List<TaxRuleSettingDto> GetTaxRuleSetting(); List<TaxRuleSettingDto> GetTaxRuleSetting();
......
...@@ -144,23 +144,23 @@ public interface UserMapper extends MyMapper { ...@@ -144,23 +144,23 @@ public interface UserMapper extends MyMapper {
@Select("select u.USER_NAME as UserName, o.id as Organization_ID, o.Name as OrganizationName, " @Select("select u.USER_NAME as UserName, o.id as Organization_ID, o.Name as OrganizationName, "
+ "u.EMAIL as Email, u.STATUS as Status, u.ATTEMPT_TIMES as AttemptTimes, u.CREATE_TIME as CreateTime, " + "u.EMAIL as Email, u.STATUS as Status, u.ATTEMPT_TIMES as AttemptTimes, u.CREATE_TIME as CreateTime, "
+ "u.EXPIRATION_DATE as ExpirationDate, u.IS_ADMIN as IsAdmin, u.ID as id, u.LOCKED_TIME as LockedTime, " + "u.EXPIRATION_DATE as ExpirationDate, u.IS_ADMIN as IsAdmin, u.ID as id, u.LOCKED_TIME as LockedTime, "
+ "u.LOGIN_TYPE as LoginType, u.PASSWORD as Password, u.PASSWORD_UPDATETIME as Password_UpdateTime, u.UPDATE_TIME as UpdateTime from USER as u " + "u.LOGIN_TYPE as LoginType, u.PASSWORD as Password, u.PASSWORD_UPDATE_TIME as Password_UpdateTime, u.UPDATE_TIME as UpdateTime from \"USER\" "
+ "left join ORGANIZATION as o on u.ORGANIZATIONID = o.id " + "left join ORGANIZATION o on u.ORGANIZATIONID = o.id "
+ "where u.ID = #{userId}") + "where u.ID = #{userId}")
List<UserDto> selectUserWithOrgInfoById(@Param(value = "userId") String userId); List<UserDto> selectUserWithOrgInfoById(@Param(value = "userId") String userId);
@Select("select R.ID AS id, R.NAME AS name FROM USER_ROLE AS U " @Select("select R.ID AS id, R.NAME AS name FROM USER_ROLE U "
+ "JOIN ROLE AS R ON U.ROLE_ID = R.ID " + "JOIN ROLE R ON U.ROLE_ID = R.ID "
+ "WHERE U.USER_ID = #{userId}") + "WHERE U.USER_ID = #{userId}")
List<RoleInfo> selectUserRoleInfoById(@Param(value = "userId") String userId); List<RoleInfo> selectUserRoleInfoById(@Param(value = "userId") String userId);
@Select("select udv.ROLE_ID as roleID, r.NAME as roleName, udv.USER_DIMENSION_VALUE_ID as id " @Select("select udv.ROLE_ID as roleID, r.NAME as roleName, udv.USER_DIMENSION_VALUE_ID as id "
+ "FROM USER_DIMENSION_VALUE_ROLE AS UDV " + "FROM USER_DIMENSION_VALUE_ROLE UDV "
+ "JOIN ROLE AS R ON UDV.ROLE_ID = R.ID") + "JOIN ROLE R ON UDV.ROLE_ID = R.ID")
List<UserOrgRoleDto> selectUserDimensionValueRole(); List<UserOrgRoleDto> selectUserDimensionValueRole();
@Select("select q.ROLE_ID as roleID, r.NAME as roleName, q.USER_ORGANIZATION_ID as id " @Select("select q.ROLE_ID as roleID, r.NAME as roleName, q.USER_ORGANIZATION_ID as id "
+ "from USER_ORGANIZATION_ROLE as q " + "from USER_ORGANIZATION_ROLE q "
+ "join ROLE as r on q.ROLEID = r.id") + "join ROLE r on q.ROLE_ID = r.id")
List<UserOrgRoleDto> selectUserOrganizationRole(); List<UserOrgRoleDto> selectUserOrganizationRole();
} }
\ No newline at end of file
...@@ -111,7 +111,7 @@ public interface UserOrganizationRoleMapper extends MyMapper { ...@@ -111,7 +111,7 @@ public interface UserOrganizationRoleMapper extends MyMapper {
List<UserOrgRoleDto> getUserOrganizationRoleList(); List<UserOrgRoleDto> getUserOrganizationRoleList();
@Select("SELECT USER_ORGANIZATION.USERID FROM USER_ORGANIZATION_ROLE " @Select("SELECT USER_ORGANIZATION.USER_ID FROM USER_ORGANIZATION_ROLE "
+ "JOIN USER_ORGANIZATION ON USER_ORGANIZATION_ROLE.USER_ORGANIZATION_ID = USER_ORGANIZATION.ID " + "JOIN USER_ORGANIZATION ON USER_ORGANIZATION_ROLE.USER_ORGANIZATION_ID = USER_ORGANIZATION.ID "
+ "WHERE USER_ORGANIZATION_ROLE.ROLEID=#{roleId}") + "WHERE USER_ORGANIZATION_ROLE.ROLEID=#{roleId}")
List<String> getUserIdByUserOrganizationRole(@Param("roleId") String roleId); List<String> getUserIdByUserOrganizationRole(@Param("roleId") String roleId);
......
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