Commit c4b1d76d authored by gary's avatar gary

1、机构信息同步定时任务

parent 34b99b79
package pwc.taxtech.atms.common.schedule;
import com.alibaba.fastjson.JSONObject;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.quartz.QuartzJobBean;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.RegionMapper;
import pwc.taxtech.atms.dto.organization.DDSyncOrgInfo;
import pwc.taxtech.atms.dto.organization.OrgSyncData;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.entity.Region;
import pwc.taxtech.atms.entity.RegionExample;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class OrgSyncJob extends QuartzJobBean {
private static final Logger logger = LoggerFactory.getLogger(OrgSyncJob.class);
@Resource
private OrganizationMapper organizationMapper;
@Resource
private RegionMapper regionMapper;
@Autowired
private OrganizationMapper orgMapper;
@Value("${org_sync_url}")
private String orgSyncUrl;
@Value("${org_sync_token}")
private String token;
@Override
protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
JobDataMap dataMap = jobExecutionContext.getJobDetail().getJobDataMap();
Map<String, String> headers = new HashMap<>();
headers.put("token", token);
headers.put("Content-Type", "application/x-www-form-urlencoded");
try {
// todo 这里要加分页查询的参数
String response = HttpUtil.get(orgSyncUrl, headers);
DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(response, DDSyncOrgInfo.class);
List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
orgSyncDatas.forEach(osd -> {
OrganizationExample example = new OrganizationExample();
example.createCriteria().andNameEqualTo(osd.getNameCN());
Organization o = new Organization();
o.setClientCode(osd.getCode());
o.setCode(osd.getCode());
o.setEnterpriseAccountCode(String.valueOf(osd.getSobId()));
o.setEnterpriseAccountName(osd.getSobName());
o.setCurrencyCode(osd.getCurrencyCode());
o.setLegalEntity(osd.getLegalEntity());
o.setLegalPersonName(osd.getLegalRepresentative());
o.setAddress(osd.getAddress());
o.setCreateTime(osd.getGmtCreate());
o.setUpdateTime(osd.getGmtModified());
o.setPsCode(osd.getPsCode());
RegionExample regionExample = new RegionExample();
regionExample.createCriteria().andShortNameEqualTo(osd.getCompanyLocation());
List<Region> regions = regionMapper.selectByExample(regionExample);
if (regions.size() > 0) {
o.setRegionId(regions.get(0).getId());
}
organizationMapper.updateByExampleSelective(o, example);
});
} catch (Exception e) {
logger.error(String.format("机构信息同步异常:[%s]", e.getMessage()), e);
}
}
}
......@@ -76,12 +76,12 @@ public class HttpUtil {
return postForm(url, params, null, connTimeout, readTimeout);
}
public static String get(String url) throws Exception {
return get(url, charset, null, null);
public static String get(String url, Map<String, String> headers) throws Exception {
return get(url, headers, charset, null, null);
}
public static String get(String url, String charset) throws Exception {
return get(url, charset, connTimeout, readTimeout);
public static String get(String url, Map<String, String> headers, String charset) throws Exception {
return get(url, headers, charset, connTimeout, readTimeout);
}
/**
......@@ -216,7 +216,7 @@ public class HttpUtil {
* @throws SocketTimeoutException 响应超时
* @throws Exception
*/
public static String get(String url, String charset, Integer connTimeout,Integer readTimeout)
public static String get(String url,Map<String,String> headers, String charset, Integer connTimeout,Integer readTimeout)
throws ConnectTimeoutException,SocketTimeoutException, Exception {
HttpClient client = null;
......@@ -231,6 +231,9 @@ public class HttpUtil {
if (readTimeout != null) {
customReqConf.setSocketTimeout(readTimeout);
}
headers.forEach((k,v)->{
get.setHeader(k,v);
});
get.setConfig(customReqConf.build());
HttpResponse res = null;
......
package pwc.taxtech.atms.dto.organization;
import java.util.List;
/**
* @Auther: Gary J Li
* @Date: 12/03/2019 11:23
* @Description:
*/
public class DDSyncOrgInfo {
private List<OrgSyncData> data;
private int currentPage;
private int pageSize;
private int totalPage;
private int totalCount;
public void setData(List<OrgSyncData> data) {
this.data = data;
}
public List<OrgSyncData> getData() {
return data;
}
public void setCurrentPage(int currentPage) {
this.currentPage = currentPage;
}
public int getCurrentPage() {
return currentPage;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getPageSize() {
return pageSize;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getTotalCount() {
return totalCount;
}
}
package pwc.taxtech.atms.dto.organization;
import java.util.Date;
/**
* @Auther: Gary J Li
* @Date: 12/03/2019 11:26
* @Description:
*/
public class OrgSyncData {
private String id;
private String code;
private String commonValueId;
private String nameCN;
private int orgId;
private String orgName;
private int sobId;
private String sobName;
private String currencyCode;
private String legalEntity;
private String legalRepresentative;
private String address;
private String registrationFromDate;
private Date gmtCreate;
private Date gmtModified;
private String psCode;
private String companyLocation;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setCode(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public void setCommonValueId(String commonValueId) {
this.commonValueId = commonValueId;
}
public String getCommonValueId() {
return commonValueId;
}
public void setNameCN(String nameCN) {
this.nameCN = nameCN;
}
public String getNameCN() {
return nameCN;
}
public void setOrgId(int orgId) {
this.orgId = orgId;
}
public int getOrgId() {
return orgId;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public String getOrgName() {
return orgName;
}
public void setSobId(int sobId) {
this.sobId = sobId;
}
public int getSobId() {
return sobId;
}
public void setSobName(String sobName) {
this.sobName = sobName;
}
public String getSobName() {
return sobName;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setLegalEntity(String legalEntity) {
this.legalEntity = legalEntity;
}
public String getLegalEntity() {
return legalEntity;
}
public void setLegalRepresentative(String legalRepresentative) {
this.legalRepresentative = legalRepresentative;
}
public String getLegalRepresentative() {
return legalRepresentative;
}
public void setAddress(String address) {
this.address = address;
}
public String getAddress() {
return address;
}
public void setRegistrationFromDate(String registrationFromDate) {
this.registrationFromDate = registrationFromDate;
}
public String getRegistrationFromDate() {
return registrationFromDate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public Date getGmtModified() {
return gmtModified;
}
public void setPsCode(String psCode) {
this.psCode = psCode;
}
public String getPsCode() {
return psCode;
}
public void setCompanyLocation(String companyLocation) {
this.companyLocation = companyLocation;
}
public String getCompanyLocation() {
return companyLocation;
}
}
......@@ -35,11 +35,13 @@
<property name="triggers">
<list>
<ref bean="lgApiJobTrigger"/>
<ref bean="orgSyncJobTrigger"/>
</list>
</property>
<property name="jobDetails">
<list>
<ref bean="lgGlBalanceJob"/>
<ref bean="orgSyncJob"/>
</list>
</property>
<property name="taskExecutor" ref="executor"/>
......@@ -59,5 +61,18 @@
<property name="cronExpression" value="0 0 1 3 * ?"/>
</bean>
<bean name="orgSyncJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="jobClass" value="pwc.taxtech.atms.common.schedule.OrgSyncJob"/>
<property name="durability" value="true"/>
<property name="requestsRecovery" value="false"/>
<property name="description" value="机构信息同步"/>
</bean>
<!-- 每月1日执行一次-->
<bean id="orgSyncJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="orgSyncJob"/>
<property name="cronExpression" value="0 0 0 1 * ?"/>
</bean>
<!-- 分布式事务配置 end -->
</beans>
\ No newline at end of file
......@@ -18,6 +18,7 @@
<intercept-url pattern="/api/v1/cache/getallcache" access="permitAll" />
<intercept-url pattern="/api/v1/user/login" access="permitAll" />
<intercept-url pattern="/api/v1/approval/**" access="permitAll" />
<intercept-url pattern="/ebs/api/v1/dd/**" access="permitAll" />
<intercept-url pattern="/api/**" access="authenticated" />
<intercept-url pattern="/**" access="permitAll" />
<headers>
......
......@@ -53,3 +53,6 @@ get_user_info_url=${get_user_info_url}
app_id=${app_id}
app_key=${app_key}
cookie.maxAgeSeconds=${cookie.maxAgeSeconds}
api_white_list=${api_white_list}
org_sync_url=${org_sync_url}
org_sync_token=${org_sync_token}
\ No newline at end of file
......@@ -51,3 +51,6 @@ get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/
app_id=2500
app_key=983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds=86400
api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
......@@ -53,4 +53,7 @@ check_ticket=true
get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500
app_key=983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds=18000
\ No newline at end of file
cookie.maxAgeSeconds=18000
api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
\ No newline at end of file
This diff is collapsed.
......@@ -17,6 +17,8 @@ import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.NationalEconomicIndustryEnum;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dto.organization.DDSyncOrgInfo;
import pwc.taxtech.atms.dto.organization.OrgSyncData;
import pwc.taxtech.atms.entity.*;
import javax.annotation.Resource;
......@@ -397,12 +399,43 @@ public class DataInitTest extends CommonIT {
@Test
public void syncOrg(){
List<String> taxPayNums= organizationMapper.selectByExample(new OrganizationExample()).stream().map(Organization::getTaxPayerNumber).collect(Collectors.toList());
/**
* 1、taxPayNums http 滴滴oa接口同步机构的信息
* 2、逐条update,记录更新失败或未更新上的taxPayNum
* 3、失败的再次处理
*/
String input = "";
try {
File targetFile = new File("src/main/resources/orgImport/ddOrgJson.json");
input = FileUtils.readFileToString(targetFile, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(input,DDSyncOrgInfo.class);
List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
orgSyncDatas.forEach(osd -> {
OrganizationExample example = new OrganizationExample();
example.createCriteria().andNameEqualTo(osd.getNameCN());
Organization o = new Organization();
o.setClientCode(osd.getCode());
o.setCode(osd.getCode());
o.setEnterpriseAccountCode(String.valueOf(osd.getSobId()));
o.setEnterpriseAccountName(osd.getSobName());
o.setCurrencyCode(osd.getCurrencyCode());
o.setLegalEntity(osd.getLegalEntity());
o.setLegalPersonName(osd.getLegalRepresentative());
o.setAddress(osd.getAddress());
o.setCreateTime(osd.getGmtCreate());
o.setUpdateTime(osd.getGmtModified());
o.setPsCode(osd.getPsCode());
RegionExample regionExample = new RegionExample();
regionExample.createCriteria().andShortNameEqualTo(osd.getCompanyLocation());
List<Region> regions = regionMapper.selectByExample(regionExample);
if (regions.size() > 0) {
o.setRegionId(regions.get(0).getId());
}
organizationMapper.updateByExampleSelective(o, example);
});
}
private void setProperty(Object obj, String propertyName, Object value) {
......
......@@ -482,8 +482,6 @@ public class Organization extends BaseEntity implements Serializable {
*/
private Boolean engageNationalProhibitIndustry;
private String enterpriseAccountCode;
/**
* Database Column Remarks:
* 注销时间。
......@@ -495,6 +493,59 @@ public class Organization extends BaseEntity implements Serializable {
*/
private Date logoutTime;
/**
* Database Column Remarks:
* 账套ID(DD)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.enterprise_account_code
*
* @mbg.generated
*/
private String enterpriseAccountCode;
/**
* Database Column Remarks:
* 账套名称(DD)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.enterprise_account_name
*
* @mbg.generated
*/
private String enterpriseAccountName;
/**
* Database Column Remarks:
* 本位币币种(DD)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.currency_code
*
* @mbg.generated
*/
private String currencyCode;
/**
* Database Column Remarks:
* 法人主体
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.legal_entity
*
* @mbg.generated
*/
private String legalEntity;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.ps_code
*
* @mbg.generated
*/
private String psCode;
private Area area;
private BusinessUnit businessUnit;
......@@ -795,30 +846,6 @@ public class Organization extends BaseEntity implements Serializable {
this.pLevel = pLevel;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.p_level
*
* @return the value of organization.p_level
*
* @mbg.generated
*/
public Integer getPLevel() {
return pLevel;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.p_level
*
* @param pLevel the value for organization.p_level
*
* @mbg.generated
*/
public void setPLevel(Integer pLevel) {
this.pLevel = pLevel;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.create_time
......@@ -1755,6 +1782,101 @@ public class Organization extends BaseEntity implements Serializable {
this.enterpriseAccountCode = enterpriseAccountCode == null ? null : enterpriseAccountCode.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.enterprise_account_name
*
* @return the value of organization.enterprise_account_name
*
* @mbg.generated
*/
public String getEnterpriseAccountName() {
return enterpriseAccountName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.enterprise_account_name
*
* @param enterpriseAccountName the value for organization.enterprise_account_name
*
* @mbg.generated
*/
public void setEnterpriseAccountName(String enterpriseAccountName) {
this.enterpriseAccountName = enterpriseAccountName == null ? null : enterpriseAccountName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.currency_code
*
* @return the value of organization.currency_code
*
* @mbg.generated
*/
public String getCurrencyCode() {
return currencyCode;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.currency_code
*
* @param currencyCode the value for organization.currency_code
*
* @mbg.generated
*/
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode == null ? null : currencyCode.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.legal_entity
*
* @return the value of organization.legal_entity
*
* @mbg.generated
*/
public String getLegalEntity() {
return legalEntity;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.legal_entity
*
* @param legalEntity the value for organization.legal_entity
*
* @mbg.generated
*/
public void setLegalEntity(String legalEntity) {
this.legalEntity = legalEntity == null ? null : legalEntity.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.ps_code
*
* @return the value of organization.ps_code
*
* @mbg.generated
*/
public String getPsCode() {
return psCode;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.ps_code
*
* @param psCode the value for organization.ps_code
*
* @mbg.generated
*/
public void setPsCode(String psCode) {
this.psCode = psCode == null ? null : psCode.trim();
}
public Area getArea() {
return area;
......@@ -1772,7 +1894,6 @@ public class Organization extends BaseEntity implements Serializable {
this.businessUnit = businessUnit;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization
......@@ -1836,6 +1957,10 @@ public class Organization extends BaseEntity implements Serializable {
sb.append(", engageNationalProhibitIndustry=").append(engageNationalProhibitIndustry);
sb.append(", logoutTime=").append(logoutTime);
sb.append(", enterpriseAccountCode=").append(enterpriseAccountCode);
sb.append(", enterpriseAccountName=").append(enterpriseAccountName);
sb.append(", currencyCode=").append(currencyCode);
sb.append(", legalEntity=").append(legalEntity);
sb.append(", psCode=").append(psCode);
sb.append("]");
return sb.toString();
}
......
......@@ -57,6 +57,10 @@
<result column="engage_national_prohibit_industry" jdbcType="BIT" property="engageNationalProhibitIndustry" />
<result column="logout_time" jdbcType="TIMESTAMP" property="logoutTime" />
<result column="enterprise_account_code" jdbcType="VARCHAR" property="enterpriseAccountCode" />
<result column="enterprise_account_name" jdbcType="VARCHAR" property="enterpriseAccountName" />
<result column="currency_code" jdbcType="VARCHAR" property="currencyCode" />
<result column="legal_entity" jdbcType="VARCHAR" property="legalEntity" />
<result column="ps_code" jdbcType="VARCHAR" property="psCode" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -138,7 +142,8 @@
legal_code, vehicleroutinglocation, business_scope, architecture_type, num_of_branches,
api_update_flag, effec_time_of_general_taxpayers, registration_location_en, paid_in_capital,
general_tax_payer_effective_time, oversea, reg_status, national_economic_industry,
engage_national_prohibit_industry, logout_time, enterprise_account_code
engage_national_prohibit_industry, logout_time, enterprise_account_code, enterprise_account_name,
currency_code, legal_entity, ps_code
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultMap="BaseResultMap">
<!--
......@@ -209,7 +214,9 @@
registration_location_en, paid_in_capital,
general_tax_payer_effective_time, oversea, reg_status,
national_economic_industry, engage_national_prohibit_industry,
logout_time, enterprise_account_code)
logout_time, enterprise_account_code, enterprise_account_name,
currency_code, legal_entity, ps_code
)
values (#{id,jdbcType=VARCHAR}, #{clientCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{code,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{taxPayerNumber,jdbcType=VARCHAR},
#{regionId,jdbcType=VARCHAR}, #{structureId,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR},
......@@ -228,7 +235,9 @@
#{registrationLocationEn,jdbcType=VARCHAR}, #{paidInCapital,jdbcType=VARCHAR},
#{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP}, #{oversea,jdbcType=BIT}, #{regStatus,jdbcType=VARCHAR},
#{nationalEconomicIndustry,jdbcType=VARCHAR}, #{engageNationalProhibitIndustry,jdbcType=BIT},
#{logoutTime,jdbcType=TIMESTAMP}, #{enterpriseAccountCode,jdbcType=VARCHAR})
#{logoutTime,jdbcType=TIMESTAMP}, #{enterpriseAccountCode,jdbcType=VARCHAR}, #{enterpriseAccountName,jdbcType=VARCHAR},
#{currencyCode,jdbcType=VARCHAR}, #{legalEntity,jdbcType=VARCHAR}, #{psCode,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.Organization">
<!--
......@@ -390,6 +399,18 @@
<if test="enterpriseAccountCode != null">
enterprise_account_code,
</if>
<if test="enterpriseAccountName != null">
enterprise_account_name,
</if>
<if test="currencyCode != null">
currency_code,
</if>
<if test="legalEntity != null">
legal_entity,
</if>
<if test="psCode != null">
ps_code,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -545,6 +566,18 @@
<if test="enterpriseAccountCode != null">
#{enterpriseAccountCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseAccountName != null">
#{enterpriseAccountName,jdbcType=VARCHAR},
</if>
<if test="currencyCode != null">
#{currencyCode,jdbcType=VARCHAR},
</if>
<if test="legalEntity != null">
#{legalEntity,jdbcType=VARCHAR},
</if>
<if test="psCode != null">
#{psCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultType="java.lang.Long">
......@@ -717,6 +750,18 @@
<if test="record.enterpriseAccountCode != null">
enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR},
</if>
<if test="record.enterpriseAccountName != null">
enterprise_account_name = #{record.enterpriseAccountName,jdbcType=VARCHAR},
</if>
<if test="record.currencyCode != null">
currency_code = #{record.currencyCode,jdbcType=VARCHAR},
</if>
<if test="record.legalEntity != null">
legal_entity = #{record.legalEntity,jdbcType=VARCHAR},
</if>
<if test="record.psCode != null">
ps_code = #{record.psCode,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -778,7 +823,11 @@
national_economic_industry = #{record.nationalEconomicIndustry,jdbcType=VARCHAR},
engage_national_prohibit_industry = #{record.engageNationalProhibitIndustry,jdbcType=BIT},
logout_time = #{record.logoutTime,jdbcType=TIMESTAMP},
enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR}
enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR},
enterprise_account_name = #{record.enterpriseAccountName,jdbcType=VARCHAR},
currency_code = #{record.currencyCode,jdbcType=VARCHAR},
legal_entity = #{record.legalEntity,jdbcType=VARCHAR},
ps_code = #{record.psCode,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -940,6 +989,18 @@
<if test="enterpriseAccountCode != null">
enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseAccountName != null">
enterprise_account_name = #{enterpriseAccountName,jdbcType=VARCHAR},
</if>
<if test="currencyCode != null">
currency_code = #{currencyCode,jdbcType=VARCHAR},
</if>
<if test="legalEntity != null">
legal_entity = #{legalEntity,jdbcType=VARCHAR},
</if>
<if test="psCode != null">
ps_code = #{psCode,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
......@@ -998,7 +1059,11 @@
national_economic_industry = #{nationalEconomicIndustry,jdbcType=VARCHAR},
engage_national_prohibit_industry = #{engageNationalProhibitIndustry,jdbcType=BIT},
logout_time = #{logoutTime,jdbcType=TIMESTAMP},
enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR}
enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR},
enterprise_account_name = #{enterpriseAccountName,jdbcType=VARCHAR},
currency_code = #{currencyCode,jdbcType=VARCHAR},
legal_entity = #{legalEntity,jdbcType=VARCHAR},
ps_code = #{psCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultMap="BaseResultMap">
......
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